Thank you for your interest in contributing! This guide covers the key contribution paths.
The eval suite is the canonical offline quality gate. It validates schema compliance, P.A.R.T contract structure, tool grant consistency, behavioral invariants, orchestration handoff discipline, drift checks, NOTES.md hygiene, archive behavior, and structural fingerprint coverage across all 13 agents — without invoking live agents.
cd evals
npm install
npm testAll checks must pass before any PR can be merged. The suite runs fully offline.
For a faster structural-only pass:
npm run test:structuralFor behavioral and orchestration regressions only:
npm run test:behavior-
Create the agent file at repo root:
<Name>.agent.mdor<Name>-subagent.agent.md. -
Follow P.A.R.T structure — every agent file must have exactly these top-level sections in order:
## Prompt— mission, scope, deterministic output contracts, Non-Negotiable Rules## Archive— memory policies, context compaction rules## Resources— file references loaded on-demand## Tools— allowed/disallowed tools with routing rules
See
docs/agent-engineering/PART-SPEC.mdfor the full specification. -
Create a JSON Schema contract in
schemas/<name>-output.schema.json. Schema files serve as documentation contracts and eval references. -
Add eval scenarios in
evals/scenarios/that cover:- At least one happy-path execution
ABSTAIN/NEEDS_INPUT/ failure classification behavior- Tool routing compliance if the agent uses external tools
-
Register the agent in governance files (see AGENTS.md §4 editing checklist):
- Add it to
governance/agent-grants.jsonwith its canonical agent/tool grants. - Add it to
governance/tool-grants.jsonwhen the agent's tool surface changes — the eval suite enforces consistency. - Update
governance/runtime-policy.jsonandgovernance/rename-allowlist.jsonwhere relevant (e.g. review routing/retry knobs or rename permissions). - Add it to
plans/project-context.md(agent roster table).
- Add it to
-
Update
README.md:- Add a row to the appropriate agent table (Primary Agents or Specialized Subagents).
- Update the agent count badge if you bump past 13.
-
Run the full eval suite and fix any failures before opening a PR.
- Read the current agent file carefully. Understand the Non-Negotiable Rules, clarification contract, and tool routing section before making changes.
- Run
cd evals && npm testbefore and after your edit to confirm no regressions. - If you change output contracts (status values, required fields, failure classifications), update the corresponding schema in
schemas/and any eval scenarios that assert those fields.model_unavailableis a first-class routing classification; PlanAuditor and AssumptionVerifier excludetransient, while ExecutabilityVerifier can use all five current values. - If you change tool grants in frontmatter, update
governance/agent-grants.jsonto match — the eval suite enforces consistency between the two.
Skills are reusable domain pattern snippets that Planner selects per phase and implementation agents load at execution time. They live in skills/patterns/*.md.
- Create
skills/patterns/<topic>.mdfollowing the style of existing patterns. - Register the new file in
skills/index.md. - Run
cd evals && npm test— Pass 5 validates that everyskills/patterns/file is registered in the index and every index entry resolves to a real file.
For project-wide orchestration audits, prefer skills/patterns/orchestration-audit-playbook.md as the audit-specific checklist. It complements the completeness, integration, and LLM behavior skills by focusing on traceability, schema/prompt/grant alignment, hidden-defect triage, validation gates, and phase-boundary memory hygiene.
The eval suite is the only verification gate (cd evals && npm test).
- Scenario fixtures live in
evals/scenarios/; add or edit the fixture that exercises the behavior, validated against the matching schema inschemas/. - Validator passes live in
evals/validate.mjs(structural/schema/P.A.R.T) and drift checks inevals/drift-checks.mjs. Add a pass only when an existing one cannot express the contract; keep new passes offline and network-free. - Run
cd evals && npm test(or the fastertest:structural/test:behavior) and confirm green before opening a PR. Seeevals/README.mdfor pass descriptions.
- Most knobs in
governance/are referenced by Orchestrator/Planner prompt text — re-read the consumers and update the prompt wording when knob semantics change (per AGENTS.md §4). - Keep grants consistent:
governance/agent-grants.jsonandgovernance/tool-grants.jsonare enforced against agent frontmatter by the eval suite. - Run
cd evals && npm testafter any governance edit to catch drift — changes here affect all agents.
Changes to files under plugins/controlflow-claude-code/ require their own validation in addition to the repository eval suite:
For ControlFlow for Claude Code (plugins/controlflow-claude-code/):
The Claude Code plugin is standalone and hand-maintained (it is intentionally NOT generated by the shared-source generator). It carries 3 skills and 0 subagents; there is no plugin-local artifact validator or test harness.
-
Run the repository eval suite — it covers the claude-code manifest parity (
evals/tests/plugin-manifest-parity.test.mjs) and the CLAUDE.md contract drift anchors (evals/tests/controlflow-contract-drift.test.mjs):cd evals && npm test
-
Run the lightweight local checks described in
plugins/controlflow-claude-code/USAGE.md(manifest JSON parse + skill frontmatter). -
If the
claudeCLI is installed, validate the manifest:cd plugins/controlflow-claude-code && claude plugin validate
Always run cd evals && npm test after plugin edits to catch cross-repo drift.
When editing .cursor/rules, ensure the following:
- Frontmatter is valid: Check that frontmatter starts with
---, has a closing---, and includes at least one ofalwaysApply,description, orglobs. - Line budget respected: Keep rules concise and within 500 lines.
- Canonical references: Point to canonical ControlFlow files (e.g.
.github/copilot-instructions.md,plans/project-context.md) instead of copying policy content. - Run structural validation: After editing, run
cd evals && npm testto ensure no project-wide structural contracts were accidentally broken.
- Shared source first: Edit
plugins/controlflow-shared-source/when changing workflow skills. - Sync: Run
plugins/controlflow-cursor/scripts/sync-to-dotcursor.ps1 -RepoRoot . -Force(shared source → plugin →.cursor/, strips Codexopenai.yaml). - Cursor overrides: Host-specific text lives in
plugins/controlflow-shared-source/host-overrides/cursor/. - Subagents: Edit
plugins/controlflow-cursor/agents/then runsync-to-dotcursor.ps1(orinstall-project.ps1for consumer repos). - Contracts: Update
evals/scenarios/cursor-plugin/*.jsonwhen adding or renaming skills/agents. - Do not add VS Code tool grants for Cursor-only surfaces.
- Run
cd evals && npm testbefore declaring done.
- Bug reports and feature requests: Open a GitHub Issue describing the problem or proposal clearly.
- Pull requests: Fork the repository, create a feature branch, and open a PR against
master.- Every PR must pass
cd evals && npm test. - Describe what you changed and why in the PR description.
- Reference any related Issues.
- Every PR must pass
- Architecture decisions: For architecture-significant changes, follow
docs/agent-engineering/ADR-PROCESS.md. - Breaking changes: Changes to shared governance files (
governance/,schemas/,.github/copilot-instructions.md) affect all agents — test thoroughly and call this out explicitly in the PR description.
Be respectful and constructive. This project follows the Contributor Covenant v2.1.