Skip to content

Agent guide: create-projection in sections, fields and strictness for every format, renderer capabilities first - #216

Open
agorischek wants to merge 2 commits into
mainfrom
feat/agent-guide-topics
Open

agorischek wants to merge 2 commits into
mainfrom
feat/agent-guide-topics

Conversation

@agorischek

@agorischek agorischek commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 6adf245e5a4a0bfc15432dfd718358f09c8ce226

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Unit tests: the overview is under a quarter of the guide; sections print by name, by #link or heading, several at once; --all prints it whole; an unknown section lists them all; short prompts and ci (one section) print whole; renderer capabilities come before the build commands.
↑ Format notes are generated from the JSON schemas and tested to name api/v0's closed contract and its required declaration, term and visibility; every schema and vocabulary has a note; a conditionally required field names the kinds that require it (database type on column).
↓ Whether agents follow the overview's instruction to read sections hasn't been observed.

Items 11 and 12 of a downstream user's (Superego) feedback, as decided for v0.3.1.

Item 11: projections help agents create-projection in topics. It printed 48 KB (56 KB generated now).

  • By default it prints the overview: the task, the parts of a projection and the tools, 6.7 KB in all. A table of sections follows, each with its first sentence and how to print it.
  • projections help agents create-projection extractor custom-renderer prints those sections; a name may also be a #link or the heading.
  • --all prints the whole guide.

The overview tells the agent to read each section before the step that needs it, and every section its task reaches before building. A prompt splits only when it's over 16 KiB with at least four ### sections; today only create-projection does. The generated docs page and projections help authoring (the skill) stay whole.

Renderer capabilities near the top. The Custom renderer section now opens, after its introduction, with Declare what it does first: rendererConfig's comparisonModes (diff first) and capabilities, including when to declare drawsRelationships: false. Before, these were buried in the rules lists further down.

Item 12: fields and strictness for every built-in format. Each schema in the guide's list, and each vocabulary, gets a note generated from its JSON schema in packages/schemas, so it can't drift: the data fields the engine checks, on entities and on relationships, with their types, which are required, and which objects are closed. Each note links its schema reference. For example, api/v0:

Fields and strictness: the engine checks, on entities, data.signature (string, required on export, type, member, function, class, interface, method, property and enum) and data.contract (contract), a closed object: no fields beyond its schema's, and declaration, term and visibility required; other data fields are open JSON (…/docs/reference/schemas/api.md).

A sentence before the list says an unknown field on an entity or relationship is an error, and that extensions go in data.

Tests: cargo test -p projections-cli --lib docs:: skill::, cargo test -p projections-cli --test authoring.

… name; every format's fields and strictness; renderer capabilities first

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Field merging discards kind-specific requiredness, causing the generated guide to incorrectly describe fields such as renderer and database type as required across kinds.

1 open issue
What changed in this PR

This PR makes Projections’ agent authoring guide easier to navigate while keeping the full guide available, and adds schema-derived format guidance.

Changes:

  • Splits long agent prompts into an overview and selectable sections, with --all for the complete prompt.
  • Generates field-type, requiredness, and closed-object notes for built-in schemas and vocabularies.
  • Moves renderer capability guidance ahead of build commands and adds focused unit tests.
File Description
packages/​cli/​templates/​SKILL.md Adds strictness guidance and moves capability declarations earlier.
packages/​cli/​src/​skill/​formats.rs Generates schema-derived format notes and tests them.
packages/​cli/​src/​skill.rs Includes format notes in the authoring guide.
packages/​cli/​src/​main.rs Adds section selection and the --all help option.
packages/​cli/​src/​docs.rs Implements prompt splitting, section lookup, summaries, and tests.
docs/​reference/​cli.md Documents the new --all option.
docs/​agents/​create-projection.md Updates the generated guide with format notes and capability guidance.

Review effort: Balanced

Comment thread packages/cli/src/skill/formats.rs Resolved
…uire it

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants