@event4u/agent-config 9.9.0 → 9.10.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 +1 -1
- package/CHANGELOG.md +153 -194
- package/README.md +1 -1
- package/dist/agent-src/commands/agent-status.md +12 -11
- package/dist/agent-src/commands/agents/user/accept.md +115 -30
- package/dist/agent-src/commands/agents/user/delete.md +147 -0
- package/dist/agent-src/commands/agents/user/review.md +65 -28
- package/dist/agent-src/commands/agents/user/show.md +82 -29
- package/dist/agent-src/commands/agents/user/update.md +2 -2
- package/dist/agent-src/commands/agents/user.md +16 -3
- package/dist/agent-src/commands/check-current-md.md +0 -10
- package/dist/agent-src/commands/condense.md +28 -97
- package/dist/agent-src/commands/cost/report.md +7 -0
- package/dist/agent-src/commands/fix/portability.md +0 -8
- package/dist/agent-src/commands/fix/refs.md +0 -8
- package/dist/agent-src/commands/humanize.md +2 -2
- package/dist/agent-src/commands/jira-ticket.md +1 -1
- package/dist/agent-src/commands/memory/load.md +11 -0
- package/dist/agent-src/commands/optimize/skills.md +1 -1
- package/dist/agent-src/commands/pr/create.md +4 -4
- package/dist/agent-src/commands/profile/show.md +3 -3
- package/dist/agent-src/commands/rule-compliance-audit.md +5 -4
- package/dist/agent-src/commands/security-audit-config.md +1 -1
- package/dist/agent-src/commands/sync/gitignore/fix.md +1 -1
- package/dist/agent-src/commands/tdd.md +21 -0
- package/dist/agent-src/commands/team/delegate.md +2 -2
- package/dist/agent-src/commands/team-knowledge/bootstrap.md +9 -8
- package/dist/agent-src/commands/team-knowledge/consolidate.md +8 -7
- package/dist/agent-src/commands/team.md +4 -1
- package/dist/agent-src/commands/upstream-contribute.md +0 -1
- package/dist/agent-src/contexts/authority/commit-mechanics.md +7 -0
- package/dist/agent-src/contexts/authority/destructive-mechanics.md +16 -0
- package/dist/agent-src/contexts/authority/scope-mechanics.md +61 -0
- package/dist/agent-src/contexts/communication/rules-auto/reply-close-mechanics.md +20 -18
- package/dist/agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +1 -1
- package/dist/agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +1 -1
- package/dist/agent-src/contexts/communication/rules-auto/source-of-truth-mechanics.md +9 -10
- package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +1 -1
- package/dist/agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +11 -0
- package/dist/agent-src/contexts/contracts/artifact-engagement-flow.md +26 -15
- package/dist/agent-src/contexts/contracts/command-suggestion-flow.md +3 -0
- package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +67 -37
- package/dist/agent-src/contexts/execution/auto-orchestration-activation.md +1 -1
- package/dist/agent-src/contexts/execution/autonomy-examples.md +1 -1
- package/dist/agent-src/contexts/execution/autonomy-mechanics.md +7 -6
- package/dist/agent-src/contexts/execution/evidence-discipline.md +92 -77
- package/dist/agent-src/contexts/execution/orchestration-benchmark-gate.md +22 -21
- package/dist/agent-src/contexts/execution/orchestration-telemetry.md +24 -0
- package/dist/agent-src/contexts/execution/project-intelligence.md +122 -103
- package/dist/agent-src/contexts/execution/roadmap-execution-contract.md +23 -21
- package/dist/agent-src/contexts/execution/subagent-response-contract.md +5 -5
- package/dist/agent-src/contexts/execution/subagent-routing.md +11 -0
- package/dist/agent-src/contexts/execution/subagent-spawn-contract.md +13 -13
- package/dist/agent-src/contexts/execution/subagent-steering.md +36 -34
- package/dist/agent-src/contexts/execution/toolchain-resolver.md +1 -1
- package/dist/agent-src/contexts/execution/user-memory-channels.md +189 -0
- package/dist/agent-src/contexts/execution/verification-mechanics.md +9 -0
- package/dist/agent-src/contexts/model-recommendations.md +3 -2
- package/dist/agent-src/contexts/subagent-configuration.md +3 -3
- package/dist/agent-src/ghostwriter/README.md +2 -2
- package/dist/agent-src/packs/README.md +1 -1
- package/dist/agent-src/personas/README.md +5 -5
- package/dist/agent-src/personas/_template-specialist/persona.md +3 -3
- package/dist/agent-src/personas/backend-architect.md +24 -23
- package/dist/agent-src/personas/eloquent-tamer.md +30 -30
- package/dist/agent-src/personas/frontend-engineer.md +30 -30
- package/dist/agent-src/personas/product-owner.md +41 -38
- package/dist/agent-src/personas/qa.md +13 -13
- package/dist/agent-src/personas/security-engineer.md +22 -22
- package/dist/agent-src/presets/README.md +3 -3
- package/dist/agent-src/profiles/README.md +3 -3
- package/dist/agent-src/rules/active-remediation.md +2 -2
- package/dist/agent-src/rules/artifact-engagement-recording.md +4 -4
- package/dist/agent-src/rules/ask-when-uncertain.md +0 -4
- package/dist/agent-src/rules/augment-edit-discipline.md +1 -1
- package/dist/agent-src/rules/broken-access-control.md +4 -4
- package/dist/agent-src/rules/code-comment-discipline.md +1 -1
- package/dist/agent-src/rules/code-provenance.md +2 -2
- package/dist/agent-src/rules/commit-policy.md +4 -9
- package/dist/agent-src/rules/communication-through-line.md +5 -5
- package/dist/agent-src/rules/decision-revisit-gate.md +1 -1
- package/dist/agent-src/rules/doc-screenshot-hygiene.md +1 -1
- package/dist/agent-src/rules/domain-adoption-policy.md +1 -1
- package/dist/agent-src/rules/domain-safety-pii.md +1 -1
- package/dist/agent-src/rules/external-code-graph-interop.md +1 -1
- package/dist/agent-src/rules/fast-path-marker-visibility.md +43 -7
- package/dist/agent-src/rules/finance-safety-floor.md +1 -1
- package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +3 -3
- package/dist/agent-src/rules/history-discipline.md +1 -1
- package/dist/agent-src/rules/legal-safety-floor.md +1 -1
- package/dist/agent-src/rules/lethal-trifecta-guard.md +5 -5
- package/dist/agent-src/rules/low-impact-corpus-privacy-floor.md +10 -8
- package/dist/agent-src/rules/media-governance-routing.md +13 -13
- package/dist/agent-src/rules/media-sync-ground-truth.md +29 -11
- package/dist/agent-src/rules/no-cheap-questions.md +7 -7
- package/dist/agent-src/rules/no-decorative-emojis-in-git-surfaces.md +29 -18
- package/dist/agent-src/rules/non-destructive-by-default.md +5 -23
- package/dist/agent-src/rules/onboarding-gate.md +14 -4
- package/dist/agent-src/rules/persona-governance.md +2 -2
- package/dist/agent-src/rules/prefer-enums-over-literals.md +9 -9
- package/dist/agent-src/rules/preservation-guard.md +10 -2
- package/dist/agent-src/rules/question-not-instruction.md +1 -1
- package/dist/agent-src/rules/roadmap-progress-sync.md +6 -6
- package/dist/agent-src/rules/rule-type-governance.md +1 -1
- package/dist/agent-src/rules/scale-discipline.md +1 -1
- package/dist/agent-src/rules/scope-control.md +1 -1
- package/dist/agent-src/rules/secret-vcs-guard.md +1 -1
- package/dist/agent-src/rules/security-sensitive-stop.md +17 -11
- package/dist/agent-src/rules/senior-engineering-discipline.md +17 -17
- package/dist/agent-src/rules/session-canary.md +1 -1
- package/dist/agent-src/rules/skill-quality.md +1 -1
- package/dist/agent-src/rules/source-confidentiality.md +21 -19
- package/dist/agent-src/rules/source-of-truth.md +6 -5
- package/dist/agent-src/rules/spreadsheet-source-quality.md +2 -2
- package/dist/agent-src/rules/strategy-safety-floor.md +1 -1
- package/dist/agent-src/rules/think-before-action.md +5 -5
- package/dist/agent-src/rules/token-budget-discipline.md +5 -3
- package/dist/agent-src/rules/token-efficiency.md +2 -2
- package/dist/agent-src/rules/untrusted-input-defense.md +4 -4
- package/dist/agent-src/rules/user-interaction.md +12 -0
- package/dist/agent-src/rules/verify-before-complete.md +4 -24
- package/dist/agent-src/skills/adversarial-review/SKILL.md +2 -2
- package/dist/agent-src/skills/agent-security-review/SKILL.md +52 -45
- package/dist/agent-src/skills/agents-md-thin-root/SKILL.md +2 -2
- package/dist/agent-src/skills/ai-code-blindspots/SKILL.md +20 -20
- package/dist/agent-src/skills/ai-council/SKILL.md +185 -128
- package/dist/agent-src/skills/analysis-skill-router/SKILL.md +3 -3
- package/dist/agent-src/skills/api-endpoint/SKILL.md +2 -2
- package/dist/agent-src/skills/artisan-commands/SKILL.md +2 -2
- package/dist/agent-src/skills/async-python-patterns/SKILL.md +8 -7
- package/dist/agent-src/skills/authz-review/SKILL.md +16 -15
- package/dist/agent-src/skills/aws-infrastructure/SKILL.md +5 -5
- package/dist/agent-src/skills/blade-ui/SKILL.md +1 -1
- package/dist/agent-src/skills/bug-analyzer/SKILL.md +30 -12
- package/dist/agent-src/skills/code-intelligence/SKILL.md +0 -1
- package/dist/agent-src/skills/code-intelligence/evals/triggers.json +52 -0
- package/dist/agent-src/skills/code-review/SKILL.md +6 -6
- package/dist/agent-src/skills/command-routing/SKILL.md +5 -4
- package/dist/agent-src/skills/composer-packages/SKILL.md +2 -2
- package/dist/agent-src/skills/condense-memory/SKILL.md +43 -41
- package/dist/agent-src/skills/context-document/SKILL.md +23 -21
- package/dist/agent-src/skills/copilot-config/SKILL.md +6 -1
- package/dist/agent-src/skills/decision-record/SKILL.md +20 -18
- package/dist/agent-src/skills/design-intelligence/SKILL.md +4 -4
- package/dist/agent-src/skills/design-review/SKILL.md +15 -14
- package/dist/agent-src/skills/design-system-capture/reference/design-system-json.md +28 -25
- package/dist/agent-src/skills/devcontainer/SKILL.md +2 -2
- package/dist/agent-src/skills/docker/SKILL.md +1 -1
- package/dist/agent-src/skills/docx-authoring/evals/triggers.json +52 -0
- package/dist/agent-src/skills/emit-tickets/SKILL.md +2 -2
- package/dist/agent-src/skills/error-handling-patterns/SKILL.md +1 -1
- package/dist/agent-src/skills/estimate-ticket/SKILL.md +2 -2
- package/dist/agent-src/skills/evaluate-llm-feature/SKILL.md +0 -1
- package/dist/agent-src/skills/evaluate-llm-feature/evals/triggers.json +52 -0
- package/dist/agent-src/skills/existing-ui-audit/SKILL.md +6 -5
- package/dist/agent-src/skills/feature-planning/SKILL.md +2 -2
- package/dist/agent-src/skills/finishing-a-development-branch/SKILL.md +3 -3
- package/dist/agent-src/skills/flux/SKILL.md +1 -1
- package/dist/agent-src/skills/frontend-render-security/SKILL.md +13 -13
- package/dist/agent-src/skills/git-workflow/SKILL.md +33 -33
- package/dist/agent-src/skills/grafana/SKILL.md +5 -0
- package/dist/agent-src/skills/humanizer/SKILL.md +83 -66
- package/dist/agent-src/skills/humanizer/data/patterns.md +14 -14
- package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +4 -4
- package/dist/agent-src/skills/judge-artifact-completeness/SKILL.md +82 -37
- package/dist/agent-src/skills/judge-bug-hunter/SKILL.md +17 -5
- package/dist/agent-src/skills/judge-injection-defense/SKILL.md +63 -25
- package/dist/agent-src/skills/judge-security-auditor/SKILL.md +2 -0
- package/dist/agent-src/skills/judge-synthesis/SKILL.md +72 -28
- package/dist/agent-src/skills/laravel-horizon/SKILL.md +5 -0
- package/dist/agent-src/skills/laravel-mail/SKILL.md +5 -4
- package/dist/agent-src/skills/laravel-middleware/SKILL.md +5 -4
- package/dist/agent-src/skills/laravel-notifications/SKILL.md +10 -9
- package/dist/agent-src/skills/laravel-pennant/SKILL.md +1 -1
- package/dist/agent-src/skills/laravel-pulse/SKILL.md +9 -8
- package/dist/agent-src/skills/laravel-reverb/SKILL.md +6 -5
- package/dist/agent-src/skills/laravel-scheduling/SKILL.md +6 -1
- package/dist/agent-src/skills/laravel-validation/SKILL.md +12 -0
- package/dist/agent-src/skills/launch-readiness/SKILL.md +1 -1
- package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +7 -7
- package/dist/agent-src/skills/learning-tutor/SKILL.md +44 -43
- package/dist/agent-src/skills/learning-tutor/evals/triggers.json +52 -0
- package/dist/agent-src/skills/license-compliance-audit/SKILL.md +7 -7
- package/dist/agent-src/skills/license-compliance-borrow-check/SKILL.md +3 -3
- package/dist/agent-src/skills/license-compliance-credits/SKILL.md +4 -4
- package/dist/agent-src/skills/llm-provider-knowledge/SKILL.md +0 -1
- package/dist/agent-src/skills/memory-consolidation/SKILL.md +69 -64
- package/dist/agent-src/skills/motion-choreographer/SKILL.md +6 -6
- package/dist/agent-src/skills/pdf-tools/evals/triggers.json +52 -0
- package/dist/agent-src/skills/performance-analysis/SKILL.md +7 -3
- package/dist/agent-src/skills/persona-improvement/SKILL.md +0 -2
- package/dist/agent-src/skills/persona-improvement/evals/triggers.json +52 -0
- package/dist/agent-src/skills/php-coder/SKILL.md +10 -0
- package/dist/agent-src/skills/prediction-pool-optimizer/SKILL.md +129 -120
- package/dist/agent-src/skills/prediction-pool-optimizer/reference/ev-fixtures.md +36 -35
- package/dist/agent-src/skills/prediction-pool-optimizer/reference/odds-and-bonus.md +45 -41
- package/dist/agent-src/skills/project-analysis-core/SKILL.md +4 -4
- package/dist/agent-src/skills/project-analysis-hypothesis-driven/SKILL.md +3 -3
- package/dist/agent-src/skills/project-analysis-react/SKILL.md +1 -1
- package/dist/agent-src/skills/project-analysis-symfony/SKILL.md +1 -1
- package/dist/agent-src/skills/project-analysis-zend-laminas/SKILL.md +2 -2
- package/dist/agent-src/skills/prompt-engineering-patterns/SKILL.md +1 -1
- package/dist/agent-src/skills/prompt-validator/SKILL.md +39 -39
- package/dist/agent-src/skills/quality-tools/SKILL.md +15 -15
- package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +55 -19
- package/dist/agent-src/skills/react-shadcn-ui/reference/registry.md +29 -27
- package/dist/agent-src/skills/readme-writing-package/SKILL.md +2 -2
- package/dist/agent-src/skills/reasoning-orchestrator/SKILL.md +25 -25
- package/dist/agent-src/skills/recursive-verification/SKILL.md +6 -5
- package/dist/agent-src/skills/refine-prompt/SKILL.md +1 -1
- package/dist/agent-src/skills/refine-ticket/SKILL.md +20 -2
- package/dist/agent-src/skills/repomix-packer/SKILL.md +1 -1
- package/dist/agent-src/skills/requesting-code-review/SKILL.md +2 -2
- package/dist/agent-src/skills/roadmap-management/SKILL.md +80 -66
- package/dist/agent-src/skills/roadmap-writing/SKILL.md +84 -77
- package/dist/agent-src/skills/rule-refactor/SKILL.md +1 -1
- package/dist/agent-src/skills/screenshot-hygiene/evals/triggers.json +52 -0
- package/dist/agent-src/skills/security-audit/SKILL.md +26 -9
- package/dist/agent-src/skills/security-maturity-assessment/SKILL.md +38 -16
- package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +14 -11
- package/dist/agent-src/skills/skill-writing/SKILL.md +9 -8
- package/dist/agent-src/skills/song-to-script/SKILL.md +93 -85
- package/dist/agent-src/skills/sql-writing/SKILL.md +2 -2
- package/dist/agent-src/skills/stakeholder-tradeoff/SKILL.md +4 -3
- package/dist/agent-src/skills/standards-from-config/SKILL.md +61 -43
- package/dist/agent-src/skills/subagent-orchestration/SKILL.md +22 -8
- package/dist/agent-src/skills/subagent-orchestration/prompts/README.md +28 -2
- package/dist/agent-src/skills/supply-chain-intake/SKILL.md +13 -13
- package/dist/agent-src/skills/systematic-debugging/SKILL.md +22 -21
- package/dist/agent-src/skills/tailwind-engineer/SKILL.md +1 -1
- package/dist/agent-src/skills/technical-specification/SKILL.md +5 -0
- package/dist/agent-src/skills/terraform/SKILL.md +2 -2
- package/dist/agent-src/skills/terragrunt/SKILL.md +8 -8
- package/dist/agent-src/skills/testing-anti-patterns/process-anti-patterns.md +1 -1
- package/dist/agent-src/skills/threat-modeling/SKILL.md +19 -13
- package/dist/agent-src/skills/universal-project-analysis/SKILL.md +1 -1
- package/dist/agent-src/skills/upstream-contribute/SKILL.md +0 -1
- package/dist/agent-src/skills/using-git-worktrees/SKILL.md +9 -9
- package/dist/agent-src/skills/validate-feature-fit/SKILL.md +3 -1
- package/dist/agent-src/skills/verify-completion-evidence/SKILL.md +4 -6
- package/dist/agent-src/skills/verify-repair-loop/SKILL.md +67 -61
- package/dist/agent-src/skills/video-director/SKILL.md +7 -7
- package/dist/agent-src/skills/worktree-lifecycle/SKILL.md +3 -3
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/contexts/knowledge-pages.md +47 -45
- package/dist/agent-src/templates/contexts/lesson-card.md +2 -2
- package/dist/agent-src/templates/contexts/tenant-boundaries.md +2 -2
- package/dist/agent-src/templates/contexts.md +1 -1
- package/dist/agent-src/templates/features.md +1 -1
- package/dist/agent-src/templates/roadmaps.md +125 -116
- package/dist/agent-src/templates/rule.md +2 -1
- package/dist/agent-src/templates/scripts/pr_risk_review.ts +0 -0
- package/dist/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
- package/dist/agent-src/templates/scripts/tier_usage_report.ts +2 -2
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +2 -2
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/review.ts +1 -1
- package/dist/agent-src/user-types/README.md +8 -8
- package/dist/agent-src/user-types/galabau-field-crew.md +34 -33
- package/dist/agent-src/user-types/metalworking-shop.md +35 -34
- package/dist/agent-src/user-types/truck-driver.md +22 -20
- package/dist/cli/python/workspace_roles.js +2 -2
- package/dist/cli/python/workspace_roles.js.map +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +88 -62
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +3 -3
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +6 -5
- package/dist/discovery/trust-report.md +2 -2
- package/dist/discovery/workspaces.json +5 -4
- package/dist/hooks/dispatch.js +186 -12
- package/dist/install/install.mjs +8 -0
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +1199 -857
- package/dist/router.json +1 -1
- package/dist/scripts/_lib/compile_time_toggles.js +48 -0
- package/dist/scripts/_lib/compile_time_toggles.js.map +1 -0
- package/dist/scripts/condense.js +234 -217
- package/dist/scripts/condense.js.map +1 -1
- package/dist/server/schemas/settings.js +4 -0
- package/dist/server/schemas/settings.js.map +1 -1
- package/dist/shared/userMd/utils.js +30 -0
- package/dist/shared/userMd/utils.js.map +1 -1
- package/dist/ui/assets/index-BpSQt5vm.js.map +1 -1
- package/docs/guidelines/agent-infra/api-cost-levers.md +56 -5
- package/docs/guidelines/agent-infra/simplicity-and-goal-demos.md +93 -33
- package/package.json +1 -1
- package/src/agent-src/templates/scripts/pr_risk_review.ts +0 -0
- package/src/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
- package/src/agent-src/templates/scripts/tier_usage_report.ts +2 -2
- package/src/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +2 -2
- package/src/agent-src/templates/scripts/work_engine/directives/ui/review.ts +1 -1
- package/src/config/agent-settings.template.yml +32 -2
- package/src/config/ci-local-parity.yml +142 -0
- package/src/config/gate-coverage.yml +127 -0
- package/src/config/preamble-payload-budget.json +44 -0
- package/src/scripts/_cli/cmd_doctor.ts +78 -2
- package/src/scripts/_lib/agent_user_profile.ts +381 -0
- package/src/scripts/_lib/agents_overlay.ts +9 -0
- package/src/scripts/_lib/anchor_eval.ts +311 -0
- package/src/scripts/_lib/cc_transcript.ts +316 -0
- package/src/scripts/_lib/compile_time_toggles.ts +79 -0
- package/src/scripts/_lib/confusables.ts +101 -0
- package/src/scripts/_lib/duplicate_scope_census.ts +77 -0
- package/src/scripts/_lib/managed_agents_folder.ts +181 -0
- package/src/scripts/_lib/payload_hash_drift.ts +126 -0
- package/src/scripts/_lib/preservation_migration.ts +291 -0
- package/src/scripts/_lib/retrieval_sanitize.ts +166 -2
- package/src/scripts/_lib/scan_scope.ts +115 -0
- package/src/scripts/_lib/user_global_memory_audit.ts +187 -0
- package/src/scripts/_lib/user_global_observations.ts +830 -0
- package/src/scripts/_lib/user_global_revocations.ts +110 -0
- package/src/scripts/_lib/user_memory_gate_counters.ts +291 -0
- package/src/scripts/ai_council/blind_review.ts +0 -0
- package/src/scripts/ai_council/budget_guard.ts +90 -11
- package/src/scripts/ai_council/bundler.ts +2 -2
- package/src/scripts/ai_council/clients.ts +59 -3
- package/src/scripts/ai_council/config.ts +38 -0
- package/src/scripts/ai_council/orchestrator.ts +54 -9
- package/src/scripts/ai_team/team_dispatch.ts +17 -6
- package/src/scripts/anchor_eval_falsify.ts +198 -0
- package/src/scripts/anchor_scoring_run.ts +239 -0
- package/src/scripts/annotate_discovery.ts +1 -65
- package/src/scripts/bench_quality_run.ts +168 -4
- package/src/scripts/cache_realization_report.ts +782 -0
- package/src/scripts/check_artefact_count_messaging.ts +5 -1
- package/src/scripts/check_augment_description_cap.ts +15 -4
- package/src/scripts/check_ci_local_parity.ts +317 -0
- package/src/scripts/check_condensation.ts +96 -191
- package/src/scripts/check_context_paths.ts +38 -9
- package/src/scripts/check_gate_coverage.ts +299 -0
- package/src/scripts/check_iron_law_prominence.ts +22 -1
- package/src/scripts/check_kernel_prefix_stability.ts +0 -0
- package/src/scripts/check_no_new_legacy_path.ts +16 -6
- package/src/scripts/check_no_roadmap_refs.ts +22 -9
- package/src/scripts/check_originality_freshness.ts +167 -0
- package/src/scripts/check_preamble_payload_budget.ts +130 -0
- package/src/scripts/check_proposal.ts +0 -0
- package/src/scripts/check_references.ts +0 -1
- package/src/scripts/check_safety_floor_untouched.ts +171 -24
- package/src/scripts/check_site_links.ts +62 -3
- package/src/scripts/ci_status.ts +0 -0
- package/src/scripts/cluster_near_miss_patterns.ts +0 -0
- package/src/scripts/code_graph/build.ts +0 -0
- package/src/scripts/command_suggester/types.ts +0 -0
- package/src/scripts/compile_router.ts +10 -14
- package/src/scripts/condense.sh +3 -4
- package/src/scripts/condense.ts +247 -228
- package/src/scripts/cost/track.mjs +168 -33
- package/src/scripts/cost_summary.ts +33 -1
- package/src/scripts/council_cli.ts +45 -3
- package/src/scripts/discovery_graph.ts +0 -0
- package/src/scripts/encoding_corpus.ts +500 -0
- package/src/scripts/encoding_corpus_report.ts +216 -0
- package/src/scripts/generate_index.ts +19 -2
- package/src/scripts/install-hooks.sh +2 -2
- package/src/scripts/learning_sidecar.ts +0 -0
- package/src/scripts/lint_confusables.ts +10 -72
- package/src/scripts/lint_featured_skills.ts +0 -0
- package/src/scripts/lint_hidden_unicode.ts +208 -0
- package/src/scripts/lint_load_context.ts +17 -5
- package/src/scripts/lint_new_skill_gate.ts +9 -3
- package/src/scripts/lint_no_python_twin_rationale.ts +17 -2
- package/src/scripts/lint_originality.ts +1 -1
- package/src/scripts/lint_skill_originality.ts +1 -1
- package/src/scripts/lint_ticket_buildable.ts +1 -1
- package/src/scripts/mcp_server/tools.ts +4 -4
- package/src/scripts/measure_scope_dedup.ts +224 -0
- package/src/scripts/memory_lookup.ts +0 -0
- package/src/scripts/mine_session.ts +98 -0
- package/src/scripts/orchestration_payload_hash_drift.ts +145 -0
- package/src/scripts/preamble_byte_census.ts +574 -0
- package/src/scripts/probe_skill_registration.ts +2 -2
- package/src/scripts/redact_hook_capture.ts +13 -0
- package/src/scripts/release.ts +65 -10
- package/src/scripts/router_telemetry.ts +1 -1
- package/src/scripts/second_brain_retrieval.ts +14 -4
- package/src/scripts/skill_linter.ts +5 -0
- package/src/scripts/surface-tiers.yml +2 -0
- package/src/scripts/validate_pack_yaml.ts +0 -0
- package/src/server/schemas/settings.ts +8 -0
- package/src/shared/userMd/utils.ts +31 -0
- package/dist/agent-src/rules/telegraph-speak.md +0 -87
|
@@ -186,14 +186,14 @@ Pairs with [`context-hygiene § Read-Loop Detection`](../../rules/context-hygien
|
|
|
186
186
|
the feedback loop.
|
|
187
187
|
|
|
188
188
|
**Failure-signature triage — same taxonomy as [`context-hygiene § The 3-Failure Rule`](../../rules/context-hygiene.md#the-3-failure-rule).**
|
|
189
|
-
The **failure signature**
|
|
190
|
-
|
|
191
|
-
twice → stop and pivot** —
|
|
192
|
-
repeated identical signature means the hypothesis is
|
|
193
|
-
**new error signature each attempt = progress** and
|
|
194
|
-
**hard-blocker classes** (missing credentials,
|
|
195
|
-
limit, external-service `5xx`) skip retries
|
|
196
|
-
occurrence; another lap cannot fix them.
|
|
189
|
+
The **failure signature** is the **same target + same error class** (same failing
|
|
190
|
+
test with the same assertion, same lint rule id, same build error). The **same
|
|
191
|
+
failure signature twice → stop and pivot** — do not spend the next lap on a
|
|
192
|
+
near-identical retry; a repeated identical signature means the hypothesis is
|
|
193
|
+
wrong, not under-applied. A **new error signature each attempt = progress** and
|
|
194
|
+
the counter continues. And the **hard-blocker classes** (missing credentials,
|
|
195
|
+
permission denied, spend/quota/rate limit, external-service `5xx`) skip retries
|
|
196
|
+
entirely — surface on first occurrence; another lap cannot fix them.
|
|
197
197
|
|
|
198
198
|
**Anti-patterns this loop prevents:**
|
|
199
199
|
|
|
@@ -268,11 +268,11 @@ When reporting debug findings to the user:
|
|
|
268
268
|
|
|
269
269
|
## Knowledge capture (`mistake_made` event)
|
|
270
270
|
|
|
271
|
-
|
|
272
|
-
implementing (documented convention wrong,
|
|
273
|
-
|
|
274
|
-
knowledge intake — never rewrite the page
|
|
275
|
-
[`knowledge-pages`](../../templates/contexts/knowledge-pages.md)):
|
|
271
|
+
If the root cause traces to a `agents/knowledge/` page that was
|
|
272
|
+
followed while implementing (a documented convention was wrong, an
|
|
273
|
+
API shape page was stale, a procedure was incomplete), append a
|
|
274
|
+
`mistake_made` event to the knowledge intake — never rewrite the page
|
|
275
|
+
mid-task (see [`knowledge-pages`](../../agent-src/templates/contexts/knowledge-pages.md)):
|
|
276
276
|
|
|
277
277
|
```bash
|
|
278
278
|
npx tsx node_modules/@event4u/agent-config/src/scripts/emit_knowledge_event.ts \
|
|
@@ -283,17 +283,18 @@ npx tsx node_modules/@event4u/agent-config/src/scripts/emit_knowledge_event.ts \
|
|
|
283
283
|
--recurrence-key "<stable slug for this class of mistake>"
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
Verify the append landed: check the command's exit code (0 =
|
|
287
|
-
|
|
286
|
+
Verify the append landed: check the command's exit code (0 = appended),
|
|
287
|
+
then `grep <recurrenceKey> agents/knowledge/intake/events-*.jsonl`
|
|
288
288
|
finds the new line.
|
|
289
289
|
|
|
290
|
-
**Live contradiction exception.**
|
|
291
|
-
right now (observed ≠ documented, not a one-off)
|
|
292
|
-
case instead — surface the
|
|
293
|
-
|
|
294
|
-
|
|
290
|
+
**Live contradiction exception.** If the followed page is DEMONSTRABLY
|
|
291
|
+
wrong right now (observed reality ≠ documented claim, not a one-off),
|
|
292
|
+
this is the hybrid immediate-fix case instead — surface the proposed
|
|
293
|
+
correction and ask before continuing (see
|
|
294
|
+
[`knowledge-pages`](../../agent-src/templates/contexts/knowledge-pages.md)
|
|
295
|
+
§ Contested entries). Approved → isolated fix commit. Declined →
|
|
295
296
|
`npx tsx node_modules/@event4u/agent-config/src/scripts/append_contested.ts` on that page, then still
|
|
296
|
-
emit the `context_stale` event above for the consolidation pass.
|
|
297
|
+
emit the `context_stale` event above it for the consolidation pass.
|
|
297
298
|
|
|
298
299
|
## Gotchas
|
|
299
300
|
|
|
@@ -153,7 +153,7 @@ Risks: <arbitrary values, !important, dark-mode gaps>
|
|
|
153
153
|
|
|
154
154
|
## Taste Dials
|
|
155
155
|
|
|
156
|
-
`DESIGN.md` `## Taste Dials
|
|
156
|
+
When `DESIGN.md` declares `## Taste Dials`, honour them: Variance → layout-family spread + asymmetry tolerance; Motion → animation budget + reduced-motion posture; Density → spacing scale + information-per-viewport. Absent → follow the design brief's inferred dials.
|
|
157
157
|
|
|
158
158
|
## Do NOT
|
|
159
159
|
|
|
@@ -31,6 +31,11 @@ Do NOT use when:
|
|
|
31
31
|
|
|
32
32
|
## Procedure: Write a spec
|
|
33
33
|
|
|
34
|
+
1. **Inspect existing specs and ADRs** — Read `agents/features/`, `agents/decisions/` (or `docs/adr/`) and any linked tickets to identify prior art, naming, and status conventions.
|
|
35
|
+
2. **Pick the document shape** — Choose Technical Spec, PRD, RFC, or ADR based on audience (engineering vs. product) and decision irreversibility.
|
|
36
|
+
3. **Draft the document** — Use the template below; fill Status, Summary, Problem, Goals, Non-Goals, Proposed Solution.
|
|
37
|
+
4. **Verify** — Confirm goals are measurable, non-goals are explicit, and at least one reviewer is named before circulating.
|
|
38
|
+
|
|
34
39
|
### Technical Specification (full)
|
|
35
40
|
|
|
36
41
|
For complex features or systems. Stored in `agents/features/` or module `agents/features/`.
|
|
@@ -111,8 +111,8 @@ Used for workers and schedulers:
|
|
|
111
111
|
|
|
112
112
|
### GitHub OIDC IAM role
|
|
113
113
|
|
|
114
|
-
Each
|
|
115
|
-
- OIDC trust policy (scoped to repo +
|
|
114
|
+
Each environment has a GitHub IAM role with:
|
|
115
|
+
- OIDC trust policy (scoped to repo + environment)
|
|
116
116
|
- Policies for ECR push/pull, ECS deployment, Secrets Manager read, CloudWatch logs
|
|
117
117
|
|
|
118
118
|
## Output format
|
|
@@ -17,7 +17,7 @@ Use this skill when working with Terragrunt configurations (`.hcl` files), manag
|
|
|
17
17
|
|
|
18
18
|
## Procedure: Write Terragrunt config
|
|
19
19
|
|
|
20
|
-
1. Read the `root.hcl` in the target
|
|
20
|
+
1. Read the `root.hcl` in the target environment (`environments/pro/root.hcl` or `environments/sta/root.hcl`).
|
|
21
21
|
2. Check existing `terragrunt.hcl` files in sibling directories for patterns.
|
|
22
22
|
3. Read the target module's `variables.tf` to understand required inputs.
|
|
23
23
|
|
|
@@ -41,7 +41,7 @@ environments/
|
|
|
41
41
|
|
|
42
42
|
## Root configuration (`root.hcl`)
|
|
43
43
|
|
|
44
|
-
The root HCL defines shared settings for all modules in an
|
|
44
|
+
The root HCL defines shared settings for all modules in an environment:
|
|
45
45
|
|
|
46
46
|
### Environment variables
|
|
47
47
|
|
|
@@ -55,9 +55,9 @@ locals {
|
|
|
55
55
|
}
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
- `.env.yaml` — committed, shared
|
|
58
|
+
- `.env.yaml` — committed, shared environment config
|
|
59
59
|
- `.env.local.yaml` — gitignored, local overrides (AWS profiles, etc.)
|
|
60
|
-
- Real
|
|
60
|
+
- Real environment variables take precedence over file values.
|
|
61
61
|
|
|
62
62
|
### Remote state
|
|
63
63
|
|
|
@@ -106,7 +106,7 @@ Each module directory contains a `terragrunt.hcl` that:
|
|
|
106
106
|
1. **Loads module-specific variables** from a YAML file
|
|
107
107
|
2. **Includes the root config** for backend and providers
|
|
108
108
|
3. **Points to the Terraform module source**
|
|
109
|
-
4. **Declares
|
|
109
|
+
4. **Declares dependencies** on other modules
|
|
110
110
|
5. **Passes inputs** by merging dependency outputs with local variables
|
|
111
111
|
|
|
112
112
|
### Example pattern
|
|
@@ -188,19 +188,19 @@ devbox run d # terragrunt destroy
|
|
|
188
188
|
|
|
189
189
|
## Output format
|
|
190
190
|
|
|
191
|
-
1. Terragrunt HCL files with DRY
|
|
191
|
+
1. Terragrunt HCL files with DRY environment configuration
|
|
192
192
|
2. Dependency graph and remote state references
|
|
193
193
|
|
|
194
194
|
## Auto-trigger keywords
|
|
195
195
|
|
|
196
196
|
- Terragrunt
|
|
197
|
-
- multi-
|
|
197
|
+
- multi-environment
|
|
198
198
|
- DRY config
|
|
199
199
|
- remote state
|
|
200
200
|
|
|
201
201
|
## Gotcha
|
|
202
202
|
|
|
203
|
-
- Terragrunt `dependency` blocks create implicit ordering — circular
|
|
203
|
+
- Terragrunt `dependency` blocks create implicit ordering — circular dependencies cause cryptic errors.
|
|
204
204
|
- Don't duplicate Terraform variables in terragrunt.hcl — use `inputs` to pass them through.
|
|
205
205
|
- The model tends to hardcode values that should come from `include` blocks — use DRY patterns.
|
|
206
206
|
|
|
@@ -61,7 +61,7 @@ the rationalization, then reject it:
|
|
|
61
61
|
|
|
62
62
|
## Provenance
|
|
63
63
|
|
|
64
|
-
- Adapted from an external reference
|
|
64
|
+
- Adapted from an external reference (internal provenance, redacted).
|
|
65
65
|
- Council convergence (anthropic/claude-sonnet-4-5 + openai/gpt-4o,
|
|
66
66
|
2026-05-07): both members ADOPT — the catalogue surfaces specific
|
|
67
67
|
rationalization patterns that would otherwise leak past code review.
|
|
@@ -15,16 +15,17 @@ packs:
|
|
|
15
15
|
# threat-modeling
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
> **Grounded corpus (Tier-1 consultation):**
|
|
19
|
-
> controls
|
|
20
|
-
> <skills-root>/corpus-grounding/scripts/ground ground
|
|
21
|
-
> <skills-root>/threat-modeling/data/manifest.json
|
|
22
|
-
> returns surface class, ATT&CK/CWE-cited
|
|
23
|
-
> negative tests, with confidence +
|
|
24
|
-
> findings; human confirms. Corpus:
|
|
25
|
-
> (MITRE ATT&CK v16 / OWASP
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
> **Grounded corpus (Tier-1 consultation):** before enumerating from
|
|
19
|
+
> memory, ground surface → threats → controls in the adopted corpus —
|
|
20
|
+
> `./scripts-run <skills-root>/corpus-grounding/scripts/ground ground
|
|
21
|
+
> --manifest <skills-root>/threat-modeling/data/manifest.json
|
|
22
|
+
> "<surface description>"` returns the surface class, ATT&CK/CWE-cited
|
|
23
|
+
> threats, required controls, and negative tests, with confidence +
|
|
24
|
+
> evidence-gap. Propose grounded findings; the human confirms. Corpus:
|
|
25
|
+
> [`data/threats.csv`](data/threats.csv) (MITRE ATT&CK v16 / OWASP
|
|
26
|
+
> ASVS-derived, owner + cadence in the manifest).
|
|
27
|
+
|
|
28
|
+
> You are a reviewer specialized in **pre-implementation threat analysis**.
|
|
28
29
|
> Your only job is to produce a compact threat model for a planned change —
|
|
29
30
|
> actors, assets, trust boundaries, abuse cases, and the minimum controls
|
|
30
31
|
> the implementer must add. You do **not** audit existing code end-to-end,
|
|
@@ -95,7 +96,9 @@ OWASP bullets unless you can anchor them in a concrete file or line.
|
|
|
95
96
|
|
|
96
97
|
### 3b. STRIDE coverage check
|
|
97
98
|
|
|
98
|
-
Sweep the six STRIDE categories once against the change so no threat class
|
|
99
|
+
Sweep the six STRIDE categories once against the change so no threat class
|
|
100
|
+
is silently skipped. Each row names the question to ask and the control
|
|
101
|
+
family the suite already teaches — anchor any hit in a concrete file per § 3.
|
|
99
102
|
|
|
100
103
|
| STRIDE category | Ask about this change | Control family (suite reference) |
|
|
101
104
|
|---|---|---|
|
|
@@ -106,7 +109,8 @@ Sweep the six STRIDE categories once against the change so no threat class is si
|
|
|
106
109
|
| **D**enial of service | Can this path be made expensive or unbounded by an attacker? | Rate limiting + bounded queries/uploads — [`security-audit`](../security-audit/SKILL.md) § rate limiting, [`performance`](../performance/SKILL.md) |
|
|
107
110
|
| **E**levation of privilege | Can a lower-privilege actor reach a higher-privilege action or object? | Per-object authorization + tenant scope — [`authz-review`](../authz-review/SKILL.md), [`broken-access-control`](../../rules/broken-access-control.md) |
|
|
108
111
|
|
|
109
|
-
|
|
112
|
+
A category with no plausible abuse case for this change is marked "n/a —
|
|
113
|
+
no boundary crossed", not silently omitted.
|
|
110
114
|
|
|
111
115
|
### 4. Convert risks to engineering actions
|
|
112
116
|
|
|
@@ -219,5 +223,7 @@ run tests**.
|
|
|
219
223
|
- [`authz-review`](../authz-review/SKILL.md),
|
|
220
224
|
[`data-exposure-review`](../data-exposure-review/SKILL.md),
|
|
221
225
|
[`security`](../security/SKILL.md),
|
|
222
|
-
[`security-audit`](../security-audit/SKILL.md) — sibling review /
|
|
226
|
+
[`security-audit`](../security-audit/SKILL.md) — sibling review / implementation skills.
|
|
227
|
+
- Prompt-injection / agent-config defense: [`untrusted-input-defense`](../../rules/untrusted-input-defense.md),
|
|
228
|
+
[`lethal-trifecta-guard`](../../rules/lethal-trifecta-guard.md) — always-on authoring rules; consult when modelling injection abuse cases.
|
|
223
229
|
- Attack surface documentation: [`docs/threat-model.md`](../../docs/threat-model.md) — package trust boundaries, assets, and known risks.
|
|
@@ -77,7 +77,7 @@ Goal: understand structure, identify major components, detect investigation path
|
|
|
77
77
|
### Investigation mode
|
|
78
78
|
|
|
79
79
|
Use when there is a concrete issue inside a large or unclear system.
|
|
80
|
-
Goal: isolate the affected area, route into root-cause analysis, verify likely
|
|
80
|
+
Goal: isolate the affected area, route into root-cause analysis, verify likely causes with evidence.
|
|
81
81
|
|
|
82
82
|
### Optimization mode
|
|
83
83
|
|
|
@@ -174,7 +174,6 @@ The files must:
|
|
|
174
174
|
./scripts-run src/scripts/check_condensation # No errors for this file
|
|
175
175
|
./scripts-run src/scripts/condense --generate-tools # Regenerate symlinks
|
|
176
176
|
bash scripts/condense.sh --check # dist/agent-src/ in sync with source
|
|
177
|
-
bash scripts/condense.sh --check-hashes # All hashes match
|
|
178
177
|
```
|
|
179
178
|
|
|
180
179
|
If not in the package repo, note that these checks will run in CI after the PR is created.
|
|
@@ -141,15 +141,15 @@ Run the project's fastest test target. If the baseline **fails**, stop
|
|
|
141
141
|
and report — ask whether to fix main first or proceed. Never silently
|
|
142
142
|
continue with a red baseline.
|
|
143
143
|
|
|
144
|
-
**Optional `env-bootstrap` entry — stand-up beyond deps.** Some projects
|
|
145
|
-
more than package install to stand up (start services, seed fixtures,
|
|
146
|
-
config). A project MAY declare a single bootstrap entry — an
|
|
147
|
-
target in its runner file (`Taskfile.yml` / `Makefile` /
|
|
148
|
-
`scripts`) or a documented equivalent. When one exists,
|
|
149
|
-
suggested next action** after the baseline — suggest,
|
|
150
|
-
autonomous surface). Long-running work then reads
|
|
151
|
-
entry instead of re-deriving it each session. If
|
|
152
|
-
the whole stand-up.
|
|
144
|
+
**Optional `env-bootstrap` entry — stand-up beyond deps.** Some projects
|
|
145
|
+
need more than package install to stand up (start services, seed fixtures,
|
|
146
|
+
generate config). A project MAY declare a single bootstrap entry — an
|
|
147
|
+
`env-bootstrap` target in its runner file (`Taskfile.yml` / `Makefile` /
|
|
148
|
+
`package.json` `scripts`) or a documented equivalent. When one exists,
|
|
149
|
+
**surface it as the suggested next action** after the baseline — suggest,
|
|
150
|
+
never auto-execute (no new autonomous surface). Long-running work then reads
|
|
151
|
+
one deterministic stand-up entry instead of re-deriving it each session. If
|
|
152
|
+
none exists, deps + baseline is the whole stand-up.
|
|
153
153
|
|
|
154
154
|
## Multi-tool parallel work
|
|
155
155
|
|
|
@@ -98,7 +98,9 @@ Format as a clear, concise summary:
|
|
|
98
98
|
|
|
99
99
|
## Output format
|
|
100
100
|
|
|
101
|
-
Always
|
|
101
|
+
1. Always close with a numbered options block — the user must be able to reply with a single digit.
|
|
102
|
+
2. Each option is one line: action verb + scope + reversibility hint (e.g., "1. Drop the duplicate — keep existing X (reversible)").
|
|
103
|
+
3. Never present more than 5 options; if more exist, group them under "other" with a follow-up question.
|
|
102
104
|
|
|
103
105
|
## Gotchas
|
|
104
106
|
|
|
@@ -94,15 +94,13 @@ on the changed scope."* — not *"everything looks good"*.
|
|
|
94
94
|
## The end-of-work sequence
|
|
95
95
|
|
|
96
96
|
**Gate zero:** when `quality.local_auto_run` is `false` or missing (the
|
|
97
|
-
default), steps 2–3 below do NOT run — user runs quality tools
|
|
98
|
-
manually
|
|
97
|
+
default), steps 2–3 below do NOT run — the user runs quality tools
|
|
98
|
+
manually and remote CI is the authoritative gate (see
|
|
99
99
|
[`quality-tools` § Execution policy](../quality-tools/SKILL.md)). Run
|
|
100
100
|
only the narrowest probe the claim needs (step 1, a `curl`, a syntax
|
|
101
101
|
check on the edited file) and close with *"quality gates delegated to
|
|
102
|
-
remote CI"* — never a pass claim for tools that did not run.
|
|
103
|
-
sequence applies when `local_auto_run: true
|
|
104
|
-
|
|
105
|
-
When all code changes are done and you are ready to report completion:
|
|
102
|
+
remote CI"* — never a pass claim for tools that did not run. The full
|
|
103
|
+
sequence applies when `local_auto_run: true`:
|
|
106
104
|
|
|
107
105
|
1. **Targeted tests** — the test(s) covering the changed code pass.
|
|
108
106
|
2. **Full test suite** — only after targeted pass is green.
|
|
@@ -11,32 +11,33 @@ packs:
|
|
|
11
11
|
|
|
12
12
|
# verify-repair-loop
|
|
13
13
|
|
|
14
|
-
>
|
|
15
|
-
> **executed verdict**
|
|
16
|
-
> threshold
|
|
17
|
-
> *after* the numeric gate passes (staged escalation).
|
|
18
|
-
> conversation, not a process: no daemon, no persistent cross-session state.
|
|
19
|
-
>
|
|
20
|
-
>
|
|
14
|
+
> A bounded **generate → run → revise → re-run** cycle whose pass signal is the
|
|
15
|
+
> **executed verdict** — the project's real test/quality output, scored against a
|
|
16
|
+
> numeric threshold — escalated to a **judge** for qualitative confirmation only
|
|
17
|
+
> *after* the numeric gate passes (staged escalation). The loop is the
|
|
18
|
+
> conversation, not a process: no daemon, no persistent cross-session state. Use
|
|
19
|
+
> it to drive a change to green when the verdict source is *runtime execution*,
|
|
20
|
+
> not a judge reading a diff.
|
|
21
21
|
|
|
22
22
|
## When to use
|
|
23
23
|
|
|
24
|
-
*
|
|
25
|
-
iterate until checks pass before review.
|
|
24
|
+
* A change must converge against the project's **test runner / quality tools**
|
|
25
|
+
and you want the agent to iterate until checks pass before asking for review.
|
|
26
26
|
* Test/quality coverage is the authoritative signal (high coverage, actionable
|
|
27
27
|
failures) — not subjective craft.
|
|
28
|
-
*
|
|
28
|
+
* You want bounded auto-repair with a hard stop, not an open-ended fix loop.
|
|
29
29
|
|
|
30
30
|
Do NOT use when:
|
|
31
31
|
|
|
32
|
-
*
|
|
33
|
-
incomplete → `do-and-judge` in
|
|
32
|
+
* The verdict is **subjective craft** (naming, architecture, style) or coverage
|
|
33
|
+
is incomplete → use `do-and-judge` in
|
|
34
34
|
[`subagent-orchestration`](../subagent-orchestration/SKILL.md) (judge reads the
|
|
35
|
-
diff
|
|
36
|
-
*
|
|
35
|
+
diff and is sovereign).
|
|
36
|
+
* You only need a **one-shot** multi-judge review of a finished diff → use
|
|
37
37
|
[`/review-changes`](../../commands/review/changes.md).
|
|
38
|
-
*
|
|
39
|
-
**deferred** (see Scope); use test/quality verdicts until that trigger
|
|
38
|
+
* The verdict must come from a **live app** (Playwright against running services)
|
|
39
|
+
→ **deferred** (see Scope below); use test/quality verdicts until that trigger
|
|
40
|
+
fires.
|
|
40
41
|
|
|
41
42
|
## The Iron Law
|
|
42
43
|
|
|
@@ -48,22 +49,22 @@ EVEN IF THE OVERALL SCORE ROSE.
|
|
|
48
49
|
GENERATOR NEVER APPROVES ITS OWN CHANGE.
|
|
49
50
|
```
|
|
50
51
|
|
|
51
|
-
A loop
|
|
52
|
-
assertions, weaken checks — and still hit the threshold. The numeric gate
|
|
53
|
-
decides **when to escalate**; a judge with veto confirms the change is real.
|
|
52
|
+
A loop that optimizes for `pass_count ≥ N` can game the metric — delete tests,
|
|
53
|
+
skip assertions, weaken checks — and still hit the threshold. The numeric gate
|
|
54
|
+
only decides **when to escalate**; a judge with veto confirms the change is real.
|
|
54
55
|
|
|
55
56
|
## Procedure
|
|
56
57
|
|
|
57
58
|
### 1. Freeze the contract (spec fingerprint)
|
|
58
59
|
|
|
59
|
-
Before the first run,
|
|
60
|
+
Before the first run, capture what "done" means and snapshot it:
|
|
60
61
|
|
|
61
62
|
* the task's acceptance criteria / requirement,
|
|
62
|
-
* the
|
|
63
|
-
* a **spec fingerprint** = hash of (requirement text + check set).
|
|
63
|
+
* the set of checks that define the verdict (test files + quality commands),
|
|
64
|
+
* a **spec fingerprint** = a hash of (requirement text + the check set).
|
|
64
65
|
|
|
65
|
-
Record the **baseline green set** — checks
|
|
66
|
-
regressions are detectable. Pick verdict commands per the project's
|
|
66
|
+
Record the **baseline green set** — which checks pass *before* any edit — so
|
|
67
|
+
regressions are detectable. Pick the verdict commands per the project's
|
|
67
68
|
[`toolchain-resolver`](../../contexts/execution/toolchain-resolver.md) (PHP / JS-TS
|
|
68
69
|
/ Python / Go / Rust), not a hardcoded runner.
|
|
69
70
|
|
|
@@ -81,37 +82,39 @@ regressions are detectable. Pick verdict commands per the project's
|
|
|
81
82
|
|
|
82
83
|
Each iteration is agent turns, never executing control-flow code:
|
|
83
84
|
|
|
84
|
-
1. **Generate / revise** — smallest change toward the contract.
|
|
85
|
-
2. **Run** — execute verdict commands; parse the **structured** result
|
|
86
|
-
(green/total, which checks failed).
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
1. **Generate / revise** — make the smallest change toward the contract.
|
|
86
|
+
2. **Run** — execute the verdict commands; parse the **structured** result
|
|
87
|
+
(counts green/total, which checks failed). This is one tool call, read in
|
|
88
|
+
context.
|
|
89
|
+
3. **Score + regression check** — compute the numeric score; compare failures
|
|
90
|
+
against the baseline green set.
|
|
89
91
|
* **Regression** (a baseline-green check now fails) → STOP, hand back with the
|
|
90
92
|
regression named, even if the score rose. No whack-a-mole.
|
|
91
93
|
* **Plateau** (last `plateau_window` scores within `tolerance`) → STOP; surface
|
|
92
94
|
suspected flakiness or a stuck point. Do not thrash.
|
|
93
95
|
* **`attempts == max_attempts`** → STOP, hand back the best envelope.
|
|
94
96
|
4. **Numeric gate** — score `< threshold` and attempts remain → back to step 1
|
|
95
|
-
(attempts++). Score `≥ threshold`, no regression → **escalate** (step 4
|
|
97
|
+
(attempts++). Score `≥ threshold`, no regression → **escalate** (step 4 of the
|
|
98
|
+
stage).
|
|
96
99
|
|
|
97
100
|
### 4. Judge escalation (only after the numeric gate passes)
|
|
98
101
|
|
|
99
102
|
Dispatch the judge as a **subagent with fresh context** (the `judge-*` cluster via
|
|
100
|
-
[`subagent-orchestration`](../subagent-orchestration/SKILL.md))
|
|
101
|
-
diff + executed results** — never the generator's reasoning. This is the real
|
|
103
|
+
[`subagent-orchestration`](../subagent-orchestration/SKILL.md)) that sees **only the
|
|
104
|
+
diff + the executed results** — never the generator's reasoning. This is the real
|
|
102
105
|
generator ≠ judge separation; single-agent persona-switching is theater.
|
|
103
106
|
|
|
104
107
|
* judge `apply` → DONE.
|
|
105
|
-
* judge `revise` → back to step 3.1 (attempts++; bounded).
|
|
108
|
+
* judge `revise` → back to step 3.1 (attempts++; still bounded).
|
|
106
109
|
* judge `reject` → STOP, hand back; the approach must change.
|
|
107
110
|
|
|
108
111
|
### 5. Mid-loop invalidation (user-interrupt-priority)
|
|
109
112
|
|
|
110
|
-
Re-check the spec fingerprint each iteration. If the user changes the
|
|
111
|
-
mid-loop (a new instruction in the conversation), the fingerprint
|
|
112
|
-
**abort and hand back** per
|
|
113
|
-
[`user-interrupt-priority`](../../rules/user-interrupt-priority.md). Never
|
|
114
|
-
against a stale contract.
|
|
113
|
+
Re-check the spec fingerprint each iteration. If the user changes the
|
|
114
|
+
requirement mid-loop (a new instruction in the conversation), the fingerprint
|
|
115
|
+
changes → **abort and hand back** per
|
|
116
|
+
[`user-interrupt-priority`](../../rules/user-interrupt-priority.md). Never keep
|
|
117
|
+
iterating against a stale contract.
|
|
115
118
|
|
|
116
119
|
## Scope — what runs, what is deferred
|
|
117
120
|
|
|
@@ -131,8 +134,8 @@ Before finalizing, confirm:
|
|
|
131
134
|
|
|
132
135
|
1. The numeric gate **escalated to a judge** — it did not apply on its own.
|
|
133
136
|
2. No baseline-green check regressed (or the loop stopped and said so).
|
|
134
|
-
3. The loop stopped at `max_attempts`, a plateau, or a judge `apply` — never
|
|
135
|
-
unbounded.
|
|
137
|
+
3. The loop stopped at `max_attempts`, a plateau, or a judge `apply` — never
|
|
138
|
+
ran unbounded.
|
|
136
139
|
4. The judge saw only the diff + results, dispatched in fresh context.
|
|
137
140
|
5. No daemon / persistent runtime introduced.
|
|
138
141
|
|
|
@@ -149,12 +152,12 @@ Evidence: <green/total> · regressions: none | <named checks>
|
|
|
149
152
|
|
|
150
153
|
Required fields (ordered):
|
|
151
154
|
|
|
152
|
-
1. **Contract** — frozen requirement + threshold + `allow_regressions`.
|
|
153
|
-
2. **Attempts** — `k/max`, score history, exact stop reason
|
|
155
|
+
1. **Contract** — the frozen requirement + threshold + `allow_regressions`.
|
|
156
|
+
2. **Attempts** — `k/max`, the score history, and the exact stop reason
|
|
154
157
|
(`threshold` / `plateau` / `cap` / `regression` / `reject`).
|
|
155
158
|
3. **Verdict** — `DONE`, `DONE_WITH_CONCERNS`, or `BLOCKED`.
|
|
156
|
-
4. **Judge** — dispatched judge skill
|
|
157
|
-
(omit only when the loop stopped before escalation).
|
|
159
|
+
4. **Judge** — the dispatched judge skill and its `apply` / `revise` /
|
|
160
|
+
`reject` verdict (omit only when the loop stopped before escalation).
|
|
158
161
|
5. **Evidence** — final `green/total` and any regressed checks by name.
|
|
159
162
|
|
|
160
163
|
## Examples
|
|
@@ -173,20 +176,23 @@ iter2 fixes A, breaks B, 92% → "PASS" ✗ regression ignored
|
|
|
173
176
|
|
|
174
177
|
## Gotcha
|
|
175
178
|
|
|
176
|
-
* **Metric gaming** — agent "passes" by deleting a failing test or
|
|
177
|
-
assertion. The numeric gate
|
|
178
|
-
safeguard.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
the
|
|
188
|
-
* **
|
|
189
|
-
|
|
179
|
+
* **Metric gaming** — the agent "passes" by deleting a failing test or
|
|
180
|
+
weakening an assertion. The numeric gate cannot catch this; the
|
|
181
|
+
fresh-context judge is the safeguard. If the diff *removes* checks,
|
|
182
|
+
that is a `reject`, not a `pass`.
|
|
183
|
+
* **Flake mistaken for a plateau** — a single non-deterministic test flips
|
|
184
|
+
the score and the window-comparison reads it as "no improvement". Re-run
|
|
185
|
+
the suspected check before declaring a plateau; surface flakiness instead
|
|
186
|
+
of thrashing.
|
|
187
|
+
* **Score rose, but a regression hid inside it** — fixing 6 checks while
|
|
188
|
+
breaking 2 still raises the total. Without the regression guard the loop
|
|
189
|
+
ships a regression. Always diff failures against the baseline green set,
|
|
190
|
+
not just the aggregate score.
|
|
191
|
+
* **Persona-switch theater** — asking the same agent to "now judge what you
|
|
192
|
+
wrote" is not separation. Dispatch the judge as a fresh-context subagent
|
|
193
|
+
that never saw the generator's reasoning.
|
|
194
|
+
* **Stale contract** — iterating against a requirement the user changed
|
|
195
|
+
mid-loop. Re-check the spec fingerprint each turn; a change aborts.
|
|
190
196
|
|
|
191
197
|
## Do NOT
|
|
192
198
|
|
|
@@ -208,6 +214,6 @@ iter2 fixes A, breaks B, 92% → "PASS" ✗ regression ignored
|
|
|
208
214
|
* [`no-runtime-boundary`](../../../docs/contracts/no-runtime-boundary.md) — the
|
|
209
215
|
runtime-free constraint this loop honors.
|
|
210
216
|
* Optional impact pre-step (when a code-graph is present, ADR-124): run
|
|
211
|
-
`agent-config code-graph affected --since <ref>` to scope which symbols a
|
|
212
|
-
before choosing verdict sources — cited, not duplicated; the
|
|
213
|
-
unchanged when no graph exists.
|
|
217
|
+
`agent-config code-graph affected --since <ref>` to scope which symbols a
|
|
218
|
+
change touches before choosing verdict sources — cited, not duplicated; the
|
|
219
|
+
loop itself is unchanged when no graph exists.
|
|
@@ -124,13 +124,13 @@ Any "no" → revise that block before handing off.
|
|
|
124
124
|
|
|
125
125
|
## Policies
|
|
126
126
|
|
|
127
|
-
11-block cinematic prompt is live-action shape — real-person
|
|
127
|
+
The 11-block cinematic prompt is live-action shape — real-person and brand-impersonation risks are the highest in the cluster. Before emitting:
|
|
128
128
|
|
|
129
|
-
- [`agents/settings/policies/media/likeness.md`](../../../agents/settings/policies/media/likeness.md) — prompt names
|
|
130
|
-
- [`agents/settings/policies/media/public-figures.md`](../../../agents/settings/policies/media/public-figures.md) — subject is recognised public figure.
|
|
131
|
-
- [`agents/settings/policies/media/brand-impersonation.md`](../../../agents/settings/policies/media/brand-impersonation.md) — prompt copies journalism / broadcaster / regulated-industry visual identity.
|
|
132
|
-
- [`agents/settings/policies/media/style.md`](../../../agents/settings/policies/media/style.md) — LIGHT / LENS anchored to named living cinematographer's signature.
|
|
133
|
-
- [`agents/settings/policies/media/disclosure.md`](../../../agents/settings/policies/media/disclosure.md) — every distributed live-action AI clip carries non-removable AI-generation disclosure.
|
|
129
|
+
- [`agents/settings/policies/media/likeness.md`](../../../agents/settings/policies/media/likeness.md) — when the prompt names or visually identifies a real person on camera.
|
|
130
|
+
- [`agents/settings/policies/media/public-figures.md`](../../../agents/settings/policies/media/public-figures.md) — when the subject is a recognised public figure.
|
|
131
|
+
- [`agents/settings/policies/media/brand-impersonation.md`](../../../agents/settings/policies/media/brand-impersonation.md) — when the prompt copies a journalism / broadcaster / regulated-industry visual identity.
|
|
132
|
+
- [`agents/settings/policies/media/style.md`](../../../agents/settings/policies/media/style.md) — when LIGHT / LENS choices are anchored to a named living cinematographer's signature.
|
|
133
|
+
- [`agents/settings/policies/media/disclosure.md`](../../../agents/settings/policies/media/disclosure.md) — every distributed live-action AI clip carries the non-removable AI-generation disclosure.
|
|
134
134
|
|
|
135
|
-
Refuse-and-surface at directorial layer; live-action realism amplifies every
|
|
135
|
+
Refuse-and-surface at the directorial layer; live-action realism amplifies every policy gap downstream.
|
|
136
136
|
|
|
@@ -101,7 +101,7 @@ A worktree is **merge-ready** only when ALL hold:
|
|
|
101
101
|
|
|
102
102
|
### 4. Cleanup discipline
|
|
103
103
|
|
|
104
|
-
Removal gated by the deterministic helper (edge-case-tested: detached
|
|
104
|
+
Removal is gated by the deterministic helper (edge-case-tested: detached
|
|
105
105
|
HEAD, branch without remote, tag-only reachability, deleted remote
|
|
106
106
|
branch, untracked files, paths with spaces):
|
|
107
107
|
|
|
@@ -125,8 +125,8 @@ Exit `0` → removal allowed; exit `1` → refuse, gates in order:
|
|
|
125
125
|
Then: **remove, never delete** — `git worktree remove <path>`, then
|
|
126
126
|
`git worktree prune`. Branch deletion is a separate, permission-gated
|
|
127
127
|
step (`scope-control`); never force-delete (`-D`) as part of cleanup.
|
|
128
|
-
Cross-worktree scope-lock overlaps
|
|
129
|
-
(surfaced by `/worktree status`).
|
|
128
|
+
Cross-worktree scope-lock overlaps are scanned via
|
|
129
|
+
`worktree_cleanup_check scope-overlap` (surfaced by `/worktree status`).
|
|
130
130
|
|
|
131
131
|
## Host-native mapping
|
|
132
132
|
|
|
@@ -39,7 +39,7 @@ schema_version: 1
|
|
|
39
39
|
# CI guard: a release bump of `package.json` must update this value
|
|
40
40
|
# in lockstep — see scripts/check_template_pin_drift.ts (road-to-
|
|
41
41
|
# portable-runtime-and-update-check P3.3).
|
|
42
|
-
agent_config_version: "9.
|
|
42
|
+
agent_config_version: "9.10.0"
|
|
43
43
|
|
|
44
44
|
# --- Project identity ---
|
|
45
45
|
project:
|