@event4u/agent-config 3.3.0 → 4.2.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 +216 -3
- package/CONTRIBUTING.md +31 -12
- package/README.md +21 -12
- 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/atomic.js +92 -0
- package/dist/install/atomic.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 +358 -0
- package/dist/server/routes/install.js.map +1 -0
- package/dist/server/routes/wizard.js +468 -32
- 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 +5 -3
- package/dist/server/schemas/settings.js.map +1 -1
- package/dist/ui/assets/index-BDAhhpDV.js +40 -0
- package/dist/ui/assets/index-BDAhhpDV.js.map +1 -0
- package/dist/ui/assets/index-BXZILUxe.css +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 +110 -97
- 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 +3 -3
- 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/connector-setup.md +2 -2
- package/docs/deploy/policy-cookbook.md +2 -2
- 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 +273 -45
- 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 +152 -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
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Track A — behavioural eval runner for the package-impact A/B bench.
|
|
3
|
+
|
|
4
|
+
Phase 3 Step 2 of `agents/roadmaps/road-to-package-impact-benchmark.md`.
|
|
5
|
+
|
|
6
|
+
For each prompt in `internal/bench/corpora/ab-tracka.yaml`, check whether
|
|
7
|
+
the expected rule/skill surface is present in the target clone. Present +
|
|
8
|
+
keyword-grep passing → trigger fires. Absent → trigger does not fire.
|
|
9
|
+
|
|
10
|
+
By construction the `without` clone has no agent-config surface — every
|
|
11
|
+
expected_target file is missing — so its accuracy floor is 0%. The `with`
|
|
12
|
+
clone has the surface installed and should score near 100%. The delta is
|
|
13
|
+
the lift attributable to the package.
|
|
14
|
+
|
|
15
|
+
This runner does NOT invoke `claude` — Track A measures **surface
|
|
16
|
+
availability**, the necessary precondition for the rule-router to fire.
|
|
17
|
+
Track B (Phase 4) measures actual end-to-end task behaviour.
|
|
18
|
+
|
|
19
|
+
Output schema (consumed by bench_ab_diff.py):
|
|
20
|
+
|
|
21
|
+
results:
|
|
22
|
+
trigger_accuracy: 0.0 .. 1.0 # share of prompts that scored 1
|
|
23
|
+
false_positives: int # `without` matches (expected = 0)
|
|
24
|
+
per_rule_accuracy: # per-target hit map
|
|
25
|
+
<expected_target>: {with: 0|1, without: 0|1}
|
|
26
|
+
per_prompt: # full audit trail
|
|
27
|
+
- id, expected_target, with_score, without_score, notes
|
|
28
|
+
"""
|
|
29
|
+
from __future__ import annotations
|
|
30
|
+
|
|
31
|
+
import argparse
|
|
32
|
+
import json
|
|
33
|
+
import re
|
|
34
|
+
import sys
|
|
35
|
+
import time
|
|
36
|
+
from datetime import datetime, timezone
|
|
37
|
+
from pathlib import Path
|
|
38
|
+
|
|
39
|
+
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
40
|
+
sys.path.insert(0, str(REPO_ROOT / "scripts"))
|
|
41
|
+
|
|
42
|
+
from _lib import bench_ab_cache # type: ignore[import-not-found] # noqa: E402
|
|
43
|
+
|
|
44
|
+
CORPUS_PATH = REPO_ROOT / "internal" / "bench" / "corpora" / "ab-tracka.yaml"
|
|
45
|
+
CLONES_DIR = REPO_ROOT / "internal" / "bench" / "ab" / "clones"
|
|
46
|
+
REPORTS_DIR = REPO_ROOT / "internal" / "bench" / "reports" / "ab"
|
|
47
|
+
|
|
48
|
+
try:
|
|
49
|
+
import yaml
|
|
50
|
+
except ImportError:
|
|
51
|
+
sys.stderr.write("bench_ab_tracka_run: PyYAML required (pip install pyyaml)\n")
|
|
52
|
+
raise SystemExit(2)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def utc_stamp() -> str:
|
|
56
|
+
return datetime.now(timezone.utc).strftime("%Y-%m-%dT%H-%M-%SZ")
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def load_corpus() -> dict:
|
|
60
|
+
return yaml.safe_load(CORPUS_PATH.read_text())
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def score_prompt(prompt: dict, clone_root: Path) -> tuple[int, str]:
|
|
64
|
+
"""Return (score, reason). score=1 when the surface is present AND every keyword hits."""
|
|
65
|
+
target_rel = prompt.get("expected_target")
|
|
66
|
+
if not target_rel:
|
|
67
|
+
return 0, "no expected_target"
|
|
68
|
+
target = clone_root / target_rel
|
|
69
|
+
if not target.exists():
|
|
70
|
+
return 0, f"missing: {target_rel}"
|
|
71
|
+
keywords = prompt.get("expected_keywords") or []
|
|
72
|
+
if not isinstance(keywords, list) or not keywords:
|
|
73
|
+
# Surface presence alone counts when no keywords specified.
|
|
74
|
+
return 1, "present (no keywords)"
|
|
75
|
+
body = target.read_text(errors="replace")
|
|
76
|
+
missing = [kw for kw in keywords if not re.search(re.escape(str(kw)), body, re.IGNORECASE)]
|
|
77
|
+
if missing:
|
|
78
|
+
return 0, f"keywords missing: {','.join(missing)}"
|
|
79
|
+
return 1, "present (keywords matched)"
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def run_variant(variant: str, prompts: list[dict]) -> dict:
|
|
83
|
+
clone_root = CLONES_DIR / variant
|
|
84
|
+
if not clone_root.exists():
|
|
85
|
+
raise RuntimeError(
|
|
86
|
+
f"clone missing at {clone_root} — run scripts/bench_ab_clone.py first"
|
|
87
|
+
)
|
|
88
|
+
per_prompt = []
|
|
89
|
+
per_target: dict[str, int] = {}
|
|
90
|
+
matched = 0
|
|
91
|
+
for prompt in prompts:
|
|
92
|
+
score, reason = score_prompt(prompt, clone_root)
|
|
93
|
+
per_prompt.append(
|
|
94
|
+
{
|
|
95
|
+
"id": prompt.get("id"),
|
|
96
|
+
"expected_target": prompt.get("expected_target"),
|
|
97
|
+
"score": score,
|
|
98
|
+
"reason": reason,
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
per_target[prompt.get("expected_target", "")] = max(
|
|
102
|
+
per_target.get(prompt.get("expected_target", ""), 0), score
|
|
103
|
+
)
|
|
104
|
+
matched += score
|
|
105
|
+
total = len(prompts) or 1
|
|
106
|
+
return {
|
|
107
|
+
"trigger_accuracy": round(matched / total, 4),
|
|
108
|
+
"matched": matched,
|
|
109
|
+
"total": total,
|
|
110
|
+
"per_target_present": per_target,
|
|
111
|
+
"per_prompt": per_prompt,
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def integrity_check(without_results: dict) -> tuple[bool, str]:
|
|
116
|
+
"""Track A safety: `without` MUST score 0 — there is no agent-config surface
|
|
117
|
+
to match. A non-zero score means the integrity boundary leaked and the run
|
|
118
|
+
is invalid.
|
|
119
|
+
"""
|
|
120
|
+
matched = without_results.get("matched", 0)
|
|
121
|
+
if matched != 0:
|
|
122
|
+
# Identify which prompts leaked
|
|
123
|
+
leaked = [p["id"] for p in without_results.get("per_prompt", []) if p.get("score")]
|
|
124
|
+
return False, f"`without` scored {matched} (expected 0); leaked: {','.join(leaked)}"
|
|
125
|
+
return True, "without=0 (clean)"
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def write_report(variant: str, results: dict, duration: float, *, integrity_ok: bool) -> Path:
|
|
129
|
+
REPORTS_DIR.mkdir(parents=True, exist_ok=True)
|
|
130
|
+
cache_key = bench_ab_cache.CacheKey(
|
|
131
|
+
corpus_hash=bench_ab_cache.hash_file(CORPUS_PATH),
|
|
132
|
+
claude_cli_version=bench_ab_cache.claude_cli_version(),
|
|
133
|
+
target_shape_hash=bench_ab_cache.target_shape_hash(),
|
|
134
|
+
)
|
|
135
|
+
stamp = utc_stamp()
|
|
136
|
+
payload = {
|
|
137
|
+
"schema": "ab-bench/0.1",
|
|
138
|
+
"stamp": stamp,
|
|
139
|
+
"variant": variant,
|
|
140
|
+
"corpus": "ab-tracka",
|
|
141
|
+
"cache_key": cache_key.to_dict(),
|
|
142
|
+
"duration_seconds": round(duration, 3),
|
|
143
|
+
"integrity_ok": integrity_ok,
|
|
144
|
+
"results": results,
|
|
145
|
+
}
|
|
146
|
+
path = REPORTS_DIR / f"{stamp}-ab-tracka-{variant}.json"
|
|
147
|
+
path.write_text(json.dumps(payload, indent=2) + "\n")
|
|
148
|
+
md = path.with_suffix(".md")
|
|
149
|
+
md.write_text(
|
|
150
|
+
f"# Track A · {variant}\n\n"
|
|
151
|
+
f"- Stamp: `{stamp}`\n"
|
|
152
|
+
f"- Trigger accuracy: **{results.get('trigger_accuracy', 0) * 100:.1f}%**"
|
|
153
|
+
f" ({results.get('matched', 0)}/{results.get('total', 0)})\n"
|
|
154
|
+
f"- Integrity OK: `{integrity_ok}`\n"
|
|
155
|
+
)
|
|
156
|
+
return path
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def parse_args(argv: list[str]) -> argparse.Namespace:
|
|
160
|
+
parser = argparse.ArgumentParser(description="Run Track A behavioural eval per variant.")
|
|
161
|
+
parser.add_argument(
|
|
162
|
+
"--variant",
|
|
163
|
+
choices=("with", "without", "both"),
|
|
164
|
+
default="both",
|
|
165
|
+
help="Which variant to run (default: both).",
|
|
166
|
+
)
|
|
167
|
+
return parser.parse_args(argv)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def main(argv: list[str] | None = None) -> int:
|
|
171
|
+
args = parse_args(argv if argv is not None else sys.argv[1:])
|
|
172
|
+
if not CORPUS_PATH.exists():
|
|
173
|
+
sys.stderr.write(f"bench_ab_tracka_run: corpus missing at {CORPUS_PATH}\n")
|
|
174
|
+
return 1
|
|
175
|
+
data = load_corpus()
|
|
176
|
+
prompts = data.get("prompts") or []
|
|
177
|
+
if not prompts:
|
|
178
|
+
sys.stderr.write("bench_ab_tracka_run: corpus has no prompts\n")
|
|
179
|
+
return 1
|
|
180
|
+
|
|
181
|
+
variants = ("with", "without") if args.variant == "both" else (args.variant,)
|
|
182
|
+
integrity_ok = True
|
|
183
|
+
for variant in variants:
|
|
184
|
+
started = time.monotonic()
|
|
185
|
+
results = run_variant(variant, prompts)
|
|
186
|
+
duration = time.monotonic() - started
|
|
187
|
+
if variant == "without":
|
|
188
|
+
ok, reason = integrity_check(results)
|
|
189
|
+
integrity_ok = ok
|
|
190
|
+
if not ok:
|
|
191
|
+
sys.stderr.write(f"bench_ab_tracka_run: integrity failure — {reason}\n")
|
|
192
|
+
path = write_report(variant, results, duration, integrity_ok=integrity_ok)
|
|
193
|
+
sys.stdout.write(
|
|
194
|
+
f"bench_ab_tracka_run: {variant} → "
|
|
195
|
+
f"{results['trigger_accuracy'] * 100:.1f}% "
|
|
196
|
+
f"({results['matched']}/{results['total']}) — {path.relative_to(REPO_ROOT)}\n"
|
|
197
|
+
)
|
|
198
|
+
return 0 if integrity_ok else 1
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
if __name__ == "__main__":
|
|
202
|
+
raise SystemExit(main())
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Offline bench for input-side memory
|
|
2
|
+
"""Offline bench for input-side memory condensation (Phase 2 / Step 11).
|
|
3
3
|
|
|
4
|
-
Runs `
|
|
4
|
+
Runs `condense_memory.py` over a fixed corpus of memory-target files, records
|
|
5
5
|
pre/post char counts, approximates input-token savings (chars / 4 — the
|
|
6
|
-
GPT-4 / Claude rule of thumb), and emits `internal/bench/reports/
|
|
6
|
+
GPT-4 / Claude rule of thumb), and emits `internal/bench/reports/telegraph-v2.{json,md}`.
|
|
7
7
|
|
|
8
8
|
Offline (no API calls). Cadence-aligned with `docs/benchmarks.md`. Citation
|
|
9
|
-
in `internal/bench/reports/
|
|
9
|
+
in `internal/bench/reports/telegraph-v2.md` notes the chars→tokens approximation and
|
|
10
10
|
points at upstream tiktoken / claude-tokenizer if a calibrated number is
|
|
11
11
|
later needed.
|
|
12
12
|
"""
|
|
@@ -22,13 +22,13 @@ from datetime import datetime, timezone
|
|
|
22
22
|
from pathlib import Path
|
|
23
23
|
|
|
24
24
|
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
25
|
-
|
|
26
|
-
REPORT_JSON = REPO_ROOT / "internal" / "bench" / "reports" / "
|
|
27
|
-
REPORT_MD = REPO_ROOT / "internal" / "bench" / "reports" / "
|
|
25
|
+
CONDENSE_SCRIPT = REPO_ROOT / "scripts" / "condense_memory.py"
|
|
26
|
+
REPORT_JSON = REPO_ROOT / "internal" / "bench" / "reports" / "telegraph-v2.json"
|
|
27
|
+
REPORT_MD = REPO_ROOT / "internal" / "bench" / "reports" / "telegraph-v2.md"
|
|
28
28
|
|
|
29
29
|
CORPUS: list[tuple[str, str]] = [
|
|
30
30
|
("AGENTS.md", "thin-root-package"),
|
|
31
|
-
(".agent-src.
|
|
31
|
+
(".agent-src.uncondensed/templates/AGENTS.md", "thin-root-consumer-template"),
|
|
32
32
|
(".agent-src/templates/AGENTS.md", "thin-root-consumer-generated"),
|
|
33
33
|
("docs/contracts/ai-council-config.md", "prose-heavy-contract"),
|
|
34
34
|
("docs/contracts/implement-ticket-flow.md", "prose-heavy-contract"),
|
|
@@ -56,7 +56,7 @@ def bench_one(rel_path: str, category: str) -> dict:
|
|
|
56
56
|
shutil.copy(src, target)
|
|
57
57
|
before_chars = target.stat().st_size
|
|
58
58
|
result = subprocess.run(
|
|
59
|
-
[sys.executable, str(
|
|
59
|
+
[sys.executable, str(CONDENSE_SCRIPT), str(target)],
|
|
60
60
|
capture_output=True, text=True, cwd=REPO_ROOT,
|
|
61
61
|
)
|
|
62
62
|
if result.returncode != 0:
|
|
@@ -101,11 +101,11 @@ def aggregate(rows: list[dict]) -> dict:
|
|
|
101
101
|
def render_md(payload: dict) -> str:
|
|
102
102
|
agg = payload["aggregate"]
|
|
103
103
|
lines = [
|
|
104
|
-
"#
|
|
104
|
+
"# telegraph-v2 — input-side memory condensation bench",
|
|
105
105
|
"",
|
|
106
106
|
f"**Generated:** {payload['generated_at']}",
|
|
107
|
-
f"**Schema:** `
|
|
108
|
-
f"**Script:** `scripts/
|
|
107
|
+
f"**Schema:** `telegraph-v2` (input-side; offline; chars→tokens via /4 heuristic)",
|
|
108
|
+
f"**Script:** `scripts/bench_condense_memory.py`",
|
|
109
109
|
"",
|
|
110
110
|
"## Headline",
|
|
111
111
|
"",
|
|
@@ -134,13 +134,13 @@ def render_md(payload: dict) -> str:
|
|
|
134
134
|
)
|
|
135
135
|
lines += ["", "## Methodology",
|
|
136
136
|
"",
|
|
137
|
-
"- Offline run: `
|
|
137
|
+
"- Offline run: `condense_memory.py` writes `.original.md` backup + frontmatter (`original_sha256`, `condensed_at`). The frontmatter pair (≈ 120 chars) is the fixed condensation tax — files with little prose net negative.",
|
|
138
138
|
"- chars → tokens approximation: `tokens ≈ chars / 4` (GPT-4 / Claude English rule of thumb). Calibrated number requires `tiktoken` or `claude-tokenizer`; deferred until a consumer requests pinpoint numbers.",
|
|
139
|
-
"- The `
|
|
139
|
+
"- The `telegraph-v1` output-side verdict (`vs_terse` median −9.27%) is orthogonal — input-side savings apply to the always-loaded memory budget, not the reply stream.",
|
|
140
140
|
"",
|
|
141
141
|
"## Interpretation",
|
|
142
142
|
"",
|
|
143
|
-
"- **Thin-Root files net negative.** `AGENTS.md` and `templates/AGENTS.md` already follow `agents-md-thin-root` (≥ 40 % pointer ratio). The
|
|
143
|
+
"- **Thin-Root files net negative.** `AGENTS.md` and `templates/AGENTS.md` already follow `agents-md-thin-root` (≥ 40 % pointer ratio). The condenseor's frontmatter pair adds more bytes than the sparse prose loses. **Do not condense Thin-Root files.**",
|
|
144
144
|
"- **Prose-heavy contract docs net 3–6 % saving.** Useful but modest. Pays off when the file is large and frequently loaded.",
|
|
145
145
|
"- **Rule of thumb:** target files with > 5 KB and visible paragraph prose; skip pointer-only files.",
|
|
146
146
|
""]
|
|
@@ -151,7 +151,7 @@ def main() -> int:
|
|
|
151
151
|
rows = [bench_one(p, c) for p, c in CORPUS]
|
|
152
152
|
payload = {
|
|
153
153
|
"generated_at": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
|
|
154
|
-
"schema": "
|
|
154
|
+
"schema": "telegraph-v2",
|
|
155
155
|
"rows": rows,
|
|
156
156
|
"aggregate": aggregate(rows),
|
|
157
157
|
}
|
package/scripts/bench_run.py
CHANGED
|
@@ -34,8 +34,8 @@ from _lib.bench_report import ( # noqa: E402
|
|
|
34
34
|
write_json,
|
|
35
35
|
write_markdown,
|
|
36
36
|
)
|
|
37
|
-
from _lib import
|
|
38
|
-
from _lib.
|
|
37
|
+
from _lib import bench_telegraph # noqa: E402
|
|
38
|
+
from _lib.bench_telegraph_report import build_telegraph_report, render_telegraph_markdown # noqa: E402
|
|
39
39
|
from _lib.bench_cost import load_pricing # noqa: E402
|
|
40
40
|
from bench_runner import run_corpus # noqa: E402
|
|
41
41
|
|
|
@@ -50,7 +50,7 @@ PRICING_PATH = REPO_ROOT / "internal" / "bench" / "pricing.yaml"
|
|
|
50
50
|
SESSIONS_JSONL = REPO_ROOT / "agents" / "cost-tracking" / "sessions.jsonl"
|
|
51
51
|
REPORTS_DIR = REPO_ROOT / "internal" / "bench" / "reports"
|
|
52
52
|
CORPUS_DIR = REPO_ROOT / "tests" / "eval"
|
|
53
|
-
|
|
53
|
+
TELEGRAPH_CORPUS = REPO_ROOT / "internal" / "bench" / "corpora" / "telegraph" / "prompts.yaml"
|
|
54
54
|
BASELINE_COLLECTOR = REPO_ROOT / "scripts" / "bench_runner.py"
|
|
55
55
|
|
|
56
56
|
|
|
@@ -115,20 +115,20 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
115
115
|
help="Override timestamp (test hook); defaults to UTC now")
|
|
116
116
|
ap.add_argument("--no-write", action="store_true",
|
|
117
117
|
help="Compute the report but do not write files (dry run)")
|
|
118
|
-
ap.add_argument("--
|
|
119
|
-
help="Run the
|
|
118
|
+
ap.add_argument("--telegraph", action="store_true",
|
|
119
|
+
help="Run the telegraph three-arm condensation bench instead of the "
|
|
120
120
|
"selection-accuracy bench (step-16 Phase 1).")
|
|
121
|
-
ap.add_argument("--
|
|
122
|
-
help="Cap prompts in the
|
|
123
|
-
ap.add_argument("--
|
|
124
|
-
help="
|
|
121
|
+
ap.add_argument("--telegraph-max-prompts", type=int, default=None,
|
|
122
|
+
help="Cap prompts in the telegraph bench (smoke test).")
|
|
123
|
+
ap.add_argument("--telegraph-dry-run", action="store_true",
|
|
124
|
+
help="Telegraph: skip live API calls; emit a stub report with "
|
|
125
125
|
"zero tokens (wiring check only).")
|
|
126
|
-
ap.add_argument("--
|
|
127
|
-
help="Filename tag for the
|
|
126
|
+
ap.add_argument("--telegraph-report-tag", default="telegraph-v1",
|
|
127
|
+
help="Filename tag for the telegraph report (default: telegraph-v1).")
|
|
128
128
|
args = ap.parse_args(argv)
|
|
129
129
|
|
|
130
|
-
if args.
|
|
131
|
-
return
|
|
130
|
+
if args.telegraph:
|
|
131
|
+
return _run_telegraph(args)
|
|
132
132
|
|
|
133
133
|
corpus_path = CORPUS_DIR / f"corpus-{args.corpus}.yaml"
|
|
134
134
|
if not corpus_path.is_file():
|
|
@@ -170,7 +170,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
class _DryRunClient:
|
|
173
|
-
"""Stub client for --
|
|
173
|
+
"""Stub client for --telegraph-dry-run. Returns empty CouncilResponse-shaped objects."""
|
|
174
174
|
|
|
175
175
|
def ask(self, system_prompt: str, user_prompt: str, max_tokens: int = 1024):
|
|
176
176
|
from ai_council.clients import CouncilResponse
|
|
@@ -185,12 +185,12 @@ def _build_anthropic_client():
|
|
|
185
185
|
return AnthropicClient(api_key=load_anthropic_key())
|
|
186
186
|
|
|
187
187
|
|
|
188
|
-
def
|
|
189
|
-
if not
|
|
190
|
-
script_output.error(f"error:
|
|
188
|
+
def _run_telegraph(args: argparse.Namespace) -> int:
|
|
189
|
+
if not TELEGRAPH_CORPUS.is_file():
|
|
190
|
+
script_output.error(f"error: telegraph corpus not found: {TELEGRAPH_CORPUS}")
|
|
191
191
|
return 2
|
|
192
192
|
|
|
193
|
-
if args.
|
|
193
|
+
if args.telegraph_dry_run:
|
|
194
194
|
client = _DryRunClient()
|
|
195
195
|
transport = "dry-run"
|
|
196
196
|
model = "stub"
|
|
@@ -211,18 +211,18 @@ def _run_caveman(args: argparse.Namespace) -> int:
|
|
|
211
211
|
f"in={ar.input_tokens:>4} out={ar.output_tokens:>4} "
|
|
212
212
|
f"{ar.latency_ms:>5}ms{err}", file=sys.stderr)
|
|
213
213
|
|
|
214
|
-
results =
|
|
215
|
-
client,
|
|
216
|
-
max_prompts=args.
|
|
214
|
+
results = bench_telegraph.run_telegraph_bench(
|
|
215
|
+
client, TELEGRAPH_CORPUS,
|
|
216
|
+
max_prompts=args.telegraph_max_prompts,
|
|
217
217
|
on_progress=_progress,
|
|
218
218
|
)
|
|
219
219
|
|
|
220
220
|
rates, sourced_on = load_pricing(PRICING_PATH)
|
|
221
221
|
sonnet_rates = rates.get("sonnet", {"input": 0.0, "output": 0.0})
|
|
222
222
|
|
|
223
|
-
report =
|
|
223
|
+
report = build_telegraph_report(
|
|
224
224
|
results=results,
|
|
225
|
-
corpus_path_rel=str(
|
|
225
|
+
corpus_path_rel=str(TELEGRAPH_CORPUS.relative_to(REPO_ROOT)),
|
|
226
226
|
generated_at=utc_now_iso(),
|
|
227
227
|
bench_run_version=BENCH_RUN_VERSION,
|
|
228
228
|
model=model,
|
|
@@ -232,27 +232,27 @@ def _run_caveman(args: argparse.Namespace) -> int:
|
|
|
232
232
|
)
|
|
233
233
|
|
|
234
234
|
stamp = args.stamp or utc_now_filename_stamp()
|
|
235
|
-
json_path, md_path = report_paths(REPORTS_DIR, args.
|
|
236
|
-
# Override:
|
|
237
|
-
fixed_json = REPORTS_DIR / f"{args.
|
|
238
|
-
fixed_md = REPORTS_DIR / f"{args.
|
|
235
|
+
json_path, md_path = report_paths(REPORTS_DIR, args.telegraph_report_tag, stamp)
|
|
236
|
+
# Override: telegraph roadmap pins the filename to `telegraph-v1.{json,md}` (no stamp).
|
|
237
|
+
fixed_json = REPORTS_DIR / f"{args.telegraph_report_tag}.json"
|
|
238
|
+
fixed_md = REPORTS_DIR / f"{args.telegraph_report_tag}.md"
|
|
239
239
|
|
|
240
240
|
if not args.no_write:
|
|
241
241
|
write_json(fixed_json, report)
|
|
242
242
|
fixed_md.parent.mkdir(parents=True, exist_ok=True)
|
|
243
|
-
fixed_md.write_text(
|
|
243
|
+
fixed_md.write_text(render_telegraph_markdown(report), encoding="utf-8")
|
|
244
244
|
# Also drop a timestamped copy for the cadence trail.
|
|
245
245
|
write_json(json_path, report)
|
|
246
246
|
json_path.with_suffix(".md").write_text(
|
|
247
|
-
|
|
247
|
+
render_telegraph_markdown(report), encoding="utf-8"
|
|
248
248
|
)
|
|
249
249
|
|
|
250
250
|
cost = report["cost"]
|
|
251
251
|
headline = (
|
|
252
|
-
f"
|
|
252
|
+
f"telegraph · prompts {report['corpus']['prompt_count']} · "
|
|
253
253
|
f"calls {cost['totals']['calls']} · errors {cost['totals']['errors']} · "
|
|
254
|
-
f"vs_raw med {report['
|
|
255
|
-
f"vs_terse med {report['
|
|
254
|
+
f"vs_raw med {report['telegraph']['aggregate']['savings_vs_raw']['median']:.2%} · "
|
|
255
|
+
f"vs_terse med {report['telegraph']['aggregate']['savings_vs_terse']['median']:.2%} · "
|
|
256
256
|
f"cost ${cost['totals']['total_cost_usd']:.6f}"
|
|
257
257
|
)
|
|
258
258
|
if args.quiet:
|
|
@@ -260,7 +260,7 @@ def _run_caveman(args: argparse.Namespace) -> int:
|
|
|
260
260
|
if not args.no_write:
|
|
261
261
|
print(f"report: {fixed_md.relative_to(REPO_ROOT)}")
|
|
262
262
|
else:
|
|
263
|
-
print(
|
|
263
|
+
print(render_telegraph_markdown(report))
|
|
264
264
|
if not args.no_write:
|
|
265
265
|
print(f"\n→ json: {fixed_json.relative_to(REPO_ROOT)}")
|
|
266
266
|
print(f"→ markdown: {fixed_md.relative_to(REPO_ROOT)}")
|
package/scripts/bench_runner.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"""Bench runner for the eval corpora — step-4 measurement-and-benchmark Phase 1.
|
|
3
3
|
|
|
4
4
|
Deterministic, no-API skill-selection baseline. For each prompt in a
|
|
5
|
-
corpus YAML, ranks the 210 skills in `.agent-src.
|
|
5
|
+
corpus YAML, ranks the 210 skills in `.agent-src.uncondensed/skills/`
|
|
6
6
|
by keyword overlap between the prompt text and each skill's
|
|
7
7
|
`description` frontmatter field. Reports selection accuracy as
|
|
8
8
|
`top-K contains >= 1 expected_skill`.
|
|
@@ -33,7 +33,7 @@ except ImportError:
|
|
|
33
33
|
sys.exit(2)
|
|
34
34
|
|
|
35
35
|
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
36
|
-
SKILLS_DIR = REPO_ROOT / ".agent-src.
|
|
36
|
+
SKILLS_DIR = REPO_ROOT / ".agent-src.uncondensed" / "skills"
|
|
37
37
|
CORPUS_DIR = REPO_ROOT / "tests" / "eval"
|
|
38
38
|
|
|
39
39
|
STOPWORDS = frozenset({
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# bootstrap.sh — Thin Bash entry for the v4 unified setup wizard.
|
|
3
|
+
#
|
|
4
|
+
# road-to-unified-setup § C1. Replaces the legacy Python boot path.
|
|
5
|
+
# Flow:
|
|
6
|
+
# 1. Verify Node ≥ 20.11.0 (the package engines bound).
|
|
7
|
+
# 2. Launch `npx @event4u/agent-config <subcommand>` in the background.
|
|
8
|
+
# 3. Tail stdout for the `WIZARD_READY <url>` marker (Phase B4).
|
|
9
|
+
# 4. Open the URL in the user's browser (best-effort; no fatal error
|
|
10
|
+
# when no `open` / `xdg-open` is available — print the URL instead).
|
|
11
|
+
# 5. Wait for the server process so Ctrl-C tears the wizard down cleanly.
|
|
12
|
+
#
|
|
13
|
+
# Usage:
|
|
14
|
+
# scripts/bootstrap.sh install # default — install wizard
|
|
15
|
+
# scripts/bootstrap.sh setup
|
|
16
|
+
# scripts/bootstrap.sh setup --no-extended
|
|
17
|
+
# AGENT_CONFIG_NO_OPEN=1 scripts/bootstrap.sh install # CI / headless
|
|
18
|
+
#
|
|
19
|
+
# Exit codes:
|
|
20
|
+
# 0 — wizard process exited cleanly
|
|
21
|
+
# 1 — Node missing or below the engines bound
|
|
22
|
+
# 2 — WIZARD_READY did not arrive within 30 seconds
|
|
23
|
+
# 3 — npx invocation failed before the marker
|
|
24
|
+
set -euo pipefail
|
|
25
|
+
|
|
26
|
+
MIN_NODE_MAJOR=20
|
|
27
|
+
MIN_NODE_MINOR=11
|
|
28
|
+
TIMEOUT_SECONDS=30
|
|
29
|
+
SUBCOMMAND="${1:-install}"
|
|
30
|
+
shift || true
|
|
31
|
+
|
|
32
|
+
if ! command -v node >/dev/null 2>&1; then
|
|
33
|
+
echo "error: Node.js not found in PATH (need ≥ ${MIN_NODE_MAJOR}.${MIN_NODE_MINOR}.0)." >&2
|
|
34
|
+
echo "install Node first — https://nodejs.org/" >&2
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
NODE_VERSION="$(node -p 'process.versions.node')"
|
|
39
|
+
NODE_MAJOR="${NODE_VERSION%%.*}"
|
|
40
|
+
NODE_MINOR="$(node -p 'process.versions.node.split(".")[1]')"
|
|
41
|
+
if [ "${NODE_MAJOR}" -lt "${MIN_NODE_MAJOR}" ] \
|
|
42
|
+
|| { [ "${NODE_MAJOR}" -eq "${MIN_NODE_MAJOR}" ] && [ "${NODE_MINOR}" -lt "${MIN_NODE_MINOR}" ]; }; then
|
|
43
|
+
echo "error: Node ${NODE_VERSION} is below the required ${MIN_NODE_MAJOR}.${MIN_NODE_MINOR}.0." >&2
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
PIPE="$(mktemp -u "${TMPDIR:-/tmp}/agent-config-bootstrap.XXXXXX")"
|
|
48
|
+
mkfifo "${PIPE}"
|
|
49
|
+
trap 'rm -f "${PIPE}"' EXIT
|
|
50
|
+
|
|
51
|
+
# Always pass --no-open here — the bootstrap script owns the browser
|
|
52
|
+
# launch so it can defer it until after WIZARD_READY arrives.
|
|
53
|
+
npx --yes @event4u/agent-config "${SUBCOMMAND}" --no-open "$@" >"${PIPE}" 2>&1 &
|
|
54
|
+
NPX_PID=$!
|
|
55
|
+
|
|
56
|
+
URL=""
|
|
57
|
+
DEADLINE=$(( $(date +%s) + TIMEOUT_SECONDS ))
|
|
58
|
+
while IFS= read -r line; do
|
|
59
|
+
printf '%s\n' "${line}"
|
|
60
|
+
if [[ "${line}" == WIZARD_READY\ * ]]; then
|
|
61
|
+
URL="${line#WIZARD_READY }"
|
|
62
|
+
break
|
|
63
|
+
fi
|
|
64
|
+
if [ "$(date +%s)" -ge "${DEADLINE}" ]; then
|
|
65
|
+
echo "error: WIZARD_READY did not arrive within ${TIMEOUT_SECONDS}s." >&2
|
|
66
|
+
kill "${NPX_PID}" 2>/dev/null || true
|
|
67
|
+
exit 2
|
|
68
|
+
fi
|
|
69
|
+
done <"${PIPE}" &
|
|
70
|
+
READER_PID=$!
|
|
71
|
+
|
|
72
|
+
# If npx died before we saw the marker, surface the failure.
|
|
73
|
+
if ! kill -0 "${NPX_PID}" 2>/dev/null; then
|
|
74
|
+
wait "${READER_PID}" || true
|
|
75
|
+
echo "error: npx exited before WIZARD_READY arrived." >&2
|
|
76
|
+
exit 3
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
wait "${READER_PID}" || true
|
|
80
|
+
|
|
81
|
+
if [ -z "${URL}" ]; then
|
|
82
|
+
echo "error: server did not emit WIZARD_READY." >&2
|
|
83
|
+
kill "${NPX_PID}" 2>/dev/null || true
|
|
84
|
+
exit 2
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
if [ -z "${AGENT_CONFIG_NO_OPEN:-}" ]; then
|
|
88
|
+
if command -v open >/dev/null 2>&1; then
|
|
89
|
+
open "${URL}" || true
|
|
90
|
+
elif command -v xdg-open >/dev/null 2>&1; then
|
|
91
|
+
xdg-open "${URL}" >/dev/null 2>&1 || true
|
|
92
|
+
else
|
|
93
|
+
echo "info: open the wizard manually: ${URL}"
|
|
94
|
+
fi
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
# Keep streaming stdout so the user sees server logs until Ctrl-C.
|
|
98
|
+
cat "${PIPE}" &
|
|
99
|
+
wait "${NPX_PID}"
|
|
@@ -15,7 +15,7 @@ Customize → Skills). One ZIP per skill, sandbox-friendly.
|
|
|
15
15
|
- Optional siblings: `references/`, `assets/`, `scripts/`, `evals/`
|
|
16
16
|
(only the first three are bundled; `evals/` is local-tooling-only)
|
|
17
17
|
- Tier classification from `audit_cloud_compatibility.py` (matched by
|
|
18
|
-
skill basename —
|
|
18
|
+
skill basename — uncondensed and condensed share names)
|
|
19
19
|
|
|
20
20
|
## Outputs
|
|
21
21
|
|
|
@@ -58,7 +58,7 @@ ships only the cloud-side instructions, not the full local rule.
|
|
|
58
58
|
## Sandbox path-swap
|
|
59
59
|
|
|
60
60
|
Body text is preprocessed:
|
|
61
|
-
- Literal `.agent-src.
|
|
61
|
+
- Literal `.agent-src.uncondensed/` and `.agent-src/` → `source/` note
|
|
62
62
|
- Literal `agents/` (path prefix only, not prose) → `(local-only)` note
|
|
63
63
|
- Cloud header prepended explaining the constraint
|
|
64
64
|
|
|
@@ -114,13 +114,13 @@ MARKER_LINE_RE = re.compile(
|
|
|
114
114
|
# Body preprocessing — sandbox path-swap.
|
|
115
115
|
#
|
|
116
116
|
# Scope: only package-internal prefixes that are unreachable from a cloud
|
|
117
|
-
# sandbox (`.agent-src.
|
|
117
|
+
# sandbox (`.agent-src.uncondensed/`, `.agent-src/`). `agents/` is left
|
|
118
118
|
# unchanged — it lives in the user's repo, the SANDBOX_NOTE header
|
|
119
119
|
# already tells the agent the host has no access.
|
|
120
120
|
PATH_SWAP_PATTERNS = [
|
|
121
|
-
(re.compile(r"`\.agent-src\.
|
|
121
|
+
(re.compile(r"`\.agent-src\.uncondensed/"), "`<package-source>/"),
|
|
122
122
|
(re.compile(r"`\.agent-src/"), "`<package-source>/"),
|
|
123
|
-
(re.compile(r"\(\.agent-src\.
|
|
123
|
+
(re.compile(r"\(\.agent-src\.uncondensed/"), "(<package-source>/"),
|
|
124
124
|
(re.compile(r"\(\.agent-src/"), "(<package-source>/"),
|
|
125
125
|
]
|
|
126
126
|
|
|
@@ -158,7 +158,7 @@ def load_tier_map() -> dict[str, dict]:
|
|
|
158
158
|
for row in audit.scan():
|
|
159
159
|
if row["kind"] != "skills":
|
|
160
160
|
continue
|
|
161
|
-
# row["path"] = .agent-src.
|
|
161
|
+
# row["path"] = .agent-src.uncondensed/skills/<name>/SKILL.md
|
|
162
162
|
parts = Path(row["path"]).parts
|
|
163
163
|
if len(parts) >= 3:
|
|
164
164
|
tier_map[parts[2]] = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""Release-time discovery scanner — produces discovery-manifest.json.
|
|
3
3
|
|
|
4
|
-
Walks the trusted-root tree (`.agent-src.
|
|
4
|
+
Walks the trusted-root tree (`.agent-src.uncondensed/`), extracts the
|
|
5
5
|
five Phase-4 frontmatter keys (`workspaces`, `packs`, `lifecycle`,
|
|
6
6
|
`trust`, `install`), validates each value against the closed vocabulary
|
|
7
7
|
in `config/discovery/*.yml`, and emits a deterministic JSON manifest
|
|
@@ -29,7 +29,7 @@ from validate_frontmatter import _FRONTMATTER_RE, parse_frontmatter # noqa: E40
|
|
|
29
29
|
from _lib.agent_src import artefact_roots, logical_relpath, resolve_logical, strip_source_prefix # noqa: E402
|
|
30
30
|
|
|
31
31
|
ROOT = Path(__file__).resolve().parents[1]
|
|
32
|
-
SRC = ROOT / ".agent-src.
|
|
32
|
+
SRC = ROOT / ".agent-src.uncondensed"
|
|
33
33
|
VOCAB_DIR = ROOT / "config" / "discovery"
|
|
34
34
|
DEFAULT_OUT = ROOT / "dist" / "discovery" / "discovery-manifest.json"
|
|
35
35
|
DEFAULT_SUMMARY = ROOT / "dist" / "discovery" / "discovery-manifest.summary.md"
|
|
@@ -38,7 +38,7 @@ DEFAULT_TRUST_REPORT = ROOT / "dist" / "discovery" / "trust-report.md"
|
|
|
38
38
|
DEFAULT_ORPHAN_REPORT = ROOT / "dist" / "discovery" / "orphan-report.md"
|
|
39
39
|
DEFAULT_WORKSPACES_JSON = ROOT / "dist" / "discovery" / "workspaces.json"
|
|
40
40
|
DEFAULT_PACKS_JSON = ROOT / "dist" / "discovery" / "packs.json"
|
|
41
|
-
TRUST_ROOTS = (".agent-src.
|
|
41
|
+
TRUST_ROOTS = (".agent-src.uncondensed", ".augment", ".claude", ".agent-src", "packages")
|
|
42
42
|
|
|
43
43
|
_FM_KEYS = ("workspaces", "packs", "lifecycle", "trust", "install")
|
|
44
44
|
_TRUST_REQ = ("level", "confidence", "human_review_required")
|
|
@@ -55,8 +55,8 @@ def _load_yaml(path: Path) -> Any:
|
|
|
55
55
|
def _vocab() -> tuple[list[dict[str, Any]], list[dict[str, Any]], dict[str, str]]:
|
|
56
56
|
"""Load discovery vocab. ``overrides`` keys are normalised to the
|
|
57
57
|
*current* physical repo-relative path, regardless of whether the YAML
|
|
58
|
-
lists the legacy ``.agent-src.
|
|
59
|
-
``packages/*/.agent-src.
|
|
58
|
+
lists the legacy ``.agent-src.uncondensed/...`` prefix or a
|
|
59
|
+
``packages/*/.agent-src.uncondensed/...`` prefix. The lookup site
|
|
60
60
|
(``_build``) compares against physical paths emitted by
|
|
61
61
|
``_iter_artefacts``.
|
|
62
62
|
"""
|
|
@@ -113,8 +113,8 @@ def _artefact_checksum(path: Path, fm: dict[str, Any] | None) -> str:
|
|
|
113
113
|
def _iter_artefacts() -> Iterable[tuple[Path, str]]:
|
|
114
114
|
"""Deterministic order: skills → rules → commands → templates.
|
|
115
115
|
|
|
116
|
-
Walks every source root (legacy ``.agent-src.
|
|
117
|
-
``packages/*/.agent-src.
|
|
116
|
+
Walks every source root (legacy ``.agent-src.uncondensed/`` plus any
|
|
117
|
+
``packages/*/.agent-src.uncondensed/``) so the manifest survives the
|
|
118
118
|
physical move (ADR-017). Within each category, paths are sorted by
|
|
119
119
|
their *logical* identity to keep ordering stable across moves.
|
|
120
120
|
"""
|