@event4u/agent-config 14.23.0 → 16.0.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/.augment-plugin/marketplace.json +3 -3
- package/.augment-plugin/plugin.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +144 -152
- package/README.md +1 -1
- package/dist/agent-src/commands/agent-handoff.md +8 -7
- package/dist/agent-src/commands/agents/init.md +1 -1
- package/dist/agent-src/commands/agents/user/accept.md +4 -4
- package/dist/agent-src/commands/agents/user/delete.md +2 -2
- package/dist/agent-src/commands/agents/user/init.md +3 -3
- package/dist/agent-src/commands/agents/user/review.md +3 -3
- package/dist/agent-src/commands/agents/user/show.md +3 -3
- package/dist/agent-src/commands/agents/user/update.md +2 -2
- package/dist/agent-src/commands/agents/user.md +6 -6
- package/dist/agent-src/commands/analytics/prune.md +1 -1
- package/dist/agent-src/commands/analytics/show.md +2 -2
- package/dist/agent-src/commands/analyze/decision.md +2 -2
- package/dist/agent-src/commands/analyze/inbox.md +5 -5
- package/dist/agent-src/commands/analyze/incident.md +3 -3
- package/dist/agent-src/commands/analyze/near-miss.md +3 -3
- package/dist/agent-src/commands/analyze/postmortem.md +4 -4
- package/dist/agent-src/commands/analyze/premortem.md +2 -2
- package/dist/agent-src/commands/analyze.md +2 -2
- package/dist/agent-src/commands/bug/fix.md +1 -1
- package/dist/agent-src/commands/bug/investigate.md +2 -2
- package/dist/agent-src/commands/cost/profile.md +3 -3
- package/dist/agent-src/commands/design.md +1 -1
- package/dist/agent-src/commands/feature/explore.md +1 -1
- package/dist/agent-src/commands/feature/plan.md +2 -2
- package/dist/agent-src/commands/feature/roadmap.md +2 -2
- package/dist/agent-src/commands/ghostwriter/fetch.md +4 -4
- package/dist/agent-src/commands/ghostwriter/list.md +1 -1
- package/dist/agent-src/commands/ghostwriter/show.md +1 -1
- package/dist/agent-src/commands/ghostwriter/write.md +9 -9
- package/dist/agent-src/commands/humanize.md +6 -6
- package/dist/agent-src/commands/jira-ticket.md +1 -1
- package/dist/agent-src/commands/judge/solo.md +1 -1
- package/dist/agent-src/commands/judge.md +1 -1
- package/dist/agent-src/commands/knowledge/cross-repo.md +1 -1
- package/dist/agent-src/commands/knowledge/forget.md +1 -1
- package/dist/agent-src/commands/knowledge/ingest.md +2 -2
- package/dist/agent-src/commands/knowledge/list.md +1 -1
- package/dist/agent-src/commands/memory/add.md +3 -3
- package/dist/agent-src/commands/memory/load.md +4 -4
- package/dist/agent-src/commands/memory/mine-session.md +1 -1
- package/dist/agent-src/commands/memory/promote.md +4 -4
- package/dist/agent-src/commands/memory/propose.md +2 -2
- package/dist/agent-src/commands/mode.md +5 -5
- package/dist/agent-src/commands/post-as/ghostwriter.md +3 -3
- package/dist/agent-src/commands/post-as/me.md +7 -7
- package/dist/agent-src/commands/pr/create.md +1 -1
- package/dist/agent-src/commands/pr/merge.md +1 -1
- package/dist/agent-src/commands/profile/activate.md +1 -1
- package/dist/agent-src/commands/profile/show.md +1 -1
- package/dist/agent-src/commands/research/deep.md +2 -2
- package/dist/agent-src/commands/research/report.md +2 -2
- package/dist/agent-src/commands/review/changes.md +1 -1
- package/dist/agent-src/commands/review/routing.md +1 -1
- package/dist/agent-src/commands/roadmap/create.md +4 -3
- package/dist/agent-src/commands/roadmap/materialize.md +2 -2
- package/dist/agent-src/commands/roadmap/next.md +1 -1
- package/dist/agent-src/commands/roadmap/process-full.md +2 -2
- package/dist/agent-src/commands/security-audit-config.md +3 -3
- package/dist/agent-src/commands/skill/preview.md +1 -1
- package/dist/agent-src/commands/skills/discover.md +1 -1
- package/dist/agent-src/commands/sync/agent-settings.md +2 -2
- package/dist/agent-src/commands/sync/gitignore/fix.md +1 -1
- package/dist/agent-src/commands/tests/create.md +1 -1
- package/dist/agent-src/commands/tests/e2e-heal.md +1 -1
- package/dist/agent-src/commands/tests/e2e-plan.md +1 -1
- package/dist/agent-src/contexts/authority/kernel-rule-edits.md +6 -6
- package/dist/agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +1 -2
- package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +2 -2
- package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +88 -1
- package/dist/agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +51 -1
- package/dist/agent-src/contexts/contracts/frugality-charter.md +1 -1
- package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +1 -1
- package/dist/agent-src/contexts/execution/auto-orchestration-activation.md +1 -1
- package/dist/agent-src/contexts/execution/autonomy-mechanics.md +1 -1
- package/dist/agent-src/contexts/execution/cheap-question-mechanics.md +1 -1
- package/dist/agent-src/contexts/execution/contract-decision-sheet.md +3 -3
- package/dist/agent-src/contexts/execution/mandated-lines.md +1 -1
- package/dist/agent-src/contexts/execution/non-interactive-contract.md +1 -1
- package/dist/agent-src/contexts/execution/orchestration-telemetry.md +1 -1
- package/dist/agent-src/contexts/execution/plan-confidence-gate.md +5 -5
- package/dist/agent-src/contexts/execution/roadmap-execution-contract.md +1 -1
- package/dist/agent-src/contexts/execution/subagent-modes-detail.md +1 -1
- package/dist/agent-src/contexts/execution/subagent-routing.md +2 -2
- package/dist/agent-src/contexts/execution/subagent-spawn-contract.md +1 -1
- package/dist/agent-src/contexts/execution/user-memory-channels.md +3 -3
- package/dist/agent-src/contexts/execution/verification-mechanics.md +1 -1
- package/dist/agent-src/contexts/judges/persona-voice-rubric.md +2 -2
- package/dist/agent-src/guidelines/abstraction-thresholds.md +88 -0
- package/dist/agent-src/guidelines/agent-infra/5w2h-analysis.md +260 -0
- package/dist/agent-src/guidelines/agent-infra/active-remediation-mechanics.md +99 -0
- package/dist/agent-src/guidelines/agent-infra/agent-interaction-and-decision-quality.md +325 -0
- package/dist/agent-src/guidelines/agent-infra/api-cost-levers.md +177 -0
- package/dist/agent-src/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md +222 -0
- package/dist/agent-src/guidelines/agent-infra/ask-when-uncertain-demos.md +134 -0
- package/dist/agent-src/guidelines/agent-infra/asking-and-brevity-examples.md +198 -0
- package/dist/agent-src/guidelines/agent-infra/break-glass-usage.md +113 -0
- package/dist/agent-src/guidelines/agent-infra/carve-out-predicates.md +17 -0
- package/dist/agent-src/guidelines/agent-infra/comparison-matrix.md +179 -0
- package/dist/agent-src/guidelines/agent-infra/context-hygiene-mechanics.md +165 -0
- package/dist/agent-src/guidelines/agent-infra/corpus-grounding-authoring.md +91 -0
- package/dist/agent-src/guidelines/agent-infra/critical-thinking.md +156 -0
- package/dist/agent-src/guidelines/agent-infra/cross-source-consistency-mechanics.md +109 -0
- package/dist/agent-src/guidelines/agent-infra/developer-judgment.md +82 -0
- package/dist/agent-src/guidelines/agent-infra/direct-answers-demos.md +142 -0
- package/dist/agent-src/guidelines/agent-infra/domain-adoption-gates.md +112 -0
- package/dist/agent-src/guidelines/agent-infra/domain-eval-anti-pattern.md +53 -0
- package/dist/agent-src/guidelines/agent-infra/domain-pack-architecture.md +56 -0
- package/dist/agent-src/guidelines/agent-infra/downstream-changes-mechanics.md +91 -0
- package/dist/agent-src/guidelines/agent-infra/emphasis-budget.md +45 -0
- package/dist/agent-src/guidelines/agent-infra/engineering-memory-data-format.md +210 -0
- package/dist/agent-src/guidelines/agent-infra/evaluator-independence-mechanics.md +92 -0
- package/dist/agent-src/guidelines/agent-infra/existence-question-verdicts.md +80 -0
- package/dist/agent-src/guidelines/agent-infra/failure-signatures.md +70 -0
- package/dist/agent-src/guidelines/agent-infra/false-green.md +233 -0
- package/dist/agent-src/guidelines/agent-infra/first-principles.md +192 -0
- package/dist/agent-src/guidelines/agent-infra/framework-neutrality-patterns.md +66 -0
- package/dist/agent-src/guidelines/agent-infra/frontier-reasoning-operating-profile.md +169 -0
- package/dist/agent-src/guidelines/agent-infra/gate-authoring.md +177 -0
- package/dist/agent-src/guidelines/agent-infra/guarded-baseline.md +39 -0
- package/dist/agent-src/guidelines/agent-infra/installed-tools-manifest.md +142 -0
- package/dist/agent-src/guidelines/agent-infra/inversion-thinking.md +388 -0
- package/dist/agent-src/guidelines/agent-infra/ios-simulator-guide.md +378 -0
- package/dist/agent-src/guidelines/agent-infra/language-and-tone-examples.md +141 -0
- package/dist/agent-src/guidelines/agent-infra/layered-settings.md +317 -0
- package/dist/agent-src/guidelines/agent-infra/linked-projects-onboarding-gate.md +80 -0
- package/dist/agent-src/guidelines/agent-infra/mcp-request-signing.md +197 -0
- package/dist/agent-src/guidelines/agent-infra/memory-access.md +149 -0
- package/dist/agent-src/guidelines/agent-infra/mental-models.md +314 -0
- package/dist/agent-src/guidelines/agent-infra/minimal-safe-diff-mechanics.md +241 -0
- package/dist/agent-src/guidelines/agent-infra/missing-tool-handling.md +66 -0
- package/dist/agent-src/guidelines/agent-infra/model-recommendation.md +101 -0
- package/dist/agent-src/guidelines/agent-infra/naming.md +69 -0
- package/dist/agent-src/guidelines/agent-infra/notes-horizon-mechanics.md +90 -0
- package/dist/agent-src/guidelines/agent-infra/output-patterns.md +117 -0
- package/dist/agent-src/guidelines/agent-infra/recurring-criticism-mechanics.md +96 -0
- package/dist/agent-src/guidelines/agent-infra/reuse-verdict-mechanics.md +71 -0
- package/dist/agent-src/guidelines/agent-infra/review-routing-data-format.md +143 -0
- package/dist/agent-src/guidelines/agent-infra/roadmap-deferred-resolution-provenance.md +54 -0
- package/dist/agent-src/guidelines/agent-infra/roadmap-progress-mechanics.md +274 -0
- package/dist/agent-src/guidelines/agent-infra/role-contracts.md +209 -0
- package/dist/agent-src/guidelines/agent-infra/role-mode-router.md +89 -0
- package/dist/agent-src/guidelines/agent-infra/rule-body-migration-inventory.md +241 -0
- package/dist/agent-src/guidelines/agent-infra/rule-type-governance.md +73 -0
- package/dist/agent-src/guidelines/agent-infra/runtime-layer.md +89 -0
- package/dist/agent-src/guidelines/agent-infra/scqa-framework.md +526 -0
- package/dist/agent-src/guidelines/agent-infra/security-lint-containment.md +121 -0
- package/dist/agent-src/guidelines/agent-infra/self-improvement-pipeline.md +134 -0
- package/dist/agent-src/guidelines/agent-infra/simplicity-and-goal-demos.md +211 -0
- package/dist/agent-src/guidelines/agent-infra/six-hats.md +353 -0
- package/dist/agent-src/guidelines/agent-infra/size-and-scope.md +229 -0
- package/dist/agent-src/guidelines/agent-infra/skill-quality-checklist.md +157 -0
- package/dist/agent-src/guidelines/agent-infra/source-confidentiality-mechanics.md +109 -0
- package/dist/agent-src/guidelines/agent-infra/symptom-driven-harvest-loop.md +104 -0
- package/dist/agent-src/guidelines/agent-infra/systems-thinking.md +220 -0
- package/dist/agent-src/guidelines/agent-infra/tool-description-as-policy.md +35 -0
- package/dist/agent-src/guidelines/agent-infra/tool-integration.md +73 -0
- package/dist/agent-src/guidelines/agent-infra/traceability-field-mechanics.md +50 -0
- package/dist/agent-src/guidelines/agent-infra/untrusted-input-spotlighting.md +166 -0
- package/dist/agent-src/guidelines/agent-infra/verify-before-complete-demos.md +128 -0
- package/dist/agent-src/guidelines/augment-portability-patterns.md +70 -0
- package/dist/agent-src/guidelines/code-clarity.md +350 -0
- package/dist/agent-src/guidelines/component-oriented-and-oop-development.md +189 -0
- package/dist/agent-src/guidelines/cross-role-handoff.md +127 -0
- package/dist/agent-src/guidelines/design-antipatterns-triggers.json +18 -0
- package/dist/agent-src/guidelines/design-antipatterns.md +327 -0
- package/dist/agent-src/guidelines/design-asset-discipline.md +38 -0
- package/dist/agent-src/guidelines/design-canon.md +63 -0
- package/dist/agent-src/guidelines/design-fidelity-mechanics.md +293 -0
- package/dist/agent-src/guidelines/design-fidelity-routing.md +78 -0
- package/dist/agent-src/guidelines/design-handover-extraction.md +117 -0
- package/dist/agent-src/guidelines/design-modes.md +143 -0
- package/dist/agent-src/guidelines/design-reconciliation.md +172 -0
- package/dist/agent-src/guidelines/docs/readme-size-and-splitting.md +209 -0
- package/dist/agent-src/guidelines/e2e/playwright.md +363 -0
- package/dist/agent-src/guidelines/gtm-handoff.md +114 -0
- package/dist/agent-src/guidelines/monorepo-antipatterns.md +141 -0
- package/dist/agent-src/guidelines/php/api-design.md +115 -0
- package/dist/agent-src/guidelines/php/artisan-commands.md +81 -0
- package/dist/agent-src/guidelines/php/blade-ui.md +78 -0
- package/dist/agent-src/guidelines/php/controllers.md +90 -0
- package/dist/agent-src/guidelines/php/database.md +194 -0
- package/dist/agent-src/guidelines/php/eloquent.md +208 -0
- package/dist/agent-src/guidelines/php/flux.md +80 -0
- package/dist/agent-src/guidelines/php/general.md +207 -0
- package/dist/agent-src/guidelines/php/git.md +164 -0
- package/dist/agent-src/guidelines/php/jobs.md +111 -0
- package/dist/agent-src/guidelines/php/livewire.md +71 -0
- package/dist/agent-src/guidelines/php/logging.md +79 -0
- package/dist/agent-src/guidelines/php/naming.md +89 -0
- package/dist/agent-src/guidelines/php/patterns/dependency-injection.md +57 -0
- package/dist/agent-src/guidelines/php/patterns/dtos.md +199 -0
- package/dist/agent-src/guidelines/php/patterns/events.md +67 -0
- package/dist/agent-src/guidelines/php/patterns/factory.md +53 -0
- package/dist/agent-src/guidelines/php/patterns/pipelines.md +66 -0
- package/dist/agent-src/guidelines/php/patterns/policies.md +66 -0
- package/dist/agent-src/guidelines/php/patterns/repositories.md +122 -0
- package/dist/agent-src/guidelines/php/patterns/service-layer.md +64 -0
- package/dist/agent-src/guidelines/php/patterns/strategy.md +247 -0
- package/dist/agent-src/guidelines/php/patterns.md +28 -0
- package/dist/agent-src/guidelines/php/performance.md +92 -0
- package/dist/agent-src/guidelines/php/php-coding-patterns.md +80 -0
- package/dist/agent-src/guidelines/php/resources.md +100 -0
- package/dist/agent-src/guidelines/php/security.md +110 -0
- package/dist/agent-src/guidelines/php/sql.md +97 -0
- package/dist/agent-src/guidelines/php/validations.md +119 -0
- package/dist/agent-src/guidelines/php/websocket.md +100 -0
- package/dist/agent-src/guidelines/prompt-templates.md +189 -0
- package/dist/agent-src/guidelines/redundancy-taxonomy.md +208 -0
- package/dist/agent-src/guidelines/wing4-handoff.md +127 -0
- package/dist/agent-src/personas/README.md +1 -1
- package/dist/agent-src/personas/_template-specialist/persona.md +1 -1
- package/dist/agent-src/personas/product-owner.md +1 -1
- package/dist/agent-src/rules/active-remediation.md +1 -1
- package/dist/agent-src/rules/architecture.md +2 -2
- package/dist/agent-src/rules/artifact-drafting-protocol.md +1 -1
- package/dist/agent-src/rules/ask-when-uncertain.md +2 -2
- package/dist/agent-src/rules/brand-source-of-truth.md +9 -7
- package/dist/agent-src/rules/code-comment-discipline.md +2 -2
- package/dist/agent-src/rules/code-provenance.md +1 -1
- package/dist/agent-src/rules/content-quoting-floor.md +1 -1
- package/dist/agent-src/rules/context-hygiene.md +5 -5
- package/dist/agent-src/rules/cross-source-consistency.md +1 -1
- package/dist/agent-src/rules/design-fidelity.md +36 -46
- package/dist/agent-src/rules/direct-answers.md +2 -2
- package/dist/agent-src/rules/domain-adoption-policy.md +1 -1
- package/dist/agent-src/rules/evaluator-independence.md +1 -1
- package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +1 -1
- package/dist/agent-src/rules/icon-consistency.md +5 -1
- package/dist/agent-src/rules/improve-before-implement.md +1 -1
- package/dist/agent-src/rules/language-and-tone.md +3 -3
- package/dist/agent-src/rules/minimal-safe-diff.md +1 -1
- package/dist/agent-src/rules/notes-first-reasoning.md +2 -2
- package/dist/agent-src/rules/recurring-criticism.md +1 -1
- package/dist/agent-src/rules/roadmap-progress-sync.md +1 -1
- package/dist/agent-src/rules/role-mode-adherence.md +2 -2
- package/dist/agent-src/rules/security-sensitive-stop.md +1 -1
- package/dist/agent-src/rules/size-enforcement.md +1 -1
- package/dist/agent-src/rules/source-confidentiality.md +2 -2
- package/dist/agent-src/rules/think-before-action.md +1 -1
- package/dist/agent-src/rules/token-efficiency.md +7 -5
- package/dist/agent-src/rules/ui-audit-gate.md +3 -2
- package/dist/agent-src/rules/untrusted-input-defense.md +3 -3
- package/dist/agent-src/rules/user-interaction.md +31 -30
- package/dist/agent-src/skills/activation-design/SKILL.md +2 -2
- package/dist/agent-src/skills/adr-create/SKILL.md +5 -5
- package/dist/agent-src/skills/ai-council/SKILL.md +1 -1
- package/dist/agent-src/skills/ai-council/references/advanced-modes.md +1 -1
- package/dist/agent-src/skills/blade-ui/SKILL.md +1 -1
- package/dist/agent-src/skills/blast-radius-analyzer/SKILL.md +1 -1
- package/dist/agent-src/skills/brand-to-tokens/SKILL.md +24 -3
- package/dist/agent-src/skills/bug-analyzer/SKILL.md +1 -1
- package/dist/agent-src/skills/build-buy-partner/SKILL.md +1 -1
- package/dist/agent-src/skills/churn-prevention/SKILL.md +2 -2
- package/dist/agent-src/skills/code-refactoring/SKILL.md +3 -3
- package/dist/agent-src/skills/code-review/SKILL.md +3 -3
- package/dist/agent-src/skills/command-writing/SKILL.md +3 -3
- package/dist/agent-src/skills/comp-banding/SKILL.md +1 -1
- package/dist/agent-src/skills/competitive-moat-analysis/SKILL.md +1 -1
- package/dist/agent-src/skills/competitive-positioning/SKILL.md +2 -2
- package/dist/agent-src/skills/complexity-first-planning/SKILL.md +1 -1
- package/dist/agent-src/skills/condense-memory/SKILL.md +1 -1
- package/dist/agent-src/skills/content-funnel-design/SKILL.md +2 -2
- package/dist/agent-src/skills/contracts-cognition/SKILL.md +1 -1
- package/dist/agent-src/skills/copilot-agents-optimization/SKILL.md +2 -2
- package/dist/agent-src/skills/corpus-grounding/SKILL.md +2 -2
- package/dist/agent-src/skills/customer-research/SKILL.md +2 -2
- package/dist/agent-src/skills/dashboard-design/SKILL.md +1 -1
- package/dist/agent-src/skills/data-handling-judgment/SKILL.md +1 -1
- package/dist/agent-src/skills/deal-qualification-meddic/SKILL.md +2 -2
- package/dist/agent-src/skills/decision-record/SKILL.md +3 -3
- package/dist/agent-src/skills/decision-review/SKILL.md +8 -8
- package/dist/agent-src/skills/deep-reading-analyst/SKILL.md +22 -22
- package/dist/agent-src/skills/design-intelligence/SKILL.md +4 -4
- package/dist/agent-src/skills/design-intelligence/references/context-and-registers.md +2 -2
- package/dist/agent-src/skills/design-review/SKILL.md +4 -4
- package/dist/agent-src/skills/design-system-capture/references/design-system-json.md +20 -1
- package/dist/agent-src/skills/design-tokens/SKILL.md +17 -2
- package/dist/agent-src/skills/design-variations/SKILL.md +2 -2
- package/dist/agent-src/skills/developer-like-execution/SKILL.md +2 -2
- package/dist/agent-src/skills/discovery-interview/SKILL.md +2 -2
- package/dist/agent-src/skills/doc-coauthoring/SKILL.md +3 -3
- package/dist/agent-src/skills/editorial-calendar/SKILL.md +2 -2
- package/dist/agent-src/skills/error-handling-patterns/SKILL.md +9 -0
- package/dist/agent-src/skills/existing-ui-audit/SKILL.md +44 -1
- package/dist/agent-src/skills/existing-ui-audit/references/anti-slop-cross-reference.md +2 -2
- package/dist/agent-src/skills/expansion-playbook/SKILL.md +2 -2
- package/dist/agent-src/skills/experiment-loop/SKILL.md +1 -1
- package/dist/agent-src/skills/experiment-loop/references/protocol.md +1 -1
- package/dist/agent-src/skills/fe-design/SKILL.md +3 -3
- package/dist/agent-src/skills/fe-design/references/design-patterns.md +1 -1
- package/dist/agent-src/skills/fe-design/references/design-read-and-memory.md +3 -3
- package/dist/agent-src/skills/fe-design/references/source-led-port.md +1 -1
- package/dist/agent-src/skills/feature-planning/SKILL.md +1 -1
- package/dist/agent-src/skills/flux/SKILL.md +1 -1
- package/dist/agent-src/skills/forecast-accuracy/SKILL.md +2 -2
- package/dist/agent-src/skills/forecasting/SKILL.md +2 -2
- package/dist/agent-src/skills/fundraising-narrative/SKILL.md +2 -2
- package/dist/agent-src/skills/funnel-analysis/SKILL.md +2 -2
- package/dist/agent-src/skills/gtm-launch/SKILL.md +2 -2
- package/dist/agent-src/skills/hiring-loop-design/SKILL.md +1 -1
- package/dist/agent-src/skills/html-deck/SKILL.md +5 -5
- package/dist/agent-src/skills/humanizer/SKILL.md +1 -1
- package/dist/agent-src/skills/humanizer/data/patterns.md +1 -1
- package/dist/agent-src/skills/iconography/SKILL.md +3 -3
- package/dist/agent-src/skills/judge-synthesis/SKILL.md +1 -1
- package/dist/agent-src/skills/laravel-api-endpoint/SKILL.md +2 -2
- package/dist/agent-src/skills/launch-readiness/SKILL.md +3 -3
- package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +6 -6
- package/dist/agent-src/skills/livewire/SKILL.md +1 -1
- package/dist/agent-src/skills/market-entry-analysis/SKILL.md +1 -1
- package/dist/agent-src/skills/mcp-builder/SKILL.md +1 -1
- package/dist/agent-src/skills/memory-consolidation/SKILL.md +3 -3
- package/dist/agent-src/skills/messaging-architecture/SKILL.md +2 -2
- package/dist/agent-src/skills/monorepo-workspace/SKILL.md +1 -1
- package/dist/agent-src/skills/onboarding-design/SKILL.md +2 -2
- package/dist/agent-src/skills/onboarding-program/SKILL.md +1 -1
- package/dist/agent-src/skills/one-on-one-cadence/SKILL.md +1 -1
- package/dist/agent-src/skills/org-design/SKILL.md +1 -1
- package/dist/agent-src/skills/overbuild-review-lens/SKILL.md +3 -3
- package/dist/agent-src/skills/override-management/SKILL.md +1 -1
- package/dist/agent-src/skills/perf-feedback-craft/SKILL.md +1 -1
- package/dist/agent-src/skills/persona-writing/SKILL.md +1 -1
- package/dist/agent-src/skills/php-coder/SKILL.md +1 -1
- package/dist/agent-src/skills/pipeline-strategy/SKILL.md +2 -2
- package/dist/agent-src/skills/playwright-testing/SKILL.md +3 -3
- package/dist/agent-src/skills/po-discovery/SKILL.md +1 -1
- package/dist/agent-src/skills/positioning-strategy/SKILL.md +2 -2
- package/dist/agent-src/skills/privacy-review/SKILL.md +1 -1
- package/dist/agent-src/skills/prompt-optimizer/SKILL.md +3 -3
- package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +1 -1
- package/dist/agent-src/skills/reasoning-orchestrator/SKILL.md +2 -2
- package/dist/agent-src/skills/receiving-code-review/SKILL.md +1 -1
- package/dist/agent-src/skills/refine-ticket/SKILL.md +2 -2
- package/dist/agent-src/skills/release-comms/SKILL.md +2 -2
- package/dist/agent-src/skills/retention-loops/SKILL.md +2 -2
- package/dist/agent-src/skills/review-routing/SKILL.md +2 -2
- package/dist/agent-src/skills/roadmap-management/SKILL.md +1 -1
- package/dist/agent-src/skills/roadmap-management/references/archival.md +1 -1
- package/dist/agent-src/skills/roadmap-writing/SKILL.md +5 -5
- package/dist/agent-src/skills/rule-writing/SKILL.md +6 -6
- package/dist/agent-src/skills/runway-cognition/SKILL.md +2 -2
- package/dist/agent-src/skills/scenario-modeling/SKILL.md +2 -2
- package/dist/agent-src/skills/skill-writing/SKILL.md +2 -2
- package/dist/agent-src/skills/skill-writing/references/procedure.md +1 -1
- package/dist/agent-src/skills/skill-writing/references/section-patterns.md +3 -3
- package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +1 -1
- package/dist/agent-src/skills/stakeholder-tradeoff/SKILL.md +3 -3
- package/dist/agent-src/skills/subagent-orchestration/SKILL.md +1 -1
- package/dist/agent-src/skills/supply-chain-intake/SKILL.md +1 -1
- package/dist/agent-src/skills/systematic-debugging/SKILL.md +2 -2
- package/dist/agent-src/skills/tailwind-engineer/SKILL.md +11 -5
- package/dist/agent-src/skills/throughput-vs-morale-tradeoff/SKILL.md +1 -1
- package/dist/agent-src/skills/token-optimizer/SKILL.md +1 -1
- package/dist/agent-src/skills/typography-system/SKILL.md +2 -2
- package/dist/agent-src/skills/ui-component-architect/SKILL.md +28 -8
- package/dist/agent-src/skills/unit-economics-modeling/SKILL.md +2 -2
- package/dist/agent-src/skills/upstream-contribute/SKILL.md +1 -1
- package/dist/agent-src/skills/validate-feature-fit/SKILL.md +2 -2
- package/dist/agent-src/skills/verify-repair-loop/SKILL.md +2 -2
- package/dist/agent-src/skills/vision-articulation/SKILL.md +1 -1
- package/dist/agent-src/skills/voc-extract/SKILL.md +2 -2
- package/dist/agent-src/skills/voice-and-tone-design/SKILL.md +2 -2
- package/dist/agent-src/skills/wireframe/SKILL.md +1 -1
- package/dist/agent-src/skills/workspace-link/SKILL.md +1 -1
- package/dist/agent-src/templates/agent-settings.md +6 -6
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/contexts/knowledge-pages.md +2 -3
- package/dist/agent-src/templates/copilot-instructions.md +1 -1
- package/dist/agent-src/templates/roadmaps.md +1 -1
- package/dist/agent-src/templates/scripts/README.md +2 -2
- package/dist/agent-src/user-types/_template/user-type.md +1 -1
- package/dist/cli-delegate/check_update_banner.js +12 -1
- package/dist/cli-delegate/{chunk-NLP54U3J.js → chunk-2XY7ILBT.js} +13 -1
- package/dist/cli-delegate/{chunk-IAI3XL43.js → chunk-3FKR64R5.js} +22 -6
- package/dist/cli-delegate/{chunk-J3RFNKG4.js → chunk-55ACLDUE.js} +2 -2
- package/dist/cli-delegate/{chunk-PKOBQADP.js → chunk-57PN4GYJ.js} +1 -1
- package/dist/cli-delegate/{chunk-KCNTUSPI.js → chunk-AK6HODNQ.js} +4 -4
- package/dist/cli-delegate/{chunk-2FTMENJL.js → chunk-GYC3VRYN.js} +1 -1
- package/dist/cli-delegate/{chunk-LWTYTX6F.js → chunk-H32DGUJH.js} +15 -84
- package/dist/cli-delegate/{chunk-6RJA2F5A.js → chunk-IVBPRCQO.js} +1 -1
- package/dist/cli-delegate/chunk-NUHLI2RX.js +80 -0
- package/dist/cli-delegate/{chunk-TYSY33MD.js → chunk-QJWAUMJW.js} +12 -2
- package/dist/cli-delegate/{chunk-2KKXJW25.js → chunk-S3VFXMTM.js} +1 -1
- package/dist/cli-delegate/{chunk-I6RHFQEG.js → chunk-YUM5KURG.js} +17 -1
- package/dist/cli-delegate/cmd_analyze_session.js +1 -1
- package/dist/cli-delegate/cmd_brand_status.js +1 -1
- package/dist/cli-delegate/cmd_conformance.js +834 -275
- package/dist/cli-delegate/cmd_doctor.js +3 -3
- package/dist/cli-delegate/cmd_explain.js +5 -3
- package/dist/cli-delegate/cmd_export.js +4 -4
- package/dist/cli-delegate/cmd_handoff.js +6 -6
- package/dist/cli-delegate/cmd_mcp_available.js +1 -1
- package/dist/cli-delegate/cmd_memory_get.js +1 -1
- package/dist/cli-delegate/cmd_migrate.js +2 -2
- package/dist/cli-delegate/cmd_packs_active.js +3 -2
- package/dist/cli-delegate/cmd_prune.js +4 -4
- package/dist/cli-delegate/cmd_route_audit.js +3 -3
- package/dist/cli-delegate/cmd_route_explain.js +1 -1
- package/dist/cli-delegate/cmd_session_recycle.js +3 -3
- package/dist/cli-delegate/cmd_settings_get.js +15 -9
- package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
- package/dist/cli-delegate/cmd_settings_set.js +54 -11
- package/dist/cli-delegate/cmd_sync.js +4 -4
- package/dist/cli-delegate/cmd_uninstall.js +4 -4
- package/dist/cli-delegate/cmd_update.js +1 -1
- package/dist/cli-delegate/cmd_upgrade.js +1 -1
- package/dist/cli-delegate/cmd_validate.js +4 -4
- package/dist/cli-delegate/cmd_versions.js +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +25 -78
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +3 -3
- package/dist/discovery/dormancy-report.md +1 -1
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +5 -7
- package/dist/discovery/trust-report.md +2 -2
- package/dist/discovery/workspaces.json +4 -6
- package/dist/hooks/dispatch.js +9684 -9304
- package/dist/install/install.mjs +36 -8
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +2147 -1470
- package/dist/router.json +1 -1
- package/dist/scripts/_lib/agent_settings.js +73 -0
- package/dist/scripts/_lib/agent_src.js +20 -0
- package/dist/scripts/_lib/guidelines_lane.js +158 -0
- package/dist/scripts/_lib/installed_lock.js +1 -1
- package/dist/scripts/condense.js +2 -5
- package/dist/server/io/yamlIO.js +175 -17
- package/dist/server/schemas/settings.js +18 -4
- package/dist/shared/settingsSurface.js +6 -1
- package/docs/contracts/settings-classes.md +18 -9
- package/docs/guidelines/abstraction-thresholds.md +35 -0
- package/docs/guidelines/agent-infra/active-remediation-mechanics.md +3 -3
- package/docs/guidelines/agent-infra/false-green.md +2 -2
- package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +1 -1
- package/docs/guidelines/agent-infra/skill-quality-checklist.md +1 -1
- package/docs/guidelines/design-fidelity-mechanics.md +4 -0
- package/docs/guidelines/design-fidelity-routing.md +78 -0
- package/docs/guidelines/design-reconciliation.md +172 -0
- package/docs/guidelines/gtm-handoff.md +2 -2
- package/docs/guidelines/wing4-handoff.md +2 -2
- package/package.json +7 -3
- package/src/config/agent-settings.template.yml +55 -8
- package/src/config/ci-local-parity.yml +34 -0
- package/src/config/continuity-surface.json +11 -32
- package/src/config/gate-coverage.yml +31 -8
- package/src/config/gate-reachability-exemptions.json +1 -0
- package/src/config/gate-violation-baselines.json +3 -3
- package/src/config/hook-token-budget.json +1 -1
- package/src/config/host-injection-effect.json +2 -2
- package/src/config/pack-size-budget.json +55 -4
- package/src/config/platform-anchor.json +47 -0
- package/src/config/preamble-payload-budget.json +12 -8
- package/src/config/preamble-payload-exceptions.json +28 -0
- package/src/config/publish-surface.json +4 -2
- package/src/config/ratification-policy.json +7 -0
- package/src/config/rule-stub-ceilings.json +16 -9
- package/src/scripts/_cli/cmd_settings_get.ts +22 -7
- package/src/scripts/_dispatch.bash +3 -1
- package/src/scripts/_lib/agent_settings.ts +85 -0
- package/src/scripts/_lib/agent_src.ts +21 -0
- package/src/scripts/_lib/artifact_maturity.ts +242 -0
- package/src/scripts/_lib/base_ref_payload.ts +315 -0
- package/src/scripts/_lib/conformance_report.ts +403 -0
- package/src/scripts/_lib/continuity_writer.ts +72 -13
- package/src/scripts/_lib/design_system_import.ts +20 -0
- package/src/scripts/_lib/design_tolerance.ts +281 -0
- package/src/scripts/_lib/dropped_decision.ts +142 -0
- package/src/scripts/_lib/guidelines_lane.ts +164 -0
- package/src/scripts/_lib/installed_lock.ts +1 -1
- package/src/scripts/_lib/measured_payload_ceiling.ts +424 -0
- package/src/scripts/_lib/obligation_frequency.ts +2 -3
- package/src/scripts/_lib/payload_catalogue_completeness.ts +211 -0
- package/src/scripts/_lib/platform_anchor.ts +1053 -0
- package/src/scripts/_lib/ratification_artifact.ts +278 -0
- package/src/scripts/_lib/release_findings_ingest.ts +324 -0
- package/src/scripts/_lib/release_tag_dispatch.ts +63 -0
- package/src/scripts/_lib/review_baseline.ts +254 -0
- package/src/scripts/_lib/review_skipped_record.ts +61 -1
- package/src/scripts/_lib/security_lint.ts +23 -2
- package/src/scripts/_lib/self_repair.ts +21 -0
- package/src/scripts/_lib/session_index_trust.ts +42 -1
- package/src/scripts/_lib/standing_bound_ratchet.ts +267 -88
- package/src/scripts/_lib/tolerance_shadow.ts +177 -0
- package/src/scripts/_lib/turn_end_refusals.ts +51 -4
- package/src/scripts/ai_council/redact_low_impact_entry.ts +8 -0
- package/src/scripts/autonomy_friction_traffic.ts +379 -0
- package/src/scripts/check_beta_review_markers.ts +35 -4
- package/src/scripts/check_finding_dispositions.ts +167 -16
- package/src/scripts/check_held_object_arrivals.ts +381 -0
- package/src/scripts/check_kernel_edit_ratified.ts +462 -0
- package/src/scripts/check_loss_class_declared.ts +793 -46
- package/src/scripts/check_platform_anchor.ts +390 -0
- package/src/scripts/check_preamble_payload_budget.ts +672 -107
- package/src/scripts/check_projected_rule_routes.ts +395 -0
- package/src/scripts/check_release_published.ts +1 -1
- package/src/scripts/check_reply_consistency.ts +86 -17
- package/src/scripts/code_graph/cli.ts +6 -0
- package/src/scripts/condense.ts +2 -6
- package/src/scripts/generate_host_cost_table.ts +354 -0
- package/src/scripts/hook_manifest.json +1 -1
- package/src/scripts/hook_manifest.yaml +74 -30
- package/src/scripts/hooks/block_kernel_rule_writes.ts +12 -2
- package/src/scripts/hooks/category_a.ts +1 -1
- package/src/scripts/hooks/chain_nudge_hook.ts +311 -25
- package/src/scripts/hooks/concern_registry.ts +2 -0
- package/src/scripts/hooks/end_review_nudge_hook.ts +101 -21
- package/src/scripts/hooks/review_baseline_hook.ts +130 -0
- package/src/scripts/hooks/session_eol_hook.ts +68 -154
- package/src/scripts/hooks/source_first_gate_hook.ts +12 -0
- package/src/scripts/hooks/turn_end_gate_hook.ts +232 -14
- package/src/scripts/hooks/ui_route_nudge_hook.ts +52 -15
- package/src/scripts/hooks_doctor.ts +4 -1
- package/src/scripts/hot_context_hook.ts +41 -401
- package/src/scripts/install.ts +1 -1
- package/src/scripts/interruption_report.ts +8 -2
- package/src/scripts/janitor.ts +8 -1
- package/src/scripts/lint_evidence_artifacts.ts +1 -0
- package/src/scripts/lint_knowledge_scale.ts +0 -26
- package/src/scripts/measure_turn_end_gate.ts +302 -5
- package/src/scripts/memory_lookup.ts +9 -9
- package/src/scripts/release.ts +52 -64
- package/src/scripts/release_drill.ts +193 -14
- package/src/scripts/release_env.ts +1 -1
- package/src/scripts/release_publication.ts +1 -1
- package/src/scripts/report_held_object_arrivals.ts +456 -0
- package/src/scripts/report_standing_payload_by_host.ts +7 -7
- package/src/scripts/session_memory_index.ts +5 -0
- package/src/scripts/sync_agent_settings.ts +394 -12
- package/src/server/io/yamlIO.ts +175 -17
- package/src/server/schemas/settings.ts +25 -5
- package/src/shared/settingsSurface.ts +13 -2
- package/src/templates/compact-instructions.md +8 -3
- package/dist/agent-src/commands/chat-history/import.md +0 -170
- package/dist/agent-src/commands/chat-history.md +0 -63
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Domain Adoption — Gates
|
|
2
|
+
|
|
3
|
+
> The three-gate evidence contract, sunset policy, and failure-mode catalog for the `domain-adoption-policy` rule
|
|
4
|
+
|
|
5
|
+
_Origin: migrated from `src/rules/domain-adoption-policy.md` per the P4 pattern of `road-to-kernel-and-router.md`. The Iron Law and the three gate names stay in the rule; this file carries the per-gate evidence bars and procedures._
|
|
6
|
+
|
|
7
|
+
## Gate 1 — Demand signal
|
|
8
|
+
|
|
9
|
+
At least one of the following must be **true and citeable** in the roadmap:
|
|
10
|
+
|
|
11
|
+
- **≥ 2 consumer projects** in the domain. Cite repository names or
|
|
12
|
+
`agents/settings/contexts/` notes — not "I think there might be".
|
|
13
|
+
- **Named user direction with target.** A specific user ask plus a target
|
|
14
|
+
project / use case — e.g. "harvest the mobile skills for project X, due
|
|
15
|
+
next quarter". Vague *"this might be useful"* does not count.
|
|
16
|
+
- **Public-incident pull.** A reproducible incident on a consumer project
|
|
17
|
+
the domain would have prevented, captured in `agents/settings/contexts/` with
|
|
18
|
+
the missing surface area named.
|
|
19
|
+
|
|
20
|
+
If none of the three is citeable, **defer**. Open a watch-only context note
|
|
21
|
+
under `agents/settings/contexts/domain-watch/<domain>.md` listing the missing signal
|
|
22
|
+
so the next harvest can re-evaluate without re-relitigating the case.
|
|
23
|
+
|
|
24
|
+
## Gate 2 — Named maintenance owner
|
|
25
|
+
|
|
26
|
+
Domain plates rot. Pick the owner before the import, not after.
|
|
27
|
+
|
|
28
|
+
- The roadmap names a **single maintainer** (not "the team", not "TBD")
|
|
29
|
+
responsible for the domain quarterly review.
|
|
30
|
+
- The owner commits to the **refresh cadence** — quarterly review at
|
|
31
|
+
minimum, faster if the domain is volatile (mobile RN/Expo SDK,
|
|
32
|
+
ML model APIs).
|
|
33
|
+
- Each adopted artefact carries an **inline upstream-source line** with
|
|
34
|
+
SHA + last-checked timestamp so refresh is mechanical, not archaeological.
|
|
35
|
+
|
|
36
|
+
If no owner is named or no cadence is set, **defer**. An unowned domain
|
|
37
|
+
plate becomes broken authoritative-links and stale skills inside two cycles.
|
|
38
|
+
|
|
39
|
+
## Gate 3 — CI-tooling decision
|
|
40
|
+
|
|
41
|
+
Either the domain's verification tooling is validated in CI, or the suite
|
|
42
|
+
explicitly accepts platform-bound reference-only status.
|
|
43
|
+
|
|
44
|
+
- **Validated.** The CI pipeline runs the relevant linters/tests/integration
|
|
45
|
+
checks for the domain (e.g. `mobile-e2e` runners, ML model validation,
|
|
46
|
+
contract conformance) on every PR. Cost noted in the roadmap risk
|
|
47
|
+
register.
|
|
48
|
+
- **Out-of-scope (reference-only).** The domain is a platform fact the
|
|
49
|
+
suite cannot validate (iOS Simulator on non-macOS runners, GPU-bound
|
|
50
|
+
ML, hardware-bound IoT). The roadmap states this explicitly; affected
|
|
51
|
+
artefacts carry a "reference-only on \<unsupported platforms\>" header
|
|
52
|
+
so consumers do not file false-positive bugs.
|
|
53
|
+
|
|
54
|
+
If neither line is drawn, **defer**. Half-validated CI silently rots the
|
|
55
|
+
domain — green builds while the underlying tooling drifts.
|
|
56
|
+
|
|
57
|
+
## Sunset Policy stacks on top
|
|
58
|
+
|
|
59
|
+
Every domain track inherits the authoritative-link Sunset path documented
|
|
60
|
+
in any plate that imports volatile upstream content:
|
|
61
|
+
|
|
62
|
+
- Volatile content (SDK-pinned, API-pinned, tool-version-pinned) lives as
|
|
63
|
+
guideline body + SHA-pinned upstream link, not as forked scripts.
|
|
64
|
+
- Refresh trigger: quarterly cadence or earlier if a SHA-pinned link
|
|
65
|
+
404s in CI.
|
|
66
|
+
- The `check-refs` and `check-portability` linters apply unchanged.
|
|
67
|
+
|
|
68
|
+
Adopting a domain does not exempt it from any other suite-wide rule —
|
|
69
|
+
`augment-edit-discipline`, `skill-quality`, `size-enforcement`,
|
|
70
|
+
`rule-type-governance`. Every domain artefact passes the same gates as a
|
|
71
|
+
core artefact.
|
|
72
|
+
|
|
73
|
+
## Failure modes
|
|
74
|
+
|
|
75
|
+
- *"It's just one skill, not a domain."* — Audit the skill's prerequisites.
|
|
76
|
+
If it pulls in a new toolchain, simulator, language runtime, or
|
|
77
|
+
platform-specific build system, it **is** a domain entry. Run the gates.
|
|
78
|
+
- *"The upstream is well-maintained, we can just track it."* — Tracking
|
|
79
|
+
upstream means owning the diff, the breaking changes, and the migrations.
|
|
80
|
+
Tracking is maintenance work; budget for it under Gate 2 or skip the
|
|
81
|
+
adoption.
|
|
82
|
+
- *"We'll add CI later."* — Later does not arrive. Either CI is wired in
|
|
83
|
+
the same plate, or the artefacts ship with explicit reference-only
|
|
84
|
+
headers so users do not assume validated coverage.
|
|
85
|
+
- *"Council convergence is enough."* — Council informs the gates; it does
|
|
86
|
+
not replace them. A council session may surface that all three gates
|
|
87
|
+
pass; the roadmap still cites the evidence.
|
|
88
|
+
- *"Demand-signal is the user asking once."* — Single-shot interest is a
|
|
89
|
+
watch trigger, not an open trigger. Either name the target use case
|
|
90
|
+
with project + timeline, or open a watch note and wait.
|
|
91
|
+
|
|
92
|
+
## What to do when the gates fail
|
|
93
|
+
|
|
94
|
+
1. Mark the domain plate `[-] gated — <gate name> not met` in the relevant
|
|
95
|
+
roadmap. Do **not** silently shrink scope to dodge the gate.
|
|
96
|
+
2. Open a watch-only context note under `agents/settings/contexts/domain-watch/`
|
|
97
|
+
capturing what's missing — citations, owner candidates, CI feasibility.
|
|
98
|
+
3. Re-evaluate at the next harvest cycle. The note is the evidence trail
|
|
99
|
+
so the same questions are not relitigated.
|
|
100
|
+
|
|
101
|
+
## Allowed without gates
|
|
102
|
+
|
|
103
|
+
- Adding **a single skill** to an **already-opened** domain follows the
|
|
104
|
+
regular harvest plate; the gates do not re-fire per skill.
|
|
105
|
+
- Authoring a **guideline** that documents a domain the suite already
|
|
106
|
+
ships in — the domain is open, the guideline is a within-domain artefact.
|
|
107
|
+
- A **rule** that constrains an already-opened domain — within-domain.
|
|
108
|
+
|
|
109
|
+
## See also
|
|
110
|
+
|
|
111
|
+
- `domain-adoption-policy` (rule) — the Iron Law + gate names.
|
|
112
|
+
- `size-enforcement` · `rule-type-governance` · `skill-quality` — the suite-wide floors every domain artefact still passes.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Domain-eval anti-pattern — manufactured false objectivity at N=1
|
|
2
|
+
|
|
3
|
+
> A retrospective from the legal pack (council round 3). It exists so the next
|
|
4
|
+
> domain does not repeat the mistake. The short version: **do not call a
|
|
5
|
+
> self-labeled regression harness an "objective" correctness gate.**
|
|
6
|
+
|
|
7
|
+
## The anti-pattern
|
|
8
|
+
|
|
9
|
+
Gating skill ship on *"≥X% match to expert ground-truth"* and calling it "the
|
|
10
|
+
objective replacement for reviewer sign-off" — when:
|
|
11
|
+
|
|
12
|
+
1. **The ground-truth is unsourced or self-generated.** If the maintainer guesses
|
|
13
|
+
what an expert would flag, the eval measures "does the skill match the
|
|
14
|
+
maintainer's guess," i.e. reviewer subjectivity wearing a quantitative costume.
|
|
15
|
+
2. **Expert agreement is not truth.** Even an attorney-validated gold set at
|
|
16
|
+
inter-annotator agreement ≥0.7 is *inter-subjective expert consensus*, not
|
|
17
|
+
ground truth — `0.7 ≠ 1.0` admits the domain is contested ~30% of the time.
|
|
18
|
+
The honest goal is **measurement objectivity** (reliably detect change), not
|
|
19
|
+
**ground-truth objectivity** (the labels are correct).
|
|
20
|
+
3. **Model capability caps below the threshold.** Clause-extraction caps at
|
|
21
|
+
~F1 0.62; any passable threshold therefore measures "not worse than a mediocre
|
|
22
|
+
baseline," i.e. regression detection — never correctness.
|
|
23
|
+
4. **The statistical language is borrowed from infra that does not exist.**
|
|
24
|
+
Calibrating a threshold "from cross-model distributions" requires a built
|
|
25
|
+
cross-model-parity layer. Borrowing the vocabulary before the layer exists is
|
|
26
|
+
false precision.
|
|
27
|
+
|
|
28
|
+
## The honest alternative
|
|
29
|
+
|
|
30
|
+
- **Ship a regression / consistency harness.** Self-labeled fixtures, explicitly
|
|
31
|
+
marked "regression-only, not correctness, not objective." It catches "did a
|
|
32
|
+
change make a skill worse than its own baseline."
|
|
33
|
+
- **Keep correctness with the human.** Licensed-expert review on material use,
|
|
34
|
+
baked into the skill's output, not a footnote.
|
|
35
|
+
- **Make the objective eval a separate, gated track.** Attorney/expert-validated
|
|
36
|
+
gold set + inter-annotator ≥0.7 is real but expensive; gate it on **validated
|
|
37
|
+
demand + funding**, not on a phase timeline — and note it is classification, so
|
|
38
|
+
it does **not** depend on a cross-model-parity keystone.
|
|
39
|
+
|
|
40
|
+
## The false-blocker corollary
|
|
41
|
+
|
|
42
|
+
When you scope an eval, check what it *actually* depends on. The legal eval was
|
|
43
|
+
briefly gated on the cross-model-parity keystone; the full critique round showed
|
|
44
|
+
that was wrong — legal fixture matching is **classification** (clause
|
|
45
|
+
present/absent/ambiguous), not the finding-count distributions that keystone
|
|
46
|
+
calibrates. The real dependency was labeled-gold-set tooling, buildable in-pack.
|
|
47
|
+
A false structural blocker is as much an error as false objectivity.
|
|
48
|
+
|
|
49
|
+
## See also
|
|
50
|
+
|
|
51
|
+
- [ADR-107 — Legal domain-pack adoption](../../decisions/ADR-107-legal-domain-pack-adoption.md)
|
|
52
|
+
- `domain-pack-architecture.md` — the retrospective sequence this is part of.
|
|
53
|
+
- `src/domains/legal-review-prep/evals/README.md` — the regression harness in practice.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Domain-pack architecture — a retrospective observation (NOT a design driver)
|
|
2
|
+
|
|
3
|
+
> **Status: retrospective hypothesis, N=1.** This documents the sequence the
|
|
4
|
+
> **legal** pack happened to follow. It is **not** a rule and **not** a template
|
|
5
|
+
> that future packs must fit. Validate it against a *second* domain before
|
|
6
|
+
> promoting any of it to a rule or building scaffolding tooling — per
|
|
7
|
+
> `domain-adoption-policy` and the `domain-pack-extraction-when-triggered` (N=2)
|
|
8
|
+
> roadmap. Designing a new pack to fit this speculative pattern would invert the
|
|
9
|
+
> lever: build the domain correctly on its own legs, then observe whether the
|
|
10
|
+
> pattern recurred.
|
|
11
|
+
|
|
12
|
+
## The sequence legal followed
|
|
13
|
+
|
|
14
|
+
1. **Safety floor first** — a domain `*-safety-floor` rule (Iron-Law-shaped,
|
|
15
|
+
~100 lines) before any drafting skill. A drafting skill shipped before its
|
|
16
|
+
floor is the exact liability the floor prevents.
|
|
17
|
+
2. **Enforcement teeth** — the floor's machine-checkable elements become a
|
|
18
|
+
deterministic linter (`lint_legal_pack`) wired into CI. Prompt rules are not
|
|
19
|
+
governance; lint rules are. This is the differentiator vs prompt-only suites.
|
|
20
|
+
3. **Eval = regression harness, not a correctness oracle** — self-labeled
|
|
21
|
+
fixtures in the maintainer's genuine-competence sub-domain; the *objective*
|
|
22
|
+
eval (attorney-validated gold set, inter-annotator ≥0.7) is a separate,
|
|
23
|
+
demand-and-funding-gated track. See `domain-eval-anti-pattern.md`.
|
|
24
|
+
4. **Skills = procedure + output template only** — no default domain positions;
|
|
25
|
+
positions live in a practice profile, so one skill set behaves
|
|
26
|
+
team-specifically and the pack stays portable.
|
|
27
|
+
5. **Practice profile (the keystone)** — a cold-start interview writing a
|
|
28
|
+
plain-prose profile into `.agent-settings.yml` / the setup wizard; skills read
|
|
29
|
+
it and halt on unresolved placeholders.
|
|
30
|
+
6. **Deferred by default** — personas, scheduled watchers, installer hubs, and
|
|
31
|
+
broader scope are recorded as rejected/gated, not built, until evidence pulls
|
|
32
|
+
them in.
|
|
33
|
+
|
|
34
|
+
## Why it is NOT yet a rule
|
|
35
|
+
|
|
36
|
+
- **N=1.** Finance might need real-time-data evals; security might need red-team
|
|
37
|
+
evals; neither looks like "clause extraction + self-labeled fixtures." The
|
|
38
|
+
shape that fit legal may not fit them.
|
|
39
|
+
- **Premature tooling is the maintainer's enemy.** No `domain-pack:new`
|
|
40
|
+
scaffolding ships from this observation. Extraction waits for N=2, where a
|
|
41
|
+
second domain either confirms the sequence (promote to a rule) or diverges
|
|
42
|
+
(document the delta, keep both bespoke).
|
|
43
|
+
|
|
44
|
+
## What to do at N=2
|
|
45
|
+
|
|
46
|
+
Build the second domain on its own merits. *Then* compare: which steps generalised,
|
|
47
|
+
which broke. If the sequence held twice, promote it to a rule and consider
|
|
48
|
+
scaffolding. If it diverged, this note records why a one-size pattern was wrong —
|
|
49
|
+
itself a useful result.
|
|
50
|
+
|
|
51
|
+
## See also
|
|
52
|
+
|
|
53
|
+
- [Capability Boundary Matrix](../../contracts/capability-boundary.md) — per-pack safety posture (default-install / consent / council / disclaimer / eval / risk_class).
|
|
54
|
+
- [ADR-107 — Legal domain-pack adoption](../../decisions/ADR-107-legal-domain-pack-adoption.md)
|
|
55
|
+
- `domain-adoption-policy` (rule) — the three gates before opening any domain.
|
|
56
|
+
- `domain-eval-anti-pattern.md` — why the legal eval is a regression harness, not an objective gate.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Downstream-Changes Mechanics — closed-set evolution
|
|
2
|
+
|
|
3
|
+
> The procedure behind [`downstream-changes`](../../rules/downstream-changes.md)
|
|
4
|
+
> for one change class its table does not reach: a **closed set** whose member
|
|
5
|
+
> list changed. Cited by `skill:code-review` (the propagation dimension) and
|
|
6
|
+
> `skill:code-refactoring` (the reference sweep).
|
|
7
|
+
>
|
|
8
|
+
> It lives here rather than in the rule for a measured reason. Project-scope
|
|
9
|
+
> rules are a gated bucket of the per-spawn standing payload, and that payload
|
|
10
|
+
> currently measures **at** its grace ceiling
|
|
11
|
+
> (`src/config/preamble-payload-budget.json`), so the rule cannot grow by a
|
|
12
|
+
> single line without reddening `check_preamble_payload_budget`. Guidelines are
|
|
13
|
+
> an excluded bucket — read on demand, not re-sent per spawn. The obligation is
|
|
14
|
+
> therefore carried by the two skills that fire at the moment it matters, and
|
|
15
|
+
> the rule keeps its current size until a reduction lands.
|
|
16
|
+
|
|
17
|
+
## The Iron Law
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
CHANGING A MEMBER OF A CLOSED SET IS NEVER DONE WHEN THE TYPE COMPILES.
|
|
21
|
+
EVERY CONSUMER IS CLASSIFIED: EXHAUSTIVE, DELIBERATE FALLBACK, OR MISSING CASE.
|
|
22
|
+
A `default` THAT SWALLOWS THE NEW MEMBER IS A MISSING CASE WEARING A BRANCH.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Why the ordinary sweep misses it
|
|
26
|
+
|
|
27
|
+
`downstream-changes` enumerates callers, tests, imports, type definitions,
|
|
28
|
+
config bindings, routes and docs — all of which are found by searching for the
|
|
29
|
+
**identifier**. A closed set breaks that assumption: the member list changes,
|
|
30
|
+
the type still compiles, and a serializer, a badge variant, an OpenAPI schema or
|
|
31
|
+
a transition table silently keeps the old set. None of them names the type, so
|
|
32
|
+
no identifier search reaches them. This is the shotgun-surgery shape — one
|
|
33
|
+
conceptual change scattered across many small sites, where forgetting one is the
|
|
34
|
+
default outcome rather than the unlucky one.
|
|
35
|
+
|
|
36
|
+
## What counts as a closed set
|
|
37
|
+
|
|
38
|
+
PHP enums · TypeScript enums · discriminated unions · literal-union state types ·
|
|
39
|
+
Rust enums · sealed types · Python `enum` classes · DB enum and check
|
|
40
|
+
constraints · OpenAPI / JSON-Schema `enum` · state machines · role and permission
|
|
41
|
+
sets · finite component variants.
|
|
42
|
+
|
|
43
|
+
## Discover by shape, not by identifier
|
|
44
|
+
|
|
45
|
+
- the member name and its **backing value** (the wire value often differs);
|
|
46
|
+
- `match` / `switch` / if-chains over the type;
|
|
47
|
+
- `Record<Member, …>`, lookup tables and maps keyed by it;
|
|
48
|
+
- `cases()` / `values()` iteration;
|
|
49
|
+
- validators and serializers;
|
|
50
|
+
- DB constraints and migrations;
|
|
51
|
+
- API schemas;
|
|
52
|
+
- UI option sources and variant maps;
|
|
53
|
+
- translation keys;
|
|
54
|
+
- tests, factories and fixtures.
|
|
55
|
+
|
|
56
|
+
## Classify every hit — three outcomes, one defect
|
|
57
|
+
|
|
58
|
+
| Class | What it means | Action |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| Exhaustive | The compiler or the data structure forces completeness (a fully-typed `Record<Member, …>`, a `match` with no default) | nothing — this is the outcome to prefer |
|
|
61
|
+
| Deliberate fallback | The fallback is part of the contract: a forward-compatible external value, a protocol unknown, a defensive boundary parse | record why, leave it |
|
|
62
|
+
| Missing case | The new member reaches code written for the old set | fix it |
|
|
63
|
+
|
|
64
|
+
**There is deliberately no blanket rule that a `default` branch is wrong.** Such
|
|
65
|
+
a rule would be refuted by every protocol parser and boundary parse in the tree.
|
|
66
|
+
What is true is sharper and easier to miss: where an exhaustiveness check exists,
|
|
67
|
+
**a `default` clause suppresses its report entirely**, so adding one to quiet the
|
|
68
|
+
check removes exactly the signal it existed to give.
|
|
69
|
+
<!-- harvest:exhaustiveness-default-clause-masks-the-check -->
|
|
70
|
+
|
|
71
|
+
Prefer the language-native guarantee over a comment. In TypeScript a
|
|
72
|
+
`Record<Member, T>` where every member needs a value fails to compile on a new
|
|
73
|
+
member, while a partially-typed string-keyed map does not. In PHP an exhaustive
|
|
74
|
+
`match` without a masking `default` throws on an unhandled case.
|
|
75
|
+
|
|
76
|
+
## Prove the sweep, do not assert it
|
|
77
|
+
|
|
78
|
+
Add a **synthetic member** to the set, confirm the checks you are relying on go
|
|
79
|
+
red, then update the consumers and confirm they go green. A sweep never seen red
|
|
80
|
+
has unknown coverage — the same sensitivity argument
|
|
81
|
+
[`downstream-changes`](../../rules/downstream-changes.md) § Verification
|
|
82
|
+
makes for tests, applied to the discovery step.
|
|
83
|
+
|
|
84
|
+
## See also
|
|
85
|
+
|
|
86
|
+
- [`downstream-changes`](../../rules/downstream-changes.md) — the rule this
|
|
87
|
+
extends; its § Defect-pattern search is the sibling-occurrence half.
|
|
88
|
+
- [`redundancy-taxonomy`](../redundancy-taxonomy.md) — the naming half: one
|
|
89
|
+
concept, several terms.
|
|
90
|
+
- [`prefer-enums-over-literals`](../../rules/prefer-enums-over-literals.md)
|
|
91
|
+
— how a closed set comes to exist in the first place.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Emphasis budget
|
|
2
|
+
|
|
3
|
+
Authoring guideline. **This is a review-time discipline, NOT a merge-blocking
|
|
4
|
+
linter** — there is no CI gate; PR review owns the judgment.
|
|
5
|
+
|
|
6
|
+
## The principle
|
|
7
|
+
|
|
8
|
+
Emphasis is a currency, and inflation debases it. Reserve the loud channels —
|
|
9
|
+
ALL-CAPS, `## Iron Law` fences, spaced repetition of the same imperative — for
|
|
10
|
+
**asymmetric, irreversible harm**: data loss, credential/secret exposure, a
|
|
11
|
+
safety floor, a legal/compliance breach. When everything shouts, nothing does:
|
|
12
|
+
an over-emphasized doc trains the reader to skim past the caps, so the one caps
|
|
13
|
+
line that guards a `DROP TABLE` loses its signal.
|
|
14
|
+
|
|
15
|
+
## The discipline
|
|
16
|
+
|
|
17
|
+
When you add emphasis, be able to answer — in the artifact or the PR — two
|
|
18
|
+
questions:
|
|
19
|
+
|
|
20
|
+
1. **What specific harm does this prevent?** Name it (not "this is
|
|
21
|
+
important" — *what* goes wrong, to *whom*, how badly).
|
|
22
|
+
2. **Why is post-hoc correction insufficient?** Emphasis is justified when the
|
|
23
|
+
harm is irreversible or asymmetric (a wrong send/delete/charge can't be
|
|
24
|
+
taken back). If a normal-weight sentence + a later fix would do, use normal
|
|
25
|
+
weight.
|
|
26
|
+
|
|
27
|
+
If you cannot answer both, down-weight to plain prose.
|
|
28
|
+
|
|
29
|
+
## Why not a linter
|
|
30
|
+
|
|
31
|
+
A mechanical caps-quota is unenforceable — semantic substitution ("Critically:
|
|
32
|
+
never…", bold, block quotes) defeats a caps count while keeping the shout — and
|
|
33
|
+
it blocks ready work on a cosmetic metric. The Iron-Law *count* is also a
|
|
34
|
+
denominator artifact: most existing Iron Laws already guard data-loss /
|
|
35
|
+
credential / safety domains, so the raw number is not evidence of inflation.
|
|
36
|
+
Judgment at review time, keyed to the harm-asymmetry test above, is the control.
|
|
37
|
+
|
|
38
|
+
## Overlap (why a separate guideline)
|
|
39
|
+
|
|
40
|
+
Distinct from [`preservation-guard`](../../rules/preservation-guard.md)
|
|
41
|
+
(preserve existing emphasis through a transform — this governs *adding* it),
|
|
42
|
+
[`size-enforcement`](../../rules/size-enforcement.md) (line budgets, not
|
|
43
|
+
emphasis weight), and [`token-budget-discipline`](../../rules/token-budget-discipline.md)
|
|
44
|
+
(load cost, not signal-to-noise). None owns the emphasis-rationing judgment;
|
|
45
|
+
this guideline does.
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Engineering Memory Data Format
|
|
2
|
+
|
|
3
|
+
Schema and conventions for the four project-local YAML files that
|
|
4
|
+
extend the memory layer beyond `ownership-map` and
|
|
5
|
+
`historical-bug-patterns` (those are covered in
|
|
6
|
+
[`review-routing-data-format`](review-routing-data-format.md)).
|
|
7
|
+
|
|
8
|
+
All four files are **optional** and live in the consumer repository —
|
|
9
|
+
never in package-shipped artifacts. Absence is handled gracefully:
|
|
10
|
+
consulting skills fall through to their generic behaviour.
|
|
11
|
+
|
|
12
|
+
This guideline replaces the *"one guideline per schema"* plan from
|
|
13
|
+
`road-to-engineering-memory.md` with a single consolidated reference,
|
|
14
|
+
matching the existing pattern established by `review-routing-data-format`.
|
|
15
|
+
|
|
16
|
+
## File locations
|
|
17
|
+
|
|
18
|
+
Each schema lives under `agents/memory/<type>/<hash>.yml` (content-addressed,
|
|
19
|
+
merge-safe) **or** in a single `agents/memory/<type>.yml` file for projects
|
|
20
|
+
that prefer one file per type.
|
|
21
|
+
|
|
22
|
+
| Type | Single-file path | Sharded path |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| Domain invariants | `agents/memory/domain-invariants.yml` | `agents/memory/domain-invariants/<hash>.yml` |
|
|
25
|
+
| Incident learnings | `agents/memory/incident-learnings.yml` | `agents/memory/incident-learnings/<hash>.yml` |
|
|
26
|
+
| Product rules | `agents/memory/product-rules.yml` | `agents/memory/product-rules/<hash>.yml` |
|
|
27
|
+
|
|
28
|
+
Choose one layout per type and stick with it. `scripts/check_memory.ts`
|
|
29
|
+
warns if both exist for the same type.
|
|
30
|
+
|
|
31
|
+
## Shared frontmatter fields
|
|
32
|
+
|
|
33
|
+
Every entry across all four types MUST carry these keys. The gate
|
|
34
|
+
rejects entries missing any required field.
|
|
35
|
+
|
|
36
|
+
| Key | Required | Type | Notes |
|
|
37
|
+
|---|---|---|---|
|
|
38
|
+
| `id` | yes | kebab-case slug | unique within the type |
|
|
39
|
+
| `status` | yes | `active` \| `deprecated` \| `archived` | lifecycle |
|
|
40
|
+
| `confidence` | yes | `low` \| `medium` \| `high` | reader weights accordingly |
|
|
41
|
+
| `source` | yes | list of URLs / ADR refs | ≥1 entry |
|
|
42
|
+
| `owner` | yes | team slug | who keeps this entry fresh |
|
|
43
|
+
| `last_validated` | yes | ISO date | stale check per type |
|
|
44
|
+
| `review_after_days` | yes | integer | triggers staleness warning |
|
|
45
|
+
| `priority` | no | `critical` \| `normal` \| `low` | tier-0 surfacing; defaults to `normal` |
|
|
46
|
+
| `ts_week` | no | ISO-week string `YYYY-Www` | promotion week stamp; convention, not enforced |
|
|
47
|
+
| `verified_at_commit` | no | 7-40 char lowercase hex | the tree revision the entry was **semantically verified against** — not the commit that last edited the YAML |
|
|
48
|
+
| `semantic_verdict` | no | `still-true` \| `stale` \| `unverifiable` | a recorded **human** reading of the entry against that tree |
|
|
49
|
+
| `semantic_verdict_at` | no | ISO date | when that reading was taken |
|
|
50
|
+
|
|
51
|
+
### Verification stamps (`verified_at_commit` / `semantic_verdict`)
|
|
52
|
+
|
|
53
|
+
A date alone cannot be tied to a tree state, and that gap is not theoretical:
|
|
54
|
+
spike cf02 measured the curated store at **21.5 % stale against the tree** while
|
|
55
|
+
the shipped instrument reported **0.0 %**, because all 107 entries carried one
|
|
56
|
+
`last_validated` and one 365-day window, so the check could not fire before
|
|
57
|
+
2027. `verified_at_commit` is what makes a stamp falsifiable — with it, a reader
|
|
58
|
+
can ask whether anything the entry cites has changed since it was last read.
|
|
59
|
+
|
|
60
|
+
`semantic_verdict` records the outcome of that read. It is **human-written**,
|
|
61
|
+
deliberately: no mechanical signal predicts it. Pointer liveness was built and
|
|
62
|
+
measured for exactly this job and came in at 0.00x lift over the base rate
|
|
63
|
+
(cf04) — a dead citation is documentation debt, not a false claim.
|
|
64
|
+
|
|
65
|
+
A `stale` verdict demotes the entry immediately, regardless of age
|
|
66
|
+
(`memory_eviction.ts`, "contradiction outranks retention"). An `unverifiable`
|
|
67
|
+
entry — one about an external system, a past event, or a recorded preference —
|
|
68
|
+
is surfaced on age but never quarantined on it, because the tree can never
|
|
69
|
+
discharge the reason.
|
|
70
|
+
|
|
71
|
+
### Priority semantics (`critical` / `normal` / `low`)
|
|
72
|
+
|
|
73
|
+
The `priority` field controls how aggressively `/memory:load` surfaces
|
|
74
|
+
an entry. The three-tier enum is intentional — see
|
|
75
|
+
an internal roadmap (local-only) § B2 and the Phase 2 council brief
|
|
76
|
+
for why a fourth `high` tier was rejected.
|
|
77
|
+
|
|
78
|
+
| Value | Meaning | Reader behaviour |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| `critical` | Tier-0 — always surface regardless of query | `/memory:load` injects on every load, irrespective of key/query match |
|
|
81
|
+
| `normal` (default) | Standard query-matched retrieval | Surfaced when the lookup key/query matches the entry |
|
|
82
|
+
| `low` | Background — only surface on explicit full load | Skipped by query-matched retrieval; visible only via `/memory:load --type` full sweep |
|
|
83
|
+
|
|
84
|
+
**Tier-0 governance.**
|
|
85
|
+
`scripts/check_memory.ts` enforces two soft guards on `critical` entries:
|
|
86
|
+
|
|
87
|
+
- **Critical-stale warning** — a `priority: critical` entry whose
|
|
88
|
+
`last_validated` is older than 90 days emits a `critical-stale` warning
|
|
89
|
+
during validation (still exit 0; the curator decides whether to
|
|
90
|
+
re-validate or downgrade).
|
|
91
|
+
- **Tier-0 inflation warning** — when a memory type accumulates more
|
|
92
|
+
than 10 active `critical` entries, the validator warns. The intent is
|
|
93
|
+
to keep the always-surface slice small enough to remain signal, not to
|
|
94
|
+
block writes; raise the threshold deliberately if the project's domain
|
|
95
|
+
genuinely needs more.
|
|
96
|
+
|
|
97
|
+
Both are warnings, never errors. The curator stays in charge.
|
|
98
|
+
|
|
99
|
+
### Temporal jitter (`ts_week`)
|
|
100
|
+
|
|
101
|
+
`ts_week` stamps a curated entry with the **ISO week** it was promoted
|
|
102
|
+
(`YYYY-Www`, e.g. `2026-W17`). It is optional and **convention-only** —
|
|
103
|
+
the validator does not require it and does not reject entries without
|
|
104
|
+
it. Promotion tooling (`/memory:promote`) writes it; manual edits are
|
|
105
|
+
free to set or omit.
|
|
106
|
+
|
|
107
|
+
**Why ISO-week, not date-time.** Curated YAML lives in the repo and is
|
|
108
|
+
reviewable by anyone with access. A precise timestamp on every entry
|
|
109
|
+
leaks session timing — "this rule appeared Tuesday 3pm" correlates with
|
|
110
|
+
"the incident hit Tuesday 3pm". ISO-week granularity preserves long-
|
|
111
|
+
term ordering (useful for audit) while removing intra-week inference.
|
|
112
|
+
|
|
113
|
+
**When to use it.** Stamp on every promotion. Do not retroactively
|
|
114
|
+
backfill — empty `ts_week` for older entries is fine and a deliberate
|
|
115
|
+
non-signal.
|
|
116
|
+
|
|
117
|
+
**Privacy carve-outs.** Highly sensitive entries (incident-learnings
|
|
118
|
+
tied to active investigations) may omit `ts_week` entirely; the field
|
|
119
|
+
is not a forensic record.
|
|
120
|
+
|
|
121
|
+
## Type-specific required fields
|
|
122
|
+
|
|
123
|
+
Each file also carries the template-specific body. See the example
|
|
124
|
+
templates for the full shape:
|
|
125
|
+
|
|
126
|
+
- [`domain-invariants.example.yml`](../../../src/agent-src/templates/agents/memory/domain-invariants.example.yml)
|
|
127
|
+
adds `rule`, `boundary`, `scope.paths`, `violation_contract`.
|
|
128
|
+
- [`incident-learnings.example.yml`](../../../src/agent-src/templates/agents/memory/incident-learnings.example.yml)
|
|
129
|
+
adds `pattern`, `trigger_conditions`, `consequence`, `guardrail`,
|
|
130
|
+
`enforcement`, `severity`.
|
|
131
|
+
- [`product-rules.example.yml`](../../../src/agent-src/templates/agents/memory/product-rules.example.yml)
|
|
132
|
+
adds `rule`, `applies_to`, `enforcement`, `error_contract`, `version`.
|
|
133
|
+
|
|
134
|
+
## Ownership (who writes, who reads)
|
|
135
|
+
|
|
136
|
+
| Type | Writer | Reader (skill/role) | Expiry |
|
|
137
|
+
|---|---|---|---|
|
|
138
|
+
| Domain invariants | senior engineer / architect | `developer-like-execution`, `php-coder`, `laravel` | reviewed at major version bump |
|
|
139
|
+
| Architecture decisions | decision author at ADR time | `feature-plan`, `api-design`, `blast-radius-analyzer` | `deprecated` on reversal; never deleted |
|
|
140
|
+
| Incident learnings | incident commander post-resolution | `Incident` role, `bug-investigate`, `bug-analyzer` | archived when guardrail lands + verified in prod |
|
|
141
|
+
| Product rules | PO or tech lead post-decision | `PO` role, `validate-feature-fit`, `laravel-validation` | version-stamped; old versions archived |
|
|
142
|
+
|
|
143
|
+
## Redaction rules (hard)
|
|
144
|
+
|
|
145
|
+
Enforced by `scripts/check_memory.ts`. Reject on match:
|
|
146
|
+
|
|
147
|
+
- **No secrets.** API keys, tokens, credentials, private URLs with
|
|
148
|
+
credentials, internal hostnames that expose infrastructure.
|
|
149
|
+
- **No customer names.** ACME Corp, specific account IDs, domain
|
|
150
|
+
names of real customers. Rephrase to the pattern.
|
|
151
|
+
- **No PII.** Names, emails, phone numbers, IP addresses tied to
|
|
152
|
+
real users. Incident-learnings is tempting here — resist.
|
|
153
|
+
- **No ticket IDs that identify the incident** in
|
|
154
|
+
`incident-learnings.yml`. Link the guardrail PR instead.
|
|
155
|
+
|
|
156
|
+
## Reader contract
|
|
157
|
+
|
|
158
|
+
Consuming skills read an entry and expose its `status` + `confidence`
|
|
159
|
+
to the agent. A `confidence: low` domain invariant informs, it does not
|
|
160
|
+
dictate. A `confidence: high` incident learning blocks the generation
|
|
161
|
+
path if the guardrail is absent.
|
|
162
|
+
|
|
163
|
+
## Staleness
|
|
164
|
+
|
|
165
|
+
`check_memory.ts` runs weekly (not per-PR). It reports entries where
|
|
166
|
+
`(today - last_validated) > review_after_days`. Stale entries stay
|
|
167
|
+
active — the report is informational, not a gate.
|
|
168
|
+
|
|
169
|
+
**The window is per store, and the numbers are derived rather than chosen.**
|
|
170
|
+
cf02 measured decay over the same 39-day span in three stores:
|
|
171
|
+
`historical-patterns` 45.8 %, `incident-learnings` 17.6 %, `product-rules`
|
|
172
|
+
13.6 % — a 3.4× spread that one uniform window cannot serve. Extrapolated
|
|
173
|
+
linearly, the days each store needs to reach the 10 % threshold are 9, 22 and
|
|
174
|
+
29. The shipped windows are **30 / 90 / 90**: the same ratio, rounded to
|
|
175
|
+
operational units, because cf02 also showed decay arrives in *batches* (two
|
|
176
|
+
upstream changes caused 11 of 22 stale entries), which makes a linear day count
|
|
177
|
+
the wrong shape for a deadline even though it is the right shape for a ratio.
|
|
178
|
+
|
|
179
|
+
## Eviction ladder
|
|
180
|
+
|
|
181
|
+
`memory_eviction.ts` acts on two signals and no others:
|
|
182
|
+
|
|
183
|
+
| State | Trigger | Effect |
|
|
184
|
+
|---|---|---|
|
|
185
|
+
| `due` | past `last_validated + review_after_days` | surfaced, stays in the store |
|
|
186
|
+
| `quarantine` | `semantic_verdict: stale`, **or** past two windows unverified | moved to `agents/memory-quarantine/<type>.yml`, no longer injected, still readable |
|
|
187
|
+
| `delete` | three windows while in quarantine | removed |
|
|
188
|
+
|
|
189
|
+
Quarantine is a **move between tracked files**, never an in-place status flip:
|
|
190
|
+
an entry has to leave the injected store to stop being read as fact, and it has
|
|
191
|
+
to stay readable to be appealable. Re-verify an entry and it returns.
|
|
192
|
+
|
|
193
|
+
Dry-run by default; `--apply` is the only path that writes.
|
|
194
|
+
|
|
195
|
+
## Anti-patterns
|
|
196
|
+
|
|
197
|
+
- **Do NOT** merge `ownership-map.yml` semantics into these files.
|
|
198
|
+
Ownership is a separate concern; mixing them doubles the staleness
|
|
199
|
+
surface.
|
|
200
|
+
- **Do NOT** generate entries via LLM in bulk. Curated is the point.
|
|
201
|
+
The point of a `confidence: high` entry is human-verified claim,
|
|
202
|
+
not high-volume output.
|
|
203
|
+
- **Do NOT** delete `deprecated` or `archived` entries. History is
|
|
204
|
+
the value of memory; deletion is amnesia.
|
|
205
|
+
- **Do NOT** ship this file pre-populated. Each consumer starts
|
|
206
|
+
empty and fills as decisions and incidents accumulate.
|
|
207
|
+
|
|
208
|
+
## See also
|
|
209
|
+
|
|
210
|
+
- [`review-routing-data-format.md`](review-routing-data-format.md) — sibling format for ownership + bug patterns
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Evaluator independence — enforcement reach and its correction history
|
|
2
|
+
|
|
3
|
+
> What the `evidence-independence` guard actually does per branch, per host; the
|
|
4
|
+
> limits that were measured rather than assumed; and the two corrections this
|
|
5
|
+
> material has taken. The rule keeps the verdict — this page carries the argument.
|
|
6
|
+
|
|
7
|
+
_Origin: migrated from [`evaluator-independence`](../../rules/evaluator-independence.md)
|
|
8
|
+
§ *Enforcement — honest scope* under the P4 pattern
|
|
9
|
+
(`road-to-standing-payload-diet` step 1.3). Nothing here is new; the rule was
|
|
10
|
+
re-sending all of it on every session and every spawn, and only the verdict has
|
|
11
|
+
to be._
|
|
12
|
+
|
|
13
|
+
## The two branches
|
|
14
|
+
|
|
15
|
+
[`evidence_independence.ts`](../../../src/scripts/hooks/evidence_independence.ts) is a
|
|
16
|
+
`pre_tool_use` concern, and its two branches do **different** things —
|
|
17
|
+
**corrected 2026-08-23**, because this paragraph claimed both of them block:
|
|
18
|
+
|
|
19
|
+
- **Item 1 BLOCKS.** A dispatch whose prompt carries a pre-loaded verdict returns
|
|
20
|
+
`EXIT_BLOCK` (`:253`). Mechanically enforced, on the one host that honours a deny.
|
|
21
|
+
- **Item 4 WARNS and does not block.** A second self-scoped evaluation dispatch in the
|
|
22
|
+
same turn returns **`EXIT_ALLOW`** with `decision: "warn"` (`:301-317`), and so does
|
|
23
|
+
the first (`:319-324`). That is deliberate, and the code says why at `:296-300`: the
|
|
24
|
+
internal ladder's `2 = warn` is read as a hard **deny** by this host's native
|
|
25
|
+
PreToolUse contract, *"which is the defect that made an advisory guard a hard deny
|
|
26
|
+
once already"*. Exiting 2 here would have kept a legitimate fan-out blocked while
|
|
27
|
+
claiming to warn.
|
|
28
|
+
|
|
29
|
+
So the rule's own turn-budget clause is **advisory**, not enforced. It reads the prompt
|
|
30
|
+
the agent is about to send, so item 1 is mechanically enforced and item 4 is surfaced.
|
|
31
|
+
|
|
32
|
+
The manifest's `severity: blocking` for `evidence-independence`
|
|
33
|
+
(`src/scripts/hook_manifest.yaml:380-385`) is a **third** reading and it is true of the
|
|
34
|
+
item-1 path only: a severity declares the concern, never every branch inside it. A
|
|
35
|
+
reader taking it as "both branches deny" reaches the claim this paragraph used to
|
|
36
|
+
make.
|
|
37
|
+
|
|
38
|
+
Three limits, stated because they were measured. The pre-loaded-verdict list is
|
|
39
|
+
a **phrase list**, so a paraphrase evades it — it catches recurrences of known
|
|
40
|
+
steering wording, not steering as such. The turn boundary is the
|
|
41
|
+
authorization ledger's `detected_at` stamp, because the envelope carries no turn
|
|
42
|
+
id; with no ledger yet, the counter falls back to session scope. And the guard
|
|
43
|
+
does not deny everywhere it exists: `pre_tool_use` is **bound** on three hosts —
|
|
44
|
+
augment, claude, cowork — and only `claude` honours the deny. Everywhere else,
|
|
45
|
+
augment and cowork included, items 1 and 4 join 2 and 3 as model-carried.
|
|
46
|
+
`agent-config hooks:status` answers it for the host you are on right now.
|
|
47
|
+
|
|
48
|
+
**Corrected 2026-08-17 — this paragraph was wrong on both sides of the line it
|
|
49
|
+
drew.** It said `pre_tool_use` "exists on three hosts" and that the guard has
|
|
50
|
+
"nowhere to bind" on the other five. Neither half survived a re-read of the
|
|
51
|
+
tree. **Downward:** the manifest's own `native_event_aliases` table already maps
|
|
52
|
+
`preToolUse` (cursor), `PreToolUse` (cline) and `BeforeTool` (gemini) onto
|
|
53
|
+
`pre_tool_use`, so there the guard is **unbound, not unbindable**; only windsurf
|
|
54
|
+
and copilot carry no pre-tool alias row at all. **Upward, and worse:**
|
|
55
|
+
`host_semantics.ts` certifies **claude alone**, and the augment and cowork
|
|
56
|
+
trampolines discard dispatcher output and `exit 0` unconditionally — so on two
|
|
57
|
+
of the three "enforcing" hosts this guard runs and is then ignored. Nor may the
|
|
58
|
+
inverse be asserted downward: nothing records whether an unbound host's
|
|
59
|
+
pre-tool event can *deny*, and `severity: blocking` is a property of the concern
|
|
60
|
+
rather than of the host. The four states are tabulated once in
|
|
61
|
+
[`hook-architecture-v1 § Which hosts carry pre_tool_use`](../../contracts/hook-architecture-v1.md).
|
|
62
|
+
|
|
63
|
+
Stated at this length because this rule exists over a case where a process that
|
|
64
|
+
*looked* followed produced fabricated evidence. An unbacked reason for a real
|
|
65
|
+
gap and an unmeasured claim of enforcement are the same failure in a smaller
|
|
66
|
+
font, and this paragraph had shipped one of each. Note also what the frequency
|
|
67
|
+
join actually reports: `check_enforcement_coverage.ts` skips `fallback_only`
|
|
68
|
+
platforms, so its gap set is **four** — cursor, cline, windsurf, gemini — never
|
|
69
|
+
copilot, which is excluded by declaration rather than measured as a gap.
|
|
70
|
+
|
|
71
|
+
**Item 2 — an honestly chosen scope — is not enforced by anything.** A narrowed scope
|
|
72
|
+
is not decidable from the prompt alone.
|
|
73
|
+
|
|
74
|
+
**Item 3 — recording the prompt with the verdict — IS enforced**, and this rule said
|
|
75
|
+
otherwise until 2026-08-23:
|
|
76
|
+
[`check_review_prompt_binding.ts`](../../../src/scripts/check_review_prompt_binding.ts)
|
|
77
|
+
binds a verdict to the prompt it was produced from. Its own header states the limit that
|
|
78
|
+
matters, so citing it does not oversell it: **omission beats substitution** — simply not
|
|
79
|
+
committing `<slug>.review-input/prompt.md` drops the round out of the checkable set with
|
|
80
|
+
**no finding and no signal**, because an artefact without a package is deliberately out
|
|
81
|
+
of scope. Measured on the corpus it shipped against, **11 of 19** artefacts already
|
|
82
|
+
carry a `prompt_hash` with no package, so the bypassed state is the historical norm and
|
|
83
|
+
is indistinguishable from it.
|
|
84
|
+
They are stated here as obligations and are model-carried. Saying so is the
|
|
85
|
+
point: this rule exists because a process that *looked* followed produced
|
|
86
|
+
fabricated evidence, and claiming coverage it does not have would repeat that.
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## See also
|
|
90
|
+
|
|
91
|
+
- [`evaluator-independence`](../../rules/evaluator-independence.md) — the rule this page carries the argument for.
|
|
92
|
+
- [`hook-architecture-v1 § Which hosts carry pre_tool_use`](../../contracts/hook-architecture-v1.md) — the four host states, tabulated once.
|