Agent Integration
qp is built to make agent-assisted development predictable: clear task contracts, scoped context, structured outputs, and generated repo guidance.
Generate Agent-Friendly Repo Docs
Bootstrap docs from your current qp.yaml:
qp init --docsThis creates:
HUMANS.mdAGENTS.mdCLAUDE.md
Each file includes task/guard/scopes summaries and conventions aligned to your config.
The One-Command Contract
Keep one canonical verification command in agent docs (for example qp check or qp guard ci).
Why it matters:
- agents always know how to verify before handoff
- humans can reproduce exactly what automation ran
- release quality becomes consistent across contributors
Scope-First Agent Workflow
A robust loop:
qp diff-plan
qp agent-brief --diff --max-tokens 2500
qp context --agent --task check --max-tokens 3000Then ask the agent to:
- make bounded edits in scoped files
- run the one-command verification
- summarize results and follow-ups
Knowledge Accrual
Enable explicit config-learning behavior:
agent:
accrue_knowledge: trueWith accrual enabled, generated agent docs instruct agents to propose structured updates to:
tasks/ params / scopes- codemap package entries
- conventions and glossary terms
This turns qp.yaml into a living operational knowledge base.
Practical Prompting Pattern
When requesting agent changes, provide:
- task goal
- allowed scope
- required verification command
- expected output format (diff summary, test result, follow-ups)
Example:
Use qp scope backend as boundary. Fix flaky retry behavior in runner cache path.
Run qp check --json before finishing.
Summarize changed files, behavior change, and remaining risks.
Structured Output For Agent Tooling
Use:
--jsonfor final state extraction--eventsfor lifecycle streamqp repair --brieffor failure handoffqp agent-brieffor concise context transfer
These outputs reduce prompt ambiguity and brittle log scraping.
Next Step
For creating the initial qp.yaml and generated repo scaffolding, continue to Init and Scaffolding.