@event4u/agent-config 3.3.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent-src/README.md +2 -2
- package/.agent-src/commands/agent-handoff.md +31 -2
- package/.agent-src/commands/agent-status.md +5 -5
- package/.agent-src/commands/agents/audit.md +8 -8
- package/.agent-src/commands/agents/init.md +25 -1
- package/.agent-src/commands/agents/optimize.md +3 -3
- package/.agent-src/commands/agents/user.md +1 -1
- package/.agent-src/commands/agents.md +1 -1
- package/.agent-src/commands/analyze-reference-repo.md +1 -1
- package/.agent-src/commands/check-current-md.md +8 -8
- package/.agent-src/commands/{compress.md → condense.md} +55 -55
- package/.agent-src/commands/context/create.md +7 -4
- package/.agent-src/commands/context/refactor.md +3 -1
- package/.agent-src/commands/feature/dev.md +1 -1
- package/.agent-src/commands/feature/explore.md +1 -1
- package/.agent-src/commands/feature/plan.md +10 -8
- package/.agent-src/commands/feature/refactor.md +3 -1
- package/.agent-src/commands/feature/roadmap.md +7 -4
- package/.agent-src/commands/fix/portability.md +3 -3
- package/.agent-src/commands/fix/refs.md +4 -4
- package/.agent-src/commands/ghostwriter.md +2 -2
- package/.agent-src/commands/memory/learn-low-impact.md +3 -3
- package/.agent-src/commands/module/explore.md +34 -8
- package/.agent-src/commands/optimize/agents-dir.md +9 -7
- package/.agent-src/commands/optimize/augmentignore.md +2 -2
- package/.agent-src/commands/optimize/skills.md +9 -9
- package/.agent-src/commands/post-as.md +1 -1
- package/.agent-src/commands/project-analyze.md +2 -2
- package/.agent-src/commands/project-health.md +3 -2
- package/.agent-src/commands/research/deep.md +1 -1
- package/.agent-src/commands/research/report.md +1 -1
- package/.agent-src/commands/research.md +1 -1
- package/.agent-src/commands/roadmap/ai-council.md +1 -1
- package/.agent-src/commands/roadmap/create.md +9 -4
- package/.agent-src/commands/rule-compliance-audit.md +1 -1
- package/.agent-src/commands/upstream-contribute.md +14 -14
- package/.agent-src/commands/video/from-script.md +1 -1
- package/.agent-src/commands/video/scene.md +1 -1
- package/.agent-src/commands/video/stitch.md +1 -1
- package/.agent-src/commands/video/storyboard.md +1 -1
- package/.agent-src/commands/video.md +1 -1
- package/.agent-src/contexts/augment-infrastructure.md +1 -1
- package/.agent-src/contexts/authority/commit-mechanics.md +15 -0
- package/.agent-src/contexts/authority/kernel-rule-edits.md +3 -3
- package/.agent-src/contexts/authority/scope-mechanics.md +1 -1
- package/.agent-src/contexts/communication/rules-auto/augment-source-of-truth-mechanics.md +28 -28
- package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +4 -4
- package/.agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +2 -2
- package/.agent-src/contexts/contracts/artifact-engagement-flow.md +6 -6
- package/.agent-src/contexts/contracts/command-suggestion-flow.md +3 -3
- package/.agent-src/contexts/contracts/emergency-triage-block.md +4 -4
- package/.agent-src/contexts/contracts/frugality-charter.md +3 -3
- package/.agent-src/contexts/documentation-hierarchy.md +14 -7
- package/.agent-src/contexts/execution/autonomy-examples.md +1 -1
- package/.agent-src/contexts/execution/cheap-question-mechanics.md +39 -2
- package/.agent-src/contexts/execution/roadmap-process-loop.md +28 -5
- package/.agent-src/contexts/override-system.md +5 -5
- package/.agent-src/ghostwriter/fictional-fixture-v1.md +1 -1
- package/.agent-src/personas/advisors/first-principles.md +1 -1
- package/.agent-src/personas/hollywood-director.md +1 -1
- package/.agent-src/rules/architecture.md +5 -1
- package/.agent-src/rules/augment-edit-discipline.md +5 -5
- package/.agent-src/rules/augment-source-of-truth.md +15 -15
- package/.agent-src/rules/commit-conventions.md +1 -1
- package/.agent-src/rules/commit-policy.md +10 -0
- package/.agent-src/rules/domain-adoption-policy.md +3 -3
- package/.agent-src/rules/fast-path-marker-visibility.md +3 -3
- package/.agent-src/rules/finance-safety-floor.md +1 -1
- package/.agent-src/rules/framework-neutrality-in-generic-skills.md +8 -8
- package/.agent-src/rules/git-history-discipline.md +1 -1
- package/.agent-src/rules/improve-before-implement.md +2 -2
- package/.agent-src/rules/language-and-tone.md +2 -2
- package/.agent-src/rules/media-governance-routing.md +5 -5
- package/.agent-src/rules/no-attribution-footers.md +1 -0
- package/.agent-src/rules/no-cheap-questions.md +3 -0
- package/.agent-src/rules/no-decorative-emojis-in-git-surfaces.md +111 -0
- package/.agent-src/rules/no-pr-progress-comments.md +118 -0
- package/.agent-src/rules/no-roadmap-references.md +3 -3
- package/.agent-src/rules/non-destructive-by-default.md +1 -1
- package/.agent-src/rules/persona-governance.md +3 -3
- package/.agent-src/rules/preservation-guard.md +15 -15
- package/.agent-src/rules/roadmap-ci-steps-policy.md +7 -3
- package/.agent-src/rules/rule-type-governance.md +1 -1
- package/.agent-src/rules/skill-quality.md +1 -1
- package/.agent-src/rules/{caveman-speak.md → telegraph-speak.md} +15 -15
- package/.agent-src/rules/token-optimizer-maintenance.md +6 -6
- package/.agent-src/skills/agent-docs-writing/SKILL.md +17 -11
- package/.agent-src/skills/agents-md-thin-root/SKILL.md +9 -9
- package/.agent-src/skills/check-refs/SKILL.md +2 -2
- package/.agent-src/skills/code-refactoring/SKILL.md +2 -2
- package/.agent-src/skills/command-writing/SKILL.md +19 -19
- package/.agent-src/skills/comp-banding/SKILL.md +1 -1
- package/.agent-src/skills/condense-memory/SKILL.md +131 -0
- package/.agent-src/skills/context-authoring/SKILL.md +2 -2
- package/.agent-src/skills/context-document/SKILL.md +5 -3
- package/.agent-src/skills/copilot-agents-optimization/SKILL.md +3 -3
- package/.agent-src/skills/description-assist/SKILL.md +2 -2
- package/.agent-src/skills/git-workflow/SKILL.md +1 -1
- package/.agent-src/skills/guideline-writing/SKILL.md +5 -5
- package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +4 -4
- package/.agent-src/skills/lint-skills/SKILL.md +3 -3
- package/.agent-src/skills/md-language-check/SKILL.md +2 -2
- package/.agent-src/skills/module-detect-on-the-fly/SKILL.md +138 -0
- package/.agent-src/skills/module-management/SKILL.md +166 -94
- package/.agent-src/skills/override-management/SKILL.md +1 -1
- package/.agent-src/skills/persona-writing/SKILL.md +5 -5
- package/.agent-src/skills/positioning-strategy/SKILL.md +1 -1
- package/.agent-src/skills/project-docs/SKILL.md +6 -4
- package/.agent-src/skills/readme-reviewer/SKILL.md +2 -2
- package/.agent-src/skills/roadmap-management/SKILL.md +13 -1
- package/.agent-src/skills/roadmap-writing/SKILL.md +4 -2
- package/.agent-src/skills/rule-refactor/SKILL.md +5 -5
- package/.agent-src/skills/rule-writing/SKILL.md +18 -18
- package/.agent-src/skills/script-writing/SKILL.md +1 -1
- package/.agent-src/skills/skill-improvement-pipeline/SKILL.md +6 -6
- package/.agent-src/skills/skill-management/SKILL.md +21 -21
- package/.agent-src/skills/skill-reviewer/SKILL.md +2 -2
- package/.agent-src/skills/skill-writing/SKILL.md +8 -8
- package/.agent-src/skills/skill-writing/evals/triggers.json +1 -1
- package/.agent-src/skills/token-optimizer/SKILL.md +4 -4
- package/.agent-src/skills/unit-economics-modeling/SKILL.md +1 -1
- package/.agent-src/skills/upstream-contribute/SKILL.md +17 -17
- package/.agent-src/templates/AGENTS.md +1 -0
- package/.agent-src/templates/agent-settings.md +24 -13
- package/.agent-src/templates/agents/agent-project-settings.example.yml +61 -2
- package/.agent-src/templates/command.md +5 -5
- package/.agent-src/templates/contexts.md +1 -1
- package/.agent-src/templates/copilot-instructions.md +8 -8
- package/.agent-src/templates/features.md +1 -1
- package/.agent-src/templates/hooks/pre-commit-frontmatter +2 -2
- package/.agent-src/templates/hooks/pre-commit-roadmap-progress +3 -3
- package/.agent-src/templates/persona.md +2 -2
- package/.agent-src/templates/roadmaps.md +1 -1
- package/.agent-src/templates/rule.md +13 -13
- package/.agent-src/templates/scripts/memory_lookup.py +1 -1
- package/.agent-src/templates/scripts/memory_status.py +2 -2
- package/.agent-src/templates/scripts/work_engine/_lib/agent_settings.py +195 -1
- package/.agent-src/templates/scripts/work_engine/orchestration.py +1 -1
- package/.agent-src/templates/skill-archive-note.md +5 -5
- package/.agent-src/templates/skill.md +1 -1
- package/.claude-plugin/marketplace.json +4 -4
- package/AGENTS.md +16 -17
- package/CHANGELOG.md +181 -3
- package/CONTRIBUTING.md +31 -12
- package/README.md +18 -10
- package/config/agent-settings.template.yml +22 -2
- package/config/discovery/unassigned-artefacts.yml +24 -24
- package/config/profiles/full.ini +1 -1
- package/dist/cli/agent-config.js +52 -3
- package/dist/cli/agent-config.js.map +1 -1
- package/dist/cli/commands/uiServe.js +9 -0
- package/dist/cli/commands/uiServe.js.map +1 -1
- package/dist/cli/registry.js +2 -1
- package/dist/cli/registry.js.map +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +649 -606
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +4 -4
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +439 -437
- package/dist/discovery/trust-report.md +5 -5
- package/dist/discovery/workspaces.json +450 -448
- package/dist/install/apply.js +238 -0
- package/dist/install/apply.js.map +1 -0
- package/dist/install/atomic.js +92 -0
- package/dist/install/atomic.js.map +1 -0
- package/dist/install/bridges/augment.js +20 -0
- package/dist/install/bridges/augment.js.map +1 -0
- package/dist/install/bridges/claude.js +44 -0
- package/dist/install/bridges/claude.js.map +1 -0
- package/dist/install/bridges/cline.js +69 -0
- package/dist/install/bridges/cline.js.map +1 -0
- package/dist/install/bridges/copilot.js +28 -0
- package/dist/install/bridges/copilot.js.map +1 -0
- package/dist/install/bridges/cursor.js +34 -0
- package/dist/install/bridges/cursor.js.map +1 -0
- package/dist/install/bridges/gemini.js +39 -0
- package/dist/install/bridges/gemini.js.map +1 -0
- package/dist/install/bridges/index.js +88 -0
- package/dist/install/bridges/index.js.map +1 -0
- package/dist/install/bridges/marker-content.js +153 -0
- package/dist/install/bridges/marker-content.js.map +1 -0
- package/dist/install/bridges/markers.js +42 -0
- package/dist/install/bridges/markers.js.map +1 -0
- package/dist/install/bridges/types.js +31 -0
- package/dist/install/bridges/types.js.map +1 -0
- package/dist/install/bridges/vscode.js +26 -0
- package/dist/install/bridges/vscode.js.map +1 -0
- package/dist/install/bridges/windsurf.js +35 -0
- package/dist/install/bridges/windsurf.js.map +1 -0
- package/dist/install/conflict.js +196 -0
- package/dist/install/conflict.js.map +1 -0
- package/dist/install/detect.js +218 -0
- package/dist/install/detect.js.map +1 -0
- package/dist/install/paths.js +82 -0
- package/dist/install/paths.js.map +1 -0
- package/dist/install/plan.js +157 -0
- package/dist/install/plan.js.map +1 -0
- package/dist/install/txlog.js +140 -0
- package/dist/install/txlog.js.map +1 -0
- package/dist/install/types.js +19 -0
- package/dist/install/types.js.map +1 -0
- package/dist/install/wizard-plan.js +184 -0
- package/dist/install/wizard-plan.js.map +1 -0
- package/dist/mcp/registry-manifest.json +4 -4
- package/dist/router.json +67 -19
- package/dist/server/app.js +6 -0
- package/dist/server/app.js.map +1 -1
- package/dist/server/routes/install.js +547 -0
- package/dist/server/routes/install.js.map +1 -0
- package/dist/server/routes/wizard.js +301 -6
- package/dist/server/routes/wizard.js.map +1 -1
- package/dist/server/routes/workspace.js +396 -0
- package/dist/server/routes/workspace.js.map +1 -0
- package/dist/server/schemas/settings.js +4 -3
- package/dist/server/schemas/settings.js.map +1 -1
- package/dist/ui/assets/index-BXZILUxe.css +1 -0
- package/dist/ui/assets/index-DLEuEW1V.js +35 -0
- package/dist/ui/assets/index-DLEuEW1V.js.map +1 -0
- package/dist/ui/index.html +2 -2
- package/docs/MIGRATION.md +1 -1
- package/docs/adrs/cost/0001-hard-stop-hook.md +1 -1
- package/docs/adrs/router/0001-three-tier-routing.md +4 -4
- package/docs/adrs/schema/0001-json-schema-frontmatter.md +1 -1
- package/docs/adrs/smoke/0001-per-tier-smoke-scripts.md +4 -4
- package/docs/adrs/{caveman → telegraph}/0001-default-off-until-bench.md +9 -9
- package/docs/adrs/telegraph/README.md +9 -0
- package/docs/architecture/augment-projection.md +4 -4
- package/docs/architecture/claude-bundle.md +1 -1
- package/docs/architecture/current-onboard-baseline.md +3 -3
- package/docs/architecture/multi-tool-projection.md +10 -10
- package/docs/architecture/source-projection.md +27 -27
- package/docs/architecture.md +19 -15
- package/docs/archive/CHANGELOG-pre-2.11.0.md +2 -2
- package/docs/archive/CHANGELOG-pre-2.15.0.md +3 -3
- package/docs/archive/CHANGELOG-pre-2.16.0.md +1 -1
- package/docs/archive/CHANGELOG-pre-2.2.0.md +70 -70
- package/docs/archive/CHANGELOG-pre-2.20.0.md +2 -2
- package/docs/archive/CHANGELOG-pre-2.25.0.md +15 -15
- package/docs/archive/CHANGELOG-pre-3.0.0.md +4 -4
- package/docs/archive/CHANGELOG-pre-3.1.0.md +2 -2
- package/docs/archive/CHANGELOG-pre-3.2.0.md +3 -3
- package/docs/benchmark.md +65 -0
- package/docs/benchmarks.md +16 -16
- package/docs/catalog.md +17 -15
- package/docs/contracts/CHANGELOG-conventions.md +1 -1
- package/docs/contracts/STABILITY.md +2 -2
- package/docs/contracts/adoption-signal-floor.md +110 -0
- package/docs/contracts/adr-chat-history-split.md +4 -4
- package/docs/contracts/adr-command-suggestion.md +4 -4
- package/docs/contracts/adr-gtm-context-spine.md +1 -1
- package/docs/contracts/adr-implement-ticket-runtime.md +4 -4
- package/docs/contracts/adr-install-user-type-axis.md +1 -1
- package/docs/contracts/adr-layout.md +2 -2
- package/docs/contracts/adr-product-ui-track.md +10 -10
- package/docs/contracts/adr-user-types-axis.md +3 -3
- package/docs/contracts/adr-wing4-context-spine.md +1 -1
- package/docs/contracts/agent-memory-contract.md +3 -3
- package/docs/contracts/agents-md-tech-stack.md +2 -2
- package/docs/contracts/ai-council-config.md +2 -2
- package/docs/contracts/at-rest-encryption.md +4 -0
- package/docs/contracts/audit-log-v1.md +1 -1
- package/docs/contracts/benchmark-ab-contract.md +101 -0
- package/docs/contracts/benchmark-corpus-spec.md +1 -1
- package/docs/contracts/branch-protection-policy.md +98 -0
- package/docs/contracts/ci-cost-budget.md +106 -0
- package/docs/contracts/ci-green-floor.md +141 -0
- package/docs/contracts/command-clusters.md +6 -6
- package/docs/contracts/command-surface-tiers.md +2 -2
- package/docs/contracts/command-taxonomy.md +2 -2
- package/docs/contracts/{compression-default-kill-criterion.md → condensation-default-kill-criterion.md} +29 -29
- package/docs/contracts/config-presets.md +1 -1
- package/docs/contracts/context-paths.md +3 -3
- package/docs/contracts/context-spine.md +1 -1
- package/docs/contracts/cost-summary-schema.md +12 -12
- package/docs/contracts/cross-wing-handoff.md +4 -4
- package/docs/contracts/daily-workspace.md +4 -0
- package/docs/contracts/decision-trace-v1.md +2 -2
- package/docs/contracts/discovery-manifest.md +4 -4
- package/docs/contracts/explain-modes.md +4 -0
- package/docs/contracts/file-ownership-matrix.json +3493 -3318
- package/docs/contracts/file-ownership-matrix.md +3 -3
- package/docs/contracts/frontmatter-contract.md +4 -4
- package/docs/contracts/ghostwriter-schema.md +3 -3
- package/docs/contracts/gui-wizard.md +1 -1
- package/docs/contracts/harness-expectations.md +123 -0
- package/docs/contracts/host-agent-protocol.md +4 -0
- package/docs/contracts/implement-ticket-flow.md +9 -9
- package/docs/contracts/install-scopes.md +77 -0
- package/docs/contracts/iron-law-overrides.txt +1 -1
- package/docs/contracts/kernel-membership.md +26 -26
- package/docs/contracts/linear-ai-rules-inclusion.md +1 -1
- package/docs/contracts/linter-structural-model.md +2 -2
- package/docs/contracts/load-context-budget-model.md +4 -4
- package/docs/contracts/load-context-schema.md +13 -13
- package/docs/contracts/local-analytics.md +4 -0
- package/docs/contracts/local-knowledge-ingestion.md +1 -1
- package/docs/contracts/mcp-cloud-scope.md +2 -2
- package/docs/contracts/mcp-phase-1-scope.md +3 -3
- package/docs/contracts/measurement-baseline.md +5 -5
- package/docs/contracts/mental-models.md +30 -30
- package/docs/contracts/multi-tool-projection-fidelity.md +4 -4
- package/docs/contracts/namespace.md +4 -4
- package/docs/contracts/orchestration-dsl-v1.md +7 -7
- package/docs/contracts/package-self-orientation.md +12 -12
- package/docs/contracts/persona-schema.md +6 -6
- package/docs/contracts/pilot/language-and-tone.md +1 -1
- package/docs/contracts/plain-language-surface.md +117 -0
- package/docs/contracts/profile-system.md +3 -3
- package/docs/contracts/release-pr-gating.md +103 -0
- package/docs/contracts/role-experience.md +3 -3
- package/docs/contracts/rule-classification.md +13 -13
- package/docs/contracts/rule-interactions.md +4 -4
- package/docs/contracts/rule-interactions.yml +30 -30
- package/docs/contracts/rule-priority-hierarchy.md +13 -13
- package/docs/contracts/rule-router.md +2 -2
- package/docs/contracts/safety-model.md +1 -1
- package/docs/contracts/skill-distribution-channels.md +61 -0
- package/docs/contracts/skill-domains.md +2 -2
- package/docs/contracts/smoke-contracts.md +5 -5
- package/docs/contracts/telegraph-telemetry.md +83 -0
- package/docs/contracts/trust-and-safety.md +5 -5
- package/docs/contracts/ui-stack-extension.md +7 -7
- package/docs/contracts/ui-track-flow.md +9 -9
- package/docs/contracts/user-type-schema.md +4 -4
- package/docs/contracts/workflow-packs.md +4 -4
- package/docs/contracts/workspace-documents.md +4 -0
- package/docs/customization.md +28 -8
- package/docs/decisions/ADR-001-kernel-swap-deferred.md +6 -6
- package/docs/decisions/ADR-002-kernel-bucket-overrides.md +11 -11
- package/docs/decisions/ADR-003-flat-cluster-subs-and-colon-syntax.md +2 -2
- package/docs/decisions/ADR-004-rule-governance-pruning.md +4 -4
- package/docs/decisions/ADR-005-subagent-worktrees.md +7 -7
- package/docs/decisions/ADR-011-domain-pack-readiness.md +6 -6
- package/docs/decisions/ADR-013-discovery-frontmatter-contract.md +3 -3
- package/docs/decisions/ADR-015-discovery-manifest-contract.md +3 -3
- package/docs/decisions/ADR-017-monorepo-physical-layout.md +10 -10
- package/docs/decisions/ADR-018-trust-and-safety-layer.md +6 -6
- package/docs/decisions/ADR-019-router-json-dist-location.md +2 -2
- package/docs/decisions/ADR-020-global-only-consumer-scope.md +2 -2
- package/docs/decisions/ADR-021-deployment-shape.md +1 -1
- package/docs/decisions/ADR-022-daily-workspace-decomposition.md +1 -1
- package/docs/decisions/ADR-027-changelog-machine-vs-manual.md +2 -2
- package/docs/decisions/ADR-028-root-layout.md +7 -7
- package/docs/decisions/ADR-029-multi-workspace-deferred.md +2 -2
- package/docs/decisions/ADR-rule-kernel-and-router.md +5 -5
- package/docs/deploy/team-deployment-posture.md +20 -0
- package/docs/development.md +17 -17
- package/docs/distribution/registries.md +32 -0
- package/docs/distribution/registry-submissions.md +85 -0
- package/docs/distribution/telemetry-schema.md +1 -1
- package/docs/getting-started-by-role.md +45 -3
- package/docs/getting-started.md +2 -2
- package/docs/guidelines/agent-infra/5w2h-analysis.md +3 -3
- package/docs/guidelines/agent-infra/ask-when-uncertain-demos.md +1 -1
- package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +3 -3
- package/docs/guidelines/agent-infra/carve-out-predicates.md +3 -3
- package/docs/guidelines/agent-infra/critical-thinking.md +4 -4
- package/docs/guidelines/agent-infra/direct-answers-demos.md +1 -1
- package/docs/guidelines/agent-infra/first-principles.md +2 -2
- package/docs/guidelines/agent-infra/inversion-thinking.md +5 -5
- package/docs/guidelines/agent-infra/layered-settings.md +56 -2
- package/docs/guidelines/agent-infra/mental-models.md +3 -3
- package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +2 -2
- package/docs/guidelines/agent-infra/rule-type-governance.md +1 -1
- package/docs/guidelines/agent-infra/scqa-framework.md +5 -5
- package/docs/guidelines/agent-infra/self-improvement-pipeline.md +2 -2
- package/docs/guidelines/agent-infra/six-hats.md +3 -3
- package/docs/guidelines/agent-infra/skill-quality-checklist.md +5 -5
- package/docs/guidelines/agent-infra/systems-thinking.md +1 -1
- package/docs/guidelines/agent-infra/verify-before-complete-demos.md +1 -1
- package/docs/guidelines/augment-portability-patterns.md +4 -4
- package/docs/guidelines/cross-role-handoff.md +2 -2
- package/docs/guidelines/php/php-coding-patterns.md +1 -1
- package/docs/guidelines/prompt-templates.md +6 -6
- package/docs/maintainers/dev-mode.md +1 -1
- package/docs/mcp.md +1 -1
- package/docs/parity/bench.json +3 -3
- package/docs/parity/ruflo.md +2 -2
- package/docs/profiles.md +11 -11
- package/docs/quality.md +11 -11
- package/docs/safety.md +3 -3
- package/docs/setup/mcp-client-config.md +1 -1
- package/docs/setup/mcp-r2-bootstrap.md +1 -1
- package/docs/setup/mcp-server-docker.md +3 -3
- package/docs/setup/per-ide/windsurf.md +1 -1
- package/docs/skills-catalog.md +8 -7
- package/docs/troubleshooting.md +1 -1
- package/docs/walkthroughs/daily-workspace-a11y.md +87 -0
- package/llms.txt +7 -6
- package/package.json +1 -1
- package/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
- package/scripts/_archive/README.md +2 -2
- package/scripts/_archive/_backfill_skill_domains.py +3 -3
- package/scripts/_archive/_bootstrap_tier_frontmatter.py +3 -3
- package/scripts/_archive/_p43_bodies.py +10 -10
- package/scripts/_archive/{_p43_compress.py → _p43_condense.py} +5 -5
- package/scripts/_archive/_p4_migrate.py +7 -7
- package/scripts/_archive/_phase2_shim_helper.py +1 -1
- package/scripts/_archive/_pilot_council_question.py +5 -5
- package/scripts/_cli/explain_last/inputs.py +1 -1
- package/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
- package/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
- package/scripts/_lib/agent_settings.py +195 -1
- package/scripts/_lib/agent_src.py +19 -19
- package/scripts/_lib/bench_ab_cache.py +162 -0
- package/scripts/_lib/bench_ab_scoring.py +209 -0
- package/scripts/_lib/{bench_caveman.py → bench_telegraph.py} +21 -21
- package/scripts/_lib/{bench_caveman_report.py → bench_telegraph_report.py} +21 -21
- package/scripts/_lib/claude_desktop_bundler.py +5 -5
- package/scripts/_lib/module_detection.py +223 -0
- package/scripts/_lib/scope_guard.sh +162 -0
- package/scripts/_phase4_bucket.py +3 -3
- package/scripts/_pilot_measure.py +4 -4
- package/scripts/_tmp_scan_framework_leakage.py +1 -1
- package/scripts/adoption_report.py +195 -0
- package/scripts/adoption_snapshot.py +219 -0
- package/scripts/adoption_status.py +166 -0
- package/scripts/ai-video/lib/parse-blueprint.sh +1 -1
- package/scripts/ai_council/advisors.py +5 -5
- package/scripts/ai_council/compile_corpus.py +1 -1
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_budget_v2_audit.py +3 -3
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_context_layer_v1_review.py +2 -2
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_inject_quiet_flag.py +1 -1
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_measure_v2.sh +1 -1
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_measure_verbosity.sh +1 -1
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_nondestructive_inline_audit.py +3 -3
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_per_task.sh +1 -1
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase6_trigger_jaccard.py +1 -1
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase_2a_budget_rebalance.py +6 -6
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_rebalancing_audit.py +1 -1
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_tier_retrofit.py +6 -6
- package/scripts/annotate_discovery.py +13 -13
- package/scripts/apply_modules_config.py +290 -0
- package/scripts/audit_adr_coverage.py +2 -2
- package/scripts/audit_auto_rules.py +2 -2
- package/scripts/audit_cloud_compatibility.py +3 -3
- package/scripts/audit_command_surface.py +9 -9
- package/scripts/audit_likelihood.py +2 -2
- package/scripts/audit_user_type_axis.py +2 -2
- package/scripts/bench_ab_cache_dispatch.py +68 -0
- package/scripts/bench_ab_clone.py +170 -0
- package/scripts/bench_ab_diff.py +227 -0
- package/scripts/bench_ab_integrity.py +143 -0
- package/scripts/bench_ab_run.py +235 -0
- package/scripts/bench_ab_task_runner.py +369 -0
- package/scripts/bench_ab_tracka_run.py +202 -0
- package/scripts/{bench_compress_memory.py → bench_condense_memory.py} +16 -16
- package/scripts/bench_run.py +33 -33
- package/scripts/bench_runner.py +2 -2
- package/scripts/bootstrap.sh +99 -0
- package/scripts/build_cloud_bundle.py +6 -6
- package/scripts/build_discovery_manifest.py +7 -7
- package/scripts/build_linear_digest.py +3 -3
- package/scripts/build_rule_trigger_matrix.py +8 -8
- package/scripts/chat_history.py +5 -5
- package/scripts/check_always_budget.py +11 -5
- package/scripts/check_augment_description_cap.py +3 -3
- package/scripts/check_cluster_patterns.py +2 -2
- package/scripts/check_command_count_messaging.py +3 -3
- package/scripts/{check_compression.py → check_condensation.py} +34 -34
- package/scripts/{check_compressed_paths.py → check_condensed_paths.py} +8 -8
- package/scripts/check_context_paths.py +7 -7
- package/scripts/check_council_layout.py +2 -2
- package/scripts/check_council_references.py +9 -9
- package/scripts/check_iron_law_prominence.py +2 -2
- package/scripts/check_kernel_rule_bundle.py +2 -2
- package/scripts/check_module_management_neutral.py +149 -0
- package/scripts/check_no_roadmap_refs.py +9 -9
- package/scripts/check_portability.py +3 -3
- package/scripts/check_public_catalog_links.py +4 -4
- package/scripts/check_references.py +7 -6
- package/scripts/check_release_pr_shape.py +112 -0
- package/scripts/check_reply_consistency.py +3 -3
- package/scripts/check_safety_floor_untouched.py +1 -1
- package/scripts/check_template_pin_drift.py +5 -5
- package/scripts/check_token_optimizer_freshness.py +3 -3
- package/scripts/ci_status.py +301 -0
- package/scripts/ci_time_ratio.py +1 -1
- package/scripts/cleanup_other_scope.sh +146 -0
- package/scripts/compile_router.py +10 -10
- package/scripts/{compress.py → condense.py} +64 -64
- package/scripts/condense.sh +18 -0
- package/scripts/{compress_memory.py → condense_memory.py} +33 -33
- package/scripts/config/presets.py +2 -2
- package/scripts/config/profiles.py +1 -1
- package/scripts/cost_by_conversation.py +3 -3
- package/scripts/cost_summary.py +7 -7
- package/scripts/count_token_optimizer_usage.sh +1 -1
- package/scripts/gen_discovery_baseline.py +5 -5
- package/scripts/generate_index.py +6 -6
- package/scripts/generate_ownership_matrix.py +10 -10
- package/scripts/generate_pack_manifests.py +1 -1
- package/scripts/ghostwriter_fixture_allowlist.txt +1 -1
- package/scripts/install +3 -3
- package/scripts/install-hooks.sh +6 -6
- package/scripts/install.py +76 -11
- package/scripts/install.sh +187 -1
- package/scripts/inventory_frontmatter.py +2 -2
- package/scripts/iron_law_sha.py +3 -3
- package/scripts/lint_agents_layout.py +14 -7
- package/scripts/lint_agents_md.py +4 -4
- package/scripts/lint_archived_skills.py +3 -3
- package/scripts/lint_artefact_frontmatter.py +2 -2
- package/scripts/lint_bench_ab.py +172 -0
- package/scripts/lint_bench_corpus.py +1 -1
- package/scripts/lint_command_tiers.py +5 -5
- package/scripts/lint_context_spine_usage.py +1 -1
- package/scripts/lint_framework_leakage.py +7 -7
- package/scripts/lint_framework_leakage_allowlist.json +144 -84
- package/scripts/lint_ghostwriter_source.py +3 -3
- package/scripts/lint_handoffs.py +1 -1
- package/scripts/lint_load_context.py +11 -11
- package/scripts/lint_media_policy_linkage.py +5 -5
- package/scripts/lint_namespace.py +1 -1
- package/scripts/lint_no_new_atomic_commands.py +2 -2
- package/scripts/lint_orchestration_dsl.py +1 -1
- package/scripts/lint_pack_boundaries.py +2 -2
- package/scripts/lint_persona_governance.py +4 -4
- package/scripts/lint_role_experiences.py +237 -0
- package/scripts/lint_rule_interactions.py +2 -2
- package/scripts/lint_rule_tiers.py +1 -1
- package/scripts/lint_trust_coherence.py +2 -2
- package/scripts/mcp_registry_submit.sh +187 -0
- package/scripts/mcp_server/tools.py +1 -1
- package/scripts/measure_frugality_savings.py +10 -10
- package/scripts/measure_patterns.py +1 -1
- package/scripts/measure_projection_bytes.py +5 -5
- package/scripts/measure_rule_budget.py +3 -3
- package/scripts/measure_skill_reduction.py +1 -1
- package/scripts/memory_lookup.py +1 -1
- package/scripts/memory_status.py +2 -2
- package/scripts/migrate_command_suggestions.py +3 -3
- package/scripts/mine_session.py +1 -1
- package/scripts/move_artefact.py +3 -3
- package/scripts/new_skill.py +2 -2
- package/scripts/pack_mcp_content.py +9 -9
- package/scripts/plan_physical_move.py +6 -6
- package/scripts/print_required_checks.py +196 -0
- package/scripts/probe_skill_registration.py +413 -0
- package/scripts/propose_modules_config.py +145 -0
- package/scripts/prototype_lint_contradictions.py +1 -1
- package/scripts/recruit_preflight.sh +152 -0
- package/scripts/refine_ticket_detect.py +3 -3
- package/scripts/release.py +20 -0
- package/scripts/render_benchmark_md.py +308 -0
- package/scripts/roadmap_progress_hook.py +1 -1
- package/scripts/run_skill_evals.py +2 -2
- package/scripts/runtime_registry.py +4 -4
- package/scripts/schemas/command.schema.json +4 -4
- package/scripts/schemas/rule.schema.json +5 -5
- package/scripts/schemas/skill.schema.json +3 -3
- package/scripts/schemas/user-type.schema.json +1 -1
- package/scripts/score_skill_selection.py +1 -1
- package/scripts/skill_collision_clusters.py +2 -2
- package/scripts/skill_linter.py +81 -81
- package/scripts/skill_overlap.py +5 -5
- package/scripts/skill_tools/audit_persona_coverage.py +2 -2
- package/scripts/skill_tools/audit_user_type_coverage.py +2 -2
- package/scripts/skill_tools/run_block_d_eval.py +1 -1
- package/scripts/skill_tools/score_skill_relevance.py +1 -1
- package/scripts/skill_tools/suggest_skill_for_task.py +1 -1
- package/scripts/skill_trigger_eval.py +3 -3
- package/scripts/smoke/kernel.sh +7 -1
- package/scripts/smoke/router.sh +5 -5
- package/scripts/smoke/skills.sh +1 -1
- package/scripts/smoke_quickstart.py +1 -1
- package/scripts/snapshot_agent_outputs.py +3 -3
- package/scripts/spotcheck_thin_root.py +1 -1
- package/scripts/{caveman_stats.py → telegraph_stats.py} +18 -18
- package/scripts/update_counts.py +1 -1
- package/scripts/validate_decision_engine.py +1 -1
- package/scripts/validate_frontmatter.py +1 -1
- package/scripts/validate_safe_paths.py +3 -3
- package/scripts/{validate_caveman_carveouts.py → validate_telegraph_carveouts.py} +7 -7
- package/scripts/verify_roadmap_closure.py +6 -6
- package/templates/consumer-settings/ONBOARDING.md +41 -0
- package/.agent-src/commands/install-via-agent.md +0 -129
- package/.agent-src/skills/compress-memory/SKILL.md +0 -131
- package/dist/ui/assets/index-D-DY1ywI.js +0 -35
- package/dist/ui/assets/index-D-DY1ywI.js.map +0 -1
- package/dist/ui/assets/index-Dqfhmg-d.css +0 -1
- package/docs/adrs/caveman/README.md +0 -9
- package/docs/contracts/caveman-telemetry.md +0 -83
- package/scripts/compress.sh +0 -18
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""R3 Phase 4 mass-annotator — discovery frontmatter helper.
|
|
3
3
|
|
|
4
|
-
Walks a list of artefacts in `.agent-src.
|
|
4
|
+
Walks a list of artefacts in `.agent-src.uncondensed/` and:
|
|
5
5
|
1. Inserts the 5 ADR-013 frontmatter keys (workspaces, packs, lifecycle,
|
|
6
6
|
trust, install) before the closing `---`, deterministically.
|
|
7
7
|
2. Mirrors the new keys into the matching `.agent-src/` counterpart so
|
|
8
|
-
the
|
|
9
|
-
3. Refreshes
|
|
10
|
-
`task check-
|
|
8
|
+
the condensed projection stays consistent (body preserved).
|
|
9
|
+
3. Refreshes `internal/.condensation-hashes.json` for each touched source path so
|
|
10
|
+
`task check-condensation` stays green.
|
|
11
11
|
|
|
12
12
|
Idempotent: re-runs leave already-annotated files untouched.
|
|
13
13
|
|
|
@@ -24,9 +24,9 @@ import sys
|
|
|
24
24
|
from pathlib import Path
|
|
25
25
|
|
|
26
26
|
ROOT = Path(__file__).resolve().parents[1]
|
|
27
|
-
SRC = ROOT / ".agent-src.
|
|
27
|
+
SRC = ROOT / ".agent-src.uncondensed"
|
|
28
28
|
DST = ROOT / ".agent-src"
|
|
29
|
-
HASH_FILE = ROOT / ".
|
|
29
|
+
HASH_FILE = ROOT / "internal" / ".condensation-hashes.json"
|
|
30
30
|
|
|
31
31
|
# Pack → (workspace_id, trust_level, default_install, removable, lifecycle).
|
|
32
32
|
PACK_DEFAULTS: dict[str, tuple[str, str, bool, bool, str]] = {
|
|
@@ -92,11 +92,11 @@ def _annotate(path: Path, pack: str) -> bool:
|
|
|
92
92
|
return True
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
def
|
|
95
|
+
def _mirror_to_condensed(rel: Path, pack: str) -> None:
|
|
96
96
|
src = SRC / rel
|
|
97
97
|
dst = DST / rel
|
|
98
98
|
if not dst.exists():
|
|
99
|
-
return # no
|
|
99
|
+
return # no condensed counterpart yet (e.g. new file)
|
|
100
100
|
text = dst.read_text(encoding="utf-8")
|
|
101
101
|
m = _FM_RE.match(text)
|
|
102
102
|
if not m:
|
|
@@ -119,7 +119,7 @@ def _refresh_hash(rel: Path, hashes: dict) -> None:
|
|
|
119
119
|
def main(argv: list[str] | None = None) -> int:
|
|
120
120
|
ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
|
121
121
|
ap.add_argument("--pack", required=True, choices=sorted(PACK_DEFAULTS))
|
|
122
|
-
ap.add_argument("paths", nargs="+", help="repo-relative paths under .agent-src.
|
|
122
|
+
ap.add_argument("paths", nargs="+", help="repo-relative paths under .agent-src.uncondensed/")
|
|
123
123
|
args = ap.parse_args(argv)
|
|
124
124
|
|
|
125
125
|
hashes: dict = json.loads(HASH_FILE.read_text()) if HASH_FILE.exists() else {}
|
|
@@ -128,17 +128,17 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
128
128
|
p = Path(raw)
|
|
129
129
|
if p.is_absolute():
|
|
130
130
|
p = p.relative_to(ROOT)
|
|
131
|
-
if not p.is_relative_to(Path(".agent-src.
|
|
132
|
-
print(f" skip (not under .agent-src.
|
|
131
|
+
if not p.is_relative_to(Path(".agent-src.uncondensed")):
|
|
132
|
+
print(f" skip (not under .agent-src.uncondensed/): {p}", file=sys.stderr)
|
|
133
133
|
continue
|
|
134
|
-
rel = p.relative_to(".agent-src.
|
|
134
|
+
rel = p.relative_to(".agent-src.uncondensed")
|
|
135
135
|
src_file = SRC / rel
|
|
136
136
|
if not src_file.is_file():
|
|
137
137
|
print(f" skip (missing): {p}", file=sys.stderr)
|
|
138
138
|
continue
|
|
139
139
|
if _annotate(src_file, args.pack):
|
|
140
140
|
changed += 1
|
|
141
|
-
|
|
141
|
+
_mirror_to_condensed(rel, args.pack)
|
|
142
142
|
_refresh_hash(rel, hashes)
|
|
143
143
|
HASH_FILE.write_text(json.dumps(hashes, indent=2, sort_keys=True) + "\n", encoding="utf-8")
|
|
144
144
|
print(f"annotated {changed} files with pack={args.pack}")
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Persist a ``modules:`` block into ``.agent-project-settings.yml``.
|
|
3
|
+
|
|
4
|
+
Phase E Step 1 of road-to-configurable-modules — the persistence side
|
|
5
|
+
of the GUI wizard's modules step. Reads a JSON payload (stdin or
|
|
6
|
+
``--input-file``) and patches the ``modules.*`` keys in the team file
|
|
7
|
+
while preserving comments, ordering, and surrounding YAML blocks.
|
|
8
|
+
|
|
9
|
+
The patch logic mirrors :func:`scripts.install._replace_template_value_raw`
|
|
10
|
+
so the wizard, ``/agents init``, and a hand-edit all converge on the
|
|
11
|
+
same on-disk shape. Comment-preserving by design — never round-trips
|
|
12
|
+
through PyYAML, which strips block comments.
|
|
13
|
+
|
|
14
|
+
Usage:
|
|
15
|
+
cat payload.json | python3 scripts/apply_modules_config.py --project <root>
|
|
16
|
+
python3 scripts/apply_modules_config.py --project <root> --input-file <path>
|
|
17
|
+
|
|
18
|
+
JSON payload shape (matches ``proposed_block`` from
|
|
19
|
+
``propose_modules_config.py --json``):
|
|
20
|
+
|
|
21
|
+
{
|
|
22
|
+
"enabled": true,
|
|
23
|
+
"root_paths": ["app/Modules"],
|
|
24
|
+
"namespace_template": "App\\\\Modules\\\\{ModuleName}\\\\App",
|
|
25
|
+
"agent_folder": "agents",
|
|
26
|
+
"skip_dirs": [".module-template", ".example"]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
Exit codes:
|
|
30
|
+
0 — patched successfully (or no-op when payload says decline).
|
|
31
|
+
2 — invalid arguments, unreachable project root, or malformed JSON.
|
|
32
|
+
3 — template-resolve failure (cannot bootstrap a missing team file).
|
|
33
|
+
"""
|
|
34
|
+
from __future__ import annotations
|
|
35
|
+
|
|
36
|
+
import argparse
|
|
37
|
+
import json
|
|
38
|
+
import re
|
|
39
|
+
import sys
|
|
40
|
+
from pathlib import Path
|
|
41
|
+
|
|
42
|
+
REPO_ROOT = Path(__file__).resolve().parents[1]
|
|
43
|
+
sys.path.insert(0, str(REPO_ROOT / "scripts"))
|
|
44
|
+
from _lib.agent_src import resolve_logical # noqa: E402
|
|
45
|
+
|
|
46
|
+
TEAM_FILE = ".agent-project-settings.yml"
|
|
47
|
+
TEMPLATE_LOGICAL = "templates/agents/agent-project-settings.example.yml"
|
|
48
|
+
|
|
49
|
+
_BARE_ID_RE = re.compile(r"^[a-z][a-z0-9_]*$")
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _yaml_scalar(value: str) -> str:
|
|
53
|
+
"""Format a string as a YAML scalar with minimal quoting.
|
|
54
|
+
|
|
55
|
+
Mirror of :func:`scripts.install._yaml_scalar` — duplicated here so
|
|
56
|
+
the persistence helper stays self-contained (importing ``install``
|
|
57
|
+
drags 4.8k lines of installer surface).
|
|
58
|
+
"""
|
|
59
|
+
if value == "":
|
|
60
|
+
return '""'
|
|
61
|
+
if value in ("true", "false"):
|
|
62
|
+
return value
|
|
63
|
+
if value.isdigit():
|
|
64
|
+
return value
|
|
65
|
+
if _BARE_ID_RE.match(value):
|
|
66
|
+
return value
|
|
67
|
+
escaped = value.replace("\\", "\\\\").replace('"', '\\"')
|
|
68
|
+
return f'"{escaped}"'
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _replace_template_value_raw(template: str, dotted_path: str, raw_yaml: str) -> str:
|
|
72
|
+
"""Replace the value at *dotted_path* with the pre-formatted *raw_yaml*.
|
|
73
|
+
|
|
74
|
+
Port of :func:`scripts.install._replace_template_value_raw`. Tracks
|
|
75
|
+
parent sections by indent (2-space stride) so the leaf scalar is
|
|
76
|
+
only patched when every parent matches. Comments + indentation are
|
|
77
|
+
preserved. Returns *template* unchanged if the path is missing.
|
|
78
|
+
"""
|
|
79
|
+
parts = dotted_path.split(".")
|
|
80
|
+
if not parts:
|
|
81
|
+
return template
|
|
82
|
+
sections = parts[:-1]
|
|
83
|
+
key = parts[-1]
|
|
84
|
+
target_indent = " " * len(sections)
|
|
85
|
+
header_re = re.compile(r"^(\s*)([A-Za-z_][A-Za-z0-9_]*):\s*$")
|
|
86
|
+
scalar_re = re.compile(r"^(\s*)([A-Za-z_][A-Za-z0-9_]*):\s*\S.*$")
|
|
87
|
+
current_path: list[str | None] = [None] * len(sections)
|
|
88
|
+
lines = template.splitlines()
|
|
89
|
+
for idx, line in enumerate(lines):
|
|
90
|
+
stripped = line.strip()
|
|
91
|
+
if not stripped or stripped.startswith("#"):
|
|
92
|
+
continue
|
|
93
|
+
m_header = header_re.match(line)
|
|
94
|
+
if m_header:
|
|
95
|
+
indent = m_header.group(1)
|
|
96
|
+
name = m_header.group(2)
|
|
97
|
+
depth = len(indent) // 2
|
|
98
|
+
if depth < len(sections):
|
|
99
|
+
current_path[depth] = name
|
|
100
|
+
for d in range(depth + 1, len(sections)):
|
|
101
|
+
current_path[d] = None
|
|
102
|
+
continue
|
|
103
|
+
m_scalar = scalar_re.match(line)
|
|
104
|
+
if not m_scalar:
|
|
105
|
+
continue
|
|
106
|
+
indent = m_scalar.group(1)
|
|
107
|
+
name = m_scalar.group(2)
|
|
108
|
+
if name != key or indent != target_indent:
|
|
109
|
+
continue
|
|
110
|
+
if current_path != list(sections):
|
|
111
|
+
continue
|
|
112
|
+
lines[idx] = f"{indent}{key}: {raw_yaml}"
|
|
113
|
+
return "\n".join(lines) + ("\n" if template.endswith("\n") else "")
|
|
114
|
+
return template
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def _yaml_flow_list(items: list[str]) -> str:
|
|
118
|
+
"""Render a list as a flow-style YAML sequence (`[a, b, c]`)."""
|
|
119
|
+
if not items:
|
|
120
|
+
return "[]"
|
|
121
|
+
return "[" + ", ".join(_yaml_scalar(item) for item in items) + "]"
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def _yaml_bool(value: bool) -> str:
|
|
125
|
+
return "true" if value else "false"
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def _resolve_template_path() -> Path | None:
|
|
129
|
+
"""Resolve the bundled ``agent-project-settings.example.yml``.
|
|
130
|
+
|
|
131
|
+
Used to bootstrap the team file when the consumer project has not
|
|
132
|
+
committed one yet. Mirrors :func:`scripts.check_template_pin_drift._template_files`
|
|
133
|
+
so source-of-truth resolution is identical across helpers.
|
|
134
|
+
"""
|
|
135
|
+
src = resolve_logical(TEMPLATE_LOGICAL)
|
|
136
|
+
if src is not None and src.is_file():
|
|
137
|
+
return src
|
|
138
|
+
fallback = REPO_ROOT / ".agent-src.uncondensed" / TEMPLATE_LOGICAL
|
|
139
|
+
if fallback.is_file():
|
|
140
|
+
return fallback
|
|
141
|
+
return None
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def _load_payload(args: argparse.Namespace) -> dict[str, object]:
|
|
145
|
+
if args.input_file:
|
|
146
|
+
raw = Path(args.input_file).read_text(encoding="utf-8")
|
|
147
|
+
else:
|
|
148
|
+
raw = sys.stdin.read()
|
|
149
|
+
try:
|
|
150
|
+
data = json.loads(raw)
|
|
151
|
+
except json.JSONDecodeError as exc:
|
|
152
|
+
print(f"error: invalid JSON payload: {exc}", file=sys.stderr)
|
|
153
|
+
sys.exit(2)
|
|
154
|
+
if not isinstance(data, dict):
|
|
155
|
+
print("error: payload must be a JSON object", file=sys.stderr)
|
|
156
|
+
sys.exit(2)
|
|
157
|
+
return data
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def _coerce_str_list(value: object, field: str) -> list[str]:
|
|
161
|
+
if not isinstance(value, list):
|
|
162
|
+
print(f"error: payload.{field} must be a list", file=sys.stderr)
|
|
163
|
+
sys.exit(2)
|
|
164
|
+
out: list[str] = []
|
|
165
|
+
for item in value:
|
|
166
|
+
if not isinstance(item, str):
|
|
167
|
+
print(f"error: payload.{field}[*] must be strings", file=sys.stderr)
|
|
168
|
+
sys.exit(2)
|
|
169
|
+
out.append(item)
|
|
170
|
+
return out
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def _patch_modules(template: str, payload: dict[str, object]) -> str:
|
|
174
|
+
"""Patch the four modules.* leaves in *template* per *payload*.
|
|
175
|
+
|
|
176
|
+
Missing keys in *payload* fall back to safe defaults that match the
|
|
177
|
+
bundled template (``enabled=false``, empty paths, ``agents``,
|
|
178
|
+
template skip-dirs). Patching is no-op for any key whose dotted
|
|
179
|
+
path is absent from *template* (returns the section untouched).
|
|
180
|
+
"""
|
|
181
|
+
enabled = bool(payload.get("enabled", False))
|
|
182
|
+
root_paths = _coerce_str_list(payload.get("root_paths", []), "root_paths")
|
|
183
|
+
ns_template = payload.get("namespace_template", "")
|
|
184
|
+
if not isinstance(ns_template, str):
|
|
185
|
+
print("error: payload.namespace_template must be a string", file=sys.stderr)
|
|
186
|
+
sys.exit(2)
|
|
187
|
+
agent_folder = payload.get("agent_folder", "agents")
|
|
188
|
+
if not isinstance(agent_folder, str) or agent_folder == "":
|
|
189
|
+
agent_folder = "agents"
|
|
190
|
+
skip_dirs = _coerce_str_list(
|
|
191
|
+
payload.get("skip_dirs", [".module-template", ".example"]),
|
|
192
|
+
"skip_dirs",
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
acknowledged = bool(payload.get("detection_acknowledged", False))
|
|
196
|
+
|
|
197
|
+
out = template
|
|
198
|
+
out = _replace_template_value_raw(out, "modules.enabled", _yaml_bool(enabled))
|
|
199
|
+
out = _replace_template_value_raw(out, "modules.root_paths", _yaml_flow_list(root_paths))
|
|
200
|
+
out = _replace_template_value_raw(out, "modules.namespace_template", _yaml_scalar(ns_template))
|
|
201
|
+
out = _replace_template_value_raw(out, "modules.agent_folder", _yaml_scalar(agent_folder))
|
|
202
|
+
out = _replace_template_value_raw(out, "modules.skip_dirs", _yaml_flow_list(skip_dirs))
|
|
203
|
+
out = _replace_template_value_raw(
|
|
204
|
+
out, "modules.detection_acknowledged", _yaml_bool(acknowledged)
|
|
205
|
+
)
|
|
206
|
+
return out
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def _patch_acknowledge_only(template: str) -> str:
|
|
210
|
+
"""Flip ``modules.detection_acknowledged`` to ``true`` without touching siblings.
|
|
211
|
+
|
|
212
|
+
Used by the ``--acknowledge-only`` flag: the user said "not now" to
|
|
213
|
+
the on-the-fly prompt and we only want to silence future nags. Every
|
|
214
|
+
other ``modules.*`` key stays at whatever the template / team file
|
|
215
|
+
already had.
|
|
216
|
+
"""
|
|
217
|
+
return _replace_template_value_raw(
|
|
218
|
+
template, "modules.detection_acknowledged", _yaml_bool(True)
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def _bootstrap_team_file(team_path: Path) -> str:
|
|
223
|
+
template_path = _resolve_template_path()
|
|
224
|
+
if template_path is None:
|
|
225
|
+
print(
|
|
226
|
+
"error: cannot bootstrap .agent-project-settings.yml — "
|
|
227
|
+
f"template missing at {TEMPLATE_LOGICAL}",
|
|
228
|
+
file=sys.stderr,
|
|
229
|
+
)
|
|
230
|
+
sys.exit(3)
|
|
231
|
+
return template_path.read_text(encoding="utf-8")
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def main(argv: list[str]) -> int:
|
|
235
|
+
parser = argparse.ArgumentParser(
|
|
236
|
+
prog="apply_modules_config.py",
|
|
237
|
+
description=(
|
|
238
|
+
"Patch the modules: block in .agent-project-settings.yml "
|
|
239
|
+
"from a JSON payload (stdin or --input-file). Comment- and "
|
|
240
|
+
"ordering-preserving."
|
|
241
|
+
),
|
|
242
|
+
)
|
|
243
|
+
parser.add_argument(
|
|
244
|
+
"--project",
|
|
245
|
+
default=None,
|
|
246
|
+
help="project root containing .agent-project-settings.yml (default: cwd)",
|
|
247
|
+
)
|
|
248
|
+
parser.add_argument(
|
|
249
|
+
"--input-file",
|
|
250
|
+
default=None,
|
|
251
|
+
help="read JSON payload from this file instead of stdin",
|
|
252
|
+
)
|
|
253
|
+
parser.add_argument(
|
|
254
|
+
"--decline",
|
|
255
|
+
action="store_true",
|
|
256
|
+
help="payload represents an explicit decline — write nothing, exit 0",
|
|
257
|
+
)
|
|
258
|
+
parser.add_argument(
|
|
259
|
+
"--acknowledge-only",
|
|
260
|
+
action="store_true",
|
|
261
|
+
help=(
|
|
262
|
+
"flip modules.detection_acknowledged=true without touching any "
|
|
263
|
+
"other modules.* key — used by the on-the-fly detection skill "
|
|
264
|
+
"when the user said 'not now'. Reads no payload."
|
|
265
|
+
),
|
|
266
|
+
)
|
|
267
|
+
args = parser.parse_args(argv)
|
|
268
|
+
if args.decline:
|
|
269
|
+
return 0
|
|
270
|
+
root = Path(args.project).expanduser().resolve() if args.project else Path.cwd().resolve()
|
|
271
|
+
if not root.is_dir():
|
|
272
|
+
print(f"error: project root is not a directory: {root}", file=sys.stderr)
|
|
273
|
+
return 2
|
|
274
|
+
team_path = root / TEAM_FILE
|
|
275
|
+
if team_path.is_file():
|
|
276
|
+
template = team_path.read_text(encoding="utf-8")
|
|
277
|
+
else:
|
|
278
|
+
template = _bootstrap_team_file(team_path)
|
|
279
|
+
if args.acknowledge_only:
|
|
280
|
+
patched = _patch_acknowledge_only(template)
|
|
281
|
+
else:
|
|
282
|
+
payload = _load_payload(args)
|
|
283
|
+
patched = _patch_modules(template, payload)
|
|
284
|
+
team_path.write_text(patched, encoding="utf-8")
|
|
285
|
+
print(str(team_path))
|
|
286
|
+
return 0
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
if __name__ == "__main__":
|
|
290
|
+
raise SystemExit(main(sys.argv[1:]))
|
|
@@ -25,8 +25,8 @@ CONTRACT_ROOT = ROOT / "docs" / "contracts"
|
|
|
25
25
|
AREAS: dict[str, dict[str, str]] = {
|
|
26
26
|
"cost": {"contract": "cost-enforcement.md",
|
|
27
27
|
"scope": "Budget ladder, hard-stop hook, cost reporting and dashboards."},
|
|
28
|
-
"
|
|
29
|
-
"scope": "
|
|
28
|
+
"telegraph": {"contract": "condensation-default-kill-criterion.md",
|
|
29
|
+
"scope": "Telegraph-speak condensation, decondensation, reversibility guards."},
|
|
30
30
|
"schema": {"contract": "agents/reference/docs/frontmatter-contract.md",
|
|
31
31
|
"scope": "Frontmatter schemas, v2 rigor, lint behaviour for skills / rules / commands."},
|
|
32
32
|
"router": {"contract": "rule-router.md",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"""Audit auto-rules for the Rule-Governance pass (Phase 5.1 of
|
|
3
3
|
road-to-augment-limit-fit).
|
|
4
4
|
|
|
5
|
-
Walk `.agent-src.
|
|
5
|
+
Walk `.agent-src.uncondensed/rules/*.md`, collect per-rule frontmatter
|
|
6
6
|
(`description`, `triggers`, `routes_to`, `tier`), measure body and
|
|
7
7
|
registry-stub costs, and emit:
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ from pathlib import Path
|
|
|
25
25
|
import yaml
|
|
26
26
|
|
|
27
27
|
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
28
|
-
SRC_RULES = REPO_ROOT / ".agent-src.
|
|
28
|
+
SRC_RULES = REPO_ROOT / ".agent-src.uncondensed" / "rules"
|
|
29
29
|
PROJECTED_RULES = REPO_ROOT / ".augment" / "rules"
|
|
30
30
|
REPORT_DIR = REPO_ROOT / "agents" / "reports"
|
|
31
31
|
JSON_OUT = REPORT_DIR / "auto-rules-audit.json"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""audit_cloud_compatibility.py — tier each artefact for cloud distribution.
|
|
3
3
|
|
|
4
|
-
Classifies every .md under .agent-src.
|
|
4
|
+
Classifies every .md under .agent-src.uncondensed/{skills,rules,commands,
|
|
5
5
|
guidelines} into a tier:
|
|
6
6
|
|
|
7
7
|
T1 Universal no script / no FS / pure guidance
|
|
@@ -30,7 +30,7 @@ from collections import Counter
|
|
|
30
30
|
from pathlib import Path
|
|
31
31
|
|
|
32
32
|
ROOT = Path(__file__).resolve().parent.parent
|
|
33
|
-
SOURCE = ROOT / ".agent-src.
|
|
33
|
+
SOURCE = ROOT / ".agent-src.uncondensed"
|
|
34
34
|
SCAN_DIRS = ["skills", "rules", "commands", "guidelines"]
|
|
35
35
|
|
|
36
36
|
# patterns
|
|
@@ -47,7 +47,7 @@ HARD_RE = re.compile(
|
|
|
47
47
|
re.IGNORECASE | re.MULTILINE,
|
|
48
48
|
)
|
|
49
49
|
FS_RE = re.compile(
|
|
50
|
-
r"(?:\.agent-src(?:\.
|
|
50
|
+
r"(?:\.agent-src(?:\.uncondensed)?/|"
|
|
51
51
|
r"\.augment/|\.claude/|\.cursor/|\.clinerules/|"
|
|
52
52
|
r"agents/|\.agent-settings\.yml|\.agent-chat-history)"
|
|
53
53
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""Command-surface inventory + overlap detection + usage signal.
|
|
3
3
|
|
|
4
|
-
Walks ``.agent-src.
|
|
4
|
+
Walks ``.agent-src.uncondensed/commands/**/*.md``, collects metadata for
|
|
5
5
|
each command (path, description, aliases, line count, last-modified),
|
|
6
6
|
flags overlap pairs by keyword-cosine similarity, and adds a usage
|
|
7
7
|
signal from git history (commands not touched in 90+ days are
|
|
@@ -37,7 +37,7 @@ from pathlib import Path
|
|
|
37
37
|
from typing import List
|
|
38
38
|
|
|
39
39
|
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
40
|
-
DEFAULT_ROOT = REPO_ROOT / ".agent-src.
|
|
40
|
+
DEFAULT_ROOT = REPO_ROOT / ".agent-src.uncondensed" / "commands"
|
|
41
41
|
REPORT_DIR = REPO_ROOT / "agents" / "reports"
|
|
42
42
|
OUT_JSON = REPORT_DIR / "command-surface.json"
|
|
43
43
|
OUT_MD = REPORT_DIR / "command-surface.md"
|
|
@@ -142,8 +142,8 @@ def git_last_modified(path: Path) -> tuple[str, int | None]:
|
|
|
142
142
|
def git_history(path: Path) -> tuple[int, str, int | None]:
|
|
143
143
|
"""Return (commit_count, first_commit_iso, days_since_first_commit).
|
|
144
144
|
|
|
145
|
-
Uses ``--follow`` so renames (e.g. the ``.augment.
|
|
146
|
-
``.agent-src.
|
|
145
|
+
Uses ``--follow`` so renames (e.g. the ``.augment.uncondensed`` →
|
|
146
|
+
``.agent-src.uncondensed`` rename) don't reset the per-file history.
|
|
147
147
|
"""
|
|
148
148
|
try:
|
|
149
149
|
out = subprocess.check_output(
|
|
@@ -226,7 +226,7 @@ def render_md(commands: List[Command], pairs: list[dict]) -> str:
|
|
|
226
226
|
"# Command-Surface Inventory",
|
|
227
227
|
"",
|
|
228
228
|
f"> Generated by `scripts/audit_command_surface.py`. "
|
|
229
|
-
f"Source: `.agent-src.
|
|
229
|
+
f"Source: `.agent-src.uncondensed/commands/`.",
|
|
230
230
|
"",
|
|
231
231
|
"## Summary",
|
|
232
232
|
"",
|
|
@@ -267,10 +267,10 @@ def render_md(commands: List[Command], pairs: list[dict]) -> str:
|
|
|
267
267
|
"were considered:",
|
|
268
268
|
"",
|
|
269
269
|
"- **Filesystem mtime** — useless: `task sync` rewrites every file when the "
|
|
270
|
-
"
|
|
271
|
-
"- **Git history (`--follow`)** — uninformative here: the `.agent-src.
|
|
272
|
-
" directory is the result of a recent rename (`.augment.
|
|
273
|
-
" `.agent-src.
|
|
270
|
+
" condensed and uncondensed trees are regenerated.",
|
|
271
|
+
"- **Git history (`--follow`)** — uninformative here: the `.agent-src.uncondensed/` "
|
|
272
|
+
" directory is the result of a recent rename (`.augment.uncondensed/` → "
|
|
273
|
+
" `.agent-src.uncondensed/`), so almost every file shows a single recent commit "
|
|
274
274
|
f" on the current branch. {len(low_signal)} of {len(commands)} commands fall into the "
|
|
275
275
|
f" ≤{LOW_SIGNAL_COMMIT_COUNT}-commits / ≤{LOW_SIGNAL_AGE_DAYS}d-old bucket purely as a "
|
|
276
276
|
" rename artefact, not as a real cold-tail signal.",
|
|
@@ -32,8 +32,8 @@ AUDIT_MD = REPORT_DIR / "auto-rules-audit.md"
|
|
|
32
32
|
LIKELIHOOD_JSON = REPORT_DIR / "auto-rules-likelihood.json"
|
|
33
33
|
|
|
34
34
|
CORPUS_GLOBS = [
|
|
35
|
-
".agent-src.
|
|
36
|
-
".agent-src.
|
|
35
|
+
".agent-src.uncondensed/skills/**/SKILL.md",
|
|
36
|
+
".agent-src.uncondensed/commands/**/*.md",
|
|
37
37
|
"agents/settings/contexts/**/*.md",
|
|
38
38
|
"docs/guidelines/**/*.md",
|
|
39
39
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""Audit the user-type axis frontmatter coverage (step-9 Phase 4).
|
|
3
3
|
|
|
4
|
-
Two checks across `.agent-src.
|
|
4
|
+
Two checks across `.agent-src.uncondensed/skills/`:
|
|
5
5
|
|
|
6
6
|
1. **Orphan values** — every `recommended_for_user_types` value must have
|
|
7
7
|
a corresponding `user-types/<value>.yml` config. Orphans are FATAL
|
|
@@ -27,7 +27,7 @@ from collections import defaultdict
|
|
|
27
27
|
from pathlib import Path
|
|
28
28
|
|
|
29
29
|
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
30
|
-
SKILLS_ROOT = REPO_ROOT / ".agent-src.
|
|
30
|
+
SKILLS_ROOT = REPO_ROOT / ".agent-src.uncondensed" / "skills"
|
|
31
31
|
USER_TYPES_ROOT = REPO_ROOT / "user-types"
|
|
32
32
|
REPORT_PATH = REPO_ROOT / "agents" / "reports" / "user-type-axis-audit.md"
|
|
33
33
|
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Cache-aware dispatch for `task bench:ab` arms.
|
|
3
|
+
|
|
4
|
+
Phase 5 supporting helper. Wraps the Phase 2 cache lookup so the Taskfile
|
|
5
|
+
entries can stay readable. Given a corpus name (`tracka` / `trackb`),
|
|
6
|
+
checks whether the cached `without` report is fresh; if so, runs only the
|
|
7
|
+
`with` arm of the corresponding runner. Otherwise runs both.
|
|
8
|
+
|
|
9
|
+
Cost-saving math: a daily `task bench:ab` re-runs only the `with` arm
|
|
10
|
+
when the corpus, claude CLI version, and target shape haven't changed.
|
|
11
|
+
That halves the wall-time + cost of the daily run.
|
|
12
|
+
"""
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
import argparse
|
|
16
|
+
import subprocess
|
|
17
|
+
import sys
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
21
|
+
sys.path.insert(0, str(REPO_ROOT / "scripts"))
|
|
22
|
+
|
|
23
|
+
from _lib import bench_ab_cache # type: ignore[import-not-found] # noqa: E402
|
|
24
|
+
|
|
25
|
+
RUNNER_FOR = {
|
|
26
|
+
"tracka": (REPO_ROOT / "scripts" / "bench_ab_tracka_run.py", "ab-tracka.yaml"),
|
|
27
|
+
"trackb": (REPO_ROOT / "scripts" / "bench_ab_task_runner.py", "ab-trackb.yaml"),
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def parse_args(argv: list[str]) -> argparse.Namespace:
|
|
32
|
+
parser = argparse.ArgumentParser(description="Cache-aware dispatch.")
|
|
33
|
+
parser.add_argument("corpus", choices=tuple(RUNNER_FOR))
|
|
34
|
+
parser.add_argument(
|
|
35
|
+
"extra",
|
|
36
|
+
nargs=argparse.REMAINDER,
|
|
37
|
+
help="Extra args forwarded to the underlying runner.",
|
|
38
|
+
)
|
|
39
|
+
return parser.parse_args(argv)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def main(argv: list[str] | None = None) -> int:
|
|
43
|
+
args = parse_args(argv if argv is not None else sys.argv[1:])
|
|
44
|
+
runner, corpus_name = RUNNER_FOR[args.corpus]
|
|
45
|
+
corpus_path = REPO_ROOT / "internal" / "bench" / "corpora" / corpus_name
|
|
46
|
+
if not corpus_path.exists():
|
|
47
|
+
sys.stderr.write(f"bench_ab_cache_dispatch: corpus missing at {corpus_path}\n")
|
|
48
|
+
return 1
|
|
49
|
+
lookup = bench_ab_cache.lookup(corpus_path)
|
|
50
|
+
if lookup.fresh and lookup.report_path is not None:
|
|
51
|
+
sys.stdout.write(
|
|
52
|
+
f"bench_ab_cache_dispatch ({args.corpus}): reusing fresh without baseline "
|
|
53
|
+
f"({lookup.report_path.name}) — running with-arm only\n"
|
|
54
|
+
)
|
|
55
|
+
variants = ("with",)
|
|
56
|
+
else:
|
|
57
|
+
sys.stdout.write(
|
|
58
|
+
f"bench_ab_cache_dispatch ({args.corpus}): cache {lookup.reason} — running both arms\n"
|
|
59
|
+
)
|
|
60
|
+
variants = ("with", "without")
|
|
61
|
+
cmd = [sys.executable, str(runner), "--variant", variants[0]] + list(args.extra)
|
|
62
|
+
if len(variants) == 2:
|
|
63
|
+
cmd = [sys.executable, str(runner), "--variant", "both"] + list(args.extra)
|
|
64
|
+
return subprocess.run(cmd, check=False).returncode
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
if __name__ == "__main__":
|
|
68
|
+
raise SystemExit(main())
|