C3 AI Documentation Home

AI agent artifacts

The rule/, skill/, and prompt/ directories contain AI agent artifacts that participate in the standard package inheritance and remix mechanisms. Each directory uses a bundle-based structure where subdirectories group related files for a single artifact.

Understand what belongs in each folder

Rules (rule/)

Rules define behavioral guidelines and constraints for AI agents. Each rule is a directory bundle containing one or more markdown files.

Text
rule/
  code-review/
    RULE.md
    checklist.md
  security-audit/
    RULE.md

Skills (skill/)

Skills define reusable capabilities for AI agents, including documentation, reference material, and supporting scripts.

Text
skill/
  pdf-skill/
    SKILL.md
    FORMS.md
    REFERENCE.md
    scripts/
      fill_form.py
  data-analysis/
    SKILL.md
    examples/
      sample_query.sql

Prompts (prompt/)

Prompts define reusable prompt templates for AI agent interactions.

Text
prompt/
  summarize/
    PROMPT.md
  classify/
    PROMPT.md
    taxonomy.md

Inheritance and remix

These directories follow the same inheritance and remix semantics as all other package categories. A downstream package can:

  • Inherit artifacts from dependency packages automatically.
  • Override specific files by providing the same path in the downstream package.
  • Extend bundles by adding new files to an inherited artifact directory.

Example

Text
# Base package (platform-ai)
platform-ai/
  rule/
    code-review/
      RULE.md

# Application package (my-app depends on platform-ai)
my-app/
  rule/
    code-review/
      RULE.md        # Overrides base rules
      team-conventions.md   # Extends with team-specific content
    deploy-review/
      RULE.md        # New rule not in base

Structural rules

Path conventions

Text
/packageName/rule/bundleName/fileName.ext
/packageName/skill/bundleName/fileName.ext
/packageName/prompt/bundleName/fileName.ext

File formats

Any file format is supported within artifact bundles. Common formats include:

  • .md for rules, documentation, and prompt templates.
  • .py, .js for supporting scripts.
  • .json, .yaml for structured configuration.

Test artifacts

Test-only artifacts live under the test/ overlay:

Text
test/rule/test-review/RULE.md
test/skill/test-skill/SKILL.md
test/prompt/test-prompt/PROMPT.md

Runtime access

Access artifact contents using standard package file APIs:

JavaScript
// List all rule bundles
var files = C3.pkg().files(Pkg.FilesSpec.make({
  category: Pkg.Category.RULE
}));

// Read a specific skill file
var content = C3.pkg().content('/my-app/skill/pdf-skill/SKILL.md');

// Check if a path is a rule
var path = Pkg.Path.fromString('meta://my-app/rule/code-review/RULE.md');
path.isRule();  // true

How AI artifacts relate to other folders

  • Source folder (src/): AI artifacts may reference Types defined in src/. For example, a skill might document how to use a specific API type.
  • Resource folder (resource/): Use resource/ for static files that are not AI agent artifacts. Use rule/, skill/, prompt/ specifically for artifacts intended for AI agent consumption.
  • Seed folder (seed/): AI artifacts are not deployed to the database. They remain as package files, unlike seed data which is persisted.

See also

Was this page helpful?