@event4u/agent-config 14.22.0 → 15.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 +333 -356
- 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 +48 -39
- 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 +1 -1
- package/dist/agent-src/commands/roadmap/materialize.md +2 -2
- package/dist/agent-src/commands/roadmap/next.md +9 -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 +1 -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 +13 -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 +36 -25
- 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/scripts/archive_completed_roadmaps.ts +106 -4
- 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-intelligence/SKILL.md +57 -1
- 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/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/git-workflow/references/push-closes-its-loop.md +9 -0
- 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 +60 -4
- 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/registry.js +1 -1
- package/dist/cli-delegate/archive_completed_roadmaps.js +52 -4
- package/dist/cli-delegate/check_update_banner.js +12 -1
- package/dist/cli-delegate/{chunk-TGIPZBCW.js → chunk-2KKXJW25.js} +22 -8
- package/dist/cli-delegate/{chunk-NLP54U3J.js → chunk-2XY7ILBT.js} +13 -1
- package/dist/cli-delegate/{chunk-4FS4WRXP.js → chunk-3FKR64R5.js} +34 -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-BIXEDQPZ.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-HZ52BRGG.js} +24 -18
- package/dist/cli-delegate/{chunk-6RJA2F5A.js → chunk-IVBPRCQO.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 +3 -3
- package/dist/cli-delegate/cmd_doctor.js +3 -3
- package/dist/cli-delegate/cmd_explain.js +2 -2
- package/dist/cli-delegate/cmd_export.js +4 -4
- package/dist/cli-delegate/cmd_handoff.js +24 -16
- 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 +2 -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 +4 -14
- 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 +41 -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 +27 -80
- 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 +9249 -8981
- package/dist/install/install.mjs +47 -8
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +5496 -2400
- 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/lean_projection_mode.js +108 -0
- package/dist/scripts/_lib/router_match.js +243 -0
- package/dist/scripts/_lib/rule_injection.js +216 -0
- package/dist/scripts/condense.js +22 -25
- package/dist/scripts/project_thin_rules.js +139 -19
- package/dist/server/io/yamlIO.js +125 -17
- package/dist/server/schemas/settings.js +32 -5
- package/dist/shared/settingsSurface.js +6 -1
- package/docs/MIGRATION.md +56 -0
- package/docs/contracts/settings-classes.md +48 -7
- 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/notes-horizon-mechanics.md +90 -0
- 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/llms.txt +1 -1
- package/package.json +7 -3
- package/src/agent-src/scripts/archive_completed_roadmaps.ts +106 -4
- package/src/config/agent-settings.template.yml +94 -1
- package/src/config/ci-local-parity.yml +34 -0
- package/src/config/continuity-surface.json +8 -29
- package/src/config/evaluator-budgets.json +4 -4
- 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 +8 -7
- package/src/config/host-injection-effect.json +2 -2
- package/src/config/pack-size-budget.json +55 -4
- package/src/config/packed-binary-manifest.json +1 -1
- package/src/config/platform-anchor.json +47 -0
- package/src/config/preamble-payload-budget.json +2 -3
- package/src/config/publish-surface.json +4 -2
- package/src/config/ratification-policy.json +7 -0
- package/src/config/routing-coverage-seed.json +9 -2
- package/src/config/rule-stub-ceilings.json +16 -9
- package/src/scripts/_cli/cmd_session_recycle.ts +2 -25
- package/src/scripts/_cli/cmd_settings_get.ts +22 -7
- package/src/scripts/_cli/handoff_sessions.ts +14 -44
- 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/conformance_report.ts +403 -0
- package/src/scripts/_lib/continuity_slot.ts +295 -0
- package/src/scripts/_lib/continuity_writer.ts +312 -0
- package/src/scripts/_lib/design_system_import.ts +20 -0
- package/src/scripts/_lib/design_tolerance.ts +281 -0
- package/src/scripts/_lib/guidelines_lane.ts +164 -0
- package/src/scripts/_lib/hook_settings.ts +85 -0
- package/src/scripts/_lib/lean_projection_mode.ts +127 -0
- package/src/scripts/_lib/obligation_frequency.ts +2 -3
- package/src/scripts/_lib/packed_binary_predicate.ts +37 -0
- package/src/scripts/_lib/platform_anchor.ts +1053 -0
- package/src/scripts/_lib/ratification_artifact.ts +278 -0
- package/src/scripts/_lib/recycle_envelope_paths.ts +109 -21
- package/src/scripts/_lib/regression_neighbourhood.ts +159 -22
- package/src/scripts/_lib/security_lint.ts +23 -2
- package/src/scripts/_lib/self_repair.ts +21 -0
- package/src/scripts/_lib/session_eol.ts +44 -0
- package/src/scripts/_lib/session_index_trust.ts +387 -0
- package/src/scripts/_lib/standing_bound_ratchet.ts +220 -0
- package/src/scripts/_lib/tolerance_shadow.ts +177 -0
- package/src/scripts/_lib/vendored_grammar_upstream.ts +280 -0
- package/src/scripts/ai_council/redact_low_impact_entry.ts +8 -0
- package/src/scripts/audit_mcp_tools.ts +69 -25
- package/src/scripts/autonomy_friction_traffic.ts +379 -0
- package/src/scripts/build_mcp_catalog.ts +24 -1
- package/src/scripts/check_host_tree_parity.ts +291 -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 +424 -7
- package/src/scripts/check_projected_rule_routes.ts +395 -0
- package/src/scripts/check_rule_projection_integrity.ts +102 -2
- package/src/scripts/ci_settle.ts +205 -5
- package/src/scripts/code_graph/build.ts +79 -0
- package/src/scripts/code_graph/cli.ts +264 -7
- package/src/scripts/code_graph/detect.ts +38 -0
- package/src/scripts/code_graph/query.ts +25 -2
- package/src/scripts/code_graph/sqlite_store.ts +16 -1
- package/src/scripts/code_graph/types.ts +52 -3
- package/src/scripts/code_graph/validate.ts +3 -1
- package/src/scripts/code_graph/verbs.ts +590 -0
- package/src/scripts/condense.ts +22 -26
- package/src/scripts/generate_host_cost_table.ts +354 -0
- package/src/scripts/handoff_context_hook.ts +39 -1
- package/src/scripts/hook_manifest.json +1 -1
- package/src/scripts/hook_manifest.yaml +59 -28
- package/src/scripts/hooks/block_speaking_inbox_dir.ts +182 -16
- package/src/scripts/hooks/category_a.ts +1 -1
- package/src/scripts/hooks/chain_nudge_hook.ts +311 -25
- package/src/scripts/hooks/code_graph_context_hook.ts +7 -18
- package/src/scripts/hooks/push_settle_hook.ts +3 -2
- package/src/scripts/hooks/rule_inject_hook.ts +107 -20
- package/src/scripts/hooks/session_eol_hook.ts +177 -145
- package/src/scripts/hooks/source_first_gate_hook.ts +12 -0
- package/src/scripts/hooks/ui_route_nudge_hook.ts +52 -15
- package/src/scripts/hot_context_hook.ts +103 -408
- package/src/scripts/lint_evidence_artifacts.ts +1 -0
- package/src/scripts/lint_knowledge_scale.ts +0 -26
- package/src/scripts/lint_roadmap_blockers.ts +164 -1
- package/src/scripts/mcp_server/consumer_tool_catalog.json +152 -2
- package/src/scripts/mcp_server/graph_tools.ts +294 -0
- package/src/scripts/mcp_server/path_util.ts +31 -0
- package/src/scripts/mcp_server/tool_catalog_source.ts +7 -1
- package/src/scripts/mcp_server/tools.ts +3 -13
- package/src/scripts/memory_lookup.ts +9 -9
- package/src/scripts/model_rule_injection.ts +61 -4
- package/src/scripts/project_thin_rules.ts +149 -16
- package/src/scripts/report_standing_payload_by_host.ts +650 -0
- package/src/scripts/schemas/agent-settings.schema.json +7 -1
- package/src/scripts/session_memory_index.ts +86 -8
- package/src/scripts/sync_agent_settings.ts +270 -10
- package/src/server/io/yamlIO.ts +127 -17
- package/src/server/schemas/settings.ts +45 -6
- package/src/shared/settingsSurface.ts +13 -2
- package/src/templates/compact-instructions.md +8 -3
- package/src/vendor/grammars/README.md +27 -2
- package/dist/agent-src/commands/chat-history/import.md +0 -170
- package/dist/agent-src/commands/chat-history.md +0 -63
|
@@ -33,7 +33,13 @@ export const CATALOG_DESCRIPTION =
|
|
|
33
33
|
'backlog: per ADR-132 they are NOT registered on the stdio tools/list ' +
|
|
34
34
|
"(the wire carries implemented tools only); the 'not_implemented' " +
|
|
35
35
|
'envelope contract (docs/contracts/mcp-tool-stub-envelope.md) remains ' +
|
|
36
|
-
'for Worker parity.
|
|
36
|
+
'for Worker parity. ' +
|
|
37
|
+
"The 'install_hint_stdio' field is the INSTALLED-BINARY form and " +
|
|
38
|
+
'therefore assumes `agent-config` is on PATH (a global install, or an ' +
|
|
39
|
+
'npx-resolved one the client already has); it deliberately carries no ' +
|
|
40
|
+
'`npx` invocation, because the un-prompted form of that command is the ' +
|
|
41
|
+
"one string this file's own gate forbids and the prompted form hangs a " +
|
|
42
|
+
'non-interactive client start. Generated by `build_mcp_catalog` — ' +
|
|
37
43
|
'never hand-edit this file.';
|
|
38
44
|
|
|
39
45
|
export interface StubToolSource {
|
|
@@ -54,6 +54,8 @@ import {
|
|
|
54
54
|
load_catalog,
|
|
55
55
|
not_implemented_envelope,
|
|
56
56
|
} from './catalog.js';
|
|
57
|
+
import { GRAPH_TOOLS } from './graph_tools.js';
|
|
58
|
+
import { resolvePath as _resolvePath, strip as _strip } from './path_util.js';
|
|
57
59
|
import { type Outcome, record_call } from './telemetry.js';
|
|
58
60
|
import type { PromptCache } from './prompts.js';
|
|
59
61
|
import type { ResourceCache } from './resources.js';
|
|
@@ -111,19 +113,6 @@ export interface BuiltinTool {
|
|
|
111
113
|
readonly handler: ToolHandler;
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
/** Mirror Python `str.strip()` (also strips the same Unicode whitespace set we care about here). */
|
|
115
|
-
function _strip(s: string): string {
|
|
116
|
-
return s.replace(/^\s+/, '').replace(/\s+$/, '');
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/** Mirror Python `Path(...).resolve()` — absolutize + realpath, tolerating a missing tail. */
|
|
120
|
-
function _resolvePath(p: string): string {
|
|
121
|
-
try {
|
|
122
|
-
return fs.realpathSync(p);
|
|
123
|
-
} catch {
|
|
124
|
-
return path.resolve(p);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
116
|
|
|
128
117
|
/**
|
|
129
118
|
* Pick the consumer-project root.
|
|
@@ -1212,6 +1201,7 @@ async function _readResourceBodyHandler(
|
|
|
1212
1201
|
// ---------------------------------------------------------------------
|
|
1213
1202
|
|
|
1214
1203
|
export const ALLOWLIST: Record<string, BuiltinTool> = {
|
|
1204
|
+
...GRAPH_TOOLS,
|
|
1215
1205
|
suggest_skill_for_task: {
|
|
1216
1206
|
name: 'suggest_skill_for_task',
|
|
1217
1207
|
side_effect: 'ro',
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
* File-first memory retrieval.
|
|
4
4
|
*
|
|
5
5
|
* Ported from the retired Python `src/scripts/memory_lookup.py` (ADR-200). The public
|
|
6
|
-
* API and CLI contract mirror
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* flagged as divergence candidates.
|
|
6
|
+
* API and CLI contract mirror it EXACTLY — same exported names (snake_case kept
|
|
7
|
+
* deliberately, especially `retrieve(...)`, whose signature and return shape are cited
|
|
8
|
+
* by rules), same exit codes, stdout/stderr split, byte-identical messages, same
|
|
9
|
+
* memory-file scan, ranking and JSON output. No behaviour changes; latent Python bugs
|
|
10
|
+
* are replicated and flagged as divergence candidates.
|
|
12
11
|
*
|
|
13
12
|
* Implements the shared `retrieve(types, keys, limit)` abstraction used
|
|
14
13
|
* by skills. Reads YAML under `agents/memory/<type>/` (curated, hand-
|
|
@@ -16,9 +15,8 @@
|
|
|
16
15
|
* append-only, supersede-chain aware), plus user-ingested `knowledge`
|
|
17
16
|
* chunks and opted-in `cross-repo` matches.
|
|
18
17
|
*
|
|
19
|
-
* Retrieval is entirely repo-side and file-backed —
|
|
20
|
-
*
|
|
21
|
-
* was removed; see `docs/decisions/` for the agent-memory removal ADR.)
|
|
18
|
+
* Retrieval is entirely repo-side and file-backed — no external backend. (The former
|
|
19
|
+
* optional `@event4u/agent-memory` routing was removed; see `docs/decisions/`.)
|
|
22
20
|
*
|
|
23
21
|
* Usage:
|
|
24
22
|
* memory_lookup --types domain-invariants,ownership --key "app/Http/Controllers/Foo" --limit 5
|
|
@@ -26,6 +24,8 @@
|
|
|
26
24
|
*
|
|
27
25
|
* import { retrieve } from './memory_lookup.js';
|
|
28
26
|
* const hits = retrieve(['ownership'], ['app/Http'], 3);
|
|
27
|
+
* loss_class: recoverable-lossy
|
|
28
|
+
* loss_recovery: the envelope's `truncation.omitted` plus its next-path hint under `agents/memory/`.
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
import * as fs from 'node:fs';
|
|
@@ -60,6 +60,7 @@ import {
|
|
|
60
60
|
loadRuleBody,
|
|
61
61
|
matchTierRules,
|
|
62
62
|
pathCapableRuleIds,
|
|
63
|
+
pathOnlyRuleIds,
|
|
63
64
|
selectForInjection,
|
|
64
65
|
triggerlessRuleIds,
|
|
65
66
|
type Router,
|
|
@@ -101,6 +102,18 @@ export interface CorpusCase {
|
|
|
101
102
|
rule: string;
|
|
102
103
|
prompt: string;
|
|
103
104
|
openFiles: string[] | null;
|
|
105
|
+
/**
|
|
106
|
+
* The slash command the case declares, or `null` (R2 finding 1).
|
|
107
|
+
*
|
|
108
|
+
* The loader DROPPED this field, so every `command:` trigger scored as an
|
|
109
|
+
* unmatched plain prompt. Two entries in the frozen corpus carry one —
|
|
110
|
+
* `roadmap-progress-sync` and `user-interrupt-priority` — and the shipped
|
|
111
|
+
* concern DOES reach command triggers: `hooks/rule_inject_hook.ts` extracts
|
|
112
|
+
* a leading `/command` from the prompt text and passes it to
|
|
113
|
+
* `matchTierRules`. Dropping the field made the shipped-reach reading
|
|
114
|
+
* falsely low in exactly the two places it mattered.
|
|
115
|
+
*/
|
|
116
|
+
command: string | null;
|
|
104
117
|
label: 'positive' | 'near_miss';
|
|
105
118
|
file: string;
|
|
106
119
|
}
|
|
@@ -119,10 +132,12 @@ function _asCases(
|
|
|
119
132
|
const prompt = typeof o['prompt'] === 'string' ? o['prompt'] : null;
|
|
120
133
|
if (prompt === null) continue;
|
|
121
134
|
const of = o['open_files'];
|
|
135
|
+
const cmd = o['command'];
|
|
122
136
|
out.push({
|
|
123
137
|
rule,
|
|
124
138
|
prompt,
|
|
125
139
|
openFiles: Array.isArray(of) ? of.map((x) => String(x)) : null,
|
|
140
|
+
command: typeof cmd === 'string' && cmd !== '' ? cmd : null,
|
|
126
141
|
label,
|
|
127
142
|
file,
|
|
128
143
|
});
|
|
@@ -618,17 +633,54 @@ export function runEndpoints(corpusDir: string): EndpointResult[] {
|
|
|
618
633
|
}
|
|
619
634
|
|
|
620
635
|
// (b) No labelled rule may end with ZERO matched positives.
|
|
621
|
-
|
|
636
|
+
//
|
|
637
|
+
// TWO READINGS SINCE 2026-09-08 (R2 finding 1), and the second one is the
|
|
638
|
+
// honest half. The pre-registered bar is scored with `open_files` HONOURED,
|
|
639
|
+
// which is the reach of the MECHANISM. It is not the reach of the SHIPPED
|
|
640
|
+
// BINDING: `rule-inject` is bound on `user_prompt_submit` + `pre_compact`
|
|
641
|
+
// only (the `pre_tool_use` binding was removed under owner ruling E2), and
|
|
642
|
+
// `user_prompt_submit` never populates `openFiles` — the payload carries no
|
|
643
|
+
// open-file list. So a rule whose only matching positives carry
|
|
644
|
+
// `open_files` is credited as reachable while no shipped slot can deliver
|
|
645
|
+
// it on that route.
|
|
646
|
+
//
|
|
647
|
+
// The bar is UNCHANGED (it is pre-registered; see
|
|
648
|
+
// `internal/bench/thin-inject-PREREG.md`). What is added is the column: the
|
|
649
|
+
// same recall computed with `open_files` ignored, and the names of the rules
|
|
650
|
+
// that differ between the two. A rule in that difference is either kept
|
|
651
|
+
// full-bodied by the always-eager residue — in which case it is reachable
|
|
652
|
+
// by projection rather than by delivery — or it is thinned, in which case it
|
|
653
|
+
// reaches a Claude Code session on the prompt route only.
|
|
654
|
+
const reach = (c: CorpusCase, honourOpenFiles: boolean): boolean =>
|
|
655
|
+
matchTierRules(
|
|
656
|
+
router,
|
|
657
|
+
c.prompt,
|
|
658
|
+
honourOpenFiles ? c.openFiles : null,
|
|
659
|
+
c.command,
|
|
660
|
+
).some((m) => m.id === c.rule);
|
|
661
|
+
|
|
662
|
+
const byRule = new Map<string, { hit: number; total: number; shipped: number }>();
|
|
622
663
|
for (const c of positives) {
|
|
623
|
-
const e = byRule.get(c.rule) ?? { hit: 0, total: 0 };
|
|
664
|
+
const e = byRule.get(c.rule) ?? { hit: 0, total: 0, shipped: 0 };
|
|
624
665
|
e.total += 1;
|
|
625
|
-
if (
|
|
666
|
+
if (reach(c, true)) e.hit += 1;
|
|
667
|
+
if (reach(c, false)) e.shipped += 1;
|
|
626
668
|
byRule.set(c.rule, e);
|
|
627
669
|
}
|
|
628
670
|
const unreachable = [...byRule.entries()].filter(([, v]) => v.hit === 0).map(([k]) => k);
|
|
629
671
|
const partial = [...byRule.entries()]
|
|
630
672
|
.filter(([, v]) => v.hit > 0 && v.hit < v.total)
|
|
631
673
|
.map(([k, v]) => `${k} ${v.hit}/${v.total}`);
|
|
674
|
+
const pathOnlyReach = [...byRule.entries()]
|
|
675
|
+
.filter(([, v]) => v.hit > 0 && v.shipped === 0)
|
|
676
|
+
.map(([k]) => k)
|
|
677
|
+
.sort();
|
|
678
|
+
const alwaysEager = new Set([
|
|
679
|
+
...triggerlessRuleIds(router),
|
|
680
|
+
...pathOnlyRuleIds(router),
|
|
681
|
+
...kernelIds(router),
|
|
682
|
+
]);
|
|
683
|
+
const thinnedAndPathOnly = pathOnlyReach.filter((id) => !alwaysEager.has(id));
|
|
632
684
|
|
|
633
685
|
// (c) A near-miss must never deliver its labelled rule.
|
|
634
686
|
const exact = scoreExact(router, cases, true);
|
|
@@ -659,7 +711,12 @@ export function runEndpoints(corpusDir: string): EndpointResult[] {
|
|
|
659
711
|
reading:
|
|
660
712
|
`${byRule.size - unreachable.length}/${byRule.size} rules reachable; ` +
|
|
661
713
|
`unreachable: ${unreachable.length === 0 ? 'none' : unreachable.join(', ')}; ` +
|
|
662
|
-
`partial: ${partial.length === 0 ? 'none' : partial.join(', ')}
|
|
714
|
+
`partial: ${partial.length === 0 ? 'none' : partial.join(', ')}` +
|
|
715
|
+
` | shipped user_prompt_submit reach (open_files IGNORED): ` +
|
|
716
|
+
`${byRule.size - pathOnlyReach.length}/${byRule.size}; reachable only via a ` +
|
|
717
|
+
`path trigger: ${pathOnlyReach.length === 0 ? 'none' : pathOnlyReach.join(', ')}` +
|
|
718
|
+
` (of which thinned, i.e. at no scope on that route: ` +
|
|
719
|
+
`${thinnedAndPathOnly.length === 0 ? 'none' : thinnedAndPathOnly.join(', ')})`,
|
|
663
720
|
bar: 'unreachable == 0 (a rule with zero matched positives is a rule the mode removed)',
|
|
664
721
|
passed: unreachable.length === 0,
|
|
665
722
|
},
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* `.augment/` projections.
|
|
20
20
|
*
|
|
21
21
|
* NOTE (faithful literal): the thin-entry pointer keeps the verbatim
|
|
22
|
-
* `Body: [`{rule_id}`](
|
|
22
|
+
* `Body: [`{rule_id}`](../../dist/agent-src/rules/{rule_id}.md)`
|
|
23
23
|
* Markdown link from the retired Python implementation. The same-basename `.py` twin
|
|
24
24
|
* carries that literal, so the ADR-051 legacy-path guard exempts this `.ts`
|
|
25
25
|
* file by twin-parity.
|
|
@@ -35,6 +35,11 @@ import * as path from 'node:path';
|
|
|
35
35
|
import process from 'node:process';
|
|
36
36
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
37
37
|
|
|
38
|
+
import {
|
|
39
|
+
pathOnlyRuleIds,
|
|
40
|
+
triggerlessRuleIds,
|
|
41
|
+
type Router,
|
|
42
|
+
} from './_lib/rule_injection.js';
|
|
38
43
|
import * as token_count from './_lib/token_count.js';
|
|
39
44
|
|
|
40
45
|
const _HERE = fileURLToPath(import.meta.url);
|
|
@@ -77,19 +82,87 @@ export function kernel_ids(): Set<string> {
|
|
|
77
82
|
* visible instead of being absorbed into the pointer count
|
|
78
83
|
* (road-to-trigger-delivered-rule-bodies 1.3).
|
|
79
84
|
*/
|
|
85
|
+
/**
|
|
86
|
+
* Rules whose ONLY triggers are path-shaped — reachable from `pre_tool_use`
|
|
87
|
+
* and from no other slot (road-to-delivery-for-every-host 3.2).
|
|
88
|
+
*
|
|
89
|
+
* They must never be thinned while the delivery concern is NOT bound on
|
|
90
|
+
* `pre_tool_use`, because a stub plus a slot nobody listens on is a rule that
|
|
91
|
+
* reaches the model at no scope at all. This is the same failure the
|
|
92
|
+
* `no_trigger_ids` exemption prevents, one step out: there the rule has nothing
|
|
93
|
+
* to match on, here it has nothing to match ON.
|
|
94
|
+
*
|
|
95
|
+
* Stated as a PROPERTY rather than a list of ids. If the concern is ever bound
|
|
96
|
+
* on `pre_tool_use` again, this exemption is what should be reconsidered — not
|
|
97
|
+
* three names someone has to remember.
|
|
98
|
+
*
|
|
99
|
+
* WHAT THIS EXEMPTION DOES **NOT** COVER — recorded 2026-09-08, R2 finding 1,
|
|
100
|
+
* because the silence read as coverage. The predicate is `every` trigger
|
|
101
|
+
* path-shaped. A rule with BOTH path and non-path triggers is therefore THINNED,
|
|
102
|
+
* and its path-shaped half then has no carrier at all: the stub carries no
|
|
103
|
+
* frontmatter (`condense.ts` writes it with `_writeText`, bypassing
|
|
104
|
+
* `_emit_claude_rule`'s host-native `paths:` key), `pre_tool_use` lost the
|
|
105
|
+
* binding under owner ruling E2, and `user_prompt_submit` never populates
|
|
106
|
+
* `openFiles`. Measured over the current `dist/router.json`: **18 such rules**,
|
|
107
|
+
* all non-kernel and all thinned — augment-edit-discipline, design-fidelity,
|
|
108
|
+
* doc-screenshot-hygiene, domain-adoption-policy,
|
|
109
|
+
* framework-neutrality-in-generic-skills, image-likeness-and-rights,
|
|
110
|
+
* laravel-translations, lethal-trifecta-guard, linked-projects-onboarding-gate,
|
|
111
|
+
* low-impact-corpus-privacy-floor, markdown-safe-codeblocks, onboarding-gate,
|
|
112
|
+
* persona-governance, php-coding, provider-lifecycle-discipline,
|
|
113
|
+
* roadmap-ci-steps-policy, roadmap-progress-sync, settings-ask-protocol.
|
|
114
|
+
*
|
|
115
|
+
* They do NOT reach the model at no scope: every non-path route
|
|
116
|
+
* (keyword / phrase / command) still delivers the body through the concern, and
|
|
117
|
+
* on `claude-code` they never had a separate host-native path route to lose —
|
|
118
|
+
* `_claude_paths_plan` emits no `paths:` for a mixed-trigger rule on purpose, so
|
|
119
|
+
* under `eager-all` they loaded UNCONDITIONALLY. What is lost is the difference
|
|
120
|
+
* between unconditional and prompt-triggered: a session that touches a matching
|
|
121
|
+
* file and says nothing that matches gets nothing.
|
|
122
|
+
*
|
|
123
|
+
* The labelled corpus cannot see this and the endpoint says so rather than
|
|
124
|
+
* implying otherwise — `model_rule_injection --endpoints` (b) now publishes the
|
|
125
|
+
* shipped `user_prompt_submit` reach beside the pre-registered reading, and
|
|
126
|
+
* every one of these 18 has at least one prompt-matching positive, so none
|
|
127
|
+
* appears in its "reachable only via a path trigger" column.
|
|
128
|
+
*
|
|
129
|
+
* WHY THIS IS NOT WIDENED TO `some` HERE. Measured: exempting all 18 moves the
|
|
130
|
+
* thin rule layer 23,592 -> 39,921 GPT tok (+16,329, +69 %), which is a budget
|
|
131
|
+
* move of a magnitude no agent may take, and it would erase most of the saving
|
|
132
|
+
* the flip is licensed on. Restoring a path route needs either that exemption
|
|
133
|
+
* under a re-anchored baseline or a `pre_tool_use` binding under a raised slot
|
|
134
|
+
* cap — both owner-reserved, so the closure is tracked rather than taken here.
|
|
135
|
+
* ADR-267's Consequences section names the receiver.
|
|
136
|
+
*/
|
|
137
|
+
/**
|
|
138
|
+
* ONE spelling of the router-derived sets, shared with the injector (R2
|
|
139
|
+
* finding 11).
|
|
140
|
+
*
|
|
141
|
+
* `path_only_ids` and `no_trigger_ids` were each a second, hand-rolled
|
|
142
|
+
* implementation of `_lib/rule_injection.ts::pathOnlyRuleIds` /
|
|
143
|
+
* `triggerlessRuleIds` — verified identical over the current router at the time
|
|
144
|
+
* (symmetric difference empty), so drift risk rather than a live defect. It is
|
|
145
|
+
* exactly the hazard `THIN_ENTRY_MARKER`'s own comment argues against one
|
|
146
|
+
* screen below ("a gate that re-spelled this string would drift from the writer
|
|
147
|
+
* silently"), and the two consumers here are the PROJECTOR's exemption set and
|
|
148
|
+
* the INJECTOR's reachability set: they must not be able to disagree about which
|
|
149
|
+
* rules the delivery path can reach.
|
|
150
|
+
*
|
|
151
|
+
* The finding named `path_only_ids`. The defect-pattern sweep found the SECOND
|
|
152
|
+
* instance one function down — `no_trigger_ids` against `triggerlessRuleIds` —
|
|
153
|
+
* and it is delegated in the same change. Count: 2 of 2 duplicated
|
|
154
|
+
* router-derived sets in this file, 0 remaining.
|
|
155
|
+
*/
|
|
156
|
+
function _router(): Router {
|
|
157
|
+
return JSON.parse(fs.readFileSync(ROUTER, 'utf-8')) as Router;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function path_only_ids(): Set<string> {
|
|
161
|
+
return pathOnlyRuleIds(_router());
|
|
162
|
+
}
|
|
163
|
+
|
|
80
164
|
export function no_trigger_ids(): Set<string> {
|
|
81
|
-
|
|
82
|
-
const out = new Set<string>();
|
|
83
|
-
for (const tier of ['tier_1', 'tier_2']) {
|
|
84
|
-
const entries = data[tier];
|
|
85
|
-
if (!Array.isArray(entries)) continue;
|
|
86
|
-
for (const e of entries) {
|
|
87
|
-
const obj = e as Record<string, unknown>;
|
|
88
|
-
const t = obj.triggers;
|
|
89
|
-
if (!Array.isArray(t) || t.length === 0) out.add(String(obj.id));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return out;
|
|
165
|
+
return new Set(triggerlessRuleIds(_router()));
|
|
93
166
|
}
|
|
94
167
|
|
|
95
168
|
/**
|
|
@@ -196,6 +269,45 @@ function _title(s: string): string {
|
|
|
196
269
|
return s.replace(/[A-Za-z]+/g, (w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase());
|
|
197
270
|
}
|
|
198
271
|
|
|
272
|
+
/**
|
|
273
|
+
* The marker that makes a projected entry recognisable as a stub.
|
|
274
|
+
*
|
|
275
|
+
* Exported so the WRITER and every DETECTOR share one definition. A gate that
|
|
276
|
+
* re-spelled this string would drift from the writer silently, and the failure
|
|
277
|
+
* would be invisible in exactly the direction that matters: a stub the gate
|
|
278
|
+
* fails to recognise reads as a complete rule body.
|
|
279
|
+
*/
|
|
280
|
+
export const THIN_ENTRY_MARKER = '> Routed rule — load the body on trigger-match.';
|
|
281
|
+
|
|
282
|
+
/** Is this projected entry a pointer stub rather than a rule body? */
|
|
283
|
+
export function is_thin_entry(text: string): boolean {
|
|
284
|
+
return text.includes(THIN_ENTRY_MARKER);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Where a stub tells a reader the body actually is.
|
|
289
|
+
*
|
|
290
|
+
* FIXED 2026-09-07: this pointed into the uncondensed source tree ADR-051
|
|
291
|
+
* retired — the literal path is deliberately NOT reproduced here, because
|
|
292
|
+
* `check_no_uncondensed_refs` matches the string and cannot tell a repair
|
|
293
|
+
* record from a live reference; `git log -S` on this file finds the old value.
|
|
294
|
+
* It exists in no checkout, so EVERY stub's fallback pointer
|
|
295
|
+
* resolved to nothing — invisible under `delivery`, where the hook loads the
|
|
296
|
+
* body from `dist/agent-src/rules` and never follows this link, and total under
|
|
297
|
+
* `thin`, where the pointer is the only path to the body there is.
|
|
298
|
+
*
|
|
299
|
+
* KNOWN LIMIT, stated rather than discovered later: one relative prefix cannot
|
|
300
|
+
* be right for every tree, because they sit at different depths — `.claude/rules`
|
|
301
|
+
* and `.cursor/rules` are two levels below the repo root and `.clinerules` is
|
|
302
|
+
* one. `../../` is correct for the first two, which are the only trees the
|
|
303
|
+
* shipped `lean_projection.hosts` default can thin. A stub in `.clinerules`
|
|
304
|
+
* needs an operator to have added `cline` to that list, and its pointer is off
|
|
305
|
+
* by one level. That is strictly better than the previous state, where the
|
|
306
|
+
* pointer was dead in all three, and it is recorded here so the remaining case
|
|
307
|
+
* is a known limit rather than a surprise.
|
|
308
|
+
*/
|
|
309
|
+
const BODY_LINK_PREFIX = '../../dist/agent-src/rules/';
|
|
310
|
+
|
|
199
311
|
/** Build the minimal progressive-disclosure pointer for a non-kernel rule. */
|
|
200
312
|
export function thin_entry(rule_id: string, text: string): string {
|
|
201
313
|
const [fm] = split_frontmatter(text);
|
|
@@ -205,8 +317,8 @@ export function thin_entry(rule_id: string, text: string): string {
|
|
|
205
317
|
const fires = hint ? ` Fires on: ${hint}.` : '';
|
|
206
318
|
return (
|
|
207
319
|
`## ${title}\n` +
|
|
208
|
-
|
|
209
|
-
`Body: [\`${rule_id}\`](
|
|
320
|
+
`${THIN_ENTRY_MARKER}${fires} ${desc} ` +
|
|
321
|
+
`Body: [\`${rule_id}\`](${BODY_LINK_PREFIX}${rule_id}.md)\n`
|
|
210
322
|
);
|
|
211
323
|
}
|
|
212
324
|
|
|
@@ -214,9 +326,21 @@ export function thin_entry(rule_id: string, text: string): string {
|
|
|
214
326
|
export function build_thin(
|
|
215
327
|
rules_dir: string = RULES_SOURCE,
|
|
216
328
|
scope: readonly string[] | null = null,
|
|
329
|
+
/**
|
|
330
|
+
* Optional sink for the D3 diagnostic
|
|
331
|
+
* (road-to-delivery-for-every-host 2.2).
|
|
332
|
+
*
|
|
333
|
+
* An `auto` rule the router gives NO trigger is already kept full-bodied by
|
|
334
|
+
* `noTrigger` below, which is the substantive protection and predates this
|
|
335
|
+
* roadmap. What did not exist is any way to SEE it happen: the rule is
|
|
336
|
+
* silently exempted, so an author who removes a rule's last trigger gets a
|
|
337
|
+
* silently eager rule and no signal. The line makes the exemption audible.
|
|
338
|
+
*/
|
|
339
|
+
announce: ((message: string) => void) | null = null,
|
|
217
340
|
): Map<string, string> {
|
|
218
341
|
const kernel = kernel_ids();
|
|
219
342
|
const noTrigger = no_trigger_ids();
|
|
343
|
+
const pathOnly = path_only_ids();
|
|
220
344
|
const wsMap = scope !== null ? rule_workspaces_map() : new Map<string, string[]>();
|
|
221
345
|
const out = new Map<string, string>();
|
|
222
346
|
for (const p of _globSortedMd(rules_dir)) {
|
|
@@ -225,7 +349,16 @@ export function build_thin(
|
|
|
225
349
|
if (!id_in_scope(stem, scope, kernel, wsMap, fm_workspaces(text))) {
|
|
226
350
|
continue; // out of workspace scope — no body, no pointer line
|
|
227
351
|
}
|
|
228
|
-
const full = kernel.has(stem) || noTrigger.has(stem);
|
|
352
|
+
const full = kernel.has(stem) || noTrigger.has(stem) || pathOnly.has(stem);
|
|
353
|
+
if (announce !== null && noTrigger.has(stem) && !kernel.has(stem)) {
|
|
354
|
+
announce(`D3: trigger-less auto rule ${path.basename(p)} — kept full-bodied, never thinned`);
|
|
355
|
+
}
|
|
356
|
+
if (announce !== null && pathOnly.has(stem) && !kernel.has(stem) && !noTrigger.has(stem)) {
|
|
357
|
+
announce(
|
|
358
|
+
`E2: path-only auto rule ${path.basename(p)} — kept full-bodied; its only triggers ` +
|
|
359
|
+
`are path-shaped and the delivery concern is not bound on pre_tool_use`,
|
|
360
|
+
);
|
|
361
|
+
}
|
|
229
362
|
out.set(path.basename(p), full ? text : thin_entry(stem, text));
|
|
230
363
|
}
|
|
231
364
|
return out;
|