@event4u/agent-config 7.5.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +8 -1
- package/AGENTS.md +9 -9
- package/CHANGELOG.md +317 -260
- package/README.md +35 -5
- package/dist/agent-src/commands/analytics/prune.md +1 -1
- package/dist/agent-src/commands/analytics/show.md +1 -1
- package/dist/agent-src/commands/analyze/decision.md +2 -2
- package/dist/agent-src/commands/analyze/incident.md +2 -2
- package/dist/agent-src/commands/analyze/near-miss.md +2 -2
- package/dist/agent-src/commands/analyze/postmortem.md +2 -2
- package/dist/agent-src/commands/analyze/premortem.md +2 -2
- package/dist/agent-src/commands/cost-report.md +25 -0
- package/dist/agent-src/commands/evals/analyze.json +30 -0
- package/dist/agent-src/commands/evals/mission-upgrade.json +30 -0
- package/dist/agent-src/commands/implement-ticket.md +1 -1
- package/dist/agent-src/commands/knowledge/forget.md +1 -1
- package/dist/agent-src/commands/knowledge/ingest.md +1 -1
- package/dist/agent-src/commands/knowledge/list.md +1 -1
- package/dist/agent-src/commands/memory/load.md +12 -11
- package/dist/agent-src/commands/memory/promote.md +30 -0
- package/dist/agent-src/commands/memory/propose.md +16 -2
- package/dist/agent-src/commands/mission/upgrade.md +1 -1
- package/dist/agent-src/commands/module/explore.md +11 -7
- package/dist/agent-src/commands/optimize-project.md +243 -0
- package/dist/agent-src/commands/optimize.md +5 -0
- package/dist/agent-src/commands/pr/create.md +37 -8
- package/dist/agent-src/commands/prediction-pool.md +2 -2
- package/dist/agent-src/commands/profile/activate.md +3 -3
- package/dist/agent-src/commands/profile/deactivate.md +2 -2
- package/dist/agent-src/commands/profile/show.md +3 -3
- package/dist/agent-src/commands/research/deep.md +5 -0
- package/dist/agent-src/commands/research/report.md +2 -1
- package/dist/agent-src/commands/roadmap/create.md +88 -10
- package/dist/agent-src/commands/roadmap/materialize.md +1 -1
- package/dist/agent-src/commands/roadmap/process-full.md +15 -2
- package/dist/agent-src/commands/roadmap/process-phase.md +18 -6
- package/dist/agent-src/commands/roadmap/process-step.md +4 -0
- package/dist/agent-src/commands/roadmap.md +1 -1
- package/dist/agent-src/commands/security-audit-config.md +1 -1
- package/dist/agent-src/commands/sync-agent-settings.md +1 -1
- package/dist/agent-src/commands/sync-gitignore/fix.md +42 -6
- package/dist/agent-src/commands/team-knowledge/bootstrap.md +106 -0
- package/dist/agent-src/commands/team-knowledge/consolidate.md +105 -0
- package/dist/agent-src/commands/team-knowledge.md +64 -0
- package/dist/agent-src/contexts/authority/commit-mechanics.md +8 -0
- package/dist/agent-src/contexts/authority/destructive-mechanics.md +11 -0
- package/dist/agent-src/contexts/authority/scope-mechanics.md +25 -0
- package/dist/agent-src/contexts/communication/rules-auto/reply-close-mechanics.md +43 -0
- package/dist/agent-src/contexts/contracts/agents-md-anatomy.md +1 -1
- package/dist/agent-src/contexts/contracts/artifact-engagement-flow.md +2 -2
- package/dist/agent-src/contexts/contracts/frugality-charter.md +1 -0
- package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +14 -4
- package/dist/agent-src/contexts/execution/autonomy-mechanics.md +11 -0
- package/dist/agent-src/contexts/execution/orchestration-telemetry.md +32 -8
- package/dist/agent-src/contexts/execution/roadmap-execution-contract.md +107 -0
- package/dist/agent-src/contexts/execution/roadmap-process-loop.md +71 -15
- package/dist/agent-src/contexts/execution/subagent-steering.md +41 -1
- package/dist/agent-src/contexts/override-system.md +1 -1
- package/dist/agent-src/personas/brand-strategist.md +0 -1
- package/dist/agent-src/personas/data-integrity.md +66 -0
- package/dist/agent-src/personas/design-director.md +0 -1
- package/dist/agent-src/personas/performance-engineer.md +66 -0
- package/dist/agent-src/personas/production-validator.md +73 -0
- package/dist/agent-src/rules/agent-authority.md +3 -4
- package/dist/agent-src/rules/analysis-skill-routing.md +3 -5
- package/dist/agent-src/rules/architecture.md +2 -4
- package/dist/agent-src/rules/artifact-drafting-protocol.md +35 -6
- package/dist/agent-src/rules/artifact-engagement-recording.md +2 -4
- package/dist/agent-src/rules/ask-when-uncertain.md +10 -14
- package/dist/agent-src/rules/augment-edit-discipline.md +3 -5
- package/dist/agent-src/rules/autonomous-execution.md +3 -5
- package/dist/agent-src/rules/brand-consistency.md +3 -5
- package/dist/agent-src/rules/brand-source-of-truth.md +3 -5
- package/dist/agent-src/rules/cli-output-handling.md +4 -6
- package/dist/agent-src/rules/command-suggestion-policy.md +3 -5
- package/dist/agent-src/rules/commit-conventions.md +3 -5
- package/dist/agent-src/rules/commit-policy.md +18 -10
- package/dist/agent-src/rules/content-quoting-floor.md +88 -0
- package/dist/agent-src/rules/context-hygiene.md +3 -5
- package/dist/agent-src/rules/copilot-routing.md +4 -6
- package/dist/agent-src/rules/decision-revisit-gate.md +120 -0
- package/dist/agent-src/rules/delegation-policy.md +10 -6
- package/dist/agent-src/rules/design-fidelity.md +3 -5
- package/dist/agent-src/rules/devcontainer-routing.md +4 -6
- package/dist/agent-src/rules/direct-answers.md +13 -17
- package/dist/agent-src/rules/docker-commands.md +3 -5
- package/dist/agent-src/rules/domain-adoption-policy.md +3 -5
- package/dist/agent-src/rules/domain-safety-disclaimer.md +3 -5
- package/dist/agent-src/rules/domain-safety-pii.md +3 -5
- package/dist/agent-src/rules/domain-safety-retention.md +3 -5
- package/dist/agent-src/rules/downstream-changes.md +3 -4
- package/dist/agent-src/rules/engineering-safety-floor.md +3 -5
- package/dist/agent-src/rules/external-reference-deep-dive.md +3 -5
- package/dist/agent-src/rules/fast-path-marker-visibility.md +3 -5
- package/dist/agent-src/rules/finance-safety-floor.md +3 -6
- package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +3 -5
- package/dist/agent-src/rules/git-history-discipline.md +3 -5
- package/dist/agent-src/rules/guidelines.md +2 -4
- package/dist/agent-src/rules/icon-consistency.md +3 -5
- package/dist/agent-src/rules/image-likeness-and-rights.md +3 -5
- package/dist/agent-src/rules/improve-before-implement.md +5 -5
- package/dist/agent-src/rules/invite-challenge.md +3 -5
- package/dist/agent-src/rules/language-and-tone.md +13 -15
- package/dist/agent-src/rules/laravel-routing.md +3 -5
- package/dist/agent-src/rules/laravel-translations.md +3 -5
- package/dist/agent-src/rules/legal-safety-floor.md +3 -5
- package/dist/agent-src/rules/lethal-trifecta-guard.md +3 -5
- package/dist/agent-src/rules/linked-projects-onboarding-gate.md +4 -7
- package/dist/agent-src/rules/low-impact-corpus-privacy-floor.md +3 -5
- package/dist/agent-src/rules/markdown-safe-codeblocks.md +2 -4
- package/dist/agent-src/rules/media-governance-routing.md +3 -5
- package/dist/agent-src/rules/media-sync-ground-truth.md +3 -5
- package/dist/agent-src/rules/minimal-safe-diff.md +5 -5
- package/dist/agent-src/rules/missing-tool-handling.md +3 -5
- package/dist/agent-src/rules/model-recommendation.md +4 -6
- package/dist/agent-src/rules/no-attribution-footers.md +3 -5
- package/dist/agent-src/rules/no-cheap-questions.md +5 -8
- package/dist/agent-src/rules/no-decorative-emojis-in-git-surfaces.md +3 -6
- package/dist/agent-src/rules/no-pr-progress-comments.md +3 -6
- package/dist/agent-src/rules/no-roadmap-references.md +3 -5
- package/dist/agent-src/rules/non-destructive-by-default.md +11 -13
- package/dist/agent-src/rules/notes-first-reasoning.md +3 -5
- package/dist/agent-src/rules/onboarding-gate.md +4 -6
- package/dist/agent-src/rules/output-discipline.md +3 -5
- package/dist/agent-src/rules/package-ci-checks.md +3 -5
- package/dist/agent-src/rules/persona-governance.md +2 -4
- package/dist/agent-src/rules/php-coding.md +3 -5
- package/dist/agent-src/rules/preservation-guard.md +2 -4
- package/dist/agent-src/rules/provider-lifecycle-discipline.md +3 -5
- package/dist/agent-src/rules/reviewer-awareness.md +5 -6
- package/dist/agent-src/rules/roadmap-ci-steps-policy.md +3 -5
- package/dist/agent-src/rules/roadmap-progress-sync.md +5 -5
- package/dist/agent-src/rules/role-mode-adherence.md +2 -4
- package/dist/agent-src/rules/rule-type-governance.md +3 -5
- package/dist/agent-src/rules/runtime-safety.md +2 -4
- package/dist/agent-src/rules/scope-control.md +10 -11
- package/dist/agent-src/rules/security-sensitive-stop.md +4 -5
- package/dist/agent-src/rules/size-enforcement.md +2 -4
- package/dist/agent-src/rules/skill-improvement-trigger.md +3 -5
- package/dist/agent-src/rules/skill-quality.md +3 -5
- package/dist/agent-src/rules/slash-command-routing-policy.md +3 -5
- package/dist/agent-src/rules/source-confidentiality.md +3 -5
- package/dist/agent-src/rules/source-discovery-gate.md +3 -5
- package/dist/agent-src/rules/source-of-truth.md +3 -5
- package/dist/agent-src/rules/strategy-safety-floor.md +3 -5
- package/dist/agent-src/rules/symfony-routing.md +4 -6
- package/dist/agent-src/rules/telegraph-speak.md +4 -5
- package/dist/agent-src/rules/think-before-action.md +7 -4
- package/dist/agent-src/rules/token-budget-discipline.md +29 -5
- package/dist/agent-src/rules/token-efficiency.md +3 -5
- package/dist/agent-src/rules/token-optimizer-maintenance.md +3 -5
- package/dist/agent-src/rules/tool-safety.md +2 -4
- package/dist/agent-src/rules/ui-audit-gate.md +3 -6
- package/dist/agent-src/rules/untrusted-input-defense.md +3 -5
- package/dist/agent-src/rules/upstream-proposal.md +4 -6
- package/dist/agent-src/rules/user-interaction.md +7 -5
- package/dist/agent-src/rules/user-interrupt-priority.md +17 -8
- package/dist/agent-src/rules/verify-before-complete.md +12 -22
- package/dist/agent-src/scripts/archive_completed_roadmaps.ts +3 -3
- package/dist/agent-src/scripts/update_roadmap_progress.ts +197 -7
- package/dist/agent-src/skills/adr-create/SKILL.md +48 -42
- package/dist/agent-src/skills/agent-docs-writing/SKILL.md +18 -0
- package/dist/agent-src/skills/agent-security-review/SKILL.md +1 -1
- package/dist/agent-src/skills/ai-council/SKILL.md +14 -1
- package/dist/agent-src/skills/blameless-post-mortem/SKILL.md +0 -3
- package/dist/agent-src/skills/brand/SKILL.md +1 -1
- package/dist/agent-src/skills/brand-identity/SKILL.md +3 -3
- package/dist/agent-src/skills/brand-strategy/SKILL.md +1 -1
- package/dist/agent-src/skills/brand-to-tokens/SKILL.md +3 -3
- package/dist/agent-src/skills/canvas-design/SKILL.md +6 -0
- package/dist/agent-src/skills/check-refs/SKILL.md +7 -4
- package/dist/agent-src/skills/code-review/SKILL.md +1 -0
- package/dist/agent-src/skills/complexity-first-planning/SKILL.md +6 -5
- package/dist/agent-src/skills/condense-memory/SKILL.md +11 -11
- package/dist/agent-src/skills/context-document/SKILL.md +17 -0
- package/dist/agent-src/skills/corpus-grounding/SKILL.md +3 -3
- package/dist/agent-src/skills/decision-record/SKILL.md +6 -0
- package/dist/agent-src/skills/decision-review/SKILL.md +5 -3
- package/dist/agent-src/skills/deep-reading-analyst/SKILL.md +6 -1
- package/dist/agent-src/skills/design-intelligence/SKILL.md +5 -2
- package/dist/agent-src/skills/design-intelligence/references/design-languages.md +1 -1
- package/dist/agent-src/skills/design-tokens/SKILL.md +10 -4
- package/dist/agent-src/skills/design-variations/SKILL.md +127 -0
- package/dist/agent-src/skills/design-variations/evals/triggers.json +17 -0
- package/dist/agent-src/skills/emit-tickets/SKILL.md +4 -4
- package/dist/agent-src/skills/fe-design/SKILL.md +20 -0
- package/dist/agent-src/skills/html-deck/SKILL.md +123 -0
- package/dist/agent-src/skills/html-deck/evals/triggers.json +17 -0
- package/dist/agent-src/skills/html-deck/templates/deck-shell.html +77 -0
- package/dist/agent-src/skills/judge-code-quality/SKILL.md +1 -0
- package/dist/agent-src/skills/laravel/SKILL.md +0 -1
- package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +46 -0
- package/dist/agent-src/skills/lint-skills/SKILL.md +6 -6
- package/dist/agent-src/skills/md-language-check/SKILL.md +3 -3
- package/dist/agent-src/skills/memory-consolidation/SKILL.md +66 -1
- package/dist/agent-src/skills/migration-architect/SKILL.md +1 -0
- package/dist/agent-src/skills/module-detect-on-the-fly/SKILL.md +2 -2
- package/dist/agent-src/skills/performance-analysis/SKILL.md +2 -0
- package/dist/agent-src/skills/prediction-pool-optimizer/SKILL.md +4 -4
- package/dist/agent-src/skills/premortem/SKILL.md +0 -3
- package/dist/agent-src/skills/project-analysis-core/SKILL.md +16 -0
- package/dist/agent-src/skills/reasoning-orchestrator/SKILL.md +3 -1
- package/dist/agent-src/skills/release-comms/SKILL.md +46 -45
- package/dist/agent-src/skills/roadmap-management/SKILL.md +21 -0
- package/dist/agent-src/skills/roadmap-writing/SKILL.md +32 -2
- package/dist/agent-src/skills/root-cause-frameworks/SKILL.md +0 -3
- package/dist/agent-src/skills/security-audit/SKILL.md +1 -0
- package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +4 -0
- package/dist/agent-src/skills/source-discovery/SKILL.md +22 -3
- package/dist/agent-src/skills/subagent-orchestration/SKILL.md +33 -14
- package/dist/agent-src/skills/subagent-orchestration/prompts/README.md +11 -0
- package/dist/agent-src/skills/subagent-orchestration/prompts/do-in-steps.md +8 -0
- package/dist/agent-src/skills/systematic-debugging/SKILL.md +29 -0
- package/dist/agent-src/skills/threat-modeling/SKILL.md +2 -2
- package/dist/agent-src/skills/typography-system/SKILL.md +2 -2
- package/dist/agent-src/skills/verify-completion-evidence/SKILL.md +2 -0
- package/dist/agent-src/skills/wireframe/SKILL.md +118 -0
- package/dist/agent-src/skills/wireframe/evals/triggers.json +17 -0
- package/dist/agent-src/templates/agent-settings.md +22 -1
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/command.md +2 -2
- package/dist/agent-src/templates/contexts/knowledge-pages.md +116 -0
- package/dist/agent-src/templates/hooks/pre-commit-frontmatter +1 -1
- package/dist/agent-src/templates/roadmaps.md +70 -2
- package/dist/agent-src/templates/rule.md +1 -1
- package/dist/agent-src/templates/scripts/README.md +3 -3
- package/dist/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +109 -0
- package/dist/agent-src/templates/tickets.md +8 -8
- package/dist/cli/commands/recordTriggerEval.test.js +1 -1
- package/dist/cli/commands/recordTriggerEval.test.js.map +1 -1
- package/dist/cli/initRouting.js +4 -2
- package/dist/cli/initRouting.js.map +1 -1
- package/dist/cli/registry.js +1 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +718 -240
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +8 -8
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +43 -28
- package/dist/discovery/trust-report.md +12 -11
- package/dist/discovery/workspaces.json +29 -18
- package/dist/install/preflight.js +173 -0
- package/dist/install/preflight.js.map +1 -0
- package/dist/mcp/registry-manifest.json +4 -4
- package/dist/router.json +1 -1
- package/dist/server/routes/settings.js +4 -0
- package/dist/server/routes/settings.js.map +1 -1
- package/dist/server/schemas/settings.js +3 -1
- package/dist/server/schemas/settings.js.map +1 -1
- package/docs/CLAIMS.md +108 -0
- package/docs/MIGRATION.md +3 -3
- package/docs/architecture.md +5 -5
- package/docs/archive/CHANGELOG-pre-8.0.0.md +301 -0
- package/docs/benchmark.md +133 -2
- package/docs/benchmark.pinned.yml +31 -0
- package/docs/capability-matrix.md +1 -0
- package/docs/catalog.md +70 -60
- package/docs/command-flows.md +15 -3
- package/docs/comparison.yaml +35 -0
- package/docs/contracts/agents-layout.md +148 -0
- package/docs/contracts/brand-token-consumption.md +5 -0
- package/docs/contracts/capability-boundary.md +5 -0
- package/docs/contracts/command-category-governance.md +5 -0
- package/docs/contracts/command-clusters.md +1 -0
- package/docs/contracts/command-surface-tiers.md +1 -1
- package/docs/contracts/conformance.md +84 -0
- package/docs/contracts/creative-pack-boundary.md +5 -0
- package/docs/contracts/discovery-manifest.schema.json +5 -4
- package/docs/contracts/file-ownership-matrix.json +4605 -985
- package/docs/contracts/governance-enforcement-projection.md +5 -0
- package/docs/contracts/gui-wizard.md +1 -1
- package/docs/contracts/hook-architecture-v1.md +2 -2
- package/docs/contracts/implement-ticket-flow.md +1 -1
- package/docs/contracts/kernel-membership.md +13 -0
- package/docs/contracts/mcp-tool-inventory.md +23 -23
- package/docs/contracts/no-runtime-boundary.md +6 -1
- package/docs/contracts/review-lens-schema.md +5 -0
- package/docs/contracts/rule-router.md +102 -8
- package/docs/contracts/skill-bundled-assets.md +1 -1
- package/docs/contracts/skill-dry-run.md +1 -1
- package/docs/contracts/subagent-boundary.md +5 -0
- package/docs/contracts/ticket-bundle-format.md +9 -4
- package/docs/contracts/tier-3-contrib-plugin.md +2 -2
- package/docs/contracts/write-engine.md +3 -0
- package/docs/customization.md +87 -15
- package/docs/decisions/ADR-107-legal-domain-pack-adoption.md +1 -1
- package/docs/decisions/ADR-109-subagent-v1-contract.md +246 -0
- package/docs/decisions/ADR-110-discipline-profile-resolution-locus.md +105 -0
- package/docs/decisions/INDEX.md +2 -0
- package/docs/distribution/awesome-list-submission.md +46 -0
- package/docs/distribution/launch-story-draft.md +58 -0
- package/docs/end-to-end-walkthroughs.md +2 -2
- package/docs/getting-started.md +2 -2
- package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +24 -0
- package/docs/guidelines/agent-infra/corpus-grounding-authoring.md +1 -1
- package/docs/guidelines/agent-infra/linked-projects-onboarding-gate.md +2 -2
- package/docs/guidelines/agent-infra/missing-tool-handling.md +3 -3
- package/docs/guidelines/agent-infra/verify-before-complete-demos.md +2 -2
- package/docs/guidelines/augment-portability-patterns.md +1 -1
- package/docs/guidelines/code-clarity.md +19 -0
- package/docs/guidelines/design-antipatterns-triggers.json +2 -1
- package/docs/guidelines/design-antipatterns.md +10 -1
- package/docs/guidelines/design-modes.md +6 -0
- package/docs/guidelines/php/general.md +9 -1
- package/docs/guidelines/php/php-coding-patterns.md +7 -0
- package/docs/guides/cross-repo-retrieval.md +1 -1
- package/docs/guides/frontend-design-corpus-refresh.md +2 -2
- package/docs/guides/local-analytics.md +4 -4
- package/docs/guides/skill-discovery.md +1 -1
- package/docs/guides/skill-preview.md +1 -1
- package/docs/hook-payload-capture.md +6 -6
- package/docs/install-friction-report.md +66 -0
- package/docs/installation.md +1 -1
- package/docs/maintainers/optional-media-deps.md +50 -0
- package/docs/mcp-server.md +11 -12
- package/docs/media/proof-demo.cast +14 -0
- package/docs/media/proof-demo.gif +0 -0
- package/docs/migration/consumer-template-consumption-model.md +1 -1
- package/docs/migration/divergences/bench-stats-float-precision.md +1 -1
- package/docs/migration/node-floor.md +1 -1
- package/docs/migration/yaml-roundtrip-spike.md +1 -1
- package/docs/personas.md +16 -5
- package/docs/positioning-evidence.md +86 -0
- package/docs/proof.md +86 -0
- package/docs/skills-catalog.md +1 -1
- package/docs/troubleshooting.md +8 -8
- package/docs/wedge/production-validator/README.md +57 -0
- package/docs/wedge/production-validator/production-validator.md +56 -0
- package/docs/wizard.md +2 -2
- package/package.json +1 -1
- package/src/config/agent-settings.template.yml +59 -4
- package/src/config/agents-paths.yml +254 -0
- package/src/config/budgets.yml +16 -0
- package/src/config/discovery/packs.yml +1 -0
- package/src/config/discovery/unassigned-artefacts.yml +2 -0
- package/src/config/gitignore-block.txt +25 -0
- package/src/config/host-capabilities.yml +31 -0
- package/src/config/profiles/balanced.ini +4 -0
- package/src/config/profiles/full.ini +4 -0
- package/src/config/profiles/minimal.ini +4 -0
- package/src/scripts/_cli/cmd_conformance.ts +716 -0
- package/src/scripts/_cli/cmd_doctor.ts +23 -2
- package/src/scripts/_cli/cmd_fleet.ts +401 -0
- package/src/scripts/_cli/cmd_preflight.ts +159 -0
- package/src/scripts/_dispatch.bash +10 -0
- package/src/scripts/_lib/knowledge_events.ts +193 -0
- package/src/scripts/_lib/subagent_steering.ts +115 -3
- package/src/scripts/_lib/text_similarity.ts +75 -0
- package/src/scripts/ai-video/test-pipeline.sh +1 -1
- package/src/scripts/ai_council/clients.ts +19 -3
- package/src/scripts/append_contested.ts +112 -0
- package/src/scripts/audit_auto_rules.ts +11 -1
- package/src/scripts/audit_mcp_tools.ts +25 -11
- package/src/scripts/bench_ab_v2_run.ts +527 -40
- package/src/scripts/bench_ab_v2_stats.ts +6 -0
- package/src/scripts/bench_matrix.ts +266 -0
- package/src/scripts/bootstrap_knowledge.ts +267 -0
- package/src/scripts/build_discovery_manifest.ts +42 -2
- package/src/scripts/build_proof.ts +214 -0
- package/src/scripts/check_always_budget.ts +3 -0
- package/src/scripts/check_augment_description_cap.ts +2 -2
- package/src/scripts/check_claims.ts +270 -0
- package/src/scripts/check_comparison.ts +79 -0
- package/src/scripts/check_generated_artefact_headers.ts +109 -0
- package/src/scripts/check_generator_output_coverage.ts +142 -0
- package/src/scripts/check_gitignore_freshness.ts +127 -0
- package/src/scripts/check_knowledge_pages.ts +210 -0
- package/src/scripts/check_knowledge_sharing.ts +162 -0
- package/src/scripts/check_media_deps.ts +91 -0
- package/src/scripts/check_memory_contradiction.ts +280 -0
- package/src/scripts/check_memory_similarity.ts +134 -0
- package/src/scripts/check_quality_regression.ts +56 -10
- package/src/scripts/check_references.ts +3 -1
- package/src/scripts/check_release_pr_shape.ts +4 -0
- package/src/scripts/check_site_links.ts +135 -0
- package/src/scripts/check_skill_gaps.ts +99 -0
- package/src/scripts/check_token_quality_golden.ts +197 -11
- package/src/scripts/check_tracked_but_ignored.ts +67 -0
- package/src/scripts/cluster_near_miss_patterns.ts +0 -0
- package/src/scripts/compile_router.ts +30 -3
- package/src/scripts/condense.ts +350 -14
- package/src/scripts/consolidate_knowledge_events.ts +192 -0
- package/src/scripts/degrade_to_pointer.ts +136 -0
- package/src/scripts/design_slop_rules.test.ts +15 -0
- package/src/scripts/design_slop_rules.ts +28 -0
- package/src/scripts/emit_knowledge_event.ts +158 -0
- package/src/scripts/export_replay_corpus.ts +187 -0
- package/src/scripts/external_sources_denylist.json +7 -2
- package/src/scripts/fold_intake.ts +281 -0
- package/src/scripts/generate_capability_matrix.ts +9 -1
- package/src/scripts/generate_knowledge_index.ts +222 -0
- package/src/scripts/hook_manifest.yaml +26 -14
- package/src/scripts/hooks/dispatch_hook.ts +18 -0
- package/src/scripts/hot_context_hook.ts +372 -0
- package/src/scripts/install +47 -0
- package/src/scripts/install-hooks.sh +17 -0
- package/src/scripts/inventory_meta_layers.ts +11 -0
- package/src/scripts/janitor.ts +258 -0
- package/src/scripts/lint_agents_layout.ts +74 -15
- package/src/scripts/lint_bench_ab.ts +4 -1
- package/src/scripts/lint_featured_skills.ts +0 -0
- package/src/scripts/lint_framework_leakage_allowlist.json +26 -3
- package/src/scripts/lint_knowledge_scale.ts +250 -0
- package/src/scripts/lint_legal_pack.ts +67 -0
- package/src/scripts/lint_persona_governance.ts +8 -3
- package/src/scripts/lint_regression.ts +15 -0
- package/src/scripts/lint_roadmap_blockers.ts +202 -0
- package/src/scripts/lint_roadmap_complexity.ts +81 -2
- package/src/scripts/lint_subagent_determinism.ts +125 -0
- package/src/scripts/measure_augment_budget.ts +46 -6
- package/src/scripts/measure_patterns.ts +4 -3
- package/src/scripts/measure_skill_reduction.ts +6 -6
- package/src/scripts/migration_status.ts +6 -2
- package/src/scripts/mine_missing_guardrails.ts +189 -0
- package/src/scripts/parity/phase_gate.ts +1 -1
- package/src/scripts/parity/replay.ts +21 -0
- package/src/scripts/project_thin_rules.ts +120 -16
- package/src/scripts/release.ts +39 -1
- package/src/scripts/render_benchmark_composite.ts +378 -0
- package/src/scripts/roadmap_progress_hook.ts +101 -43
- package/src/scripts/schemas/skill.schema.json +27 -0
- package/src/scripts/schemas/subagent.schema.json +106 -0
- package/src/scripts/skill_linter.ts +1 -0
- package/src/scripts/smoke/kernel.sh +5 -4
- package/src/scripts/surface-tiers.yml +1 -0
- package/src/scripts/sync_gitignore.ts +4 -0
- package/src/scripts/update_skill_candidates.ts +172 -0
- package/src/scripts/validate_frontmatter.ts +1 -0
|
@@ -15,9 +15,11 @@ v1 forward-compat rule on unknown fields).
|
|
|
15
15
|
"spawn_count": 0,
|
|
16
16
|
"tiers": [],
|
|
17
17
|
"token_delta": 0,
|
|
18
|
+
"token_delta_provenance": "estimated",
|
|
18
19
|
"wall_clock_ms": 0,
|
|
19
20
|
"outcome": "DONE",
|
|
20
|
-
"verify_mode": "deterministic"
|
|
21
|
+
"verify_mode": "deterministic",
|
|
22
|
+
"verdict_changed_outcome": null
|
|
21
23
|
}
|
|
22
24
|
```
|
|
23
25
|
|
|
@@ -25,13 +27,15 @@ v1 forward-compat rule on unknown fields).
|
|
|
25
27
|
|
|
26
28
|
| Field | Type | Meaning |
|
|
27
29
|
|---|---|---|
|
|
28
|
-
| `task_size_estimate` | int | Pre-dispatch estimate of the task's size (
|
|
29
|
-
| `spawn_count` | int |
|
|
30
|
-
| `tiers` | string[] | Model tiers dispatched to, one
|
|
31
|
-
| `token_delta` | int | Net token cost
|
|
32
|
-
| `
|
|
30
|
+
| `task_size_estimate` | int | Pre-dispatch estimate of the task's size (orchestrator's sizing heuristic). Counts only, no body. |
|
|
31
|
+
| `spawn_count` | int | Subagents dispatched for this task. `0` → handled in-session. |
|
|
32
|
+
| `tiers` | string[] | Model tiers dispatched to, one per spawn class (e.g. `["sonnet","opus"]`). Tier names only, no prompts. |
|
|
33
|
+
| `token_delta` | int | Net token cost vs the in-session baseline. Positive = cost more; negative = saved. Counts only. |
|
|
34
|
+
| `token_delta_provenance` | enum | `"measured"` from host-reported `usage` metadata (preferred); `"estimated"` when self-estimated from response length (mark always when host usage unavailable). |
|
|
35
|
+
| `wall_clock_ms` | int | Dispatch wall-clock duration, milliseconds. |
|
|
33
36
|
| `outcome` | enum | One of `DONE` · `DONE_WITH_CONCERNS` · `NEEDS_CONTEXT` · `BLOCKED` · `killed`. |
|
|
34
|
-
| `verify_mode` | enum | How
|
|
37
|
+
| `verify_mode` | enum | How output was verified: `deterministic` · `judge` · `none`. |
|
|
38
|
+
| `verdict_changed_outcome` | bool \| null | **A3 extension (ADR-109 Track A).** For a review/verdict subagent (e.g. `production-validator`): did the verdict change the outcome vs the in-session baseline? `true` = caught a real issue the baseline missed / flipped a false `READY`→`NOT READY`; `false` = no lift; `null` = not a verdict dispatch / not measured. **Negative-control (clean single-file) tasks MUST record `false`** — a `true` on a control = spurious findings, fails Gate A. Additive field on THIS object, not a second schema. Boolean/counts only, no bodies. |
|
|
35
39
|
|
|
36
40
|
## Privacy floor
|
|
37
41
|
|
|
@@ -48,6 +52,27 @@ object is an additive extension on an otherwise standard audit-log-v1 line:
|
|
|
48
52
|
{"schema_version":1,"id":"01HXY...","ts":"2026-06-23T12:34:56Z","work_id":"PROJ-7-2026-06-23T12-30-00Z","phase":"implement","outcome":"success","confidence_band":"high","risk_class":"low","memory":{"asks":2,"hits":1},"verify":{"claims":1,"first_try_passes":1},"rules_applied":["verify-before-complete"],"persona":"backend","input_kind":"orchestration","type":"phase","orchestration":{"task_size_estimate":3,"spawn_count":2,"tiers":["sonnet","opus"],"token_delta":4200,"wall_clock_ms":18500,"outcome":"DONE","verify_mode":"deterministic"}}
|
|
49
53
|
```
|
|
50
54
|
|
|
55
|
+
## Emit procedure (how the orchestrating agent writes telemetry)
|
|
56
|
+
|
|
57
|
+
After every auto-dispatched orchestration run, the orchestrating agent writes one
|
|
58
|
+
telemetry line to `agents/runtime/state/audit/YYYY-MM.jsonl` (the existing
|
|
59
|
+
audit-log-v1 path; `YYYY-MM` = current UTC month). The line is a standard
|
|
60
|
+
audit-log-v1 object with `input_kind: "orchestration"` and an `orchestration`
|
|
61
|
+
sub-object carrying this shape.
|
|
62
|
+
|
|
63
|
+
**No hook or daemon required.** The agent writes directly via its file-write
|
|
64
|
+
tool — same mechanism as any other agent-written artifact. No-runtime-compatible
|
|
65
|
+
capture path (decided 2026-06-30, maintainer decision; see
|
|
66
|
+
`road-to-subagent-value-realization.md § Council notes`).
|
|
67
|
+
|
|
68
|
+
**`token_delta` sourcing priority:**
|
|
69
|
+
1. Host-reported: read `usage.output_tokens` (and `usage.input_tokens` if
|
|
70
|
+
available) from each subagent call's response metadata. Use the sum minus the
|
|
71
|
+
estimated single-agent baseline. Set `token_delta_provenance: "measured"`.
|
|
72
|
+
2. Self-estimate fallback: host usage metadata unavailable → estimate from
|
|
73
|
+
response length (chars / 4 ≈ tokens). Set `token_delta_provenance:
|
|
74
|
+
"estimated"`. Lossy; measured always preferred.
|
|
75
|
+
|
|
51
76
|
## Related
|
|
52
77
|
|
|
53
78
|
- [`audit-log-v1`](../../../../docs/contracts/audit-log-v1.md) — the frozen
|
|
@@ -56,4 +81,3 @@ object is an additive extension on an otherwise standard audit-log-v1 line:
|
|
|
56
81
|
- [`host-capability-manifest`](host-capability-manifest.md) — the manifest that
|
|
57
82
|
decides whether a dispatch is even attempted; `spawn_count` and `tiers`
|
|
58
83
|
reflect what it enabled.
|
|
59
|
-
Phase-0 instrumentation belongs to.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Roadmap Execution Contract
|
|
2
|
+
|
|
3
|
+
Loaded by [`roadmap-process-loop § 3`](roadmap-process-loop.md) when
|
|
4
|
+
resolved roadmap declares `execution.mode` in frontmatter
|
|
5
|
+
(`autonomous` | `phase-checkpoints`; absent / `interactive` = legacy
|
|
6
|
+
behavior, this context stays unloaded). Defines the run-start
|
|
7
|
+
pre-scan, the contract summary user confirms ONCE, the grants that
|
|
8
|
+
confirmation activates, and the per-mode gate table.
|
|
9
|
+
|
|
10
|
+
## Principle — declaration vs. authorization
|
|
11
|
+
|
|
12
|
+
`execution.mode` in frontmatter is a **declaration of intent** written
|
|
13
|
+
at authoring time. Grants nothing. Authorization happens exactly once
|
|
14
|
+
per run: user invokes `/roadmap:process-*` (a this-turn action), loop
|
|
15
|
+
derives the contract below from roadmap's CURRENT content, and user's
|
|
16
|
+
single confirmation converts declared mode into this-turn grants
|
|
17
|
+
**cached for this run only** (same mechanism as commit pre-scan it
|
|
18
|
+
extends). Stale frontmatter is harmless: no confirmation, no grants.
|
|
19
|
+
|
|
20
|
+
## 1. Pre-scan — four detection classes
|
|
21
|
+
|
|
22
|
+
Scan every open step (text + inline notes) for:
|
|
23
|
+
|
|
24
|
+
1. **Commit-shaped steps** — `commit:` / `git commit` / `Commit phase`
|
|
25
|
+
(existing § 3 scan).
|
|
26
|
+
2. **Git-shape needs** — steps requiring a branch / push / PR
|
|
27
|
+
(`branch`, `push`, `open a PR`, `create PR`, "in a worktree"), plus
|
|
28
|
+
run's own delivery needs when roadmap's definition of done includes
|
|
29
|
+
shipping (autonomous mode default, § 4).
|
|
30
|
+
3. **Artifact-authoring steps** — steps that create or materially
|
|
31
|
+
rewrite a skill / rule / command / guideline (verbs `add`/`create`/
|
|
32
|
+
`write`/`rewrite` + artifact nouns, or paths under
|
|
33
|
+
`src/{skills,rules}/`, command/guideline trees). Feed the batched
|
|
34
|
+
[`artifact-drafting-protocol`](../../rules/artifact-drafting-protocol.md)
|
|
35
|
+
research pass (§ 3 below).
|
|
36
|
+
4. **Open questions / ambiguity** — explicit `?` markers, "decide
|
|
37
|
+
whether", options left unresolved, or steps matching
|
|
38
|
+
[`ask-when-uncertain`](../../rules/ask-when-uncertain.md)
|
|
39
|
+
vague-trigger patterns.
|
|
40
|
+
|
|
41
|
+
## 2. Contract summary — shown once, confirmed once
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Roadmap: <path> · mode: <autonomous | phase-checkpoints>
|
|
45
|
+
|
|
46
|
+
Git: branch <feat/<roadmap-slug>> · commits: chunked (N commit steps
|
|
47
|
+
detected / delivery commits) · push: to feat/<roadmap-slug> ONLY
|
|
48
|
+
· PR: open against <default branch> (description only — no merge)
|
|
49
|
+
Artifacts: <N> planned (skills/rules/commands/guidelines) —
|
|
50
|
+
batched overlap check: <result — run NOW, against current state>
|
|
51
|
+
Open questions: <N> → resolved via AI council (<members | "none
|
|
52
|
+
configured — will halt on ambiguity">)
|
|
53
|
+
Quality: <cadence> · Dashboard: <cadence>
|
|
54
|
+
|
|
55
|
+
Always active regardless of this contract (never lifted):
|
|
56
|
+
• Hard Floor per-commit diff gate (bulk deletions / infra)
|
|
57
|
+
• Push anywhere except feat/<roadmap-slug>; any merge
|
|
58
|
+
• security-sensitive-stop on auth/billing/tenant/secret paths
|
|
59
|
+
• N=3 validation budget · context-hygiene read-loop abort
|
|
60
|
+
• Deferred-[~] archival gate
|
|
61
|
+
|
|
62
|
+
1. Accept — run under this contract
|
|
63
|
+
2. Adjust (name the change) · 3. Run interactive instead · 4. Abort
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Accept = ONE authorization of the run. Cache all grants; never re-ask
|
|
67
|
+
inside the run. Adjust → apply, re-show once. Contract re-derived on
|
|
68
|
+
every invocation — always reflects roadmap's and repo's current state.
|
|
69
|
+
|
|
70
|
+
## 3. Grants activated by acceptance
|
|
71
|
+
|
|
72
|
+
| Grant | Boundary |
|
|
73
|
+
|---|---|
|
|
74
|
+
| Create feature branch `feat/<roadmap-slug>` (or reuse the current worktree branch) | Never a prod trunk; one branch per run |
|
|
75
|
+
| Chunked commits on that branch | Per-commit Hard-Floor diff gate stays ([`commit-mechanics`](../authority/commit-mechanics.md)); agent picks the split per [`commit-policy`](../../rules/commit-policy.md) |
|
|
76
|
+
| Push to that branch **only** | Push to any other ref = Hard Floor, ask |
|
|
77
|
+
| Open ONE PR (description-only flow) | Never merge, never close/retarget; merge is always conversational |
|
|
78
|
+
| Batched artifact drafting | The drafting-protocol **Research/overlap pass runs NOW at contract time against current artifact state**; results cached; Understand/Draft phases run non-interactively during the run. Artifacts NOT in the batch still trigger the interactive protocol |
|
|
79
|
+
| Council auto-enable | In-run open questions route to the AI council silently; `high_impact` / `user_required` classifications STILL escalate to the user per [`ask-when-uncertain`](../../rules/ask-when-uncertain.md). **No council configured** → the contract summary says so and in-run true ambiguity halts (never silent guessing) |
|
|
80
|
+
|
|
81
|
+
Grants satisfy [`scope-control`](../../rules/scope-control.md)'s
|
|
82
|
+
"standing instruction" clause for the run — see
|
|
83
|
+
[`scope-mechanics § Roadmap execution contract`](../authority/scope-mechanics.md).
|
|
84
|
+
|
|
85
|
+
## 4. Definition of done, per mode
|
|
86
|
+
|
|
87
|
+
| Mode | End state | Halts during run |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| `autonomous` | All steps `[x]` · quality green per cadence · work committed in chunks on `feat/<roadmap-slug>` · pushed · PR open · archival sweep run. **Merge out of scope, always.** | Safety floors only (+ quality-red, + step reveals out-of-roadmap work) |
|
|
90
|
+
| `phase-checkpoints` | Same end state | Safety floors + a compact status + "continue?" prompt at each phase boundary |
|
|
91
|
+
| `interactive` (absent field) | Legacy: work lands, no git delivery without per-op permission | All gates as authored by their owning rules |
|
|
92
|
+
|
|
93
|
+
If roadmap contains **no** delivery need and no commit steps, git
|
|
94
|
+
grants are omitted from the contract (nothing to authorize —
|
|
95
|
+
[`commit-policy`](../../rules/commit-policy.md) default: never commit).
|
|
96
|
+
|
|
97
|
+
## 5. What acceptance can NEVER cover
|
|
98
|
+
|
|
99
|
+
- Any [`non-destructive-by-default`](../../rules/non-destructive-by-default.md)
|
|
100
|
+
trigger beyond the two named grants (own-branch push, PR-open):
|
|
101
|
+
prod-trunk anything, deploys, bulk deletions, infra commits.
|
|
102
|
+
- Merging, closing, or retargeting a PR.
|
|
103
|
+
- Lifting [`security-sensitive-stop`](../../rules/security-sensitive-stop.md),
|
|
104
|
+
the N=3 budget, context-hygiene aborts, or the deferred-`[~]` gate.
|
|
105
|
+
- Work outside the roadmap's scope (halt: scope-out-of-roadmap).
|
|
106
|
+
- Kernel-rule edits' own-PR + 24h-soak guarantee
|
|
107
|
+
([`kernel-rule-edits`](../authority/kernel-rule-edits.md)).
|
|
@@ -56,6 +56,7 @@ options + wait):
|
|
|
56
56
|
> Phase 2: `<name>` — 0/4
|
|
57
57
|
> Next open step: `<description>`
|
|
58
58
|
> Scope: **step | phase | full**
|
|
59
|
+
> Execution mode: **autonomous | phase-checkpoints | interactive** (frontmatter `execution.mode`; absent = interactive)
|
|
59
60
|
> AI council: **on | off** (`<member list or "no members configured">`)
|
|
60
61
|
> Quality cadence: **end_of_roadmap | per_phase | per_step**
|
|
61
62
|
> Commit steps in roadmap: **N** (see § 3)
|
|
@@ -68,15 +69,39 @@ when scope, roadmap, and council are all unambiguous in the invocation
|
|
|
68
69
|
(e.g. `/roadmap:process-phase road-to-X.md with council`), the gate
|
|
69
70
|
does not fire.
|
|
70
71
|
|
|
71
|
-
## 3.
|
|
72
|
+
## 3. Pre-scan — execution contract or commit-step ask
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
Read `execution.mode` from roadmap's frontmatter
|
|
75
|
+
(`autonomous` | `phase-checkpoints` | `interactive`; absent =
|
|
76
|
+
`interactive`).
|
|
77
|
+
|
|
78
|
+
**`mode: autonomous` or `phase-checkpoints`** → load
|
|
79
|
+
[`roadmap-execution-contract`](roadmap-execution-contract.md) and run
|
|
80
|
+
its four-class pre-scan over every open step:
|
|
81
|
+
|
|
82
|
+
1. commit-shaped steps (patterns below),
|
|
83
|
+
2. git-shape needs (branch / push / PR / delivery),
|
|
84
|
+
3. artifact-authoring steps (new or materially rewritten skill / rule /
|
|
85
|
+
command / guideline — feeds batched drafting-protocol research
|
|
86
|
+
pass, run at contract time against current artifact state),
|
|
87
|
+
4. open questions / ambiguity markers (incl. `ask-when-uncertain`
|
|
88
|
+
vague-trigger patterns).
|
|
89
|
+
|
|
90
|
+
Surface contract summary; user's single **Accept** activates all run
|
|
91
|
+
grants (branch, chunked commits, push to run's own feature branch
|
|
92
|
+
only, PR-open, batched artifact drafting, council auto-enable) —
|
|
93
|
+
cached for run, never re-asked. Contract never lifts a Hard Floor or
|
|
94
|
+
any safety floor; boundaries + per-mode gate table live in contract
|
|
95
|
+
context.
|
|
96
|
+
|
|
97
|
+
**`mode: interactive` (or field absent)** → legacy commit-step scan
|
|
98
|
+
only: lines matching `commit:` / `git commit` / `Commit phase`.
|
|
75
99
|
|
|
76
100
|
- **No commit steps** → nothing to ask. Never commit, never re-ask
|
|
77
101
|
per [`commit-policy`](../../rules/commit-policy.md).
|
|
78
|
-
- **Commit steps present, autonomous mode**
|
|
79
|
-
or `auto` after opt-in) → ask **once**
|
|
102
|
+
- **Commit steps present, autonomous conversation mode**
|
|
103
|
+
(`personal.autonomy: on`, or `auto` after opt-in) → ask **once**
|
|
104
|
+
upfront:
|
|
80
105
|
> "Roadmap contains N commit steps. Authorize all of them for this
|
|
81
106
|
> run? (yes / no / list them)"
|
|
82
107
|
Cache the answer for the whole run; do **not** re-ask per step.
|
|
@@ -152,9 +177,17 @@ For each open step in the working set (scope-bound — see wrapper):
|
|
|
152
177
|
2. Analyze the codebase for what the step requires.
|
|
153
178
|
3. Decide and act — implement. **No "should I implement this?" prompt.**
|
|
154
179
|
4. **Open question handling:**
|
|
155
|
-
- **Council on**
|
|
156
|
-
|
|
157
|
-
|
|
180
|
+
- **Council on** (toggled manually, or auto-enabled for run by
|
|
181
|
+
accepted execution contract — § 3) → invoke per
|
|
182
|
+
[`ai-council`](../../skills/ai-council/SKILL.md), integrate
|
|
183
|
+
convergence, proceed. Token spend was opted in (contract summary
|
|
184
|
+
named members). `high_impact` / `user_required` classifications
|
|
185
|
+
still escalate to user per
|
|
186
|
+
[`ask-when-uncertain`](../../rules/ask-when-uncertain.md).
|
|
187
|
+
- **Council off / not configured** → halt, surface once, wait.
|
|
188
|
+
Resume on next turn. Execution contract cannot enable a council
|
|
189
|
+
with no configured members — contract summary says so upfront,
|
|
190
|
+
and in-run ambiguity halts (never silent guessing).
|
|
158
191
|
5. **Atomic flip — same reply, every step.**
|
|
159
192
|
Flip the checkbox in `agents/roadmaps/<file>.md`: `[x]` done ·
|
|
160
193
|
`[~]` partial · `[-]` skipped. **Non-skippable, non-batchable**
|
|
@@ -168,9 +201,13 @@ For each open step in the working set (scope-bound — see wrapper):
|
|
|
168
201
|
Before advancing to step 6, run:
|
|
169
202
|
|
|
170
203
|
```bash
|
|
171
|
-
git
|
|
204
|
+
git status --porcelain -- agents/roadmaps/<file>.md
|
|
172
205
|
```
|
|
173
206
|
|
|
207
|
+
(`git status --porcelain`, not `git diff` — roadmap file still
|
|
208
|
+
**untracked** (e.g. fresh worktree) is invisible to `git diff`,
|
|
209
|
+
would false-halt; `--porcelain` reports both `M` and `??`.)
|
|
210
|
+
|
|
174
211
|
Empty output → Iron Law 2 was violated this iteration: the step
|
|
175
212
|
landed work but no checkbox flipped. **Halt loudly**, surface
|
|
176
213
|
"step <N> landed without checkbox flip — flip then resume", and
|
|
@@ -202,7 +239,18 @@ For each open step in the working set (scope-bound — see wrapper):
|
|
|
202
239
|
- Security-sensitive path ([`security-sensitive-stop`](../../rules/security-sensitive-stop.md))
|
|
203
240
|
- Step reveals work outside the roadmap's scope
|
|
204
241
|
- Test failure or quality red on `per_step`
|
|
205
|
-
- Council off + true ambiguity
|
|
242
|
+
- Council off + true ambiguity — under an **accepted execution
|
|
243
|
+
contract** ([§ 3](#3-pre-scan--execution-contract-or-commit-step-ask))
|
|
244
|
+
this halt exists only when no council is configured: contract
|
|
245
|
+
auto-enables council for run, so in-run open questions resolve
|
|
246
|
+
silently (`high_impact` / `user_required` classifications still
|
|
247
|
+
escalate per [`ask-when-uncertain`](../../rules/ask-when-uncertain.md));
|
|
248
|
+
with no council configured, true ambiguity halts — never silent
|
|
249
|
+
guessing.
|
|
250
|
+
|
|
251
|
+
An accepted execution contract **never lifts a Hard Floor** or any
|
|
252
|
+
other halt above — it removes redundant *asks* (git shape, artifact
|
|
253
|
+
drafting, council enablement), not safety.
|
|
206
254
|
|
|
207
255
|
On halt: stop, surface state, do **not** auto-fix outside the failing step.
|
|
208
256
|
|
|
@@ -231,6 +279,14 @@ execution either way.
|
|
|
231
279
|
- Summary: scope-bound (steps/phases done in this run), council
|
|
232
280
|
consultations count (if on), steps remaining, halts.
|
|
233
281
|
- Final dashboard regen.
|
|
282
|
+
- **End state under an accepted execution contract** (per-mode table:
|
|
283
|
+
[`roadmap-execution-contract § 4`](roadmap-execution-contract.md)):
|
|
284
|
+
all steps `[x]` · quality green per cadence · work committed in
|
|
285
|
+
chunks on run's feature branch · pushed to that branch · ONE PR
|
|
286
|
+
open (description-only flow) · archival sweep run. **Merge is out
|
|
287
|
+
of scope in every mode — always conversational.** Without a
|
|
288
|
+
contract (interactive mode), the run ends after the archival check
|
|
289
|
+
with no git delivery beyond explicitly authorized commit steps.
|
|
234
290
|
- **If the entire roadmap reached `count_open == 0`** → run the full
|
|
235
291
|
project quality pipeline. On red → stop, surface failures, do **not**
|
|
236
292
|
archive. On green → run **deferred-resolution gate** below before
|
|
@@ -270,11 +326,11 @@ untracked, leaves a completed roadmap rotting).
|
|
|
270
326
|
|
|
271
327
|
## Scope deltas — what each wrapper binds
|
|
272
328
|
|
|
273
|
-
| Wrapper | Working set | Stop after |
|
|
274
|
-
|
|
275
|
-
| `process-step` | Single first open step | One iteration of § 5 |
|
|
276
|
-
| `process-phase` | All open steps in first phase with `count_open > 0` | Phase boundary; per-phase quality if cadence ≠ `end_of_roadmap` |
|
|
277
|
-
| `process-full` | Every open step across every phase, in order | Roadmap fully closed (or halt) |
|
|
329
|
+
| Wrapper | Working set | Stop after | Execution contract (§ 3) |
|
|
330
|
+
|---|---|---|---|
|
|
331
|
+
| `process-step` | Single first open step | One iteration of § 5 | Never — mode ignored |
|
|
332
|
+
| `process-phase` | All open steps in first phase with `count_open > 0` | Phase boundary; per-phase quality if cadence ≠ `end_of_roadmap` | When `execution.mode: autonomous \| phase-checkpoints` |
|
|
333
|
+
| `process-full` | Every open step across every phase, in order | Roadmap fully closed (or halt) | When `execution.mode: autonomous \| phase-checkpoints` |
|
|
278
334
|
|
|
279
335
|
`process-full` runs the per-phase quality pipeline at every phase
|
|
280
336
|
boundary when cadence is `per_phase` or `per_step`; on red it halts
|
|
@@ -29,6 +29,45 @@ dispatch → monitor → status → escalate / kill
|
|
|
29
29
|
- `subagents.max_parallel` caps concurrent dispatch. No speculative fan-out:
|
|
30
30
|
a subagent is spawned only for a classified-delegable target, never on spec.
|
|
31
31
|
|
|
32
|
+
## Transient-failure retry — tier downshift
|
|
33
|
+
|
|
34
|
+
On transient subagent failure (HTTP 429, 5xx, timeout), retry **once** at the
|
|
35
|
+
next-lower model tier (haiku → if already haiku, escalate to `spawn_failure`
|
|
36
|
+
counter) before counting a failed attempt. Max one downshift per call.
|
|
37
|
+
Downshifted retry also fails → increment `spawn_failure_rate` normally. Never
|
|
38
|
+
downshift twice on the same slot — deterministic cap prevents silent drift to the
|
|
39
|
+
cheapest model on every failure.
|
|
40
|
+
|
|
41
|
+
Only automatic response to a transient failure; structural/semantic errors (e.g.
|
|
42
|
+
`BLOCKED` envelope) do **not** trigger a downshift — escalate to the orchestrator
|
|
43
|
+
immediately.
|
|
44
|
+
|
|
45
|
+
## Failure-type stop — the N=3 budget applied per subagent type
|
|
46
|
+
|
|
47
|
+
Two consecutive **verification-failed** returns from one subagent type in a
|
|
48
|
+
session exhaust that type's dispatch budget: 2 failures + escalation ARE the
|
|
49
|
+
three N=3 attempts — an application of that budget at type granularity,
|
|
50
|
+
**not a new mechanism, not a circuit breaker**. On fire the orchestrator:
|
|
51
|
+
|
|
52
|
+
1. stops dispatching that type for the rest of the session,
|
|
53
|
+
2. surfaces both failed returns to the human,
|
|
54
|
+
3. runs the remaining slices in-session.
|
|
55
|
+
|
|
56
|
+
Iron Law below unchanged — no automatic cohort-disable; the stop is
|
|
57
|
+
session-scoped orchestrator state, never a persisted flip. Deterministic
|
|
58
|
+
reference: `typeStop()`.
|
|
59
|
+
|
|
60
|
+
## Ordered-slice dependency gate (do-in-steps)
|
|
61
|
+
|
|
62
|
+
An ordered slice **declares its parent**; no slice dispatches before the
|
|
63
|
+
parent's return is verified by the orchestrator. Makes the implicit
|
|
64
|
+
`do-in-steps` contract ("step N output → judge → step N+1 input") explicit
|
|
65
|
+
and checkable: `sliceDispatchAllowed(declaredParent, verifiedReturns)`
|
|
66
|
+
refuses dispatch while the parent lacks a verified return in session state.
|
|
67
|
+
Root / independent slices (no declared parent) always pass. A refused slice
|
|
68
|
+
is not an error — the ordering contract doing its job; verify (or revise)
|
|
69
|
+
the parent first.
|
|
70
|
+
|
|
32
71
|
## Rollback guardrails — surfaced, not auto-disabled
|
|
33
72
|
|
|
34
73
|
```
|
|
@@ -61,7 +100,8 @@ This is the canonical disable — no code change, effective on the next run.
|
|
|
61
100
|
## Reference implementation
|
|
62
101
|
|
|
63
102
|
[`src/scripts/_lib/subagent_steering.ts`](../../../../src/scripts/_lib/subagent_steering.ts)
|
|
64
|
-
(`isLayerDisabled`, `budgetHalt`, `
|
|
103
|
+
(`isLayerDisabled`, `budgetHalt`, `typeStop`, `sliceDispatchAllowed`,
|
|
104
|
+
`breachedGuardrails`), covered by
|
|
65
105
|
[`tests/scripts/_lib_subagent_steering.test.ts`](../../../../tests/scripts/_lib_subagent_steering.test.ts).
|
|
66
106
|
|
|
67
107
|
## Related
|
|
@@ -149,7 +149,7 @@ When a project using this package wants to **optimize** a shared rule or skill:
|
|
|
149
149
|
|
|
150
150
|
- The PR must contain **both** uncondensed and condensed versions (complete files)
|
|
151
151
|
- The condensed version must be derived from the uncondensed version
|
|
152
|
-
- Changes must pass the skill linter (
|
|
152
|
+
- Changes must pass the skill linter (`./scripts-run src/scripts/skill_linter --all`)
|
|
153
153
|
- Changes must not be project-specific (no domain assumptions)
|
|
154
154
|
- Changes must pass the promotion gate (see `controlled-self-optimization.md`)
|
|
155
155
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: data-integrity
|
|
3
|
+
role: Data Integrity Reviewer
|
|
4
|
+
description: "The voice that audits migrations and data operations for reversibility, lock behavior under live traffic, and data loss when a backfill aborts halfway."
|
|
5
|
+
tier: specialist
|
|
6
|
+
mode: reviewer
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Data Integrity Reviewer
|
|
10
|
+
|
|
11
|
+
## Focus
|
|
12
|
+
|
|
13
|
+
The safety of a change to data at rest and in motion — migrations,
|
|
14
|
+
backfills, dual-writes, deletes, and cutovers. Reads every schema or
|
|
15
|
+
data operation against the question "what happens to real production
|
|
16
|
+
rows if this runs under live traffic and dies halfway?" — reversibility,
|
|
17
|
+
lock behavior, ordering of write/backfill/cutover, and the blast radius
|
|
18
|
+
of a partial failure. Names the data-loss path, not the code shape.
|
|
19
|
+
|
|
20
|
+
This lens is **not** responsible for query speed (that is
|
|
21
|
+
`performance-engineer`) or for schema and service-boundary design
|
|
22
|
+
(`backend-architect`) — it owns whether the operation is *safe to run
|
|
23
|
+
on live data* and *safe to abort*.
|
|
24
|
+
|
|
25
|
+
## Mindset
|
|
26
|
+
|
|
27
|
+
- Assume the migration runs against a large table under concurrent writes, and assume it crashes at 50%.
|
|
28
|
+
- Refuse to take "it worked in staging" on faith — staging has no traffic and no volume.
|
|
29
|
+
- Always ask for the down path before approving the up path.
|
|
30
|
+
- A destructive step (drop/rename/delete/truncate) is guilty until a recovery path is shown.
|
|
31
|
+
- Owns the prior that the dangerous migration is the one that looks trivial.
|
|
32
|
+
|
|
33
|
+
## Unique Questions
|
|
34
|
+
|
|
35
|
+
- Is this migration reversible, and what exactly does the down path restore?
|
|
36
|
+
- What locks does this take on which tables, and for how long under live write traffic?
|
|
37
|
+
- If the backfill aborts at 50%, what state are the rows in — and is that state readable and resumable?
|
|
38
|
+
- Is the write/backfill/cutover ordered so no reader ever sees a torn or missing value?
|
|
39
|
+
|
|
40
|
+
## Output Expectations
|
|
41
|
+
|
|
42
|
+
- Severity vocabulary: `blocker · must-fix · should-fix`.
|
|
43
|
+
- Every finding cites the migration/operation `file:line` and names the data-loss or lock hazard concretely.
|
|
44
|
+
- Short. State the traffic + volume assumption behind each hazard.
|
|
45
|
+
|
|
46
|
+
## Anti-Patterns
|
|
47
|
+
|
|
48
|
+
- No approving an irreversible destructive migration without an explicit, stated recovery plan.
|
|
49
|
+
- No "add + backfill + drop" collapsed into one migration that cannot be rolled back per step.
|
|
50
|
+
- No rubber-stamp because the migration is small — small destructive migrations are the classic data-loss.
|
|
51
|
+
- Do not tune query performance here; hand speed concerns to `performance-engineer`.
|
|
52
|
+
|
|
53
|
+
## Critical Rules
|
|
54
|
+
|
|
55
|
+
- Every destructive operation (drop/rename/delete/truncate) names its recovery path or is blocked.
|
|
56
|
+
- Lock scope + duration under live traffic is stated for every schema change to a hot table.
|
|
57
|
+
- Backfills are chunked and resumable; a half-run backfill never leaves rows unreadable.
|
|
58
|
+
- Expand → backfill → contract is ordered so readers never see a missing/torn column.
|
|
59
|
+
|
|
60
|
+
## Workflows
|
|
61
|
+
|
|
62
|
+
1. Identify every schema change and data operation in the diff.
|
|
63
|
+
2. For each, confirm a reversible down path exists; if destructive, demand the recovery plan.
|
|
64
|
+
3. Name the locks taken (table, mode, duration) under concurrent write traffic.
|
|
65
|
+
4. Trace a mid-operation abort at 50% — is the resulting row state readable and resumable?
|
|
66
|
+
5. Verify write/backfill/cutover ordering so no reader observes an inconsistent value.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: performance-engineer
|
|
3
|
+
role: Performance Engineer
|
|
4
|
+
description: "The voice that reads a change for latency, allocations, hot-path cost, and complexity class — what melts at 100× load, not what looks clean at rest."
|
|
5
|
+
tier: specialist
|
|
6
|
+
mode: reviewer
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Performance Engineer
|
|
10
|
+
|
|
11
|
+
## Focus
|
|
12
|
+
|
|
13
|
+
The runtime cost of the change, read at scale rather than at rest. Reads
|
|
14
|
+
every diff against the question "what does this do when the data is 100×
|
|
15
|
+
bigger and the traffic is concurrent?" — complexity class of the touched
|
|
16
|
+
path, allocations inside hot loops, synchronous work on the request path,
|
|
17
|
+
unbounded collections, repeated work that should be memoised, and calls
|
|
18
|
+
that fan out per-row. Names the cost, not the tidiness.
|
|
19
|
+
|
|
20
|
+
This lens is **not** responsible for coupling or blast radius (that is
|
|
21
|
+
`senior-engineer`), for test coverage (`qa`), or for the exact SQL an ORM
|
|
22
|
+
emits (`eloquent-tamer` owns query-shape) — it owns everything else that
|
|
23
|
+
costs time or memory on the hot path.
|
|
24
|
+
|
|
25
|
+
## Mindset
|
|
26
|
+
|
|
27
|
+
- Assume the input grows 100× and the call runs concurrently — clean-at-rest is not clean under load.
|
|
28
|
+
- Refuse to take "it's fast enough" on faith without the complexity class named.
|
|
29
|
+
- Always locate the hot path first, then read allocations and I/O on it.
|
|
30
|
+
- A synchronous call on the request path is guilty until proven cheap.
|
|
31
|
+
- Owns the prior that most latency hides in a loop nobody profiled.
|
|
32
|
+
|
|
33
|
+
## Unique Questions
|
|
34
|
+
|
|
35
|
+
- What is the complexity class of this path when the data is 100× larger — O(n), O(n²), or worse?
|
|
36
|
+
- Which call in this change becomes an N+1 or a per-row fan-out under real load?
|
|
37
|
+
- What allocates inside the hot loop, and does it need to?
|
|
38
|
+
- What runs synchronously on the request path that could be deferred, batched, or cached?
|
|
39
|
+
|
|
40
|
+
## Output Expectations
|
|
41
|
+
|
|
42
|
+
- Severity vocabulary: `must-fix · should-fix · nit`.
|
|
43
|
+
- Every finding cites a `file:line` and names the cost (complexity class, allocation site, or blocking call).
|
|
44
|
+
- Short — one screen unless the change is genuinely large. State the load assumption behind each finding.
|
|
45
|
+
|
|
46
|
+
## Anti-Patterns
|
|
47
|
+
|
|
48
|
+
- No hand-wavy "this might be slow" — name the mechanism and the scale at which it bites.
|
|
49
|
+
- No micro-optimisation of a cold path while the hot path is ignored.
|
|
50
|
+
- No rubber-stamp because the tests are green — green tests do not measure load.
|
|
51
|
+
- Do not redesign architecture; flag the cost and hand structural calls to `senior-engineer`.
|
|
52
|
+
|
|
53
|
+
## Critical Rules
|
|
54
|
+
|
|
55
|
+
- Every flagged path states its complexity class and the input size at which it degrades.
|
|
56
|
+
- A synchronous external call on the request path must be justified or flagged.
|
|
57
|
+
- Unbounded growth (a collection/queue/cache with no eviction) is always surfaced.
|
|
58
|
+
- Defer to `eloquent-tamer` on emitted SQL; defer to `qa` on whether a perf regression test exists.
|
|
59
|
+
|
|
60
|
+
## Workflows
|
|
61
|
+
|
|
62
|
+
1. Locate the hot path(s) the change touches — the code that runs per request or per row.
|
|
63
|
+
2. For each, name the complexity class and the input size at which it degrades.
|
|
64
|
+
3. Scan hot loops for allocations, per-row I/O, and repeated work; flag each with `file:line`.
|
|
65
|
+
4. Check the request path for synchronous external calls that could be deferred/batched.
|
|
66
|
+
5. Check every new collection/cache/queue for a bound and an eviction path.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: production-validator
|
|
3
|
+
role: Production Validator
|
|
4
|
+
description: "The last gate before 'done' — audits that no mock, stub, or fake implementation remains and that the change was validated against real systems."
|
|
5
|
+
tier: specialist
|
|
6
|
+
mode: reviewer
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Production Validator
|
|
10
|
+
|
|
11
|
+
## Focus
|
|
12
|
+
|
|
13
|
+
Whether the shipped code is *real*. Reads a change that claims to be
|
|
14
|
+
finished against one question: "is the thing under the green test
|
|
15
|
+
actually implemented, or a stub, mock, or placeholder that passes?"
|
|
16
|
+
Hunts for `TODO`, `NotImplemented`, hard-coded fixtures returned from
|
|
17
|
+
production paths, mocks that leaked out of tests, and features validated
|
|
18
|
+
only against fakes. This is Evidence-First discipline applied at the
|
|
19
|
+
delivery edge (anti-hallucination, ADR-098).
|
|
20
|
+
|
|
21
|
+
This lens is distinct from `qa` — qa asks *does the right test exist?*;
|
|
22
|
+
this asks *is the code the test exercises actually real, and was it run
|
|
23
|
+
against a real system?* It is **not** responsible for test design (`qa`)
|
|
24
|
+
or runtime cost (`performance-engineer`).
|
|
25
|
+
|
|
26
|
+
## Mindset
|
|
27
|
+
|
|
28
|
+
- Assume "done" is a claim, not a fact, until the real path is shown to run.
|
|
29
|
+
- Refuse to accept a green test suite as proof the implementation is real.
|
|
30
|
+
- Always grep the shipped path for mock/stub/placeholder markers before signing off.
|
|
31
|
+
- A hard-coded return on a production path is guilty until proven a real default.
|
|
32
|
+
- Owns the prior that the most confident "it works" hides the hollow function.
|
|
33
|
+
|
|
34
|
+
## Unique Questions
|
|
35
|
+
|
|
36
|
+
- Does any mock, stub, fake, `TODO`, or `NotImplemented` remain on the *shipped* (non-test) path?
|
|
37
|
+
- Was this validated against a real system/dependency, or only against mocks and in-memory fakes?
|
|
38
|
+
- Does the passing test exercise real behavior, or a hollow placeholder that returns a fixture?
|
|
39
|
+
- If I removed the test doubles, would this feature actually function end-to-end?
|
|
40
|
+
|
|
41
|
+
## Output Expectations
|
|
42
|
+
|
|
43
|
+
- Severity vocabulary: `blocker · must-fix · should-fix`.
|
|
44
|
+
- Every finding cites the `file:line` of the mock/stub/placeholder or the missing real-system validation.
|
|
45
|
+
- Short. A single confirmed hollow path on the shipped code is a `blocker`, not a nit.
|
|
46
|
+
|
|
47
|
+
## Anti-Patterns
|
|
48
|
+
|
|
49
|
+
- No signing off "done" on green tests alone without confirming the path is real.
|
|
50
|
+
- No accepting a mock that lives outside a test directory on a production path.
|
|
51
|
+
- No treating a `TODO`/`NotImplemented` on the shipped path as acceptable "for now".
|
|
52
|
+
- Do not judge whether the test is well-designed — that is `qa`'s call.
|
|
53
|
+
|
|
54
|
+
## Critical Rules
|
|
55
|
+
|
|
56
|
+
- No mock/stub/fake/placeholder survives on the shipped (non-test) path.
|
|
57
|
+
- Every "done" claim is backed by evidence the real path executed, not just that tests passed.
|
|
58
|
+
- A hard-coded production return is either proven a legitimate default or flagged.
|
|
59
|
+
- Defer test-design and coverage questions to `qa`; defer performance to `performance-engineer`.
|
|
60
|
+
|
|
61
|
+
## Workflows
|
|
62
|
+
|
|
63
|
+
1. Grep the shipped diff for `mock`, `stub`, `fake`, `TODO`, `NotImplemented`, placeholder fixtures.
|
|
64
|
+
2. For each hit on a non-test path, confirm it is real or flag it `blocker`.
|
|
65
|
+
3. Check that the change was exercised against a real system/dependency, not only mocks.
|
|
66
|
+
4. For each green test, confirm it drives real behavior rather than a hollow placeholder.
|
|
67
|
+
5. Report the "would-it-work-without-the-doubles" verdict as the final gate.
|
|
68
|
+
|
|
69
|
+
## Sync note
|
|
70
|
+
|
|
71
|
+
Single source of truth for the read-only `production-validator` execution
|
|
72
|
+
subagent (the adoption wedge) when that layer is built — the subagent is a
|
|
73
|
+
projection of this persona, per the market-readiness roadmap.
|
|
@@ -3,10 +3,8 @@ type: "always"
|
|
|
3
3
|
tier: "3"
|
|
4
4
|
description: "Priority Index for the four authority rules — Hard Floor → Permission Gate → Commit Default → Trivial-vs-Blocking; read first, route to canonical rule"
|
|
5
5
|
alwaysApply: true
|
|
6
|
-
workspaces:
|
|
7
|
-
|
|
8
|
-
packs:
|
|
9
|
-
- meta
|
|
6
|
+
workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
|
|
7
|
+
packs: [meta]
|
|
10
8
|
---
|
|
11
9
|
|
|
12
10
|
# Agent Authority — Priority Index
|
|
@@ -24,4 +22,5 @@ Four rules answer **"may the agent do this autonomously?"** Higher band wins.
|
|
|
24
22
|
|
|
25
23
|
- Hard Floor wins, always — autonomy / roadmap / standing instruction never lift.
|
|
26
24
|
- Higher band wins on conflict — commit exception ≠ Hard Floor override; scope permission ≠ commit override.
|
|
25
|
+
- New user instruction mid-flight = interrupt, never a continuation: STOP → run the new task in full → ASK before resuming ([`user-interrupt-priority`](user-interrupt-priority.md)).
|
|
27
26
|
- Unsure → [`ask-when-uncertain`](ask-when-uncertain.md).
|
|
@@ -8,10 +8,8 @@ triggers:
|
|
|
8
8
|
- phrase: "dig into the codebase"
|
|
9
9
|
routes_to:
|
|
10
10
|
- "skill:analysis-skill-router"
|
|
11
|
-
workspaces:
|
|
12
|
-
|
|
13
|
-
packs:
|
|
14
|
-
- meta
|
|
11
|
+
workspaces: [agent-config-maintainer, engineering]
|
|
12
|
+
packs: [meta]
|
|
15
13
|
---
|
|
16
14
|
|
|
17
15
|
# Analysis Skill Routing
|
|
@@ -19,4 +17,4 @@ packs:
|
|
|
19
17
|
**Iron Law.** Route analysis tasks to the narrowest matching `project-analysis-*` skill, not the broad fallback.
|
|
20
18
|
|
|
21
19
|
Body migrated to `skill:analysis-skill-router` (per P4 of `road-to-kernel-and-router.md`).
|
|
22
|
-
Trigger-set above activates this routing
|
|
20
|
+
Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
|