@event4u/agent-config 14.23.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 +198 -0
- 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 +1 -1
- 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 +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 +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/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/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-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 +4 -4
- 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 +1 -1
- 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 +22 -75
- 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 +8607 -8930
- package/dist/install/install.mjs +35 -8
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +1433 -1342
- 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/condense.js +2 -5
- package/dist/server/io/yamlIO.js +125 -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 +4 -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 +2 -3
- 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/_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_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/guidelines_lane.ts +164 -0
- package/src/scripts/_lib/obligation_frequency.ts +2 -3
- package/src/scripts/_lib/platform_anchor.ts +1053 -0
- package/src/scripts/_lib/ratification_artifact.ts +278 -0
- 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 +103 -37
- package/src/scripts/_lib/tolerance_shadow.ts +177 -0
- 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_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 +292 -4
- package/src/scripts/check_projected_rule_routes.ts +395 -0
- 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 +35 -27
- package/src/scripts/hooks/category_a.ts +1 -1
- package/src/scripts/hooks/chain_nudge_hook.ts +311 -25
- 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/ui_route_nudge_hook.ts +52 -15
- package/src/scripts/hot_context_hook.ts +41 -401
- package/src/scripts/lint_evidence_artifacts.ts +1 -0
- package/src/scripts/lint_knowledge_scale.ts +0 -26
- package/src/scripts/memory_lookup.ts +9 -9
- 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 +270 -10
- package/src/server/io/yamlIO.ts +127 -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,317 @@
|
|
|
1
|
+
# Layered Settings
|
|
2
|
+
|
|
3
|
+
Three-file settings model: **team defaults** (committed),
|
|
4
|
+
**user-global DX-comfort defaults** (per-developer, cross-project), and
|
|
5
|
+
**developer overrides** (per-project, git-ignored). Lets a project pin
|
|
6
|
+
decisions, a developer carry DX preferences across every project, and
|
|
7
|
+
project-local choices always win.
|
|
8
|
+
|
|
9
|
+
Referenced by `road-to-project-memory.md` Phase 0 and
|
|
10
|
+
`road-to-portable-dev-preferences.md`. Consumed by the centralized
|
|
11
|
+
settings loader at
|
|
12
|
+
[`scripts/_lib/agent_settings.ts`](../../../src/scripts/_lib/agent_settings.ts),
|
|
13
|
+
the `/onboard` command, and any agent that edits `.agent-settings.yml`
|
|
14
|
+
on user request.
|
|
15
|
+
|
|
16
|
+
## The three files
|
|
17
|
+
|
|
18
|
+
| File | Git | Scope | Owner | Example values |
|
|
19
|
+
|---|---|---|---|---|
|
|
20
|
+
| `.agent-project-settings.yml` | **committed** | team / repo | lead maintainer | `project.stack`, `quality.php.tools`, `memory.dogfood` |
|
|
21
|
+
| `~/.event4u/agent-config/agent-settings.yml` | **n/a** (outside repo) | individual developer · cross-project | individual | `name`, `ide`, `rule_loading_tier`, `personal.bot_icon`, `personal.autonomy`, `memory.cadence` (legacy `~/.config/agent-config/agent-settings.yml` read as fallback) |
|
|
22
|
+
| `agents/settings/.agent-settings.yml` | **gitignored** | individual developer · this project | individual | `personal.ide`, `personal.user_name`, `subagents.max_parallel`, `onboarding.onboarded` | <!-- ref-ignore -->
|
|
23
|
+
|
|
24
|
+
> **Canonical location (ADR-038):** the developer file lives in the settings
|
|
25
|
+
> layer at `agents/settings/.agent-settings.yml` (alongside <!-- ref-ignore -->
|
|
26
|
+
> `.agent-settings.local.yml`, `contexts/`, `policies/`). A repo-root
|
|
27
|
+
> `.agent-settings.yml` is read as a **back-compat fallback** and is migrated
|
|
28
|
+
> into the canonical location by `install` on the next run.
|
|
29
|
+
|
|
30
|
+
All three are YAML. Schemas:
|
|
31
|
+
|
|
32
|
+
- Developer (project-local): [`agent-settings.md`](../../templates/agent-settings.md).
|
|
33
|
+
- Team: [`agent-project-settings.example.yml`](../../../src/agent-src/templates/agents/agent-project-settings.example.yml).
|
|
34
|
+
- User-global: six exact dotted paths — whitelist in
|
|
35
|
+
[`scripts/_lib/agent_settings.ts`](../../../src/scripts/_lib/agent_settings.ts).
|
|
36
|
+
|
|
37
|
+
## Merge order
|
|
38
|
+
|
|
39
|
+
Lowest priority → highest priority:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
1. Package defaults (shipped by event4u/agent-config)
|
|
43
|
+
2. ~/.event4u/agent-config/agent-settings.yml (user-global · whitelist-filtered · legacy ~/.config/agent-config/ read as fallback)
|
|
44
|
+
3. .agent-project-settings.yml (team file, committed)
|
|
45
|
+
4. agents/settings/.agent-settings.yml (developer file, gitignored; legacy repo-root .agent-settings.yml read as fallback — ADR-038) <!-- ref-ignore -->
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Keys from higher layers win unless a lower layer marks them
|
|
49
|
+
`locked` (team file only). The user-global file does **not** support
|
|
50
|
+
`locked` — its purpose is cross-project comfort, never policy.
|
|
51
|
+
|
|
52
|
+
## User-global whitelist
|
|
53
|
+
|
|
54
|
+
Only these exact dotted paths are mergeable from the user-global file;
|
|
55
|
+
every other key is silently dropped by the loader. The whitelist is
|
|
56
|
+
intentionally tiny — adding a key requires an ADR.
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
name
|
|
60
|
+
ide
|
|
61
|
+
rule_loading_tier
|
|
62
|
+
personal.bot_icon
|
|
63
|
+
personal.autonomy
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Loader contract:
|
|
67
|
+
|
|
68
|
+
- **Read-only.** The loader never creates, modifies, or deletes the
|
|
69
|
+
user-global file. Writes are the exclusive responsibility of the
|
|
70
|
+
`/onboard` command on explicit user opt-in.
|
|
71
|
+
- **Tolerant.** Missing file, malformed YAML, empty file — all fall
|
|
72
|
+
back to the next tier without raising.
|
|
73
|
+
- **Silent on out-of-whitelist keys.** `verbose=True` logs which keys
|
|
74
|
+
were dropped for debugging; default mode is silent.
|
|
75
|
+
- **Never auto-creates `~/.event4u/agent-config/`** (nor the legacy
|
|
76
|
+
`~/.config/agent-config/`). The new directory is created by the
|
|
77
|
+
migration shim or by `/onboard` on opt-in; key installation also
|
|
78
|
+
`mkdir -p`s as needed.
|
|
79
|
+
|
|
80
|
+
## Lock semantics
|
|
81
|
+
|
|
82
|
+
`.agent-project-settings.yml` has a top-level `locked_keys` list.
|
|
83
|
+
Any key listed there cannot be overridden from `.agent-settings.yml`:
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
# .agent-project-settings.yml
|
|
87
|
+
quality:
|
|
88
|
+
php:
|
|
89
|
+
tools: [phpstan, rector, ecs]
|
|
90
|
+
|
|
91
|
+
locked_keys:
|
|
92
|
+
- quality.php.tools
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Even if a developer's `.agent-settings.yml` sets
|
|
96
|
+
`quality.php.tools: [pint]`, the resolved value stays
|
|
97
|
+
`[phpstan, rector, ecs]`. The loader emits a one-line warning
|
|
98
|
+
when it ignores a locked override.
|
|
99
|
+
|
|
100
|
+
### When to lock
|
|
101
|
+
|
|
102
|
+
- **Correctness** — test framework, database driver, seeder ordering.
|
|
103
|
+
- **Compliance** — code style enforced by CI.
|
|
104
|
+
- **Team-wide rituals** — mandatory pre-commit checks.
|
|
105
|
+
|
|
106
|
+
### When NOT to lock
|
|
107
|
+
|
|
108
|
+
- Personal preferences — IDE, output verbosity, name.
|
|
109
|
+
- Performance knobs the developer should tune to their hardware.
|
|
110
|
+
- Anything that slows down onboarding without a correctness payoff.
|
|
111
|
+
|
|
112
|
+
Err on the side of **not** locking. Every locked key reduces
|
|
113
|
+
autonomy. Unlock by removing the entry from `locked_keys` — no
|
|
114
|
+
migration needed.
|
|
115
|
+
|
|
116
|
+
## Migration from a single file
|
|
117
|
+
|
|
118
|
+
Repos that currently ship only `.agent-settings.yml` (often
|
|
119
|
+
mistakenly committed) migrate by:
|
|
120
|
+
|
|
121
|
+
1. Create `.agent-project-settings.yml` from the example template.
|
|
122
|
+
2. Move team-wide keys (`project.*`, `quality.*`, `memory.*`,
|
|
123
|
+
`review_routing.*`, `roles.*`) into the new file.
|
|
124
|
+
3. Leave personal keys (`personal.*`, `subagents.*`, `github.*`)
|
|
125
|
+
in `.agent-settings.yml`.
|
|
126
|
+
4. Commit `.agent-project-settings.yml`.
|
|
127
|
+
5. Confirm `.agent-settings.yml` is in `.gitignore`; add it if not.
|
|
128
|
+
6. Remove any previously-committed `.agent-settings.yml` from the
|
|
129
|
+
repo history only if it leaked personal tokens. Otherwise leave
|
|
130
|
+
it — future commits supersede.
|
|
131
|
+
|
|
132
|
+
The `/onboard` command and any agent that edits settings on user
|
|
133
|
+
request should walk steps 1–3 and 5 automatically when it detects
|
|
134
|
+
a one-file setup.
|
|
135
|
+
|
|
136
|
+
## .gitignore expectations
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
# .gitignore
|
|
140
|
+
.agent-settings.yml # developer-local, NEVER committed
|
|
141
|
+
.agent-settings.backup.* # migration backups
|
|
142
|
+
!.agent-project-settings.yml # explicitly NOT ignored
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The final negated entry protects the team file if a broader
|
|
146
|
+
pattern (e.g. `*.yml` in a nested folder) would otherwise match.
|
|
147
|
+
|
|
148
|
+
## Consumption
|
|
149
|
+
|
|
150
|
+
- **Skills** read settings via the loader, never by parsing YAML
|
|
151
|
+
directly. The loader returns the merged view already.
|
|
152
|
+
- **Commands** that mutate settings must state which layer they
|
|
153
|
+
write to. Writing to the wrong layer is a spec bug.
|
|
154
|
+
- Writes to either file MUST follow the [section-aware merge
|
|
155
|
+
rules](#section-aware-merge-rules) — preserve existing values,
|
|
156
|
+
template order, and comments. No ad-hoc YAML rewrites.
|
|
157
|
+
|
|
158
|
+
## Module discovery
|
|
159
|
+
|
|
160
|
+
Module-aware skills and commands (`module-management`, `/module
|
|
161
|
+
explore`, `/module create`, roadmap-writing) consult the `modules:`
|
|
162
|
+
block on the **team** layer
|
|
163
|
+
([`agent-project-settings.example.yml`](../../../src/agent-src/templates/agents/agent-project-settings.example.yml))
|
|
164
|
+
to find module roots, namespace conventions, and per-module
|
|
165
|
+
`agents/` folders. Lives next to `project.stack` because it
|
|
166
|
+
describes the same thing — repo layout.
|
|
167
|
+
|
|
168
|
+
| Key | Default | Purpose |
|
|
169
|
+
|---|---|---|
|
|
170
|
+
| `modules.enabled` | `false` | Master switch; when off, every module-aware surface treats the repo as flat |
|
|
171
|
+
| `modules.root_paths` | `[]` | Repo-relative directories whose direct children are modules |
|
|
172
|
+
| `modules.namespace_template` | `""` | Substitution template (`{ModuleName}`) for stacks with a PHP-style namespace |
|
|
173
|
+
| `modules.agent_folder` | `"agents"` | Per-module folder the agent auto-loads on `/module explore <Name>` |
|
|
174
|
+
| `modules.skip_dirs` | `[".module-template", ".example"]` | Directory names skipped during enumeration |
|
|
175
|
+
|
|
176
|
+
Stack-by-stack starting points (manual setup; the installer fills
|
|
177
|
+
these on opt-in when it detects a known shape):
|
|
178
|
+
|
|
179
|
+
```yaml
|
|
180
|
+
# Laravel HMVC
|
|
181
|
+
modules:
|
|
182
|
+
enabled: true
|
|
183
|
+
root_paths: [app/Modules]
|
|
184
|
+
namespace_template: "App\\Modules\\{ModuleName}\\App"
|
|
185
|
+
|
|
186
|
+
# Symfony DDD-lite (or PHP with a single src tree)
|
|
187
|
+
modules:
|
|
188
|
+
enabled: true
|
|
189
|
+
root_paths: [src]
|
|
190
|
+
namespace_template: "App\\{ModuleName}"
|
|
191
|
+
|
|
192
|
+
# Node monorepo
|
|
193
|
+
modules:
|
|
194
|
+
enabled: true
|
|
195
|
+
root_paths: [packages]
|
|
196
|
+
namespace_template: ""
|
|
197
|
+
|
|
198
|
+
# Go internal layout
|
|
199
|
+
modules:
|
|
200
|
+
enabled: true
|
|
201
|
+
root_paths: [internal]
|
|
202
|
+
namespace_template: ""
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Multi-root repos list each root once; enumeration walks every
|
|
206
|
+
listed root and merges results.
|
|
207
|
+
|
|
208
|
+
Lock via `locked_keys: [modules.root_paths]` when the layout must
|
|
209
|
+
not drift between developers — typical for compliance-critical or
|
|
210
|
+
multi-team repos.
|
|
211
|
+
|
|
212
|
+
## Persona-list merge semantics
|
|
213
|
+
|
|
214
|
+
Persona configuration does **not** follow the simple "higher layer
|
|
215
|
+
wins" rule — lists merge with explicit override and ignore hooks.
|
|
216
|
+
|
|
217
|
+
| Key | Layer | Role |
|
|
218
|
+
|---|---|---|
|
|
219
|
+
| `personas.default` | project | Team default cast (list of ids) |
|
|
220
|
+
| `personas.specialists.auto_include` | project | Specialists auto-added on every multi-lens run |
|
|
221
|
+
| `personas.override` | developer | Full replacement of `personas.default` for this developer (empty = inherit) |
|
|
222
|
+
| `personas.ignore` | developer | Ids dropped from the effective cast |
|
|
223
|
+
| `.augmentignore` | workstation | Persona files physically hidden from the agent |
|
|
224
|
+
|
|
225
|
+
**Resolution order** for the effective cast of a multi-lens skill:
|
|
226
|
+
|
|
227
|
+
1. Start with `personas.default` from the project file.
|
|
228
|
+
2. If `personas.override` is non-empty, **replace** the list (not merge).
|
|
229
|
+
3. Add every id from `personas.specialists.auto_include`.
|
|
230
|
+
4. Remove every id from `personas.ignore`.
|
|
231
|
+
5. Remove every id whose file is matched by `.augmentignore`.
|
|
232
|
+
6. If the skill's own frontmatter pins `personas: [...]`, that wins
|
|
233
|
+
over all of the above — the skill is the authority for its own
|
|
234
|
+
cast.
|
|
235
|
+
|
|
236
|
+
An id removed in step 4 or 5 stays **invokable** via explicit
|
|
237
|
+
`--personas=<id>` on the skill invocation. Ignore hides the id from
|
|
238
|
+
the default cast; it does not blacklist it.
|
|
239
|
+
|
|
240
|
+
If the project locks `personas.default` via `locked_keys`, steps 2
|
|
241
|
+
and 4 are ignored with a one-line warning — the developer cannot
|
|
242
|
+
narrow a team-locked cast.
|
|
243
|
+
|
|
244
|
+
## Section-aware merge rules
|
|
245
|
+
|
|
246
|
+
Any agent that writes `.agent-settings.yml` or
|
|
247
|
+
`.agent-project-settings.yml` on the user's behalf (including
|
|
248
|
+
`/onboard`, `/set-cost-profile`, and ad-hoc "change value X" requests)
|
|
249
|
+
MUST follow these rules. Initial file creation and legacy migration
|
|
250
|
+
are owned by `scripts/install.ts`; these rules govern every edit
|
|
251
|
+
after that.
|
|
252
|
+
|
|
253
|
+
The contract is **additive merge with user-line preservation** —
|
|
254
|
+
the user's file is the ground truth, the template only contributes
|
|
255
|
+
keys the user is missing. Round-trip parser and merger live in
|
|
256
|
+
[`scripts/sync_yaml_rt.ts`](../../../src/scripts/sync_yaml_rt.ts); the
|
|
257
|
+
supported YAML subset (block-mappings, scalars, lists, comments,
|
|
258
|
+
CRLF/LF) is documented in its module docstring. The stdlib-only
|
|
259
|
+
choice (vs. `ruamel.yaml`) and its revisit triggers are recorded in
|
|
260
|
+
[`docs/contracts/adr-settings-sync-engine.md`](../../contracts/adr-settings-sync-engine.md).
|
|
261
|
+
|
|
262
|
+
For each section in the template
|
|
263
|
+
([`agent-settings.md`](../../templates/agent-settings.md)):
|
|
264
|
+
|
|
265
|
+
- For each key under the section:
|
|
266
|
+
- **Key exists in user's file** → keep the user's line **verbatim**
|
|
267
|
+
(value, quoting, inline comment, indent — all preserved).
|
|
268
|
+
- **Key missing** → insert the template's line at the position
|
|
269
|
+
after the user's last preceding sibling that is also in the
|
|
270
|
+
template (max-index insertion).
|
|
271
|
+
- **Unknown sections/keys** the user has added → preserved verbatim
|
|
272
|
+
at their existing position. They are not moved to a trailing
|
|
273
|
+
`_user:` block, not re-prefixed, not flattened.
|
|
274
|
+
|
|
275
|
+
Invariants:
|
|
276
|
+
|
|
277
|
+
- **User order wins.** Template order is only consulted to decide
|
|
278
|
+
where to insert missing keys; existing user keys are never
|
|
279
|
+
reordered.
|
|
280
|
+
- Existing scalar values are **never overwritten** unless the user
|
|
281
|
+
asked for that specific change.
|
|
282
|
+
- New keys added to the template land with their default value and
|
|
283
|
+
the template's leading comments.
|
|
284
|
+
- **User comments are preserved verbatim** on every existing key.
|
|
285
|
+
Template comments only land with keys the merger inserts; once a
|
|
286
|
+
key is in the user's file, its surrounding comments are owned by
|
|
287
|
+
the user.
|
|
288
|
+
- Legacy `_user._user.foo` corruption (accumulated by older buggy
|
|
289
|
+
syncs) heals on the next sync — the leading `_user.` chain is
|
|
290
|
+
stripped and the leaf is re-homed at its template path, or kept
|
|
291
|
+
as a single-level orphan under `_user:` if no template home
|
|
292
|
+
exists.
|
|
293
|
+
- Write with 2-space indent, no tabs, no trailing whitespace.
|
|
294
|
+
- Never commit — `.agent-settings.yml` is git-ignored.
|
|
295
|
+
- If a legacy flat `.agent-settings` (key=value) is still present,
|
|
296
|
+
stop and tell the user to run `scripts/install` — migration is the
|
|
297
|
+
installer's job, never the agent's.
|
|
298
|
+
|
|
299
|
+
Template drift (new keys shipped by a package update) is resolved by
|
|
300
|
+
re-running `scripts/install` or by the agent walking these rules on
|
|
301
|
+
the next explicit settings edit.
|
|
302
|
+
|
|
303
|
+
## Anti-patterns
|
|
304
|
+
|
|
305
|
+
- **Do NOT** commit `.agent-settings.yml`. It contains developer
|
|
306
|
+
identity and potentially secrets.
|
|
307
|
+
- **Do NOT** put personal preferences in `.agent-project-settings.yml`.
|
|
308
|
+
The team file is not a place to publish your IDE choice.
|
|
309
|
+
- **Do NOT** lock every key "just to be safe". Locking is an
|
|
310
|
+
intervention, not a default.
|
|
311
|
+
- **Do NOT** merge settings in skill code. The loader owns the
|
|
312
|
+
merge; duplicating it creates drift.
|
|
313
|
+
|
|
314
|
+
## See also
|
|
315
|
+
|
|
316
|
+
- [`agent-settings.md`](../../templates/agent-settings.md) — dev-layer schema
|
|
317
|
+
- [`agent-project-settings.example.yml`](../../../src/agent-src/templates/agents/agent-project-settings.example.yml) — team-layer template
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Linked-Projects Onboarding Gate
|
|
2
|
+
|
|
3
|
+
> IDE-attached sibling repo detection, one-time opt-in flow, persistence shape, and the cross-repo behavioral directive
|
|
4
|
+
|
|
5
|
+
_Origin: migrated from `src/rules/linked-projects-onboarding-gate.md` per the P4 pattern of `road-to-kernel-and-router.md`._
|
|
6
|
+
|
|
7
|
+
**Iron Law.** When the IDE has attached a sibling repository to this project
|
|
8
|
+
and the sibling is not yet recorded in `linked_projects`, prompt the developer
|
|
9
|
+
**once** to opt it into scope, persist the choice local-only, and thereafter
|
|
10
|
+
proactively flag cross-repo impact — never bulk-include the sibling's files.
|
|
11
|
+
|
|
12
|
+
This closes the **proactivity gap**: the agent can already read/write a sibling
|
|
13
|
+
repo, but it does not *consider* one unless told — and the developer who most
|
|
14
|
+
needs cross-repo awareness is precisely the one who won't think to mention the
|
|
15
|
+
sibling. Detection reads the relationship the developer already encoded by
|
|
16
|
+
attaching the repo in their IDE (zero-knowledge). See the cross-repo guide
|
|
17
|
+
(`docs/guides/cross-repo-linked-projects.md`) and ADR-032.
|
|
18
|
+
|
|
19
|
+
## When this fires
|
|
20
|
+
|
|
21
|
+
First substantive turn of a session (and on a new IDE attachment), when a
|
|
22
|
+
detected sibling is absent from `linked_projects` in `.agent-settings.local.yml` (in agents/settings/).
|
|
23
|
+
Inert when no sibling is attached, or when every detected sibling already has a
|
|
24
|
+
recorded decision (opted-in or declined).
|
|
25
|
+
|
|
26
|
+
## Detection
|
|
27
|
+
|
|
28
|
+
Run the detector against the project root:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
./scripts-run src/scripts/_lib/linked_projects detect .
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
It returns config-attached siblings only (PhpStorm `.idea/modules.xml` +
|
|
36
|
+
`vcs.xml`, VS Code `*.code-workspace`) that resolve outside the project, exist,
|
|
37
|
+
and are git repos. A sibling above `linked_projects_max_files` (default 20000)
|
|
38
|
+
carries `"large": true` — surfaced as awareness only, never excluded.
|
|
39
|
+
|
|
40
|
+
## Opt-in (one-time per sibling)
|
|
41
|
+
|
|
42
|
+
For each detected sibling **not** already in `linked_projects`, ask once
|
|
43
|
+
(numbered options per `user-interaction`): include it / decline it / always /
|
|
44
|
+
never-ask. Persist to `.agent-settings.local.yml` (in agents/settings/) (the gitignored per-machine
|
|
45
|
+
layer — never the committed `.agent-settings.yml`):
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
linked_projects:
|
|
49
|
+
- path: /abs/path/to/sibling
|
|
50
|
+
include: true # false = declined; never re-prompt
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
A declined sibling (`include: false`) is never prompted again.
|
|
54
|
+
|
|
55
|
+
## Behavioral directive (for each `include: true` sibling)
|
|
56
|
+
|
|
57
|
+
While that sibling is in scope, the agent:
|
|
58
|
+
|
|
59
|
+
- **proactively checks cross-repo impact** when a change here may affect it —
|
|
60
|
+
API-contract changes, shared-type / enum drift, renamed routes the sibling
|
|
61
|
+
consumes — and **warns** before finishing;
|
|
62
|
+
- **does not bulk-include** the sibling's files in context (passive awareness,
|
|
63
|
+
not implicit inclusion — large repos stay cheap);
|
|
64
|
+
- treats out-of-root edits to the sibling as normal work, but the host agent's
|
|
65
|
+
own out-of-root **permission gate still applies** (no silent cross-repo write).
|
|
66
|
+
|
|
67
|
+
## Kill-switch
|
|
68
|
+
|
|
69
|
+
This is an experimental, removable rule. If opt-in is consistently declined or
|
|
70
|
+
siblings are never cited, remove it — no telemetry, the signal is local.
|
|
71
|
+
|
|
72
|
+
## Follow-up (not yet shipped)
|
|
73
|
+
|
|
74
|
+
- Consumer-install detector reachability: ✅ shipped 2026-05-30 — the detector is
|
|
75
|
+
now exposed as `agent-config linked-projects:list` (closes the ADR-032
|
|
76
|
+
follow-up); cross-repo retrieval over opted-in siblings ships as
|
|
77
|
+
`/knowledge:cross-repo`.
|
|
78
|
+
- Multi-agent verification: only Claude Code was empirically validated
|
|
79
|
+
(ADR-032). Cursor / Augment / Copilot behavior is unverified — the manual
|
|
80
|
+
fallback in the guide covers them until tested.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# MCP Request Signing (HMAC-SHA256)
|
|
2
|
+
|
|
3
|
+
Reference guideline for signing JSON-RPC requests crossing any non-stdio
|
|
4
|
+
MCP transport — HTTP, SSE, WebSocket, anything routable. Stdio over a
|
|
5
|
+
trusted parent-child pipe is **outside** the scope of this guideline; only
|
|
6
|
+
network-exposed transports require signing.
|
|
7
|
+
|
|
8
|
+
Lands ahead of any HTTP-MCP transport so the security floor is in place
|
|
9
|
+
when one becomes a real consumer use case (paired with the allowlist
|
|
10
|
+
gate tracked in the active mcp-server plate under `agents/roadmaps/`).
|
|
11
|
+
|
|
12
|
+
Adapted from an external reference — the request-signing primitive
|
|
13
|
+
(`CRYPTO_SEG`). The full Express bridge (~1.6k LOC) stays out of
|
|
14
|
+
scope; this guideline takes the **primitive**, not the runtime.
|
|
15
|
+
|
|
16
|
+
## When signing is mandatory
|
|
17
|
+
|
|
18
|
+
- Any HTTP / SSE / WebSocket MCP transport — the wire is shared with
|
|
19
|
+
arbitrary callers.
|
|
20
|
+
- Any cross-host stdio bridge (parent and child on different machines).
|
|
21
|
+
- Any MCP server reachable from a browser context.
|
|
22
|
+
|
|
23
|
+
## When signing is **not** required
|
|
24
|
+
|
|
25
|
+
- Plain stdio MCP server invoked as a child process by one trusted client
|
|
26
|
+
on the same host. The OS pipe is the trust boundary.
|
|
27
|
+
- Local-only loopback served behind a Unix domain socket with `0700`
|
|
28
|
+
permissions on the socket file.
|
|
29
|
+
|
|
30
|
+
If unsure → sign. The cost is one HMAC per request.
|
|
31
|
+
|
|
32
|
+
## Signing pattern (~30 LOC reference)
|
|
33
|
+
|
|
34
|
+
`KERNEL_SECRET` is a per-installation shared secret loaded from env or a
|
|
35
|
+
secrets store. Never commit it. `randomUUID()` is Node's
|
|
36
|
+
`crypto.randomUUID`.
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
import { createHmac, randomUUID } from 'node:crypto';
|
|
40
|
+
|
|
41
|
+
const KERNEL_SECRET = process.env.MCP_KERNEL_SECRET;
|
|
42
|
+
const KERNEL_ID = `mcp-kernel-${process.pid}`;
|
|
43
|
+
|
|
44
|
+
function signRequest(payload) {
|
|
45
|
+
const timestamp = Date.now();
|
|
46
|
+
const nonce = randomUUID();
|
|
47
|
+
const data = `${timestamp}:${nonce}:${JSON.stringify(payload)}`;
|
|
48
|
+
const signature = createHmac('sha256', KERNEL_SECRET)
|
|
49
|
+
.update(data)
|
|
50
|
+
.digest('hex');
|
|
51
|
+
return { timestamp, nonce, signature, kernelId: KERNEL_ID };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// On every outbound MCP request:
|
|
55
|
+
const sig = signRequest(body);
|
|
56
|
+
headers['X-MCP-Kernel'] = sig.kernelId;
|
|
57
|
+
headers['X-MCP-Signature'] = sig.signature;
|
|
58
|
+
headers['X-MCP-Timestamp'] = String(sig.timestamp);
|
|
59
|
+
headers['X-MCP-Nonce'] = sig.nonce;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Header names are project-namespaced; the upstream the external runtime file uses
|
|
63
|
+
`X-RVF-*`, the convention here is `X-MCP-*`.
|
|
64
|
+
|
|
65
|
+
## Verification pattern (server-side counterpart)
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
import { createHmac, timingSafeEqual } from 'node:crypto';
|
|
69
|
+
|
|
70
|
+
const KERNEL_SECRET = process.env.MCP_KERNEL_SECRET;
|
|
71
|
+
const MAX_SKEW_MS = 5 * 60 * 1000; // 5 min
|
|
72
|
+
const seenNonces = new Map(); // nonce -> expiresAt
|
|
73
|
+
|
|
74
|
+
function verifyRequest(headers, rawBody) {
|
|
75
|
+
const ts = Number(headers['x-mcp-timestamp']);
|
|
76
|
+
const nonce = headers['x-mcp-nonce'];
|
|
77
|
+
const sig = headers['x-mcp-signature'];
|
|
78
|
+
if (!ts || !nonce || !sig) return false;
|
|
79
|
+
if (Math.abs(Date.now() - ts) > MAX_SKEW_MS) return false;
|
|
80
|
+
if (seenNonces.has(nonce)) return false; // replay
|
|
81
|
+
const data = `${ts}:${nonce}:${rawBody}`;
|
|
82
|
+
const expected = createHmac('sha256', KERNEL_SECRET).update(data).digest();
|
|
83
|
+
const got = Buffer.from(sig, 'hex');
|
|
84
|
+
if (got.length !== expected.length) return false;
|
|
85
|
+
if (!timingSafeEqual(got, expected)) return false;
|
|
86
|
+
seenNonces.set(nonce, Date.now() + MAX_SKEW_MS);
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`timingSafeEqual` is non-negotiable — `===` on a hex string is a timing
|
|
92
|
+
oracle. The nonce store must evict on `expiresAt` to bound memory; a
|
|
93
|
+
plain `setInterval` sweep every minute is enough.
|
|
94
|
+
|
|
95
|
+
## Threat model
|
|
96
|
+
|
|
97
|
+
| Threat | Mitigation in this pattern |
|
|
98
|
+
|---|---|
|
|
99
|
+
| **Replay** — attacker captures a valid request and resends it | `nonce` + `seenNonces` set; replays inside the skew window are rejected, replays outside it fail the timestamp check |
|
|
100
|
+
| **MITM (non-stdio)** — wire-level rewrite | HMAC over `${ts}:${nonce}:${body}` — any payload tamper invalidates the signature; pair with TLS in production |
|
|
101
|
+
| **Clock skew abuse** — long-lived request | `MAX_SKEW_MS = 5 min` rejects out-of-window timestamps |
|
|
102
|
+
| **Timing oracle on signature compare** | `timingSafeEqual`, never `===` |
|
|
103
|
+
| **Secret exfil via repo / log** | `KERNEL_SECRET` from env or secrets store; never log raw headers; redact `X-MCP-Signature` in any audit trail |
|
|
104
|
+
| **Allowlist bypass** | Signing **does not** authorize what's called — pair with the allowlist enforced at server boot (mcp-server plate under `agents/roadmaps/`, Phase 4 **D4**); a valid signature on a non-allowlisted tool name still rejects |
|
|
105
|
+
|
|
106
|
+
## Citation hooks
|
|
107
|
+
|
|
108
|
+
- mcp-server plate under `agents/roadmaps/` — **Phase 4 D4** allowlist
|
|
109
|
+
enforced at server boot. Signing layers *under* the allowlist: verify
|
|
110
|
+
signature → look up tool in allowlist → execute. Both gates must pass.
|
|
111
|
+
- mcp-server plate under `agents/roadmaps/` — **Phase 6 F2 / F3** SSE
|
|
112
|
+
transport, cloud bundle. These are the triggers that make this
|
|
113
|
+
guideline load-bearing; until then it is reference material for the
|
|
114
|
+
deferred-with-trigger HTTP-bridge slot tracked
|
|
115
|
+
(Phase 2 P2.1) under `agents/roadmaps/`.
|
|
116
|
+
|
|
117
|
+
## Operational notes
|
|
118
|
+
|
|
119
|
+
- **Secret rotation** — rotate `MCP_KERNEL_SECRET` on a fixed cadence
|
|
120
|
+
(90 days minimum). Both client and server reload from env on the next
|
|
121
|
+
request; in-flight requests fail and retry with the new secret.
|
|
122
|
+
- **Multi-client deployments** — give every client kernel a distinct
|
|
123
|
+
`KERNEL_ID` so logs attribute to a source even though all use the
|
|
124
|
+
same shared secret.
|
|
125
|
+
- **Don't sign `tools/list`** — `tools/list` is read-only metadata; it
|
|
126
|
+
can stay unsigned in deployments where the metadata itself is public.
|
|
127
|
+
`tools/call` must always be signed.
|
|
128
|
+
|
|
129
|
+
## Out-of-scope
|
|
130
|
+
|
|
131
|
+
- The full Express bridge in the external reference (~1.6k LOC,
|
|
132
|
+
HTTP routing, SSE streaming, auth proxying) — out of scope,
|
|
133
|
+
not forked. If we ever need an HTTP-MCP server, build on this
|
|
134
|
+
guideline + the host's web framework, not on the external runtime.
|
|
135
|
+
- Asymmetric signing (Ed25519, ECDSA). HMAC-SHA256 is sufficient for
|
|
136
|
+
shared-secret deployments. Asymmetric is only worth the complexity
|
|
137
|
+
when keys cross trust boundaries the shared-secret model can't
|
|
138
|
+
represent.
|
|
139
|
+
|
|
140
|
+
## Appendix — HTTP-bridge `stdio-kernel` pattern (reference)
|
|
141
|
+
|
|
142
|
+
Portable shape of an external reference's stdio kernel (~250 LOC), on
|
|
143
|
+
hand for the day a real HTTP-MCP consumer surfaces (`road-to-mcp-server.md`
|
|
144
|
+
Phase 6 F2 / F3). Full file stays **out of scope**.
|
|
145
|
+
|
|
146
|
+
**Trigger to inline more:** both — (a) Phase 1 ships stdio prompt fetch
|
|
147
|
+
in ≥1 confirmed client, (b) ≥1 consumer surfaces a concrete HTTP-MCP
|
|
148
|
+
use case. Until then, this appendix is the reference.
|
|
149
|
+
|
|
150
|
+
### Pattern shape
|
|
151
|
+
|
|
152
|
+
The kernel sits between the HTTP transport and the spawned stdio MCP
|
|
153
|
+
child. Inbound: HTTP → `verifyRequest` → JSON-RPC onto child stdin.
|
|
154
|
+
Outbound: child stdout → parsed → signed response → HTTP.
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
client ──HTTP──▶ kernel.verify ──stdin──▶ stdio MCP child
|
|
158
|
+
client ◀─HTTP── kernel.sign ◀─stdout── stdio MCP child
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Six load-bearing pieces:
|
|
162
|
+
|
|
163
|
+
1. **Process supervisor** — spawn with `stdio: ['pipe', 'pipe', 'inherit']`,
|
|
164
|
+
restart on exit with bounded backoff, SIGTERM on shutdown.
|
|
165
|
+
2. **JSON-RPC framing** — newline-delimited JSON; buffer partial
|
|
166
|
+
stdout reads; drop unparseable frames with a logged warning, never
|
|
167
|
+
crash the bridge.
|
|
168
|
+
3. **Request-id correlation** — kernel generates outbound `id`, maps
|
|
169
|
+
`kernelId → clientId`; slow calls can't cross-talk between HTTP
|
|
170
|
+
clients.
|
|
171
|
+
4. **Verification gate** — `verifyRequest` (above) before stdin write;
|
|
172
|
+
failure is a 401, never a 500; never log the raw signature.
|
|
173
|
+
5. **Allowlist enforcement** — after verify, look up the JSON-RPC
|
|
174
|
+
`method` in the boot-time allowlist (`road-to-mcp-server.md` **D4**).
|
|
175
|
+
Non-allowlisted → JSON-RPC `-32601 Method not found`; no enumeration
|
|
176
|
+
leak.
|
|
177
|
+
6. **Backpressure** — bound the in-flight queue per kernel (the external runtime
|
|
178
|
+
uses 32); beyond it, return `429`. Otherwise a flood OOMs the child.
|
|
179
|
+
|
|
180
|
+
### Out of this appendix
|
|
181
|
+
|
|
182
|
+
Express routes / middleware / SSE upgrade — host web framework.
|
|
183
|
+
The external reference's marketplace + `mcp__claude-flow__*` tools —
|
|
184
|
+
never adopted (see the related internal roadmap Sunset path).
|
|
185
|
+
Multi-tenant routing — out-of-scope until a consumer surfaces a
|
|
186
|
+
tenancy requirement.
|
|
187
|
+
|
|
188
|
+
### Citation hooks
|
|
189
|
+
|
|
190
|
+
- `road-to-mcp-server.md` **Phase 6 F2 / F3** — SSE / cloud-bundle work
|
|
191
|
+
starts here; the upstream link is the authoritative source.
|
|
192
|
+
- An internal roadmap (local-only) **P2.1** — landed this appendix;
|
|
193
|
+
full bridge fork stays out-of-scope unless the dual trigger fires.
|
|
194
|
+
- [`mcp-cloud-scope.md`](../../contracts/mcp-cloud-scope.md) —
|
|
195
|
+
operationalizes this pattern as a TypeScript Cloudflare Worker (no
|
|
196
|
+
spawned stdio child; R2 blob replaces the child process). HMAC
|
|
197
|
+
`verifyRequest` is deferred to MVP-2 alongside auth.
|