@event4u/agent-config 6.1.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +35 -3
- package/AGENTS.md +8 -7
- package/CHANGELOG.md +408 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +17 -15
- package/dist/agent-src/commands/agent-status.md +2 -2
- package/dist/agent-src/commands/agents/audit.md +3 -3
- package/dist/agent-src/commands/agents/init.md +1 -1
- package/dist/agent-src/commands/agents/optimize.md +4 -4
- package/dist/agent-src/commands/analyze/decision.md +108 -0
- package/dist/agent-src/commands/analyze/incident.md +120 -0
- package/dist/agent-src/commands/analyze/near-miss.md +113 -0
- package/dist/agent-src/commands/analyze/postmortem.md +130 -0
- package/dist/agent-src/commands/analyze/premortem.md +104 -0
- package/dist/agent-src/commands/analyze.md +124 -0
- package/dist/agent-src/commands/brand/identity.md +27 -0
- package/dist/agent-src/commands/brand/review.md +27 -0
- package/dist/agent-src/commands/brand/strategy.md +27 -0
- package/dist/agent-src/commands/brand/tokens.md +28 -0
- package/dist/agent-src/commands/brand/voice.md +27 -0
- package/dist/agent-src/commands/brand.md +58 -0
- package/dist/agent-src/commands/check-current-md.md +3 -3
- package/dist/agent-src/commands/condense.md +2 -2
- package/dist/agent-src/commands/council/debate.md +2 -2
- package/dist/agent-src/commands/council/default.md +45 -18
- package/dist/agent-src/commands/fix/portability.md +3 -3
- package/dist/agent-src/commands/fix/refs.md +3 -3
- package/dist/agent-src/commands/implement-ticket.md +36 -6
- package/dist/agent-src/commands/knowledge/cross-repo.md +1 -1
- package/dist/agent-src/commands/memory/add.md +1 -1
- package/dist/agent-src/commands/mission/upgrade.md +182 -0
- package/dist/agent-src/commands/optimize/skills.md +2 -2
- package/dist/agent-src/commands/orchestrate.md +1 -1
- package/dist/agent-src/commands/pr/create.md +6 -4
- package/dist/agent-src/commands/review-changes.md +8 -0
- package/dist/agent-src/commands/roadmap/materialize.md +73 -0
- package/dist/agent-src/commands/skill/preview.md +1 -1
- package/dist/agent-src/commands/skills/discover.md +1 -1
- package/dist/agent-src/commands/threat-model.md +4 -4
- package/dist/agent-src/commands/upstream-contribute.md +3 -3
- package/dist/agent-src/commands/video/from-script.md +2 -2
- package/dist/agent-src/commands/video/from-song.md +3 -3
- package/dist/agent-src/commands/video/scene.md +1 -1
- package/dist/agent-src/commands/video/storyboard.md +1 -1
- package/dist/agent-src/commands/video.md +3 -3
- package/dist/agent-src/contexts/communication/rules-auto/source-of-truth-mechanics.md +3 -3
- package/dist/agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +1 -1
- package/dist/agent-src/contexts/execution/evidence-discipline.md +153 -0
- package/dist/agent-src/contexts/execution/project-intelligence.md +264 -0
- package/dist/agent-src/contexts/execution/roadmap-process-loop.md +2 -1
- package/dist/agent-src/personas/ai-video-technical-director.md +1 -1
- package/dist/agent-src/personas/brand-strategist.md +74 -0
- package/dist/agent-src/personas/design-director.md +74 -0
- package/dist/agent-src/rules/brand-consistency.md +77 -0
- package/dist/agent-src/rules/brand-source-of-truth.md +57 -0
- package/dist/agent-src/rules/direct-answers.md +2 -0
- package/dist/agent-src/rules/domain-safety-disclaimer.md +2 -0
- package/dist/agent-src/rules/git-history-discipline.md +1 -0
- package/dist/agent-src/rules/icon-consistency.md +53 -0
- package/dist/agent-src/rules/image-likeness-and-rights.md +67 -0
- package/dist/agent-src/rules/lethal-trifecta-guard.md +1 -1
- package/dist/agent-src/rules/persona-governance.md +2 -2
- package/dist/agent-src/rules/provider-lifecycle-discipline.md +3 -1
- package/dist/agent-src/rules/roadmap-progress-sync.md +10 -0
- package/dist/agent-src/rules/security-sensitive-stop.md +9 -3
- package/dist/agent-src/rules/size-enforcement.md +1 -1
- package/dist/agent-src/rules/source-confidentiality.md +3 -3
- package/dist/agent-src/rules/source-discovery-gate.md +98 -0
- package/dist/agent-src/rules/think-before-action.md +1 -0
- package/dist/agent-src/rules/ui-audit-gate.md +2 -0
- package/dist/agent-src/rules/untrusted-input-defense.md +1 -1
- package/dist/agent-src/rules/user-interaction.md +1 -1
- package/dist/agent-src/scripts/archive_completed_roadmaps.ts +392 -0
- package/dist/agent-src/scripts/update_roadmap_progress.ts +824 -0
- package/dist/agent-src/skills/adr-create/SKILL.md +5 -5
- package/dist/agent-src/skills/agent-security-review/evals/triggers.json +1 -0
- package/dist/agent-src/skills/agents-md-thin-root/SKILL.md +1 -1
- package/dist/agent-src/skills/ai-council/SKILL.md +1 -1
- package/dist/agent-src/skills/analysis-autonomous-mode/SKILL.md +9 -13
- package/dist/agent-src/skills/blade-ui/SKILL.md +12 -5
- package/dist/agent-src/skills/blameless-post-mortem/SKILL.md +199 -0
- package/dist/agent-src/skills/brand/ATTRIBUTION.md +38 -0
- package/dist/agent-src/skills/brand/SKILL.md +115 -0
- package/dist/agent-src/skills/brand/data/archetypes.csv +13 -0
- package/dist/agent-src/skills/brand/data/color-psychology.csv +14 -0
- package/dist/agent-src/skills/brand/data/logo-style-fit.csv +13 -0
- package/dist/agent-src/skills/brand/data/manifest.json +226 -0
- package/dist/agent-src/skills/brand/data/messaging-frameworks.csv +13 -0
- package/dist/agent-src/skills/brand/data/naming-patterns.csv +13 -0
- package/dist/agent-src/skills/brand/data/typography-principles.csv +13 -0
- package/dist/agent-src/skills/brand/data/voice-tone.csv +13 -0
- package/dist/agent-src/skills/brand/evals/triggers.json +17 -0
- package/dist/agent-src/skills/brand-asset-generation/SKILL.md +89 -0
- package/dist/agent-src/skills/brand-asset-generation/evals/triggers.json +17 -0
- package/dist/agent-src/skills/brand-audit/SKILL.md +67 -0
- package/dist/agent-src/skills/brand-audit/evals/triggers.json +17 -0
- package/dist/agent-src/skills/brand-identity/SKILL.md +101 -0
- package/dist/agent-src/skills/brand-identity/evals/triggers.json +17 -0
- package/dist/agent-src/skills/brand-strategy/SKILL.md +83 -0
- package/dist/agent-src/skills/brand-strategy/evals/triggers.json +17 -0
- package/dist/agent-src/skills/brand-to-tokens/SKILL.md +102 -0
- package/dist/agent-src/skills/brand-to-tokens/evals/triggers.json +17 -0
- package/dist/agent-src/skills/brand-to-tokens/templates/marp-brand-deck.md.example +46 -0
- package/dist/agent-src/skills/brand-to-tokens/templates/reveal-brand-deck.yaml +32 -0
- package/dist/agent-src/skills/canvas-design/evals/triggers.json +1 -0
- package/dist/agent-src/skills/check-refs/SKILL.md +5 -5
- package/dist/agent-src/skills/code-review/SKILL.md +6 -15
- package/dist/agent-src/skills/command-writing/SKILL.md +2 -2
- package/dist/agent-src/skills/complexity-first-planning/evals/triggers.json +1 -0
- package/dist/agent-src/skills/context-authoring/SKILL.md +2 -2
- package/dist/agent-src/skills/context-document/SKILL.md +35 -2
- package/dist/agent-src/skills/corpus-grounding/evals/triggers.json +1 -0
- package/dist/agent-src/skills/corpus-grounding/scripts/bm25_search.ts +482 -0
- package/dist/agent-src/skills/corpus-grounding/scripts/decision_engine.ts +803 -0
- package/dist/agent-src/skills/corpus-grounding/scripts/ground.ts +541 -0
- package/dist/agent-src/skills/corpus-grounding/scripts/schema_validator.ts +309 -0
- package/dist/agent-src/skills/database/SKILL.md +26 -4
- package/dist/agent-src/skills/decision-record/SKILL.md +1 -1
- package/dist/agent-src/skills/decision-record/evals/triggers.json +17 -0
- package/dist/agent-src/skills/decision-review/SKILL.md +179 -0
- package/dist/agent-src/skills/description-assist/SKILL.md +1 -1
- package/dist/agent-src/skills/design-intelligence/SKILL.md +1 -1
- package/dist/agent-src/skills/design-intelligence/data/manifest.json +23 -6
- package/dist/agent-src/skills/design-intelligence/evals/triggers.json +1 -0
- package/dist/agent-src/skills/design-tokens/evals/triggers.json +1 -0
- package/dist/agent-src/skills/design-tokens/scripts/tokens.ts +888 -0
- package/dist/agent-src/skills/doc-coauthoring/evals/triggers.json +1 -0
- package/dist/agent-src/skills/eloquent/evals/triggers.json +1 -0
- package/dist/agent-src/skills/emit-tickets/SKILL.md +198 -0
- package/dist/agent-src/skills/estimate-ticket/evals/triggers.json +1 -0
- package/dist/agent-src/skills/git-workflow/SKILL.md +33 -0
- package/dist/agent-src/skills/guideline-writing/SKILL.md +2 -2
- package/dist/agent-src/skills/iconography/SKILL.md +88 -0
- package/dist/agent-src/skills/iconography/evals/triggers.json +17 -0
- package/dist/agent-src/skills/image-analyser/evals/triggers.json +1 -0
- package/dist/agent-src/skills/image-creator/evals/triggers.json +1 -0
- package/dist/agent-src/skills/image-editing/SKILL.md +100 -0
- package/dist/agent-src/skills/image-editing/evals/triggers.json +17 -0
- package/dist/agent-src/skills/image-generation/SKILL.md +95 -0
- package/dist/agent-src/skills/image-generation/evals/triggers.json +17 -0
- package/dist/agent-src/skills/image-provider-routing/SKILL.md +96 -0
- package/dist/agent-src/skills/image-provider-routing/evals/triggers.json +17 -0
- package/dist/agent-src/skills/launch-readiness/SKILL.md +21 -0
- package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +12 -8
- package/dist/agent-src/skills/lint-skills/SKILL.md +5 -5
- package/dist/agent-src/skills/logo-generation/SKILL.md +98 -0
- package/dist/agent-src/skills/logo-generation/evals/triggers.json +17 -0
- package/dist/agent-src/skills/markitdown/SKILL.md +1 -1
- package/dist/agent-src/skills/md-language-check/SKILL.md +1 -1
- package/dist/agent-src/skills/motion-choreographer/SKILL.md +1 -1
- package/dist/agent-src/skills/php-coder/evals/triggers.json +1 -0
- package/dist/agent-src/skills/prediction-pool-optimizer/evals/triggers.json +1 -0
- package/dist/agent-src/skills/premortem/SKILL.md +137 -0
- package/dist/agent-src/skills/prompt-engineering-image/SKILL.md +115 -0
- package/dist/agent-src/skills/prompt-engineering-image/evals/triggers.json +17 -0
- package/dist/agent-src/skills/prompt-validator/evals/triggers.json +1 -0
- package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +12 -5
- package/dist/agent-src/skills/react-shadcn-ui/scripts/shadcn_add.ts +388 -0
- package/dist/agent-src/skills/reasoning-orchestrator/SKILL.md +1 -1
- package/dist/agent-src/skills/reasoning-orchestrator/evals/triggers.json +1 -0
- package/dist/agent-src/skills/refine-ticket/evals/triggers.json +1 -0
- package/dist/agent-src/skills/roadmap-management/SKILL.md +16 -3
- package/dist/agent-src/skills/roadmap-writing/SKILL.md +76 -0
- package/dist/agent-src/skills/root-cause-frameworks/SKILL.md +146 -0
- package/dist/agent-src/skills/rule-refactor/SKILL.md +9 -9
- package/dist/agent-src/skills/rule-writing/SKILL.md +7 -7
- package/dist/agent-src/skills/script-writing/SKILL.md +2 -2
- package/dist/agent-src/skills/security-audit/SKILL.md +5 -0
- package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +19 -3
- package/dist/agent-src/skills/skill-management/SKILL.md +3 -3
- package/dist/agent-src/skills/skill-reviewer/SKILL.md +1 -1
- package/dist/agent-src/skills/skill-writing/SKILL.md +5 -5
- package/dist/agent-src/skills/skill-writing/evals/triggers.json +1 -0
- package/dist/agent-src/skills/source-discovery/SKILL.md +182 -0
- package/dist/agent-src/skills/standards-from-config/SKILL.md +93 -0
- package/dist/agent-src/skills/systematic-debugging/SKILL.md +7 -0
- package/dist/agent-src/skills/tailwind-engineer/scripts/tailwind_config_gen.ts +561 -0
- package/dist/agent-src/skills/threat-modeling/SKILL.md +1 -0
- package/dist/agent-src/skills/typography-system/SKILL.md +138 -0
- package/dist/agent-src/skills/typography-system/evals/triggers.json +17 -0
- package/dist/agent-src/skills/upstream-contribute/SKILL.md +3 -3
- package/dist/agent-src/skills/verify-repair-loop/SKILL.md +209 -0
- package/dist/agent-src/skills/verify-repair-loop/evals/output-schema.yml +20 -0
- package/dist/agent-src/skills/verify-repair-loop/evals/triggers.json +17 -0
- package/dist/agent-src/templates/agent-settings.md +7 -0
- package/dist/agent-src/templates/contexts/knowledge-card.md +69 -0
- package/dist/agent-src/templates/contexts/lesson-card.md +73 -0
- package/dist/agent-src/templates/roadmaps.md +29 -1
- package/dist/agent-src/templates/scripts/README.md +6 -6
- package/dist/agent-src/templates/scripts/check_memory.ts +640 -0
- package/dist/agent-src/templates/scripts/check_memory_proposal.ts +351 -0
- package/dist/agent-src/templates/scripts/implement_ticket/__main__.ts +27 -0
- package/dist/agent-src/templates/scripts/memory_hash.ts +333 -0
- package/dist/agent-src/templates/scripts/memory_lookup.ts +1067 -0
- package/dist/agent-src/templates/scripts/memory_report.ts +846 -0
- package/dist/agent-src/templates/scripts/memory_signal.ts +422 -0
- package/dist/agent-src/templates/scripts/memory_status.ts +191 -0
- package/dist/agent-src/templates/scripts/pr_review_routing.ts +523 -0
- package/dist/agent-src/templates/scripts/pr_risk_review.ts +0 -0
- package/dist/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
- package/dist/agent-src/templates/scripts/telemetry/boundary.ts +164 -0
- package/dist/agent-src/templates/scripts/telemetry/engagement.ts +479 -0
- package/dist/agent-src/templates/scripts/telemetry/report_renderer.ts +394 -0
- package/dist/agent-src/templates/scripts/telemetry/settings.ts +210 -0
- package/dist/agent-src/templates/scripts/telemetry_record.ts +255 -0
- package/dist/agent-src/templates/scripts/telemetry_report.ts +189 -0
- package/dist/agent-src/templates/scripts/telemetry_status.ts +312 -0
- package/dist/agent-src/templates/scripts/tier_usage_report.ts +597 -0
- package/dist/agent-src/templates/scripts/work_engine/__main__.ts +14 -0
- package/dist/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +1118 -0
- package/dist/agent-src/templates/scripts/work_engine/_lib/user_global_paths.ts +329 -0
- package/dist/agent-src/templates/scripts/work_engine/cli.ts +206 -0
- package/dist/agent-src/templates/scripts/work_engine/cli_args.ts +249 -0
- package/dist/agent-src/templates/scripts/work_engine/delivery_state.ts +225 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/analyze.ts +125 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/implement.ts +189 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/index.ts +94 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/memory.ts +193 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/plan.ts +267 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/refine.ts +518 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/report.ts +379 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/test.ts +268 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/verify.ts +258 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/index.ts +32 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/mixed/contract.ts +243 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/mixed/index.ts +108 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/mixed/stitch.ts +259 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/mixed/ui.ts +216 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/_passthrough.ts +40 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/app_spec.ts +241 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +216 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/audit.ts +506 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/design.ts +325 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/index.ts +102 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +462 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/review.ts +474 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +352 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/_skipped.ts +33 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/apply.ts +213 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/index.ts +111 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/refine.ts +126 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/report.ts +112 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/test.ts +164 -0
- package/dist/agent-src/templates/scripts/work_engine/dispatcher.ts +515 -0
- package/dist/agent-src/templates/scripts/work_engine/emitters.ts +119 -0
- package/dist/agent-src/templates/scripts/work_engine/errors.ts +24 -0
- package/dist/agent-src/templates/scripts/work_engine/hook_bootstrap.ts +104 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/_chat_history_base.ts +176 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_append.ts +41 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_halt_append.ts +89 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/decision_gate.ts +193 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/decision_trace.ts +304 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/directive_set_guard.ts +110 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/halt_surface_audit.ts +118 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/index.ts +17 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.ts +161 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/state_shape_validation.ts +45 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/trace.ts +134 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/context.ts +94 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/events.ts +58 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/exceptions.ts +85 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/index.ts +27 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/registry.ts +66 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/runner.ts +90 -0
- package/dist/agent-src/templates/scripts/work_engine/hooks/settings.ts +260 -0
- package/dist/agent-src/templates/scripts/work_engine/input_builders.ts +260 -0
- package/dist/agent-src/templates/scripts/work_engine/intent/classify.ts +466 -0
- package/dist/agent-src/templates/scripts/work_engine/migration/v0_to_v1.ts +531 -0
- package/dist/agent-src/templates/scripts/work_engine/orchestration.ts +366 -0
- package/dist/agent-src/templates/scripts/work_engine/persona_policy.ts +97 -0
- package/dist/agent-src/templates/scripts/work_engine/resolvers/diff.ts +135 -0
- package/dist/agent-src/templates/scripts/work_engine/resolvers/file.ts +175 -0
- package/dist/agent-src/templates/scripts/work_engine/resolvers/prompt.ts +115 -0
- package/dist/agent-src/templates/scripts/work_engine/scoring/confidence.ts +415 -0
- package/dist/agent-src/templates/scripts/work_engine/scoring/decision_engine.ts +466 -0
- package/dist/agent-src/templates/scripts/work_engine/scoring/decision_trace.ts +298 -0
- package/dist/agent-src/templates/scripts/work_engine/scoring/memory_visibility.ts +444 -0
- package/dist/agent-src/templates/scripts/work_engine/stack/detect.ts +252 -0
- package/dist/agent-src/templates/scripts/work_engine/stack/runner.ts +745 -0
- package/dist/agent-src/templates/scripts/work_engine/state.ts +1151 -0
- package/dist/agent-src/templates/scripts/work_engine/state_io.ts +413 -0
- package/dist/agent-src/templates/tickets.md +120 -0
- package/dist/cli/commands/commands.js +2 -2
- package/dist/cli/commands/commands.js.map +1 -1
- package/dist/cli/commands/doctorShell.js +4 -22
- package/dist/cli/commands/doctorShell.js.map +1 -1
- package/dist/cli/commands/packs.js +1 -1
- package/dist/cli/commands/packs.js.map +1 -1
- package/dist/cli/commands/recordTriggerEval.js +179 -0
- package/dist/cli/commands/recordTriggerEval.js.map +1 -0
- package/dist/cli/commands/recordTriggerEval.test.js +113 -0
- package/dist/cli/commands/recordTriggerEval.test.js.map +1 -0
- package/dist/cli/commands/workspaces.js +1 -1
- package/dist/cli/commands/workspaces.js.map +1 -1
- package/dist/cli/main.js +22 -1
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/python/knowledge_ingest.js +1048 -0
- package/dist/cli/python/knowledge_ingest.js.map +1 -0
- package/dist/cli/python/workspace_analytics.js +1085 -0
- package/dist/cli/python/workspace_analytics.js.map +1 -0
- package/dist/cli/python/workspace_crypto.js +544 -0
- package/dist/cli/python/workspace_crypto.js.map +1 -0
- package/dist/cli/python/workspace_documents.js +1216 -0
- package/dist/cli/python/workspace_documents.js.map +1 -0
- package/dist/cli/python/workspace_drive.js +574 -0
- package/dist/cli/python/workspace_drive.js.map +1 -0
- package/dist/cli/python/workspace_drive_health.js +628 -0
- package/dist/cli/python/workspace_drive_health.js.map +1 -0
- package/dist/cli/python/workspace_explain.js +765 -0
- package/dist/cli/python/workspace_explain.js.map +1 -0
- package/dist/cli/python/workspace_hosts.js +349 -0
- package/dist/cli/python/workspace_hosts.js.map +1 -0
- package/dist/cli/python/workspace_inbox.js +692 -0
- package/dist/cli/python/workspace_inbox.js.map +1 -0
- package/dist/cli/python/workspace_render.js +816 -0
- package/dist/cli/python/workspace_render.js.map +1 -0
- package/dist/cli/python/workspace_roles.js +487 -0
- package/dist/cli/python/workspace_roles.js.map +1 -0
- package/dist/cli/python/workspace_secrets.js +180 -0
- package/dist/cli/python/workspace_secrets.js.map +1 -0
- package/dist/cli/python/workspace_sessions.js +1079 -0
- package/dist/cli/python/workspace_sessions.js.map +1 -0
- package/dist/cli/python/workspace_skills.js +417 -0
- package/dist/cli/python/workspace_skills.js.map +1 -0
- package/dist/cli/registry.js +2 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +1174 -123
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +9 -6
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +163 -15
- package/dist/discovery/trust-report.md +4 -4
- package/dist/discovery/workspaces.json +73 -12
- package/dist/install/install.mjs +13934 -0
- package/dist/mcp/registry-manifest.json +4 -4
- package/dist/router.json +1 -1
- package/dist/server/routes/wizard.js +50 -21
- package/dist/server/routes/wizard.js.map +1 -1
- package/dist/server/routes/workspace.js +44 -25
- package/dist/server/routes/workspace.js.map +1 -1
- package/dist/server/schemas/settings.js +15 -0
- package/dist/server/schemas/settings.js.map +1 -1
- package/docs/SKILL_CENSUS.md +344 -0
- package/docs/architecture/augment-projection.md +1 -1
- package/docs/architecture/multi-tool-projection.md +3 -3
- package/docs/architecture.md +37 -6
- package/docs/benchmark.md +24 -27
- package/docs/capability-matrix.md +32 -0
- package/docs/catalog.md +50 -9
- package/docs/command-naming-audit.md +60 -0
- package/docs/contracts/STABILITY.md +32 -0
- package/docs/contracts/agents-md-tech-stack.md +1 -1
- package/docs/contracts/ai-council-config.md +22 -22
- package/docs/contracts/analysis-memory-loop.md +149 -0
- package/docs/contracts/benchmark-ab-contract.md +3 -3
- package/docs/contracts/branch-protection-policy.md +27 -0
- package/docs/contracts/brand-token-consumption.md +69 -0
- package/docs/contracts/command-clusters.md +2 -1
- package/docs/contracts/command-surface-tiers.md +13 -0
- package/docs/contracts/discovery-manifest.schema.json +24 -5
- package/docs/contracts/implement-ticket-flow.md +9 -9
- package/docs/contracts/install-layout.md +249 -0
- package/docs/contracts/kernel-membership.md +1 -1
- package/docs/contracts/linear-ai-rules-inclusion.md +2 -2
- package/docs/contracts/linter-structural-model.md +1 -1
- package/docs/contracts/mcp-discovery-phase-notice.md +1 -1
- package/docs/contracts/multi-tool-projection-fidelity.md +1 -1
- package/docs/contracts/namespace.md +2 -2
- package/docs/contracts/no-runtime-boundary.md +56 -0
- package/docs/contracts/package-self-orientation.md +24 -0
- package/docs/contracts/provider-lifecycle.md +3 -3
- package/docs/contracts/reasoning-discipline-protocol.md +83 -0
- package/docs/contracts/rule-classification.md +3 -3
- package/docs/contracts/skill-domains.md +1 -1
- package/docs/contracts/smoke-contracts.md +1 -1
- package/docs/contracts/surface-tiers.md +81 -0
- package/docs/contracts/ticket-bundle-format.md +228 -0
- package/docs/cookbook.md +152 -0
- package/docs/customization.md +12 -1
- package/docs/decisions/ADR-013-discovery-frontmatter-contract.md +16 -0
- package/docs/decisions/ADR-056-unvalidated-video-adapters-disposition.md +1 -1
- package/docs/decisions/ADR-059-render-resume-filesystem-as-state.md +1 -1
- package/docs/decisions/ADR-060-comfyui-sandbox-model.md +1 -1
- package/docs/decisions/ADR-061-corpus-grounding-layer.md +48 -1
- package/docs/decisions/ADR-096-analysis-workbench.md +110 -0
- package/docs/decisions/ADR-097-mission-recipe-privilege-boundary.md +121 -0
- package/docs/decisions/ADR-098-evidence-first-structure-discovery.md +154 -0
- package/docs/decisions/ADR-099-file-first-pattern-library.md +87 -0
- package/docs/decisions/ADR-100-global-knowledge-card-sharing.md +133 -0
- package/docs/decisions/ADR-101-ticket-bundle-emission.md +109 -0
- package/docs/decisions/ADR-102-ticket-handoff-paste-and-mcp.md +72 -0
- package/docs/decisions/ADR-103-global-knowledge-default-off-until-measured.md +92 -0
- package/docs/decisions/ADR-200-python-to-typescript-migration.md +193 -0
- package/docs/decisions/INDEX.md +9 -0
- package/docs/distribution/mcp-submission-checklist.md +3 -3
- package/docs/featured-commands.md +1 -1
- package/docs/featured-skills.md +1 -1
- package/docs/getting-started-by-role.md +2 -0
- package/docs/getting-started.md +2 -2
- package/docs/guidelines/agent-infra/failure-signatures.md +35 -0
- package/docs/guidelines/agent-infra/frontier-reasoning-operating-profile.md +5 -0
- package/docs/guidelines/agent-infra/size-and-scope.md +17 -0
- package/docs/guidelines/agent-infra/skill-quality-checklist.md +2 -2
- package/docs/guides/frontend-design-corpus-refresh.md +83 -0
- package/docs/guides/skill-preview.md +1 -1
- package/docs/hook-payload-capture.md +4 -4
- package/docs/mcp.md +1 -1
- package/docs/migration/consumer-template-consumption-model.md +145 -0
- package/docs/migration/divergences/README.md +55 -0
- package/docs/migration/divergences/_template.md +50 -0
- package/docs/migration/divergences/bench-stats-float-precision.md +72 -0
- package/docs/migration/divergences/mcp-telemetry-node-sqlite.md +61 -0
- package/docs/migration/divergences/pack-mcp-content-gzip-body.md +53 -0
- package/docs/migration/divergences/src-scripts-build_cloud_bundle.md +63 -0
- package/docs/migration/divergences/src-scripts-check_memory.md +91 -0
- package/docs/migration/divergences/src-scripts-inventory_abstraction_budget.md +65 -0
- package/docs/migration/divergences/src-scripts-lint_marketplace.md +57 -0
- package/docs/migration/divergences/src-scripts-lint_mcp_registry_manifest.md +70 -0
- package/docs/migration/divergences/src-scripts-spotcheck_thin_root.md +60 -0
- package/docs/migration/divergences/src-scripts-validate_agent_settings.md +58 -0
- package/docs/migration/node-floor.md +86 -0
- package/docs/migration/yaml-roundtrip-spike.md +163 -0
- package/docs/personas.md +6 -1
- package/docs/role-experiences.md +19 -0
- package/docs/setup/per-ide/windsurf.md +1 -1
- package/docs/skills-catalog.md +24 -3
- package/docs/threat-model.md +28 -0
- package/llms.txt +23 -2
- package/package.json +10 -15
- package/src/config/agent-settings.template.yml +64 -1
- package/src/config/discovery/packs.yml +31 -0
- package/src/config/discovery/unassigned-artefacts.yml +6 -0
- package/src/config/discovery/workspaces.yml +2 -2
- package/src/config/gitignore-block.txt +7 -0
- package/src/scripts/_cli/cmd_doctor.ts +2306 -0
- package/src/scripts/_cli/cmd_explain.ts +748 -0
- package/src/scripts/_cli/cmd_export.ts +375 -0
- package/src/scripts/_cli/cmd_migrate.ts +951 -0
- package/src/scripts/_cli/cmd_prune.ts +610 -0
- package/src/scripts/_cli/cmd_refresh.ts +530 -0
- package/src/scripts/_cli/cmd_settings_check.ts +407 -0
- package/src/scripts/_cli/cmd_settings_migrate.ts +344 -0
- package/src/scripts/_cli/cmd_sync.ts +381 -0
- package/src/scripts/_cli/cmd_uninstall.ts +833 -0
- package/src/scripts/_cli/cmd_update.ts +585 -0
- package/src/scripts/_cli/cmd_upgrade.ts +390 -0
- package/src/scripts/_cli/cmd_validate.ts +394 -0
- package/src/scripts/_cli/cmd_versions.ts +492 -0
- package/src/scripts/_cli/explain_last/assumptions.ts +114 -0
- package/src/scripts/_cli/explain_last/council.ts +197 -0
- package/src/scripts/_cli/explain_last/halt.ts +73 -0
- package/src/scripts/_cli/explain_last/index.ts +155 -0
- package/src/scripts/_cli/explain_last/inputs.ts +211 -0
- package/src/scripts/_cli/explain_last/memory.ts +231 -0
- package/src/scripts/_cli/explain_last/provider.ts +82 -0
- package/src/scripts/_cli/explain_last/render.ts +54 -0
- package/src/scripts/_cli/explain_last/route.ts +70 -0
- package/src/scripts/_cli/explain_last/scrubber.ts +138 -0
- package/src/scripts/_cli/explain_last/sections/assumptions.ts +51 -0
- package/src/scripts/_cli/explain_last/sections/council.ts +56 -0
- package/src/scripts/_cli/explain_last/sections/halt.ts +60 -0
- package/src/scripts/_cli/explain_last/sections/header.ts +50 -0
- package/src/scripts/_cli/explain_last/sections/index.ts +21 -0
- package/src/scripts/_cli/explain_last/sections/inputs.ts +63 -0
- package/src/scripts/_cli/explain_last/sections/memory.ts +124 -0
- package/src/scripts/_cli/explain_last/sections/pack.ts +42 -0
- package/src/scripts/_cli/explain_last/sections/provider.ts +51 -0
- package/src/scripts/_cli/explain_last/sections/route.ts +48 -0
- package/src/scripts/_cli/explain_last/state_loader.ts +119 -0
- package/src/scripts/_dispatch.bash +179 -163
- package/src/scripts/_lib/agent_settings.ts +1123 -0
- package/src/scripts/_lib/agent_src.ts +654 -0
- package/src/scripts/_lib/agents_overlay.ts +183 -0
- package/src/scripts/_lib/bench_ab_cache.ts +399 -0
- package/src/scripts/_lib/bench_ab_scoring.ts +352 -0
- package/src/scripts/_lib/bench_ab_scoring_v2.ts +751 -0
- package/src/scripts/_lib/bench_cost.ts +396 -0
- package/src/scripts/_lib/bench_quality.ts +237 -0
- package/src/scripts/_lib/bench_report.ts +255 -0
- package/src/scripts/_lib/bench_telegraph.ts +516 -0
- package/src/scripts/_lib/bench_telegraph_report.ts +272 -0
- package/src/scripts/_lib/changelog_eras.ts +398 -0
- package/src/scripts/_lib/claude_desktop_bundler.ts +324 -0
- package/src/scripts/_lib/cli_wrapper.ts +89 -0
- package/src/scripts/_lib/fs_atomic.ts +172 -0
- package/src/scripts/_lib/global_deploy_inventory.ts +639 -0
- package/src/scripts/_lib/install_layout.ts +87 -0
- package/src/scripts/_lib/install_regenerator.ts +157 -0
- package/src/scripts/_lib/installed_lock.ts +451 -0
- package/src/scripts/_lib/installed_tools.ts +518 -0
- package/src/scripts/_lib/json_pointers.ts +388 -0
- package/src/scripts/_lib/knowledge_global.ts +770 -0
- package/src/scripts/_lib/knowledge_global_promote.ts +453 -0
- package/src/scripts/_lib/knowledge_global_redaction.ts +448 -0
- package/src/scripts/_lib/link_crypto.ts +325 -0
- package/src/scripts/_lib/linked_projects.ts +613 -0
- package/src/scripts/_lib/model_tier.ts +65 -0
- package/src/scripts/_lib/module_detection.ts +275 -0
- package/src/scripts/_lib/node_sqlite.d.ts +32 -0
- package/src/scripts/_lib/pin_resolver.ts +264 -0
- package/src/scripts/_lib/py_random.ts +212 -0
- package/src/scripts/_lib/script_output.ts +147 -0
- package/src/scripts/_lib/security_lint.ts +623 -0
- package/src/scripts/_lib/surface_tiers.ts +127 -0
- package/src/scripts/_lib/token_count.ts +126 -0
- package/src/scripts/_lib/update_check.ts +297 -0
- package/src/scripts/_lib/user_global_paths.ts +329 -0
- package/src/scripts/_lib/value_ladder.ts +882 -0
- package/src/scripts/_lib/value_report.ts +617 -0
- package/src/scripts/_lib/zip_min.ts +175 -0
- package/src/scripts/adoption_report.ts +357 -0
- package/src/scripts/adoption_snapshot.ts +392 -0
- package/src/scripts/adoption_status.ts +424 -0
- package/src/scripts/adr/regenerate_index.ts +257 -0
- package/src/scripts/ai-image/adapters/flux.sh +45 -0
- package/src/scripts/ai-image/adapters/gemini-image.sh +45 -0
- package/src/scripts/ai-image/adapters/ideogram.sh +45 -0
- package/src/scripts/ai-image/adapters/recraft.sh +47 -0
- package/src/scripts/ai-video/adapters/comfyui.sh +3 -3
- package/src/scripts/ai-video/adapters/fal.sh +3 -3
- package/src/scripts/ai-video/adapters/gemini-veo.sh +3 -3
- package/src/scripts/ai-video/adapters/higgsfield.sh +3 -3
- package/src/scripts/ai-video/adapters/kling.sh +3 -3
- package/src/scripts/ai-video/adapters/musetalk.sh +2 -2
- package/src/scripts/ai-video/adapters/openai-images.sh +3 -3
- package/src/scripts/ai-video/adapters/replicate.sh +3 -3
- package/src/scripts/ai-video/adapters/sora.sh +3 -3
- package/src/scripts/ai-video/adapters/syncso.sh +3 -3
- package/src/scripts/ai-video/audio-adapters/allin1.sh +2 -2
- package/src/scripts/ai-video/audio-adapters/whisperx.sh +2 -2
- package/src/scripts/ai-video/lib/audio-adapter-contract.md +1 -1
- package/src/scripts/ai-video/lib/embed-provenance.sh +2 -2
- package/src/scripts/ai-video/lib/ingest-song.sh +2 -2
- package/src/scripts/ai-video/lib/parse-blueprint.sh +1 -1
- package/src/scripts/ai-video/lib/resume-scan.sh +2 -2
- package/src/scripts/ai-video/smoke-trace.sh +16 -7
- package/src/scripts/ai-video/stitch.sh +2 -2
- package/src/scripts/ai_council/_default_prices.ts +73 -0
- package/src/scripts/ai_council/advisors.ts +244 -0
- package/src/scripts/ai_council/airgap.ts +249 -0
- package/src/scripts/ai_council/budget_guard.ts +492 -0
- package/src/scripts/ai_council/bundler.ts +376 -0
- package/src/scripts/ai_council/cli_hints.ts +120 -0
- package/src/scripts/ai_council/clients.ts +2214 -0
- package/src/scripts/ai_council/compile_corpus.ts +681 -0
- package/src/scripts/ai_council/confidence_gate.ts +230 -0
- package/src/scripts/ai_council/config.ts +1729 -0
- package/src/scripts/ai_council/consensus.ts +551 -0
- package/src/scripts/ai_council/events_log.ts +327 -0
- package/src/scripts/ai_council/learn_low_impact_preview.ts +317 -0
- package/src/scripts/ai_council/low_impact.ts +1069 -0
- package/src/scripts/ai_council/low_impact_corpus.ts +662 -0
- package/src/scripts/ai_council/low_impact_intake.ts +222 -0
- package/src/scripts/ai_council/modes.ts +169 -0
- package/src/scripts/ai_council/necessity.ts +933 -0
- package/src/scripts/ai_council/orchestrator.ts +1689 -0
- package/src/scripts/ai_council/pricing.ts +267 -0
- package/src/scripts/ai_council/probation_gate.ts +282 -0
- package/src/scripts/ai_council/project_context.ts +308 -0
- package/src/scripts/ai_council/prompts.ts +600 -0
- package/src/scripts/ai_council/redact_low_impact_entry.ts +291 -0
- package/src/scripts/ai_council/replay.ts +314 -0
- package/src/scripts/ai_council/session.ts +558 -0
- package/src/scripts/ai_council/shadow_dispatch.ts +509 -0
- package/src/scripts/ai_council/solo_dispatch.ts +281 -0
- package/src/scripts/analysis_freshness.ts +343 -0
- package/src/scripts/annotate_discovery.ts +288 -0
- package/src/scripts/apply_modules_config.ts +537 -0
- package/src/scripts/audit_adr_coverage.ts +357 -0
- package/src/scripts/audit_auto_rules.ts +415 -0
- package/src/scripts/audit_cloud_compatibility.ts +608 -0
- package/src/scripts/audit_command_surface.ts +1227 -0
- package/src/scripts/audit_initial_context.ts +694 -0
- package/src/scripts/audit_likelihood.ts +434 -0
- package/src/scripts/audit_mcp_tools.ts +252 -0
- package/src/scripts/audit_overlap.ts +421 -0
- package/src/scripts/audit_skill_descriptions.ts +402 -0
- package/src/scripts/audit_skill_overlap.ts +576 -0
- package/src/scripts/audit_user_type_axis.ts +264 -0
- package/src/scripts/backfill_model_tier.ts +349 -0
- package/src/scripts/bench_ab_cache_dispatch.ts +126 -0
- package/src/scripts/bench_ab_clone.ts +610 -0
- package/src/scripts/bench_ab_diff.ts +609 -0
- package/src/scripts/bench_ab_integrity.ts +261 -0
- package/src/scripts/bench_ab_run.ts +417 -0
- package/src/scripts/bench_ab_task_runner.ts +1382 -0
- package/src/scripts/bench_ab_tracka_run.ts +436 -0
- package/src/scripts/bench_ab_v2_run.ts +585 -0
- package/src/scripts/bench_ab_v2_stats.ts +1018 -0
- package/src/scripts/bench_baseline_ready.ts +326 -0
- package/src/scripts/bench_condense_memory.ts +479 -0
- package/src/scripts/bench_drift_check.ts +503 -0
- package/src/scripts/bench_per_tool.ts +591 -0
- package/src/scripts/bench_rtk_savings.ts +710 -0
- package/src/scripts/bench_run.ts +509 -0
- package/src/scripts/bench_runner.ts +519 -0
- package/src/scripts/build_cloud_bundle.ts +692 -0
- package/src/scripts/build_discovery_manifest.ts +1371 -0
- package/src/scripts/build_linear_digest.ts +368 -0
- package/src/scripts/build_mcp_registry_manifest.ts +351 -0
- package/src/scripts/build_rule_trigger_matrix.ts +469 -0
- package/src/scripts/capture_showcase_session.ts +735 -0
- package/src/scripts/chat_history.ts +2301 -0
- package/src/scripts/check_always_budget.ts +694 -0
- package/src/scripts/check_artefact_checksums.ts +281 -0
- package/src/scripts/check_augment_description_cap.ts +133 -0
- package/src/scripts/check_augmentignore.ts +108 -0
- package/src/scripts/check_beta_review_markers.ts +234 -0
- package/src/scripts/check_bite_sized_granularity.ts +116 -0
- package/src/scripts/check_cluster_patterns.ts +285 -0
- package/src/scripts/check_command_count_messaging.ts +224 -0
- package/src/scripts/check_condensation.ts +900 -0
- package/src/scripts/check_condensed_paths.ts +414 -0
- package/src/scripts/check_context_paths.ts +388 -0
- package/src/scripts/check_council_config_location.ts +260 -0
- package/src/scripts/check_council_layout.ts +180 -0
- package/src/scripts/check_council_references.ts +345 -0
- package/src/scripts/check_discovery_determinism.ts +124 -0
- package/src/scripts/check_gate_paths.ts +230 -0
- package/src/scripts/check_iron_law_prominence.ts +298 -0
- package/src/scripts/check_kernel_rule_bundle.ts +242 -0
- package/src/scripts/check_knowledge_cards.ts +759 -0
- package/src/scripts/check_md_language.ts +291 -0
- package/src/scripts/check_memory.ts +845 -0
- package/src/scripts/check_memory_proposal.ts +351 -0
- package/src/scripts/check_module_management_neutral.ts +238 -0
- package/src/scripts/check_no_conflict_markers.ts +298 -0
- package/src/scripts/check_no_conflict_markers_allowlist.json +4 -0
- package/src/scripts/check_no_external_sources.ts +351 -0
- package/src/scripts/check_no_local_settings_committed.ts +69 -0
- package/src/scripts/check_no_new_legacy_path.ts +188 -0
- package/src/scripts/check_no_roadmap_refs.ts +304 -0
- package/src/scripts/check_one_off_location.ts +165 -0
- package/src/scripts/check_overlay_cascade_subdirs.ts +188 -0
- package/src/scripts/check_portability.ts +860 -0
- package/src/scripts/check_proposal.ts +0 -0
- package/src/scripts/check_public_catalog_links.ts +204 -0
- package/src/scripts/check_public_links.ts +357 -0
- package/src/scripts/check_references.ts +963 -0
- package/src/scripts/check_release_includes_discovery.ts +94 -0
- package/src/scripts/check_release_pr_shape.ts +222 -0
- package/src/scripts/check_release_published.ts +235 -0
- package/src/scripts/check_release_trunk_sync.ts +203 -0
- package/src/scripts/check_reply_consistency.ts +359 -0
- package/src/scripts/check_roadmap_trackable.ts +268 -0
- package/src/scripts/check_role_doc_links.ts +187 -0
- package/src/scripts/check_safety_floor_untouched.ts +160 -0
- package/src/scripts/check_skill_requires.ts +205 -0
- package/src/scripts/check_structural_breaking.ts +170 -0
- package/src/scripts/check_surface_tiers.ts +567 -0
- package/src/scripts/check_template_pin_drift.ts +222 -0
- package/src/scripts/check_test_coverage_diff.ts +235 -0
- package/src/scripts/check_token_optimizer_freshness.ts +183 -0
- package/src/scripts/check_trigger_evals.ts +375 -0
- package/src/scripts/check_update_banner.ts +143 -0
- package/src/scripts/ci_status.ts +0 -0
- package/src/scripts/ci_summary.ts +235 -0
- package/src/scripts/ci_time_ratio.ts +526 -0
- package/src/scripts/command_suggester/cooldown.ts +176 -0
- package/src/scripts/command_suggester/index.ts +41 -0
- package/src/scripts/command_suggester/loader.ts +205 -0
- package/src/scripts/command_suggester/match.ts +294 -0
- package/src/scripts/command_suggester/rank.ts +201 -0
- package/src/scripts/command_suggester/render.ts +122 -0
- package/src/scripts/command_suggester/sanitize.ts +114 -0
- package/src/scripts/command_suggester/settings.ts +186 -0
- package/src/scripts/command_suggester/types.ts +0 -0
- package/src/scripts/compile_router.ts +297 -0
- package/src/scripts/condense.sh +7 -1
- package/src/scripts/condense.ts +2035 -0
- package/src/scripts/condense_memory.ts +334 -0
- package/src/scripts/config/index.ts +15 -0
- package/src/scripts/config/packs.ts +310 -0
- package/src/scripts/config/presets.ts +369 -0
- package/src/scripts/config/profile_explain.ts +114 -0
- package/src/scripts/config/profiles.ts +277 -0
- package/src/scripts/config/session_profiles.ts +1064 -0
- package/src/scripts/context_hygiene_hook.ts +272 -0
- package/src/scripts/cost_by_conversation.ts +444 -0
- package/src/scripts/cost_summary.ts +407 -0
- package/src/scripts/council_cli.ts +2827 -0
- package/src/scripts/council_prune.ts +153 -0
- package/src/scripts/cross_repo_retrieve.ts +694 -0
- package/src/scripts/discovery_stats.ts +218 -0
- package/src/scripts/evidence_report.ts +580 -0
- package/src/scripts/external_sources_denylist.json +1 -0
- package/src/scripts/extract_audit_patterns.ts +394 -0
- package/src/scripts/first_run_gate_hook.ts +246 -0
- package/src/scripts/gen_discovery_baseline.ts +297 -0
- package/src/scripts/generate_capabilities_index.ts +496 -0
- package/src/scripts/generate_capability_matrix.ts +430 -0
- package/src/scripts/generate_catalog.ts +178 -0
- package/src/scripts/generate_command_flows.ts +316 -0
- package/src/scripts/generate_cookbook.ts +302 -0
- package/src/scripts/generate_index.ts +500 -0
- package/src/scripts/generate_ownership_matrix.ts +646 -0
- package/src/scripts/generate_pack_manifests.ts +1025 -0
- package/src/scripts/generate_role_experiences_catalog.ts +265 -0
- package/src/scripts/hermetic-install.sh +22 -11
- package/src/scripts/hook_manifest.yaml +24 -10
- package/src/scripts/hooks/augment-chat-history.sh +3 -10
- package/src/scripts/hooks/augment-context-hygiene.sh +3 -10
- package/src/scripts/hooks/augment-dispatcher.sh +3 -10
- package/src/scripts/hooks/augment-onboarding-gate.sh +3 -10
- package/src/scripts/hooks/augment-roadmap-progress.sh +3 -10
- package/src/scripts/hooks/block_no_verify.ts +413 -0
- package/src/scripts/hooks/cline-dispatcher.sh +3 -10
- package/src/scripts/hooks/cowork-dispatcher.sh +3 -14
- package/src/scripts/hooks/cursor-dispatcher.sh +3 -10
- package/src/scripts/hooks/dispatch_hook.ts +851 -0
- package/src/scripts/hooks/dispatch_issues.ts +226 -0
- package/src/scripts/hooks/envelope.ts +140 -0
- package/src/scripts/hooks/gemini-dispatcher.sh +3 -8
- package/src/scripts/hooks/replay_hook.ts +364 -0
- package/src/scripts/hooks/state_io.ts +293 -0
- package/src/scripts/hooks/windsurf-dispatcher.sh +3 -9
- package/src/scripts/hooks_doctor.ts +418 -0
- package/src/scripts/hooks_status.ts +292 -0
- package/src/scripts/injection_scan_hook.ts +285 -0
- package/src/scripts/install +36 -22
- package/src/scripts/install-hooks.sh +20 -14
- package/src/scripts/install.sh +38 -14
- package/src/scripts/install.ts +4515 -0
- package/src/scripts/inventory_abstraction_budget.ts +1104 -0
- package/src/scripts/inventory_frontmatter.ts +320 -0
- package/src/scripts/inventory_meta_layers.ts +516 -0
- package/src/scripts/iron_law_sha.ts +233 -0
- package/src/scripts/knowledge_global_cli.ts +1105 -0
- package/src/scripts/linked_projects_list.ts +310 -0
- package/src/scripts/lint_agent_security.ts +224 -0
- package/src/scripts/lint_agent_skill_names.ts +241 -0
- package/src/scripts/lint_agents_layout.ts +205 -0
- package/src/scripts/lint_agents_md.ts +294 -0
- package/src/scripts/lint_archived_skills.ts +309 -0
- package/src/scripts/lint_artefact_frontmatter.ts +359 -0
- package/src/scripts/lint_bench_ab.ts +319 -0
- package/src/scripts/lint_bench_corpus.ts +421 -0
- package/src/scripts/lint_command_flow_coverage.ts +231 -0
- package/src/scripts/lint_command_routing.ts +377 -0
- package/src/scripts/lint_command_tiers.ts +345 -0
- package/src/scripts/lint_command_verbs.ts +379 -0
- package/src/scripts/lint_commit_subjects.ts +243 -0
- package/src/scripts/lint_context_spine_usage.ts +198 -0
- package/src/scripts/lint_discovery_manifest.ts +540 -0
- package/src/scripts/lint_discovery_vocabulary.ts +393 -0
- package/src/scripts/lint_empty_roadmaps.ts +147 -0
- package/src/scripts/lint_eval_freshness.ts +335 -0
- package/src/scripts/lint_examples.ts +183 -0
- package/src/scripts/lint_explain_trace.ts +381 -0
- package/src/scripts/lint_featured_skills.ts +0 -0
- package/src/scripts/lint_flows.ts +701 -0
- package/src/scripts/lint_framework_leakage.ts +497 -0
- package/src/scripts/lint_framework_leakage_allowlist.json +8 -1
- package/src/scripts/lint_frontmatter_boilerplate.ts +356 -0
- package/src/scripts/lint_ghostwriter_source.ts +389 -0
- package/src/scripts/lint_global_paths.ts +420 -0
- package/src/scripts/lint_handoffs.ts +362 -0
- package/src/scripts/lint_hidden_unicode.ts +350 -0
- package/src/scripts/lint_hook_concern_budget.ts +319 -0
- package/src/scripts/lint_hook_manifest.ts +354 -0
- package/src/scripts/lint_instruction_smuggling.ts +173 -0
- package/src/scripts/lint_load_context.ts +371 -0
- package/src/scripts/lint_marketplace.ts +286 -0
- package/src/scripts/lint_marketplace_install_completeness.ts +309 -0
- package/src/scripts/lint_mcp_config_security.ts +225 -0
- package/src/scripts/lint_mcp_registry_manifest.ts +350 -0
- package/src/scripts/lint_media_policy_linkage.ts +224 -0
- package/src/scripts/lint_missions.ts +774 -0
- package/src/scripts/lint_model_tier_coverage.ts +151 -0
- package/src/scripts/lint_namespace.ts +295 -0
- package/src/scripts/lint_namespace_collisions.ts +203 -0
- package/src/scripts/lint_new_skill_gate.ts +462 -0
- package/src/scripts/lint_no_new_atomic_commands.ts +342 -0
- package/src/scripts/lint_one_off_age.ts +348 -0
- package/src/scripts/lint_orchestration_dsl.ts +377 -0
- package/src/scripts/lint_orchestrator_auto_detect.ts +177 -0
- package/src/scripts/lint_pack_boundaries.ts +366 -0
- package/src/scripts/lint_pack_dependencies.ts +541 -0
- package/src/scripts/lint_pack_first_win.ts +202 -0
- package/src/scripts/lint_persona_governance.ts +292 -0
- package/src/scripts/lint_positioning.ts +257 -0
- package/src/scripts/lint_profile_overlay_set_only.ts +324 -0
- package/src/scripts/lint_readme_jargon.ts +189 -0
- package/src/scripts/lint_readme_size.ts +73 -0
- package/src/scripts/lint_regression.ts +497 -0
- package/src/scripts/lint_roadmap_ci_steps.ts +252 -0
- package/src/scripts/lint_roadmap_complexity.ts +295 -0
- package/src/scripts/lint_roadmap_later_disposition.ts +357 -0
- package/src/scripts/lint_role_experiences.ts +410 -0
- package/src/scripts/lint_rule_interactions.ts +281 -0
- package/src/scripts/lint_rule_tiers.ts +169 -0
- package/src/scripts/lint_showcase_sessions.ts +254 -0
- package/src/scripts/lint_skill_frontmatter_safety.ts +279 -0
- package/src/scripts/lint_skill_originality.ts +586 -0
- package/src/scripts/lint_skill_originality_allowlist.json +20 -0
- package/src/scripts/lint_skill_tools.ts +320 -0
- package/src/scripts/lint_ticket_buildable.ts +1027 -0
- package/src/scripts/lint_topics_yaml.ts +203 -0
- package/src/scripts/lint_trust_coherence.ts +377 -0
- package/src/scripts/lint_value_dashboard.ts +314 -0
- package/src/scripts/lint_workflow_security.ts +637 -0
- package/src/scripts/lint_workflow_security_allowlist.json +20 -0
- package/src/scripts/lint_workspace_boundary.ts +248 -0
- package/src/scripts/mcp_parity_smoke.ts +638 -0
- package/src/scripts/mcp_render.ts +346 -0
- package/src/scripts/mcp_server/__main__.ts +28 -0
- package/src/scripts/mcp_server/catalog.ts +154 -0
- package/src/scripts/mcp_server/index.ts +24 -0
- package/src/scripts/mcp_server/metadata.ts +83 -0
- package/src/scripts/mcp_server/prompts.ts +711 -0
- package/src/scripts/mcp_server/resources.ts +343 -0
- package/src/scripts/mcp_server/server.ts +439 -0
- package/src/scripts/mcp_server/telemetry.ts +154 -0
- package/src/scripts/mcp_server/tools.ts +1031 -0
- package/src/scripts/mcp_setup.sh +25 -52
- package/src/scripts/mcp_telemetry_health.ts +362 -0
- package/src/scripts/mcp_telemetry_query.ts +371 -0
- package/src/scripts/mcp_telemetry_store.ts +422 -0
- package/src/scripts/measure_augment_budget.ts +453 -0
- package/src/scripts/measure_density.ts +618 -0
- package/src/scripts/measure_frugality_savings.ts +353 -0
- package/src/scripts/measure_markitdown_lift.ts +299 -0
- package/src/scripts/measure_patterns.ts +682 -0
- package/src/scripts/measure_projection_bytes.ts +425 -0
- package/src/scripts/measure_rule_budget.ts +627 -0
- package/src/scripts/measure_skill_reduction.ts +442 -0
- package/src/scripts/media/lib/adapter-common.sh +247 -0
- package/src/scripts/media/lib/adapter-contract.md +329 -0
- package/src/scripts/media/lib/fixtures/comfyui/result.json +1 -0
- package/src/scripts/media/lib/fixtures/fal/result.json +1 -0
- package/src/scripts/media/lib/fixtures/flux/asset-0001.png +0 -0
- package/src/scripts/media/lib/fixtures/flux/result.json +1 -0
- package/src/scripts/media/lib/fixtures/gemini-image/asset-0001.png +0 -0
- package/src/scripts/media/lib/fixtures/gemini-image/result.json +1 -0
- package/src/scripts/media/lib/fixtures/gemini-veo/result.json +1 -0
- package/src/scripts/media/lib/fixtures/higgsfield/result.json +1 -0
- package/src/scripts/media/lib/fixtures/ideogram/asset-0001.png +0 -0
- package/src/scripts/media/lib/fixtures/ideogram/result.json +1 -0
- package/src/scripts/media/lib/fixtures/kling/result.json +1 -0
- package/src/scripts/media/lib/fixtures/musetalk/result.json +1 -0
- package/src/scripts/media/lib/fixtures/openai-images/result.json +1 -0
- package/src/scripts/media/lib/fixtures/recraft/asset-0001.svg +1 -0
- package/src/scripts/media/lib/fixtures/recraft/result.json +1 -0
- package/src/scripts/media/lib/fixtures/replicate/result.json +1 -0
- package/src/scripts/media/lib/fixtures/sora/result.json +1 -0
- package/src/scripts/media/lib/fixtures/syncso/result.json +1 -0
- package/src/scripts/media/lib/load-config.sh +180 -0
- package/src/scripts/media/lib/redact.sh +85 -0
- package/src/scripts/memory_hash.ts +331 -0
- package/src/scripts/memory_lookup.ts +1278 -0
- package/src/scripts/memory_report.ts +845 -0
- package/src/scripts/memory_signal.ts +417 -0
- package/src/scripts/memory_status.ts +189 -0
- package/src/scripts/migrate_command_suggestions.ts +341 -0
- package/src/scripts/migrate_frontmatter_defaults.ts +539 -0
- package/src/scripts/migration_status.ts +301 -0
- package/src/scripts/mine_session.ts +645 -0
- package/src/scripts/minimal_safe_diff_hook.ts +355 -0
- package/src/scripts/move_artefact.ts +869 -0
- package/src/scripts/new_skill.ts +404 -0
- package/src/scripts/onboarding_gate_hook.ts +224 -0
- package/src/scripts/pack_dependency_allowlist.json +1 -1
- package/src/scripts/pack_mcp_content.ts +552 -0
- package/src/scripts/parity/README.md +140 -0
- package/src/scripts/parity/compare.ts +189 -0
- package/src/scripts/parity/coverage_diff.ts +199 -0
- package/src/scripts/parity/phase-manifest.json +93 -0
- package/src/scripts/parity/phase_gate.ts +270 -0
- package/src/scripts/parity/replay.ts +320 -0
- package/src/scripts/pattern_share.ts +363 -0
- package/src/scripts/plan_physical_move.ts +605 -0
- package/src/scripts/prediction-pool/poisson_sim.ts +537 -0
- package/src/scripts/prediction-pool/pool_winsim.ts +677 -0
- package/src/scripts/prediction-pool/score_ev.ts +546 -0
- package/src/scripts/print_required_checks.ts +249 -0
- package/src/scripts/probe_projection_fidelity.ts +468 -0
- package/src/scripts/probe_skill_registration.ts +787 -0
- package/src/scripts/profile_staleness_hook.ts +169 -0
- package/src/scripts/profile_use.ts +227 -0
- package/src/scripts/project_thin_rules.ts +387 -0
- package/src/scripts/propose_modules_config.ts +311 -0
- package/src/scripts/prototype_lint_contradictions.ts +414 -0
- package/src/scripts/prove_pack_extractable.ts +388 -0
- package/src/scripts/readme_linter.ts +913 -0
- package/src/scripts/redact_hook_capture.ts +325 -0
- package/src/scripts/refine_ticket_detect.ts +703 -0
- package/src/scripts/release.ts +1697 -0
- package/src/scripts/render_benchmark_md.ts +664 -0
- package/src/scripts/render_value_md.ts +506 -0
- package/src/scripts/repro/repro_marketplace_install_gap.sh +1 -1
- package/src/scripts/roadmap_progress_hook.ts +410 -0
- package/src/scripts/router_telemetry.ts +972 -0
- package/src/scripts/run.ts +98 -0
- package/src/scripts/run_skill_evals.ts +477 -0
- package/src/scripts/runtime_dispatcher.ts +586 -0
- package/src/scripts/runtime_handler.ts +231 -0
- package/src/scripts/runtime_registry.ts +394 -0
- package/src/scripts/schemas/command.schema.json +3 -2
- package/src/scripts/schemas/mission-catalog.schema.json +112 -0
- package/src/scripts/schemas/mission.schema.json +87 -0
- package/src/scripts/schemas/pack.schema.json +6 -0
- package/src/scripts/schemas/rule.schema.json +1 -0
- package/src/scripts/schemas/skill.schema.json +1 -0
- package/src/scripts/schemas/ticket-manifest.schema.json +35 -0
- package/src/scripts/schemas/ticket.schema.json +60 -0
- package/src/scripts/score_skill_selection.ts +570 -0
- package/src/scripts/security_audit_config.ts +423 -0
- package/src/scripts/skill_collision_clusters.ts +448 -0
- package/src/scripts/skill_discovery.ts +690 -0
- package/src/scripts/skill_linter.ts +4276 -0
- package/src/scripts/skill_overlap.ts +414 -0
- package/src/scripts/skill_preview.ts +548 -0
- package/src/scripts/skill_tools/audit_persona_coverage.ts +427 -0
- package/src/scripts/skill_tools/audit_user_type_coverage.ts +507 -0
- package/src/scripts/skill_tools/index.ts +28 -0
- package/src/scripts/skill_tools/run_block_d_eval.ts +373 -0
- package/src/scripts/skill_tools/score_skill_relevance.ts +475 -0
- package/src/scripts/skill_tools/suggest_skill_for_task.ts +288 -0
- package/src/scripts/skill_trigger_eval.ts +1046 -0
- package/src/scripts/skill_usage_collect.ts +465 -0
- package/src/scripts/skill_usage_report.ts +364 -0
- package/src/scripts/smoke/kernel.sh +4 -5
- package/src/scripts/smoke/router.sh +76 -76
- package/src/scripts/smoke/schema.sh +2 -2
- package/src/scripts/smoke/skills.sh +73 -52
- package/src/scripts/smoke_path_resolution.ts +194 -0
- package/src/scripts/smoke_quickstart.ts +224 -0
- package/src/scripts/snapshot_agent_outputs.ts +375 -0
- package/src/scripts/spotcheck_thin_root.ts +247 -0
- package/src/scripts/surface-tiers.yml +68 -0
- package/src/scripts/sync_agent_settings.ts +763 -0
- package/src/scripts/sync_github_metadata.ts +550 -0
- package/src/scripts/sync_gitignore.ts +630 -0
- package/src/scripts/sync_yaml_rt.ts +910 -0
- package/src/scripts/telegraph_stats.ts +447 -0
- package/src/scripts/tool_registry.ts +330 -0
- package/src/scripts/tools/adapter_errors.ts +93 -0
- package/src/scripts/tools/base_adapter.ts +147 -0
- package/src/scripts/tools/github_adapter.ts +229 -0
- package/src/scripts/tools/jira_adapter.ts +196 -0
- package/src/scripts/trigger_coverage.ts +251 -0
- package/src/scripts/update_counts.ts +284 -0
- package/src/scripts/update_prices.ts +219 -0
- package/src/scripts/validate_agent_settings.ts +265 -0
- package/src/scripts/validate_decision_engine.ts +366 -0
- package/src/scripts/validate_discovery_manifest.ts +160 -0
- package/src/scripts/validate_frontmatter.ts +1030 -0
- package/src/scripts/validate_pack_yaml.ts +0 -0
- package/src/scripts/validate_safe_paths.ts +164 -0
- package/src/scripts/validate_telegraph_carveouts.ts +485 -0
- package/src/scripts/verify_before_complete_hook.ts +306 -0
- package/src/scripts/verify_physical_move.ts +411 -0
- package/src/scripts/wrapper_freshness_hook.ts +179 -0
- package/dist/agent-src/scripts/archive_completed_roadmaps.py +0 -171
- package/dist/agent-src/scripts/update_roadmap_progress.py +0 -537
- package/dist/agent-src/skills/corpus-grounding/scripts/bm25_search.py +0 -212
- package/dist/agent-src/skills/corpus-grounding/scripts/decision_engine.py +0 -438
- package/dist/agent-src/skills/corpus-grounding/scripts/ground.py +0 -166
- package/dist/agent-src/skills/corpus-grounding/scripts/schema_validator.py +0 -160
- package/dist/agent-src/skills/design-tokens/scripts/tokens.py +0 -296
- package/dist/agent-src/skills/react-shadcn-ui/scripts/shadcn_add.py +0 -299
- package/dist/agent-src/skills/tailwind-engineer/scripts/tailwind_config_gen.py +0 -463
- package/dist/agent-src/templates/scripts/check_memory.py +0 -282
- package/dist/agent-src/templates/scripts/check_memory_proposal.py +0 -180
- package/dist/agent-src/templates/scripts/implement_ticket/__init__.py +0 -94
- package/dist/agent-src/templates/scripts/implement_ticket/__main__.py +0 -15
- package/dist/agent-src/templates/scripts/memory_hash.py +0 -75
- package/dist/agent-src/templates/scripts/memory_lookup.py +0 -436
- package/dist/agent-src/templates/scripts/memory_report.py +0 -314
- package/dist/agent-src/templates/scripts/memory_signal.py +0 -165
- package/dist/agent-src/templates/scripts/memory_status.py +0 -76
- package/dist/agent-src/templates/scripts/pr_review_routing.py +0 -340
- package/dist/agent-src/templates/scripts/pr_risk_review.py +0 -211
- package/dist/agent-src/templates/scripts/telemetry/__init__.py +0 -42
- package/dist/agent-src/templates/scripts/telemetry/aggregator.py +0 -169
- package/dist/agent-src/templates/scripts/telemetry/boundary.py +0 -171
- package/dist/agent-src/templates/scripts/telemetry/engagement.py +0 -297
- package/dist/agent-src/templates/scripts/telemetry/report_renderer.py +0 -197
- package/dist/agent-src/templates/scripts/telemetry/settings.py +0 -177
- package/dist/agent-src/templates/scripts/telemetry_record.py +0 -179
- package/dist/agent-src/templates/scripts/telemetry_report.py +0 -161
- package/dist/agent-src/templates/scripts/telemetry_status.py +0 -142
- package/dist/agent-src/templates/scripts/tier_usage_report.py +0 -183
- package/dist/agent-src/templates/scripts/work_engine/__init__.py +0 -58
- package/dist/agent-src/templates/scripts/work_engine/__main__.py +0 -9
- package/dist/agent-src/templates/scripts/work_engine/_lib/__init__.py +0 -7
- package/dist/agent-src/templates/scripts/work_engine/_lib/agent_settings.py +0 -840
- package/dist/agent-src/templates/scripts/work_engine/_lib/user_global_paths.py +0 -249
- package/dist/agent-src/templates/scripts/work_engine/cli.py +0 -195
- package/dist/agent-src/templates/scripts/work_engine/cli_args.py +0 -116
- package/dist/agent-src/templates/scripts/work_engine/delivery_state.py +0 -137
- package/dist/agent-src/templates/scripts/work_engine/directives/__init__.py +0 -33
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/__init__.py +0 -98
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/analyze.py +0 -98
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/implement.py +0 -145
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/memory.py +0 -136
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/plan.py +0 -175
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/refine.py +0 -396
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/report.py +0 -227
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/test.py +0 -180
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/verify.py +0 -170
- package/dist/agent-src/templates/scripts/work_engine/directives/mixed/__init__.py +0 -116
- package/dist/agent-src/templates/scripts/work_engine/directives/mixed/contract.py +0 -254
- package/dist/agent-src/templates/scripts/work_engine/directives/mixed/stitch.py +0 -229
- package/dist/agent-src/templates/scripts/work_engine/directives/mixed/ui.py +0 -231
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/__init__.py +0 -113
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/_passthrough.py +0 -44
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.py +0 -241
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/audit.py +0 -414
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/design.py +0 -335
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/polish.py +0 -513
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/review.py +0 -471
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/__init__.py +0 -119
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/_skipped.py +0 -37
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/apply.py +0 -165
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/refine.py +0 -66
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/report.py +0 -62
- package/dist/agent-src/templates/scripts/work_engine/directives/ui_trivial/test.py +0 -115
- package/dist/agent-src/templates/scripts/work_engine/dispatcher.py +0 -331
- package/dist/agent-src/templates/scripts/work_engine/emitters.py +0 -68
- package/dist/agent-src/templates/scripts/work_engine/errors.py +0 -19
- package/dist/agent-src/templates/scripts/work_engine/hook_bootstrap.py +0 -91
- package/dist/agent-src/templates/scripts/work_engine/hooks/__init__.py +0 -54
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/__init__.py +0 -35
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/_chat_history_base.py +0 -59
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_append.py +0 -43
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_halt_append.py +0 -41
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/decision_gate.py +0 -162
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/decision_trace.py +0 -163
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/directive_set_guard.py +0 -53
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/halt_surface_audit.py +0 -50
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.py +0 -141
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/state_shape_validation.py +0 -52
- package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/trace.py +0 -84
- package/dist/agent-src/templates/scripts/work_engine/hooks/context.py +0 -66
- package/dist/agent-src/templates/scripts/work_engine/hooks/events.py +0 -44
- package/dist/agent-src/templates/scripts/work_engine/hooks/exceptions.py +0 -79
- package/dist/agent-src/templates/scripts/work_engine/hooks/registry.py +0 -60
- package/dist/agent-src/templates/scripts/work_engine/hooks/runner.py +0 -73
- package/dist/agent-src/templates/scripts/work_engine/hooks/settings.py +0 -196
- package/dist/agent-src/templates/scripts/work_engine/input_builders.py +0 -163
- package/dist/agent-src/templates/scripts/work_engine/intent/__init__.py +0 -47
- package/dist/agent-src/templates/scripts/work_engine/intent/classify.py +0 -280
- package/dist/agent-src/templates/scripts/work_engine/migration/__init__.py +0 -8
- package/dist/agent-src/templates/scripts/work_engine/migration/v0_to_v1.py +0 -231
- package/dist/agent-src/templates/scripts/work_engine/orchestration.py +0 -193
- package/dist/agent-src/templates/scripts/work_engine/persona_policy.py +0 -85
- package/dist/agent-src/templates/scripts/work_engine/resolvers/__init__.py +0 -22
- package/dist/agent-src/templates/scripts/work_engine/resolvers/diff.py +0 -106
- package/dist/agent-src/templates/scripts/work_engine/resolvers/file.py +0 -113
- package/dist/agent-src/templates/scripts/work_engine/resolvers/prompt.py +0 -90
- package/dist/agent-src/templates/scripts/work_engine/scoring/__init__.py +0 -14
- package/dist/agent-src/templates/scripts/work_engine/scoring/confidence.py +0 -300
- package/dist/agent-src/templates/scripts/work_engine/scoring/decision_engine.py +0 -351
- package/dist/agent-src/templates/scripts/work_engine/scoring/decision_trace.py +0 -141
- package/dist/agent-src/templates/scripts/work_engine/scoring/memory_visibility.py +0 -283
- package/dist/agent-src/templates/scripts/work_engine/stack/__init__.py +0 -31
- package/dist/agent-src/templates/scripts/work_engine/stack/detect.py +0 -187
- package/dist/agent-src/templates/scripts/work_engine/stack/runner.py +0 -481
- package/dist/agent-src/templates/scripts/work_engine/state.py +0 -694
- package/dist/agent-src/templates/scripts/work_engine/state_io.py +0 -202
- package/dist/cli/python/resolvePython.js +0 -38
- package/dist/cli/python/resolvePython.js.map +0 -1
- package/src/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
- package/src/scripts/_archive/_backfill_skill_domains.py +0 -140
- package/src/scripts/_archive/_bootstrap_tier_frontmatter.py +0 -151
- package/src/scripts/_archive/_p43_bodies.py +0 -235
- package/src/scripts/_archive/_p43_condense.py +0 -118
- package/src/scripts/_archive/_p4_migrate.py +0 -199
- package/src/scripts/_archive/_phase2_shim_helper.py +0 -109
- package/src/scripts/_archive/_pilot_council_question.py +0 -57
- package/src/scripts/_cli/__init__.py +0 -0
- package/src/scripts/_cli/cmd_doctor.py +0 -1669
- package/src/scripts/_cli/cmd_explain.py +0 -355
- package/src/scripts/_cli/cmd_export.py +0 -157
- package/src/scripts/_cli/cmd_migrate.py +0 -524
- package/src/scripts/_cli/cmd_prune.py +0 -322
- package/src/scripts/_cli/cmd_refresh.py +0 -179
- package/src/scripts/_cli/cmd_settings_check.py +0 -171
- package/src/scripts/_cli/cmd_settings_migrate.py +0 -147
- package/src/scripts/_cli/cmd_sync.py +0 -166
- package/src/scripts/_cli/cmd_uninstall.py +0 -476
- package/src/scripts/_cli/cmd_update.py +0 -279
- package/src/scripts/_cli/cmd_upgrade.py +0 -172
- package/src/scripts/_cli/cmd_validate.py +0 -177
- package/src/scripts/_cli/cmd_versions.py +0 -160
- package/src/scripts/_cli/explain_last/__init__.py +0 -122
- package/src/scripts/_cli/explain_last/assumptions.py +0 -59
- package/src/scripts/_cli/explain_last/council.py +0 -105
- package/src/scripts/_cli/explain_last/halt.py +0 -44
- package/src/scripts/_cli/explain_last/inputs.py +0 -128
- package/src/scripts/_cli/explain_last/memory.py +0 -94
- package/src/scripts/_cli/explain_last/provider.py +0 -52
- package/src/scripts/_cli/explain_last/render.py +0 -52
- package/src/scripts/_cli/explain_last/route.py +0 -59
- package/src/scripts/_cli/explain_last/scrubber.py +0 -105
- package/src/scripts/_cli/explain_last/sections/__init__.py +0 -35
- package/src/scripts/_cli/explain_last/sections/assumptions.py +0 -21
- package/src/scripts/_cli/explain_last/sections/council.py +0 -27
- package/src/scripts/_cli/explain_last/sections/halt.py +0 -31
- package/src/scripts/_cli/explain_last/sections/header.py +0 -24
- package/src/scripts/_cli/explain_last/sections/inputs.py +0 -27
- package/src/scripts/_cli/explain_last/sections/memory.py +0 -21
- package/src/scripts/_cli/explain_last/sections/pack.py +0 -16
- package/src/scripts/_cli/explain_last/sections/provider.py +0 -26
- package/src/scripts/_cli/explain_last/sections/route.py +0 -22
- package/src/scripts/_cli/explain_last/state_loader.py +0 -76
- package/src/scripts/_emit_domain_table.py +0 -35
- package/src/scripts/_lib/__init__.py +0 -5
- package/src/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
- package/src/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
- package/src/scripts/_lib/agent_settings.py +0 -840
- package/src/scripts/_lib/agent_src.py +0 -491
- package/src/scripts/_lib/agents_overlay.py +0 -120
- package/src/scripts/_lib/bench_ab_cache.py +0 -162
- package/src/scripts/_lib/bench_ab_scoring.py +0 -209
- package/src/scripts/_lib/bench_ab_scoring_v2.py +0 -227
- package/src/scripts/_lib/bench_cost.py +0 -138
- package/src/scripts/_lib/bench_quality.py +0 -118
- package/src/scripts/_lib/bench_report.py +0 -149
- package/src/scripts/_lib/bench_telegraph.py +0 -273
- package/src/scripts/_lib/bench_telegraph_report.py +0 -151
- package/src/scripts/_lib/changelog_eras.py +0 -330
- package/src/scripts/_lib/claude_desktop_bundler.py +0 -238
- package/src/scripts/_lib/cli_wrapper.py +0 -64
- package/src/scripts/_lib/fs_atomic.py +0 -116
- package/src/scripts/_lib/global_deploy_inventory.py +0 -312
- package/src/scripts/_lib/install_regenerator.py +0 -134
- package/src/scripts/_lib/installed_lock.py +0 -256
- package/src/scripts/_lib/installed_tools.py +0 -381
- package/src/scripts/_lib/json_pointers.py +0 -260
- package/src/scripts/_lib/link_crypto.py +0 -206
- package/src/scripts/_lib/linked_projects.py +0 -238
- package/src/scripts/_lib/model_tier.py +0 -52
- package/src/scripts/_lib/module_detection.py +0 -223
- package/src/scripts/_lib/pin_resolver.py +0 -152
- package/src/scripts/_lib/script_output.py +0 -144
- package/src/scripts/_lib/security_lint.py +0 -228
- package/src/scripts/_lib/token_count.py +0 -95
- package/src/scripts/_lib/update_check.py +0 -207
- package/src/scripts/_lib/user_global_paths.py +0 -249
- package/src/scripts/_lib/value_ladder.py +0 -696
- package/src/scripts/_lib/value_report.py +0 -455
- package/src/scripts/_phase4_bucket.py +0 -210
- package/src/scripts/_pilot_measure.py +0 -53
- package/src/scripts/_tmp_scan_framework_leakage.py +0 -119
- package/src/scripts/adoption_report.py +0 -195
- package/src/scripts/adoption_snapshot.py +0 -219
- package/src/scripts/adoption_status.py +0 -166
- package/src/scripts/adr/regenerate_index.py +0 -79
- package/src/scripts/ai-video/lib/adapter-common.sh +0 -231
- package/src/scripts/ai-video/lib/adapter-contract.md +0 -329
- package/src/scripts/ai-video/lib/fixtures/comfyui/result.json +0 -1
- package/src/scripts/ai-video/lib/fixtures/fal/result.json +0 -1
- package/src/scripts/ai-video/lib/fixtures/gemini-veo/result.json +0 -1
- package/src/scripts/ai-video/lib/fixtures/higgsfield/result.json +0 -1
- package/src/scripts/ai-video/lib/fixtures/kling/result.json +0 -1
- package/src/scripts/ai-video/lib/fixtures/musetalk/result.json +0 -1
- package/src/scripts/ai-video/lib/fixtures/openai-images/result.json +0 -1
- package/src/scripts/ai-video/lib/fixtures/replicate/result.json +0 -1
- package/src/scripts/ai-video/lib/fixtures/sora/result.json +0 -1
- package/src/scripts/ai-video/lib/fixtures/syncso/result.json +0 -1
- package/src/scripts/ai-video/lib/load-config.sh +0 -180
- package/src/scripts/ai-video/lib/redact.sh +0 -85
- package/src/scripts/ai_council/__init__.py +0 -40
- package/src/scripts/ai_council/_default_prices.py +0 -50
- package/src/scripts/ai_council/advisors.py +0 -148
- package/src/scripts/ai_council/airgap.py +0 -165
- package/src/scripts/ai_council/budget_guard.py +0 -202
- package/src/scripts/ai_council/bundler.py +0 -263
- package/src/scripts/ai_council/cli_hints.py +0 -123
- package/src/scripts/ai_council/clients.py +0 -1385
- package/src/scripts/ai_council/compile_corpus.py +0 -179
- package/src/scripts/ai_council/confidence_gate.py +0 -156
- package/src/scripts/ai_council/config.py +0 -1419
- package/src/scripts/ai_council/consensus.py +0 -329
- package/src/scripts/ai_council/events_log.py +0 -141
- package/src/scripts/ai_council/learn_low_impact_preview.py +0 -252
- package/src/scripts/ai_council/low_impact.py +0 -714
- package/src/scripts/ai_council/low_impact_corpus.py +0 -466
- package/src/scripts/ai_council/low_impact_intake.py +0 -163
- package/src/scripts/ai_council/modes.py +0 -131
- package/src/scripts/ai_council/necessity.py +0 -782
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_2a4_acceptance.py +0 -208
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_add_quiet.py +0 -149
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_budget_v2_audit.py +0 -206
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_context_layer_v1_estimate.py +0 -67
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_context_layer_v1_review.py +0 -292
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_followups_review.py +0 -259
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_inject_quiet_flag.py +0 -33
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_measure_v2.sh +0 -36
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_measure_verbosity.sh +0 -26
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_nondestructive_inline_audit.py +0 -209
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_per_task.sh +0 -41
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_phase4_dispatch_latency.py +0 -108
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_phase6_trigger_jaccard.py +0 -92
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_phase_2a_budget_rebalance.py +0 -257
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_phase_2a_post_revert.py +0 -197
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_rebalancing_audit.py +0 -149
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_roundtrip.py +0 -111
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_rule_hardening_v1.py +0 -251
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_silent_taskfiles.py +0 -98
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_open_questions.py +0 -232
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_optimization.py +0 -144
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_v3_gaps.py +0 -252
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_v3_review.py +0 -240
- package/src/scripts/ai_council/one_off_archive/2026-05/_one_off_tier_retrofit.py +0 -180
- package/src/scripts/ai_council/orchestrator.py +0 -1206
- package/src/scripts/ai_council/pricing.py +0 -215
- package/src/scripts/ai_council/probation_gate.py +0 -152
- package/src/scripts/ai_council/project_context.py +0 -159
- package/src/scripts/ai_council/prompts.py +0 -567
- package/src/scripts/ai_council/redact_low_impact_entry.py +0 -155
- package/src/scripts/ai_council/replay.py +0 -155
- package/src/scripts/ai_council/session.py +0 -366
- package/src/scripts/ai_council/shadow_dispatch.py +0 -235
- package/src/scripts/ai_council/solo_dispatch.py +0 -226
- package/src/scripts/annotate_discovery.py +0 -149
- package/src/scripts/apply_modules_config.py +0 -290
- package/src/scripts/audit_adr_coverage.py +0 -173
- package/src/scripts/audit_auto_rules.py +0 -175
- package/src/scripts/audit_cloud_compatibility.py +0 -362
- package/src/scripts/audit_command_surface.py +0 -682
- package/src/scripts/audit_initial_context.py +0 -237
- package/src/scripts/audit_likelihood.py +0 -148
- package/src/scripts/audit_mcp_tools.py +0 -146
- package/src/scripts/audit_overlap.py +0 -145
- package/src/scripts/audit_skill_descriptions.py +0 -180
- package/src/scripts/audit_skill_overlap.py +0 -207
- package/src/scripts/audit_user_type_axis.py +0 -140
- package/src/scripts/backfill_model_tier.py +0 -184
- package/src/scripts/bench_ab_cache_dispatch.py +0 -68
- package/src/scripts/bench_ab_clone.py +0 -220
- package/src/scripts/bench_ab_diff.py +0 -220
- package/src/scripts/bench_ab_integrity.py +0 -143
- package/src/scripts/bench_ab_run.py +0 -235
- package/src/scripts/bench_ab_task_runner.py +0 -814
- package/src/scripts/bench_ab_tracka_run.py +0 -202
- package/src/scripts/bench_ab_v2_run.py +0 -247
- package/src/scripts/bench_ab_v2_stats.py +0 -347
- package/src/scripts/bench_baseline_ready.py +0 -108
- package/src/scripts/bench_condense_memory.py +0 -168
- package/src/scripts/bench_drift_check.py +0 -151
- package/src/scripts/bench_per_tool.py +0 -216
- package/src/scripts/bench_rtk_savings.py +0 -320
- package/src/scripts/bench_run.py +0 -272
- package/src/scripts/bench_runner.py +0 -158
- package/src/scripts/build_cloud_bundle.py +0 -458
- package/src/scripts/build_discovery_manifest.py +0 -757
- package/src/scripts/build_linear_digest.py +0 -260
- package/src/scripts/build_mcp_registry_manifest.py +0 -181
- package/src/scripts/build_rule_trigger_matrix.py +0 -350
- package/src/scripts/capture_showcase_session.py +0 -361
- package/src/scripts/chat_history.py +0 -1799
- package/src/scripts/check_always_budget.py +0 -532
- package/src/scripts/check_artefact_checksums.py +0 -111
- package/src/scripts/check_augment_description_cap.py +0 -79
- package/src/scripts/check_augmentignore.py +0 -72
- package/src/scripts/check_beta_review_markers.py +0 -127
- package/src/scripts/check_bite_sized_granularity.py +0 -98
- package/src/scripts/check_cluster_patterns.py +0 -206
- package/src/scripts/check_command_count_messaging.py +0 -152
- package/src/scripts/check_condensation.py +0 -375
- package/src/scripts/check_condensed_paths.py +0 -231
- package/src/scripts/check_context_paths.py +0 -202
- package/src/scripts/check_council_layout.py +0 -125
- package/src/scripts/check_council_references.py +0 -228
- package/src/scripts/check_discovery_determinism.py +0 -70
- package/src/scripts/check_gate_paths.py +0 -128
- package/src/scripts/check_iron_law_prominence.py +0 -145
- package/src/scripts/check_kernel_rule_bundle.py +0 -151
- package/src/scripts/check_md_language.py +0 -161
- package/src/scripts/check_memory.py +0 -429
- package/src/scripts/check_memory_proposal.py +0 -182
- package/src/scripts/check_module_management_neutral.py +0 -147
- package/src/scripts/check_no_external_sources.py +0 -101
- package/src/scripts/check_no_local_settings_committed.py +0 -51
- package/src/scripts/check_no_new_legacy_path.py +0 -100
- package/src/scripts/check_no_roadmap_refs.py +0 -155
- package/src/scripts/check_one_off_location.py +0 -81
- package/src/scripts/check_overlay_cascade_subdirs.py +0 -129
- package/src/scripts/check_portability.py +0 -574
- package/src/scripts/check_proposal.py +0 -269
- package/src/scripts/check_public_catalog_links.py +0 -125
- package/src/scripts/check_public_links.py +0 -185
- package/src/scripts/check_references.py +0 -559
- package/src/scripts/check_release_includes_discovery.py +0 -61
- package/src/scripts/check_release_pr_shape.py +0 -123
- package/src/scripts/check_release_published.py +0 -145
- package/src/scripts/check_release_trunk_sync.py +0 -152
- package/src/scripts/check_reply_consistency.py +0 -169
- package/src/scripts/check_roadmap_trackable.py +0 -114
- package/src/scripts/check_role_doc_links.py +0 -110
- package/src/scripts/check_safety_floor_untouched.py +0 -125
- package/src/scripts/check_skill_requires.py +0 -147
- package/src/scripts/check_template_pin_drift.py +0 -129
- package/src/scripts/check_test_coverage_diff.py +0 -180
- package/src/scripts/check_token_optimizer_freshness.py +0 -146
- package/src/scripts/check_update_banner.py +0 -86
- package/src/scripts/ci_status.py +0 -301
- package/src/scripts/ci_summary.py +0 -131
- package/src/scripts/ci_time_ratio.py +0 -168
- package/src/scripts/command_suggester/__init__.py +0 -51
- package/src/scripts/command_suggester/cooldown.py +0 -132
- package/src/scripts/command_suggester/loader.py +0 -73
- package/src/scripts/command_suggester/match.py +0 -180
- package/src/scripts/command_suggester/rank.py +0 -120
- package/src/scripts/command_suggester/render.py +0 -86
- package/src/scripts/command_suggester/sanitize.py +0 -113
- package/src/scripts/command_suggester/settings.py +0 -127
- package/src/scripts/command_suggester/types.py +0 -78
- package/src/scripts/compile_router.py +0 -232
- package/src/scripts/condense.py +0 -1919
- package/src/scripts/condense_memory.py +0 -178
- package/src/scripts/config/__init__.py +0 -9
- package/src/scripts/config/packs.py +0 -157
- package/src/scripts/config/presets.py +0 -224
- package/src/scripts/config/profile_explain.py +0 -89
- package/src/scripts/config/profiles.py +0 -191
- package/src/scripts/config/session_profiles.py +0 -542
- package/src/scripts/context_hygiene_hook.py +0 -181
- package/src/scripts/cost_by_conversation.py +0 -78
- package/src/scripts/cost_summary.py +0 -97
- package/src/scripts/council_cli.py +0 -2571
- package/src/scripts/council_prune.py +0 -81
- package/src/scripts/cross_repo_retrieve.py +0 -172
- package/src/scripts/discovery_stats.py +0 -70
- package/src/scripts/extract_audit_patterns.py +0 -202
- package/src/scripts/first_run_gate_hook.py +0 -179
- package/src/scripts/gen_discovery_baseline.py +0 -127
- package/src/scripts/generate_catalog.py +0 -116
- package/src/scripts/generate_command_flows.py +0 -191
- package/src/scripts/generate_index.py +0 -303
- package/src/scripts/generate_ownership_matrix.py +0 -378
- package/src/scripts/generate_pack_manifests.py +0 -340
- package/src/scripts/hooks/__init__.py +0 -1
- package/src/scripts/hooks/dispatch_hook.py +0 -461
- package/src/scripts/hooks/dispatch_issues.py +0 -136
- package/src/scripts/hooks/envelope.py +0 -98
- package/src/scripts/hooks/replay_hook.py +0 -144
- package/src/scripts/hooks/state_io.py +0 -145
- package/src/scripts/hooks_doctor.py +0 -223
- package/src/scripts/hooks_status.py +0 -157
- package/src/scripts/injection_scan_hook.py +0 -145
- package/src/scripts/install.py +0 -5258
- package/src/scripts/inventory_abstraction_budget.py +0 -622
- package/src/scripts/inventory_frontmatter.py +0 -164
- package/src/scripts/inventory_meta_layers.py +0 -288
- package/src/scripts/iron_law_sha.py +0 -107
- package/src/scripts/linked_projects_list.py +0 -91
- package/src/scripts/lint_agent_security.py +0 -112
- package/src/scripts/lint_agent_skill_names.py +0 -150
- package/src/scripts/lint_agents_layout.py +0 -197
- package/src/scripts/lint_agents_md.py +0 -210
- package/src/scripts/lint_archived_skills.py +0 -159
- package/src/scripts/lint_artefact_frontmatter.py +0 -188
- package/src/scripts/lint_bench_ab.py +0 -173
- package/src/scripts/lint_bench_corpus.py +0 -255
- package/src/scripts/lint_command_flow_coverage.py +0 -132
- package/src/scripts/lint_command_routing.py +0 -160
- package/src/scripts/lint_command_tiers.py +0 -216
- package/src/scripts/lint_command_verbs.py +0 -206
- package/src/scripts/lint_commit_subjects.py +0 -139
- package/src/scripts/lint_context_spine_usage.py +0 -137
- package/src/scripts/lint_discovery_manifest.py +0 -176
- package/src/scripts/lint_discovery_vocabulary.py +0 -222
- package/src/scripts/lint_empty_roadmaps.py +0 -80
- package/src/scripts/lint_examples.py +0 -102
- package/src/scripts/lint_explain_trace.py +0 -80
- package/src/scripts/lint_featured_skills.py +0 -144
- package/src/scripts/lint_flows.py +0 -215
- package/src/scripts/lint_framework_leakage.py +0 -375
- package/src/scripts/lint_frontmatter_boilerplate.py +0 -77
- package/src/scripts/lint_ghostwriter_source.py +0 -242
- package/src/scripts/lint_global_paths.py +0 -148
- package/src/scripts/lint_handoffs.py +0 -217
- package/src/scripts/lint_hidden_unicode.py +0 -132
- package/src/scripts/lint_hook_concern_budget.py +0 -207
- package/src/scripts/lint_hook_manifest.py +0 -217
- package/src/scripts/lint_instruction_smuggling.py +0 -107
- package/src/scripts/lint_load_context.py +0 -196
- package/src/scripts/lint_marketplace.py +0 -180
- package/src/scripts/lint_marketplace_install_completeness.py +0 -198
- package/src/scripts/lint_mcp_config_security.py +0 -124
- package/src/scripts/lint_mcp_registry_manifest.py +0 -69
- package/src/scripts/lint_media_policy_linkage.py +0 -140
- package/src/scripts/lint_model_tier_coverage.py +0 -73
- package/src/scripts/lint_namespace.py +0 -135
- package/src/scripts/lint_namespace_collisions.py +0 -103
- package/src/scripts/lint_new_skill_gate.py +0 -144
- package/src/scripts/lint_no_new_atomic_commands.py +0 -180
- package/src/scripts/lint_one_off_age.py +0 -184
- package/src/scripts/lint_orchestration_dsl.py +0 -217
- package/src/scripts/lint_orchestrator_auto_detect.py +0 -111
- package/src/scripts/lint_pack_boundaries.py +0 -147
- package/src/scripts/lint_pack_dependencies.py +0 -137
- package/src/scripts/lint_pack_first_win.py +0 -121
- package/src/scripts/lint_persona_governance.py +0 -164
- package/src/scripts/lint_positioning.py +0 -143
- package/src/scripts/lint_profile_overlay_set_only.py +0 -179
- package/src/scripts/lint_readme_jargon.py +0 -131
- package/src/scripts/lint_readme_size.py +0 -33
- package/src/scripts/lint_regression.py +0 -251
- package/src/scripts/lint_roadmap_ci_steps.py +0 -186
- package/src/scripts/lint_roadmap_complexity.py +0 -220
- package/src/scripts/lint_role_experiences.py +0 -255
- package/src/scripts/lint_rule_interactions.py +0 -170
- package/src/scripts/lint_rule_tiers.py +0 -90
- package/src/scripts/lint_showcase_sessions.py +0 -148
- package/src/scripts/lint_skill_frontmatter_safety.py +0 -144
- package/src/scripts/lint_skill_tools.py +0 -168
- package/src/scripts/lint_topics_yaml.py +0 -89
- package/src/scripts/lint_trust_coherence.py +0 -212
- package/src/scripts/lint_value_dashboard.py +0 -218
- package/src/scripts/lint_workspace_boundary.py +0 -122
- package/src/scripts/mcp_parity_smoke.py +0 -316
- package/src/scripts/mcp_render.py +0 -173
- package/src/scripts/mcp_server/__init__.py +0 -19
- package/src/scripts/mcp_server/__main__.py +0 -12
- package/src/scripts/mcp_server/catalog.py +0 -125
- package/src/scripts/mcp_server/metadata.py +0 -75
- package/src/scripts/mcp_server/prompts.py +0 -442
- package/src/scripts/mcp_server/requirements.txt +0 -4
- package/src/scripts/mcp_server/resources.py +0 -201
- package/src/scripts/mcp_server/server.py +0 -270
- package/src/scripts/mcp_server/telemetry.py +0 -128
- package/src/scripts/mcp_server/tools.py +0 -926
- package/src/scripts/mcp_telemetry_health.py +0 -214
- package/src/scripts/mcp_telemetry_query.py +0 -203
- package/src/scripts/mcp_telemetry_store.py +0 -211
- package/src/scripts/measure_augment_budget.py +0 -214
- package/src/scripts/measure_density.py +0 -232
- package/src/scripts/measure_frugality_savings.py +0 -164
- package/src/scripts/measure_markitdown_lift.py +0 -127
- package/src/scripts/measure_patterns.py +0 -376
- package/src/scripts/measure_projection_bytes.py +0 -159
- package/src/scripts/measure_rule_budget.py +0 -347
- package/src/scripts/measure_skill_reduction.py +0 -102
- package/src/scripts/memory_hash.py +0 -75
- package/src/scripts/memory_lookup.py +0 -436
- package/src/scripts/memory_report.py +0 -314
- package/src/scripts/memory_signal.py +0 -165
- package/src/scripts/memory_status.py +0 -76
- package/src/scripts/migrate_command_suggestions.py +0 -151
- package/src/scripts/migrate_frontmatter_defaults.py +0 -245
- package/src/scripts/mine_session.py +0 -356
- package/src/scripts/minimal_safe_diff_hook.py +0 -245
- package/src/scripts/move_artefact.py +0 -143
- package/src/scripts/new_skill.py +0 -148
- package/src/scripts/onboarding_gate_hook.py +0 -142
- package/src/scripts/pack_mcp_content.py +0 -293
- package/src/scripts/plan_physical_move.py +0 -353
- package/src/scripts/prediction-pool/poisson_sim.py +0 -167
- package/src/scripts/prediction-pool/pool_winsim.py +0 -236
- package/src/scripts/prediction-pool/score_ev.py +0 -188
- package/src/scripts/print_required_checks.py +0 -196
- package/src/scripts/probe_projection_fidelity.py +0 -202
- package/src/scripts/probe_skill_registration.py +0 -413
- package/src/scripts/profile_staleness_hook.py +0 -69
- package/src/scripts/profile_use.py +0 -164
- package/src/scripts/project_thin_rules.py +0 -168
- package/src/scripts/propose_modules_config.py +0 -145
- package/src/scripts/prototype_lint_contradictions.py +0 -150
- package/src/scripts/prove_pack_extractable.py +0 -187
- package/src/scripts/readme_linter.py +0 -589
- package/src/scripts/redact_hook_capture.py +0 -148
- package/src/scripts/refine_ticket_detect.py +0 -646
- package/src/scripts/release.py +0 -1091
- package/src/scripts/render_benchmark_md.py +0 -401
- package/src/scripts/render_value_md.py +0 -347
- package/src/scripts/requirements-evals.txt +0 -8
- package/src/scripts/roadmap_progress_hook.py +0 -274
- package/src/scripts/router_telemetry.py +0 -470
- package/src/scripts/run_skill_evals.py +0 -185
- package/src/scripts/runtime_dispatcher.py +0 -276
- package/src/scripts/runtime_handler.py +0 -148
- package/src/scripts/runtime_registry.py +0 -166
- package/src/scripts/score_skill_selection.py +0 -198
- package/src/scripts/security_audit_config.py +0 -153
- package/src/scripts/setup_eval_venv.sh +0 -58
- package/src/scripts/skill_collision_clusters.py +0 -162
- package/src/scripts/skill_discovery.py +0 -254
- package/src/scripts/skill_linter.py +0 -3694
- package/src/scripts/skill_overlap.py +0 -204
- package/src/scripts/skill_preview.py +0 -179
- package/src/scripts/skill_tools/__init__.py +0 -22
- package/src/scripts/skill_tools/audit_persona_coverage.py +0 -147
- package/src/scripts/skill_tools/audit_user_type_coverage.py +0 -148
- package/src/scripts/skill_tools/run_block_d_eval.py +0 -129
- package/src/scripts/skill_tools/score_skill_relevance.py +0 -169
- package/src/scripts/skill_tools/suggest_skill_for_task.py +0 -113
- package/src/scripts/skill_trigger_eval.py +0 -682
- package/src/scripts/skill_usage_collect.py +0 -191
- package/src/scripts/skill_usage_report.py +0 -162
- package/src/scripts/smoke_path_resolution.py +0 -93
- package/src/scripts/smoke_quickstart.py +0 -144
- package/src/scripts/snapshot_agent_outputs.py +0 -144
- package/src/scripts/spotcheck_thin_root.py +0 -134
- package/src/scripts/sync_agent_settings.py +0 -180
- package/src/scripts/sync_github_metadata.py +0 -147
- package/src/scripts/sync_gitignore.py +0 -291
- package/src/scripts/sync_yaml_rt.py +0 -734
- package/src/scripts/telegraph_stats.py +0 -119
- package/src/scripts/tool_registry.py +0 -146
- package/src/scripts/tools/__init__.py +0 -1
- package/src/scripts/tools/adapter_errors.py +0 -63
- package/src/scripts/tools/base_adapter.py +0 -91
- package/src/scripts/tools/github_adapter.py +0 -128
- package/src/scripts/tools/jira_adapter.py +0 -115
- package/src/scripts/trigger_coverage.py +0 -129
- package/src/scripts/update_counts.py +0 -199
- package/src/scripts/update_prices.py +0 -125
- package/src/scripts/validate_agent_settings.py +0 -124
- package/src/scripts/validate_decision_engine.py +0 -136
- package/src/scripts/validate_discovery_manifest.py +0 -94
- package/src/scripts/validate_frontmatter.py +0 -647
- package/src/scripts/validate_pack_yaml.py +0 -179
- package/src/scripts/validate_safe_paths.py +0 -118
- package/src/scripts/validate_telegraph_carveouts.py +0 -129
- package/src/scripts/verify_before_complete_hook.py +0 -216
- package/src/scripts/verify_physical_move.py +0 -185
- package/src/scripts/wrapper_freshness_hook.py +0 -86
- /package/dist/agent-src/skills/design-intelligence/data/{typography.csv → font-pairings-reference.csv} +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/allin1/analysis.json +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/comfyui/scene-0001.mp4 +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/fal/scene-0001.mp4 +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/gemini-veo/scene-0001.mp4 +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/higgsfield/scene-0001.mp4 +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/kling/scene-0001.mp4 +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/musetalk/lipsync-0001.mp4 +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/openai-images/scene-0001.png +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/replicate/scene-0001.mp4 +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/sora/scene-0001.mp4 +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/syncso/lipsync-0001.mp4 +0 -0
- /package/src/scripts/{ai-video → media}/lib/fixtures/whisperx/transcript.json +0 -0
- /package/src/scripts/{ai-video → media}/lib/telemetry.sh +0 -0
|
@@ -0,0 +1,1025 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Generate `pack.yaml` + `README.md` for every pack home.
|
|
4
|
+
*
|
|
5
|
+
* TypeScript twin of `src/scripts/generate_pack_manifests.py` (ADR-200 —
|
|
6
|
+
* Python→TS migration, Phase 8 / Wave 8a). The CLI contract is mirrored
|
|
7
|
+
* EXACTLY: same flag (`--check`), same exit codes, same stdout/stderr
|
|
8
|
+
* split, same byte-identical generated `pack.yaml` + `README.md`. WRITER
|
|
9
|
+
* — both outputs match the Python output byte-for-byte, including the
|
|
10
|
+
* PyYAML `safe_dump(meta, sort_keys=True, allow_unicode=True)` block-style
|
|
11
|
+
* emission (`_py_safe_dump` below reproduces PyYAML's scalar-quoting +
|
|
12
|
+
* block-collection layout for the value shapes this script emits). No
|
|
13
|
+
* behaviour changes — latent bugs replicated.
|
|
14
|
+
*
|
|
15
|
+
* Phase 4.4 of the monorepo migration (ADR-017). The manifests are
|
|
16
|
+
* *derived* from frontmatter + `src/config/discovery/packs.yml`; they are
|
|
17
|
+
* regenerated on every `task sync` and must never be hand-edited.
|
|
18
|
+
*
|
|
19
|
+
* For each pack home we emit:
|
|
20
|
+
* - `<home>/pack.yaml` — id, label, owner, requires, version, artefact_count, …
|
|
21
|
+
* - `<home>/README.md` — pack description + per-artefact description table
|
|
22
|
+
*
|
|
23
|
+
* CLI:
|
|
24
|
+
* --check exit non-zero if any output would change (CI gate)
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import * as fs from 'node:fs';
|
|
28
|
+
import * as path from 'node:path';
|
|
29
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
30
|
+
|
|
31
|
+
import { parse as parseYaml } from 'yaml';
|
|
32
|
+
|
|
33
|
+
import { SRC_AGENT, iter_all_sources, resolve_logical } from './_lib/agent_src.js';
|
|
34
|
+
|
|
35
|
+
const _HERE = fileURLToPath(import.meta.url);
|
|
36
|
+
// src/scripts/generate_pack_manifests.ts → parents[2] is the repo root (mirrors
|
|
37
|
+
// `Path(__file__).resolve().parents[2]` in the .py).
|
|
38
|
+
const ROOT = path.resolve(path.dirname(_HERE), '..', '..');
|
|
39
|
+
const PACKAGES = path.join(ROOT, 'packages');
|
|
40
|
+
const SRC_DOMAINS = path.join(ROOT, 'src', 'domains');
|
|
41
|
+
const SRC_PACKS = path.join(ROOT, 'src', 'packs');
|
|
42
|
+
const PACKS_VOCAB = path.join(ROOT, 'src', 'config', 'discovery', 'packs.yml');
|
|
43
|
+
const PACKAGE_JSON = path.join(ROOT, 'package.json');
|
|
44
|
+
const GENERATED_HEADER =
|
|
45
|
+
'# Generated by scripts/generate_pack_manifests.py — DO NOT EDIT BY HAND\n';
|
|
46
|
+
|
|
47
|
+
type Json = unknown;
|
|
48
|
+
type Dict = Record<string, unknown>;
|
|
49
|
+
|
|
50
|
+
interface Artefact {
|
|
51
|
+
path: string;
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
category: string;
|
|
55
|
+
skills: string[];
|
|
56
|
+
rules: string[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// resolve_logical may need the SRC_AGENT accessor; keep an explicit reference
|
|
60
|
+
// so the import is not pruned (parity with the Python `from … import` list).
|
|
61
|
+
void resolve_logical;
|
|
62
|
+
|
|
63
|
+
function _load_yaml(p: string): Json {
|
|
64
|
+
if (!_exists(p)) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
return parseYaml(fs.readFileSync(p, 'utf-8'), { version: '1.1' }) ?? null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function _read_frontmatter(p: string): Dict {
|
|
71
|
+
const text = fs.readFileSync(p, 'utf-8');
|
|
72
|
+
if (!text.startsWith('---')) {
|
|
73
|
+
return {};
|
|
74
|
+
}
|
|
75
|
+
const end = text.indexOf('\n---', 4);
|
|
76
|
+
if (end === -1) {
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
79
|
+
let data: Json;
|
|
80
|
+
try {
|
|
81
|
+
data = parseYaml(text.slice(4, end), { version: '1.1' });
|
|
82
|
+
} catch {
|
|
83
|
+
return {};
|
|
84
|
+
}
|
|
85
|
+
return _isPlainObject(data) ? (data as Dict) : {};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function _pack_id_from_dir(pkgDir: string): string {
|
|
89
|
+
const name = path.basename(pkgDir);
|
|
90
|
+
return name === 'core' ? 'core' : _removePrefix(name, 'pack-');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Every pack home as `[pack_id, home_dir, mode]`. Mirrors `_pack_homes`. */
|
|
94
|
+
function _pack_homes(): Array<[string, string, string]> {
|
|
95
|
+
const homes: Array<[string, string, string]> = [];
|
|
96
|
+
const seen = new Set<string>();
|
|
97
|
+
if (_isDir(SRC_AGENT())) {
|
|
98
|
+
homes.push(['core', path.join(SRC_PACKS, 'core'), 'core']);
|
|
99
|
+
seen.add('core');
|
|
100
|
+
}
|
|
101
|
+
for (const parent of [SRC_PACKS, SRC_DOMAINS]) {
|
|
102
|
+
if (!_isDir(parent)) {
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
for (const d of _iterdirSorted(parent)) {
|
|
106
|
+
if (!_isDir(d) || path.basename(d).startsWith('_')) {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
const pid = path.basename(d);
|
|
110
|
+
if (seen.has(pid)) {
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
homes.push([pid, d, 'flat']);
|
|
114
|
+
seen.add(pid);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (_exists(PACKAGES)) {
|
|
118
|
+
for (const pkg of _iterdirSorted(PACKAGES)) {
|
|
119
|
+
if (!_isDir(pkg)) {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
const pid = _pack_id_from_dir(pkg);
|
|
123
|
+
if (seen.has(pid)) {
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
homes.push([pid, pkg, 'physical']);
|
|
127
|
+
seen.add(pid);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return homes;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function _vocab_lookup(packsVocab: Dict[]): Record<string, Dict> {
|
|
134
|
+
const out: Record<string, Dict> = {};
|
|
135
|
+
for (const p of packsVocab ?? []) {
|
|
136
|
+
out[String(p.id)] = p;
|
|
137
|
+
}
|
|
138
|
+
return out;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function _package_version(): string {
|
|
142
|
+
if (!_exists(PACKAGE_JSON)) {
|
|
143
|
+
return '0.0.0';
|
|
144
|
+
}
|
|
145
|
+
const pkg = JSON.parse(fs.readFileSync(PACKAGE_JSON, 'utf-8')) as Dict;
|
|
146
|
+
return _pyTruthy(pkg.version) ? String(pkg.version) : '0.0.0';
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function _artefact_record(p: string, logicalRel: string, fm: Dict): Artefact {
|
|
150
|
+
const name = _pyTruthy(fm.name)
|
|
151
|
+
? String(fm.name)
|
|
152
|
+
: path.basename(p) === 'SKILL.md'
|
|
153
|
+
? path.basename(path.dirname(p))
|
|
154
|
+
: _stem(p);
|
|
155
|
+
return {
|
|
156
|
+
path: logicalRel,
|
|
157
|
+
name,
|
|
158
|
+
description: _pyStrip(_pyTruthy(fm.description) ? String(fm.description) : ''),
|
|
159
|
+
category: _category_from_logical(logicalRel),
|
|
160
|
+
skills: ((fm.skills as unknown[]) ?? []).filter((s) => typeof s === 'string') as string[],
|
|
161
|
+
rules: ((fm.rules as unknown[]) ?? []).filter((r) => typeof r === 'string') as string[],
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function _collect_physical(pkgDir: string): Artefact[] {
|
|
166
|
+
const srcRoot = path.join(pkgDir, '.agent-src.uncondensed');
|
|
167
|
+
if (!_isDir(srcRoot)) {
|
|
168
|
+
return [];
|
|
169
|
+
}
|
|
170
|
+
const items: Artefact[] = [];
|
|
171
|
+
for (const p of _rglobSortedMd(srcRoot)) {
|
|
172
|
+
if (!_isFile(p)) {
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
const fm = _read_frontmatter(p);
|
|
176
|
+
if (!_pyTruthy(fm)) {
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
items.push(_artefact_record(p, _relativeToPosix(p, srcRoot), fm));
|
|
180
|
+
}
|
|
181
|
+
return items;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function _collect_core(): Artefact[] {
|
|
185
|
+
const items: Artefact[] = [];
|
|
186
|
+
const seen = new Set<string>();
|
|
187
|
+
if (_isDir(SRC_AGENT())) {
|
|
188
|
+
for (const p of _rglobSortedMd(SRC_AGENT())) {
|
|
189
|
+
if (!_isFile(p)) {
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
const fm = _read_frontmatter(p);
|
|
193
|
+
if (!_pyTruthy(fm)) {
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
const logical = _relativeToPosix(p, SRC_AGENT());
|
|
197
|
+
seen.add(logical);
|
|
198
|
+
items.push(_artefact_record(p, logical, fm));
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
for (const rec of _collect_flat('core')) {
|
|
202
|
+
if (!seen.has(rec.path)) {
|
|
203
|
+
seen.add(rec.path);
|
|
204
|
+
items.push(rec);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return items;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function _collect_flat(pid: string): Artefact[] {
|
|
211
|
+
const items: Artefact[] = [];
|
|
212
|
+
const seen = new Set<string>();
|
|
213
|
+
for (const [phys, logical] of iter_all_sources()) {
|
|
214
|
+
if (!logical.endsWith('.md') || seen.has(logical)) {
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
const fm = _read_frontmatter(phys);
|
|
218
|
+
if (!_pyTruthy(fm)) {
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
const packs = (fm.packs as unknown[]) ?? [];
|
|
222
|
+
if (packs.includes(pid)) {
|
|
223
|
+
seen.add(logical);
|
|
224
|
+
items.push(_artefact_record(phys, logical, fm));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return items.slice().sort((a, b) => _cmpStr(a.path, b.path));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function _collect_artefacts(pid: string, homeDir: string, mode: string): Artefact[] {
|
|
231
|
+
if (mode === 'core') {
|
|
232
|
+
return _collect_core();
|
|
233
|
+
}
|
|
234
|
+
if (mode === 'physical') {
|
|
235
|
+
return _collect_physical(homeDir);
|
|
236
|
+
}
|
|
237
|
+
return _collect_flat(pid);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function _category_from_logical(logicalRel: string): string {
|
|
241
|
+
const top = logicalRel.split('/', 1)[0] as string;
|
|
242
|
+
const mapping: Record<string, string> = {
|
|
243
|
+
skills: 'skill',
|
|
244
|
+
rules: 'rule',
|
|
245
|
+
commands: 'command',
|
|
246
|
+
personas: 'persona',
|
|
247
|
+
guidelines: 'guideline',
|
|
248
|
+
contexts: 'context',
|
|
249
|
+
presets: 'preset',
|
|
250
|
+
profiles: 'profile',
|
|
251
|
+
};
|
|
252
|
+
return mapping[top] ?? top;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Build the pack.yaml meta dict. Mirrors `_build_pack_yaml`. Insertion
|
|
257
|
+
* order here is irrelevant — `_py_safe_dump` sorts keys (sort_keys=True).
|
|
258
|
+
*/
|
|
259
|
+
function _build_pack_yaml(
|
|
260
|
+
pid: string,
|
|
261
|
+
vocab: Record<string, Dict>,
|
|
262
|
+
artefacts: Artefact[],
|
|
263
|
+
version: string,
|
|
264
|
+
): Dict {
|
|
265
|
+
const meta = vocab[pid] ?? {};
|
|
266
|
+
const label = _pyTruthy(meta.label)
|
|
267
|
+
? String(meta.label)
|
|
268
|
+
: pid === 'core'
|
|
269
|
+
? _capitalizeTitle(pid)
|
|
270
|
+
: pid;
|
|
271
|
+
const out: Dict = {
|
|
272
|
+
id: pid,
|
|
273
|
+
label,
|
|
274
|
+
description: _pyTruthy(meta.description)
|
|
275
|
+
? String(meta.description)
|
|
276
|
+
: pid === 'core'
|
|
277
|
+
? 'Core framework-neutral artefacts.'
|
|
278
|
+
: '',
|
|
279
|
+
owner: _pyTruthy(meta.workspaces)
|
|
280
|
+
? (meta.workspaces as unknown)
|
|
281
|
+
: pid === 'core'
|
|
282
|
+
? ['agent-config-maintainer']
|
|
283
|
+
: [],
|
|
284
|
+
requires: _pyTruthy(meta.requires)
|
|
285
|
+
? (meta.requires as unknown)
|
|
286
|
+
: _pyTruthy(meta.requires_hint)
|
|
287
|
+
? (meta.requires_hint as unknown)
|
|
288
|
+
: [],
|
|
289
|
+
trust_level_default: _pyTruthy(meta.trust_level_default)
|
|
290
|
+
? (meta.trust_level_default as unknown)
|
|
291
|
+
: 'core',
|
|
292
|
+
version,
|
|
293
|
+
artefact_count: artefacts.length,
|
|
294
|
+
};
|
|
295
|
+
if (_isPlainObject(meta.onboarding)) {
|
|
296
|
+
out.onboarding = meta.onboarding;
|
|
297
|
+
}
|
|
298
|
+
if (_pyTruthy(meta.slug_prefix)) {
|
|
299
|
+
out.slug_prefix = meta.slug_prefix;
|
|
300
|
+
}
|
|
301
|
+
if (_pyTruthy(meta.size_class)) {
|
|
302
|
+
out.size_class = meta.size_class;
|
|
303
|
+
}
|
|
304
|
+
// surface_tier — core | lab (road-to-install-contract-stability Phase 2).
|
|
305
|
+
// `core` = the lean stable multi-host engine (rules + skills + install +
|
|
306
|
+
// condensation). `lab` = experimental / pilot domain tooling that must not
|
|
307
|
+
// destabilise the core install surface. Default core; sourced from the
|
|
308
|
+
// discovery vocab when a pack is explicitly lab.
|
|
309
|
+
out.surface_tier = _pyTruthy(meta.surface_tier) ? (meta.surface_tier as unknown) : 'core';
|
|
310
|
+
out.suggests = _pyTruthy(meta.suggests) ? (meta.suggests as unknown) : [];
|
|
311
|
+
const depSkills = new Set<string>();
|
|
312
|
+
const depRules = new Set<string>();
|
|
313
|
+
for (const a of artefacts) {
|
|
314
|
+
for (const s of a.skills ?? []) depSkills.add(s);
|
|
315
|
+
for (const r of a.rules ?? []) depRules.add(r);
|
|
316
|
+
}
|
|
317
|
+
out.dependencies = {
|
|
318
|
+
skills: [...depSkills].sort(_cmpStr),
|
|
319
|
+
rules: [...depRules].sort(_cmpStr),
|
|
320
|
+
};
|
|
321
|
+
return out;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function _render_readme(packMeta: Dict, artefacts: Artefact[]): string {
|
|
325
|
+
const lines: string[] = [GENERATED_HEADER, `# ${String(packMeta.label)}`, ''];
|
|
326
|
+
if (_pyTruthy(packMeta.description)) {
|
|
327
|
+
lines.push(String(packMeta.description), '');
|
|
328
|
+
}
|
|
329
|
+
const owner = (packMeta.owner as unknown[]) ?? [];
|
|
330
|
+
const requires = (packMeta.requires as unknown[]) ?? [];
|
|
331
|
+
lines.push(
|
|
332
|
+
`- **id**: \`${String(packMeta.id)}\``,
|
|
333
|
+
`- **version**: \`${String(packMeta.version)}\``,
|
|
334
|
+
`- **owner**: ${owner.map(String).join(', ') || '—'}`,
|
|
335
|
+
`- **requires**: ${requires.map(String).join(', ') || '—'}`,
|
|
336
|
+
`- **artefacts**: ${String(packMeta.artefact_count)}`,
|
|
337
|
+
'',
|
|
338
|
+
);
|
|
339
|
+
const byCat = new Map<string, Artefact[]>();
|
|
340
|
+
for (const a of artefacts) {
|
|
341
|
+
if (!byCat.has(a.category)) byCat.set(a.category, []);
|
|
342
|
+
(byCat.get(a.category) as Artefact[]).push(a);
|
|
343
|
+
}
|
|
344
|
+
for (const cat of [...byCat.keys()].sort(_cmpStr)) {
|
|
345
|
+
const group = byCat.get(cat) as Artefact[];
|
|
346
|
+
lines.push(`## ${_capitalizeTitle(cat)}s (${group.length})`, '');
|
|
347
|
+
for (const a of group.slice().sort((x, y) => _cmpStr(x.name, y.name))) {
|
|
348
|
+
const desc = a.description || '_(no description)_';
|
|
349
|
+
lines.push(`- **\`${a.name}\`** — ${desc}`);
|
|
350
|
+
}
|
|
351
|
+
lines.push('');
|
|
352
|
+
}
|
|
353
|
+
return _pyRstripWs(lines.join('\n')) + '\n';
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
function _write_if_changed(p: string, content: string, check: boolean): boolean {
|
|
357
|
+
const existing = _exists(p) ? fs.readFileSync(p, 'utf-8') : null;
|
|
358
|
+
if (existing === content) {
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
if (check) {
|
|
362
|
+
return true;
|
|
363
|
+
}
|
|
364
|
+
fs.mkdirSync(path.dirname(p), { recursive: true });
|
|
365
|
+
fs.writeFileSync(p, content, 'utf-8');
|
|
366
|
+
return true;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export function main(argv: string[] = process.argv.slice(2)): number {
|
|
370
|
+
const check = argv.includes('--check');
|
|
371
|
+
const vocab = _vocab_lookup((_load_yaml(PACKS_VOCAB) as Dict[]) ?? []);
|
|
372
|
+
const version = _package_version();
|
|
373
|
+
const homes = _pack_homes();
|
|
374
|
+
if (homes.length === 0) {
|
|
375
|
+
process.stderr.write(
|
|
376
|
+
'no pack homes (src/agent-src, src/packs, src/domains, packages/) — nothing to generate\n',
|
|
377
|
+
);
|
|
378
|
+
return 0;
|
|
379
|
+
}
|
|
380
|
+
let drift = 0;
|
|
381
|
+
for (const [pid, homeDir, mode] of homes) {
|
|
382
|
+
const artefacts = _collect_artefacts(pid, homeDir, mode);
|
|
383
|
+
const meta = _build_pack_yaml(pid, vocab, artefacts, version);
|
|
384
|
+
const yamlBody = GENERATED_HEADER + _py_safe_dump(meta);
|
|
385
|
+
const readmeBody = _render_readme(meta, artefacts);
|
|
386
|
+
const label = _relativeToPosix(homeDir, ROOT);
|
|
387
|
+
if (_write_if_changed(path.join(homeDir, 'pack.yaml'), yamlBody, check)) {
|
|
388
|
+
drift += 1;
|
|
389
|
+
process.stdout.write(`${check ? 'drift' : 'wrote'}: ${label}/pack.yaml\n`);
|
|
390
|
+
}
|
|
391
|
+
if (_write_if_changed(path.join(homeDir, 'README.md'), readmeBody, check)) {
|
|
392
|
+
drift += 1;
|
|
393
|
+
process.stdout.write(`${check ? 'drift' : 'wrote'}: ${label}/README.md\n`);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
if (check && drift) {
|
|
397
|
+
process.stderr.write(
|
|
398
|
+
`pack manifests out of date (${drift} file(s)) — run \`task generate-pack-manifests\`\n`,
|
|
399
|
+
);
|
|
400
|
+
return 1;
|
|
401
|
+
}
|
|
402
|
+
return 0;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// === PyYAML safe_dump emitter (block style, sort_keys, allow_unicode) =======
|
|
406
|
+
//
|
|
407
|
+
// Reproduces the byte output of
|
|
408
|
+
// yaml.safe_dump(value, sort_keys=True, allow_unicode=True)
|
|
409
|
+
// for the value shapes this script emits: dicts (string keys), strings,
|
|
410
|
+
// ints, bools, None, lists, and nested dicts. PyYAML's default block style,
|
|
411
|
+
// 2-space indent, best_width=80 plain-scalar line folding (now triggered by
|
|
412
|
+
// the two long pack descriptions on main), and implicit-resolver-driven
|
|
413
|
+
// scalar quoting are mirrored.
|
|
414
|
+
|
|
415
|
+
// PyYAML Emitter defaults: best_width=80, best_indent=2. A plain block scalar
|
|
416
|
+
// folds at column 80 — when a single-space word boundary would push the
|
|
417
|
+
// running column past 80, the space is replaced by a line break + the value
|
|
418
|
+
// node's block indent (the continuation indent). Only PLAIN scalars fold here;
|
|
419
|
+
// quoted scalars have their own folding rules (not exercised by pack data,
|
|
420
|
+
// where no quoted value approaches 80 columns).
|
|
421
|
+
const BEST_WIDTH = 80;
|
|
422
|
+
|
|
423
|
+
export function _py_safe_dump(value: unknown): string {
|
|
424
|
+
// Top-level document. PyYAML's emitter prints an empty mapping/sequence
|
|
425
|
+
// inline and a non-empty one in block style at indent 0.
|
|
426
|
+
const out: string[] = [];
|
|
427
|
+
_emitBlockNode(value, 0, out, true);
|
|
428
|
+
return out.join('');
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Fold a PLAIN scalar the way PyYAML's `Emitter.write_plain` does, starting
|
|
433
|
+
* at `startColumn` (the column of the scalar's first character) and breaking
|
|
434
|
+
* to `contIndent` (the value node's block indent) when a word boundary would
|
|
435
|
+
* push the running column past `best_width` (80).
|
|
436
|
+
*
|
|
437
|
+
* Faithful to PyYAML: a fold happens only at a SINGLE-space word boundary
|
|
438
|
+
* (`start + 1 === end`) once `column > best_width`; that one space is dropped
|
|
439
|
+
* and replaced by a newline + `contIndent` spaces. Multi-space runs are
|
|
440
|
+
* written literally (never the fold point). The first word is always emitted
|
|
441
|
+
* on the opening line — a fold can never produce an empty leading line nor
|
|
442
|
+
* break before the first space. The pack data carries no line breaks inside
|
|
443
|
+
* a scalar, so the break-run branch of `write_plain` is unreachable here.
|
|
444
|
+
*
|
|
445
|
+
* Returns the text fragment for the scalar (no trailing newline).
|
|
446
|
+
*/
|
|
447
|
+
function _foldPlainScalar(text: string, startColumn: number, contIndent: number): string {
|
|
448
|
+
if (text === '') {
|
|
449
|
+
return '';
|
|
450
|
+
}
|
|
451
|
+
let outStr = '';
|
|
452
|
+
let column = startColumn;
|
|
453
|
+
let spaces = false;
|
|
454
|
+
let start = 0;
|
|
455
|
+
let end = 0;
|
|
456
|
+
while (end <= text.length) {
|
|
457
|
+
const ch: string | null = end < text.length ? (text[end] as string) : null;
|
|
458
|
+
if (spaces) {
|
|
459
|
+
if (ch !== ' ') {
|
|
460
|
+
if (start + 1 === end && column > BEST_WIDTH) {
|
|
461
|
+
// Fold: replace the single space with break + continuation
|
|
462
|
+
// indent. PyYAML's writeIndent resets the column to the
|
|
463
|
+
// indent and primes whitespace=false so the next word
|
|
464
|
+
// attaches with no extra leading space.
|
|
465
|
+
outStr += '\n' + ' '.repeat(contIndent);
|
|
466
|
+
column = contIndent;
|
|
467
|
+
} else {
|
|
468
|
+
const data = text.slice(start, end);
|
|
469
|
+
column += data.length;
|
|
470
|
+
outStr += data;
|
|
471
|
+
}
|
|
472
|
+
start = end;
|
|
473
|
+
}
|
|
474
|
+
} else {
|
|
475
|
+
if (ch === null || ch === ' ') {
|
|
476
|
+
const data = text.slice(start, end);
|
|
477
|
+
column += data.length;
|
|
478
|
+
outStr += data;
|
|
479
|
+
start = end;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
if (ch !== null) {
|
|
483
|
+
spaces = ch === ' ';
|
|
484
|
+
}
|
|
485
|
+
end += 1;
|
|
486
|
+
}
|
|
487
|
+
return outStr;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Emit a node in block context. `indent` is the current indent column for
|
|
492
|
+
* children. `topLevel` toggles the document-root behaviour. Appends to
|
|
493
|
+
* `out` (a list of string chunks). The contract: each call leaves a
|
|
494
|
+
* complete set of lines ending in `\n` for the lines it owns.
|
|
495
|
+
*/
|
|
496
|
+
function _emitBlockNode(value: unknown, indent: number, out: string[], topLevel: boolean): void {
|
|
497
|
+
if (_isPlainObject(value)) {
|
|
498
|
+
const obj = value as Dict;
|
|
499
|
+
const keys = Object.keys(obj).sort(_cmpStr);
|
|
500
|
+
if (keys.length === 0) {
|
|
501
|
+
out.push(`${' '.repeat(indent)}{}\n`);
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
for (const k of keys) {
|
|
505
|
+
const keyScalar = _scalarRepr(k);
|
|
506
|
+
const v = obj[k];
|
|
507
|
+
if (_isPlainObject(v) && Object.keys(v as Dict).length > 0) {
|
|
508
|
+
out.push(`${' '.repeat(indent)}${keyScalar}:\n`);
|
|
509
|
+
_emitBlockNode(v, indent + 2, out, false);
|
|
510
|
+
} else if (Array.isArray(v) && v.length > 0) {
|
|
511
|
+
out.push(`${' '.repeat(indent)}${keyScalar}:\n`);
|
|
512
|
+
_emitBlockSeq(v, indent, out);
|
|
513
|
+
} else {
|
|
514
|
+
// scalar, empty dict, or empty list → inline value. A plain
|
|
515
|
+
// string value folds at best_width=80; the value's first char
|
|
516
|
+
// sits at column `indent + key + ": "`, continuation indent is
|
|
517
|
+
// the value node's block indent (`indent + 2`).
|
|
518
|
+
const startColumn = indent + keyScalar.length + 2;
|
|
519
|
+
out.push(`${' '.repeat(indent)}${keyScalar}: ${_scalarValueAt(v, startColumn, indent + 2)}\n`);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
if (Array.isArray(value)) {
|
|
525
|
+
if (value.length === 0) {
|
|
526
|
+
out.push(`${' '.repeat(indent)}[]\n`);
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
_emitBlockSeq(value, indent, out);
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
// bare scalar document
|
|
533
|
+
void topLevel;
|
|
534
|
+
out.push(`${_inlineValue(value)}\n`);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Emit a block sequence. PyYAML aligns the `-` markers at the SAME indent
|
|
539
|
+
* as the parent key (block sequences are not extra-indented under a key in
|
|
540
|
+
* default safe_dump): `owner:\n- engineering`. Nested under a 2-space key
|
|
541
|
+
* (`dependencies:\n skills:\n - x`) the items sit at the key's indent.
|
|
542
|
+
*/
|
|
543
|
+
function _emitBlockSeq(seq: unknown[], indent: number, out: string[]): void {
|
|
544
|
+
for (const item of seq) {
|
|
545
|
+
if (_isPlainObject(item) && Object.keys(item as Dict).length > 0) {
|
|
546
|
+
// First key on the dash line, rest indented. (Not exercised by
|
|
547
|
+
// this script's data, but kept faithful.)
|
|
548
|
+
const obj = item as Dict;
|
|
549
|
+
const keys = Object.keys(obj).sort(_cmpStr);
|
|
550
|
+
const firstKey = keys[0] as string;
|
|
551
|
+
out.push(`${' '.repeat(indent)}- ${_scalarRepr(firstKey)}: ${_inlineValue(obj[firstKey])}\n`);
|
|
552
|
+
for (const k of keys.slice(1)) {
|
|
553
|
+
out.push(`${' '.repeat(indent + 2)}${_scalarRepr(k)}: ${_inlineValue(obj[k])}\n`);
|
|
554
|
+
}
|
|
555
|
+
} else if (Array.isArray(item) && item.length > 0) {
|
|
556
|
+
out.push(`${' '.repeat(indent)}-\n`);
|
|
557
|
+
_emitBlockSeq(item, indent + 2, out);
|
|
558
|
+
} else {
|
|
559
|
+
// Plain string item folds at best_width=80; first char sits at
|
|
560
|
+
// column `indent + "- "`, continuation indent is `indent + 2`.
|
|
561
|
+
out.push(`${' '.repeat(indent)}- ${_scalarValueAt(item, indent + 2, indent + 2)}\n`);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Block-context representation of a scalar value at a known column. For a
|
|
568
|
+
* string that PyYAML would emit as a PLAIN scalar, fold it at best_width=80
|
|
569
|
+
* with `contIndent` continuation. Quoted scalars / numbers / bools / null /
|
|
570
|
+
* empty collections are not subject to plain folding here, so they fall back
|
|
571
|
+
* to the inline writer unchanged.
|
|
572
|
+
*/
|
|
573
|
+
function _scalarValueAt(value: unknown, startColumn: number, contIndent: number): string {
|
|
574
|
+
if (typeof value === 'string') {
|
|
575
|
+
const repr = _scalarRepr(value);
|
|
576
|
+
// A plain scalar is returned verbatim by _scalarRepr (no surrounding
|
|
577
|
+
// quote indicators). Only those fold; quoted reprs keep their own form.
|
|
578
|
+
if (repr === value) {
|
|
579
|
+
return _foldPlainScalar(value, startColumn, contIndent);
|
|
580
|
+
}
|
|
581
|
+
return repr;
|
|
582
|
+
}
|
|
583
|
+
return _inlineValue(value);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/** Inline (flow-on-one-line) representation of a scalar / empty collection. */
|
|
587
|
+
function _inlineValue(value: unknown): string {
|
|
588
|
+
if (value === null || value === undefined) {
|
|
589
|
+
return 'null';
|
|
590
|
+
}
|
|
591
|
+
if (typeof value === 'boolean') {
|
|
592
|
+
return value ? 'true' : 'false';
|
|
593
|
+
}
|
|
594
|
+
if (typeof value === 'number') {
|
|
595
|
+
return _numberRepr(value);
|
|
596
|
+
}
|
|
597
|
+
if (typeof value === 'string') {
|
|
598
|
+
return _scalarRepr(value);
|
|
599
|
+
}
|
|
600
|
+
if (Array.isArray(value)) {
|
|
601
|
+
// Only empty lists reach here (non-empty handled in block context).
|
|
602
|
+
return '[]';
|
|
603
|
+
}
|
|
604
|
+
if (_isPlainObject(value)) {
|
|
605
|
+
return '{}';
|
|
606
|
+
}
|
|
607
|
+
return _scalarRepr(String(value));
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
function _numberRepr(n: number): string {
|
|
611
|
+
if (Number.isInteger(n)) return String(n);
|
|
612
|
+
return String(n);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// --- PyYAML scalar analysis / quoting ----------------------------------------
|
|
616
|
+
//
|
|
617
|
+
// Mirrors PyYAML's `Emitter.analyze_scalar` + `choose_scalar_style` for the
|
|
618
|
+
// block context, plus the `SafeRepresenter`/`Resolver` implicit type check
|
|
619
|
+
// that forces quoting when a plain scalar would re-resolve as a non-string
|
|
620
|
+
// (bool / int / float / null / timestamp / merge / value).
|
|
621
|
+
|
|
622
|
+
/** Return the YAML scalar token for a string, quoting per PyYAML rules. */
|
|
623
|
+
function _scalarRepr(s: string): string {
|
|
624
|
+
if (s === '') {
|
|
625
|
+
return "''";
|
|
626
|
+
}
|
|
627
|
+
const analysis = _analyzeScalar(s);
|
|
628
|
+
// PyYAML default flow_level=-1 (block). Plain allowed unless the analysis
|
|
629
|
+
// forbids it OR the implicit resolver would re-type it.
|
|
630
|
+
const plainOk = analysis.allowBlockPlain && !_resolvesToNonStr(s);
|
|
631
|
+
if (plainOk) {
|
|
632
|
+
return s;
|
|
633
|
+
}
|
|
634
|
+
if (analysis.allowSingleQuoted) {
|
|
635
|
+
return _singleQuoted(s);
|
|
636
|
+
}
|
|
637
|
+
return _doubleQuoted(s);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
interface ScalarAnalysis {
|
|
641
|
+
allowBlockPlain: boolean;
|
|
642
|
+
allowSingleQuoted: boolean;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Port of PyYAML `Emitter.analyze_scalar` restricted to the flags this
|
|
647
|
+
* emitter consults (block-plain + single-quoted permission). Faithful to
|
|
648
|
+
* the indicator / spacing / special-character rules.
|
|
649
|
+
*/
|
|
650
|
+
function _analyzeScalar(scalar: string): ScalarAnalysis {
|
|
651
|
+
const chars = [...scalar];
|
|
652
|
+
|
|
653
|
+
let blockIndicators = false;
|
|
654
|
+
let flowIndicators = false;
|
|
655
|
+
let lineBreaks = false;
|
|
656
|
+
let specialCharacters = false;
|
|
657
|
+
|
|
658
|
+
let leadingSpace = false;
|
|
659
|
+
let leadingBreak = false;
|
|
660
|
+
let trailingSpace = false;
|
|
661
|
+
let trailingBreak = false;
|
|
662
|
+
let breakSpace = false;
|
|
663
|
+
let spaceBreak = false;
|
|
664
|
+
|
|
665
|
+
// First character indicators.
|
|
666
|
+
if (scalar.startsWith('---') || scalar.startsWith('...')) {
|
|
667
|
+
blockIndicators = true;
|
|
668
|
+
flowIndicators = true;
|
|
669
|
+
}
|
|
670
|
+
let precededByWhitespace = true;
|
|
671
|
+
let followedByWhitespace = chars.length === 1 || _isBreakOrSpace(chars[1]);
|
|
672
|
+
|
|
673
|
+
let previousSpace = false;
|
|
674
|
+
let previousBreak = false;
|
|
675
|
+
|
|
676
|
+
let index = 0;
|
|
677
|
+
while (index < chars.length) {
|
|
678
|
+
const ch = chars[index] as string;
|
|
679
|
+
const cp = ch.codePointAt(0) as number;
|
|
680
|
+
if (index === 0) {
|
|
681
|
+
if ('#,[]{}&*!|>\'"%@`'.includes(ch)) {
|
|
682
|
+
flowIndicators = true;
|
|
683
|
+
blockIndicators = true;
|
|
684
|
+
}
|
|
685
|
+
if (ch === '?' || ch === ':') {
|
|
686
|
+
flowIndicators = true;
|
|
687
|
+
if (followedByWhitespace) {
|
|
688
|
+
blockIndicators = true;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
if (ch === '-' && followedByWhitespace) {
|
|
692
|
+
flowIndicators = true;
|
|
693
|
+
blockIndicators = true;
|
|
694
|
+
}
|
|
695
|
+
} else {
|
|
696
|
+
if (',?[]{}'.includes(ch)) {
|
|
697
|
+
flowIndicators = true;
|
|
698
|
+
}
|
|
699
|
+
if (ch === ':') {
|
|
700
|
+
flowIndicators = true;
|
|
701
|
+
if (followedByWhitespace) {
|
|
702
|
+
blockIndicators = true;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
if (ch === '#' && precededByWhitespace) {
|
|
706
|
+
flowIndicators = true;
|
|
707
|
+
blockIndicators = true;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
if (_isLineBreak(ch)) {
|
|
712
|
+
lineBreaks = true;
|
|
713
|
+
}
|
|
714
|
+
if (!_isPrintableAllowUnicode(cp)) {
|
|
715
|
+
specialCharacters = true;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
if (ch === ' ') {
|
|
719
|
+
if (index === 0) leadingSpace = true;
|
|
720
|
+
if (index === chars.length - 1) trailingSpace = true;
|
|
721
|
+
if (previousBreak) breakSpace = true;
|
|
722
|
+
previousSpace = true;
|
|
723
|
+
previousBreak = false;
|
|
724
|
+
} else if (_isLineBreak(ch)) {
|
|
725
|
+
if (index === 0) leadingBreak = true;
|
|
726
|
+
if (index === chars.length - 1) trailingBreak = true;
|
|
727
|
+
if (previousSpace) spaceBreak = true;
|
|
728
|
+
previousSpace = false;
|
|
729
|
+
previousBreak = true;
|
|
730
|
+
} else {
|
|
731
|
+
previousSpace = false;
|
|
732
|
+
previousBreak = false;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
index += 1;
|
|
736
|
+
precededByWhitespace = ch === '\0' || ' \t'.includes(ch) || _isLineBreak(ch);
|
|
737
|
+
followedByWhitespace =
|
|
738
|
+
index + 1 >= chars.length || _isBreakOrSpaceCh(chars[index + 1]);
|
|
739
|
+
// PyYAML uses index+1 lookahead with a sentinel; for our scalars the
|
|
740
|
+
// simpler check above is sufficient (no embedded breaks in pack data).
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
let allowFlowPlain = true;
|
|
744
|
+
let allowBlockPlain = true;
|
|
745
|
+
let allowSingleQuoted = true;
|
|
746
|
+
let allowBlockScalarUnused = true;
|
|
747
|
+
void allowFlowPlain;
|
|
748
|
+
void allowBlockScalarUnused;
|
|
749
|
+
|
|
750
|
+
if (leadingSpace || leadingBreak || trailingSpace || trailingBreak) {
|
|
751
|
+
allowFlowPlain = false;
|
|
752
|
+
allowBlockPlain = false;
|
|
753
|
+
}
|
|
754
|
+
if (trailingSpace) {
|
|
755
|
+
allowBlockScalarUnused = false;
|
|
756
|
+
}
|
|
757
|
+
if (breakSpace) {
|
|
758
|
+
allowFlowPlain = false;
|
|
759
|
+
allowBlockPlain = false;
|
|
760
|
+
allowSingleQuoted = false;
|
|
761
|
+
}
|
|
762
|
+
if (spaceBreak || specialCharacters) {
|
|
763
|
+
allowFlowPlain = false;
|
|
764
|
+
allowBlockPlain = false;
|
|
765
|
+
allowSingleQuoted = false;
|
|
766
|
+
allowBlockScalarUnused = false;
|
|
767
|
+
}
|
|
768
|
+
if (lineBreaks) {
|
|
769
|
+
allowFlowPlain = false;
|
|
770
|
+
allowBlockPlain = false;
|
|
771
|
+
}
|
|
772
|
+
if (flowIndicators) {
|
|
773
|
+
allowFlowPlain = false;
|
|
774
|
+
}
|
|
775
|
+
if (blockIndicators) {
|
|
776
|
+
allowBlockPlain = false;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
return { allowBlockPlain, allowSingleQuoted };
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
function _isLineBreak(ch: string): boolean {
|
|
783
|
+
const cp = ch.codePointAt(0);
|
|
784
|
+
// \n (0x0A), NEL (0x85), LS (0x2028), PS (0x2029) — PyYAML line breaks.
|
|
785
|
+
return cp === 0x0a || cp === 0x85 || cp === 0x2028 || cp === 0x2029;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* allow_unicode=True printable test (PyYAML analyze_scalar). Printable:
|
|
790
|
+
* tab, newline, 0x20-0x7E, NEL, 0xA0-0xD7FF, 0xE000-0xFFFD (excl. BOM),
|
|
791
|
+
* and any astral code point.
|
|
792
|
+
*/
|
|
793
|
+
function _isPrintableAllowUnicode(cp: number): boolean {
|
|
794
|
+
if (cp === 0x09 || cp === 0x0a) return true;
|
|
795
|
+
if (cp >= 0x20 && cp <= 0x7e) return true;
|
|
796
|
+
if (cp === 0x85) return true;
|
|
797
|
+
if (cp >= 0xa0 && cp <= 0xd7ff) return true;
|
|
798
|
+
if (cp >= 0xe000 && cp <= 0xfffd && cp !== 0xfeff) return true;
|
|
799
|
+
if (cp >= 0x10000 && cp <= 0x10ffff) return true;
|
|
800
|
+
return false;
|
|
801
|
+
}
|
|
802
|
+
function _isBreakOrSpace(ch: string | undefined): boolean {
|
|
803
|
+
return ch === undefined || ch === ' ' || _isLineBreak(ch);
|
|
804
|
+
}
|
|
805
|
+
function _isBreakOrSpaceCh(ch: string | undefined): boolean {
|
|
806
|
+
return ch === undefined || '\0 \t'.includes(ch) || _isLineBreak(ch);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* PyYAML resolver: would this plain string re-resolve as a non-`str` type
|
|
811
|
+
* (bool / int / float / null / timestamp / merge / value / yes-no-on-off)?
|
|
812
|
+
* If so, safe_dump quotes it. Regexes ported from
|
|
813
|
+
* `yaml.resolver.Resolver.add_implicit_resolver` (YAML 1.1 defaults).
|
|
814
|
+
*/
|
|
815
|
+
function _resolvesToNonStr(s: string): boolean {
|
|
816
|
+
// bool
|
|
817
|
+
if (
|
|
818
|
+
/^(?:yes|Yes|YES|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)$/.test(s)
|
|
819
|
+
) {
|
|
820
|
+
return true;
|
|
821
|
+
}
|
|
822
|
+
// null
|
|
823
|
+
if (/^(?:~|null|Null|NULL|)$/.test(s)) {
|
|
824
|
+
return true;
|
|
825
|
+
}
|
|
826
|
+
// int (YAML 1.1)
|
|
827
|
+
if (
|
|
828
|
+
/^[-+]?0b[0-1_]+$/.test(s) ||
|
|
829
|
+
/^[-+]?0[0-7_]+$/.test(s) ||
|
|
830
|
+
/^[-+]?(?:0|[1-9][0-9_]*)$/.test(s) ||
|
|
831
|
+
/^[-+]?0x[0-9a-fA-F_]+$/.test(s) ||
|
|
832
|
+
/^[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+$/.test(s)
|
|
833
|
+
) {
|
|
834
|
+
return true;
|
|
835
|
+
}
|
|
836
|
+
// float (YAML 1.1)
|
|
837
|
+
if (
|
|
838
|
+
/^[-+]?(?:[0-9][0-9_]*)\.[0-9_]*(?:[eE][-+]?[0-9]+)?$/.test(s) ||
|
|
839
|
+
/^\.[0-9][0-9_]*(?:[eE][-+]?[0-9]+)?$/.test(s) ||
|
|
840
|
+
/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/.test(s) ||
|
|
841
|
+
/^[-+]?\.(?:inf|Inf|INF)$/.test(s) ||
|
|
842
|
+
/^\.(?:nan|NaN|NAN)$/.test(s)
|
|
843
|
+
) {
|
|
844
|
+
return true;
|
|
845
|
+
}
|
|
846
|
+
// timestamp (YAML 1.1)
|
|
847
|
+
if (
|
|
848
|
+
/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$/.test(s) ||
|
|
849
|
+
/^[0-9][0-9][0-9][0-9]-[0-9][0-9]?-[0-9][0-9]?(?:[Tt]|[ \t]+)[0-9][0-9]?:[0-9][0-9]:[0-9][0-9](?:\.[0-9]*)?(?:[ \t]*(?:Z|[-+][0-9][0-9]?(?::[0-9][0-9])?))?$/.test(
|
|
850
|
+
s,
|
|
851
|
+
)
|
|
852
|
+
) {
|
|
853
|
+
return true;
|
|
854
|
+
}
|
|
855
|
+
// value / merge
|
|
856
|
+
if (s === '=' || s === '<<') {
|
|
857
|
+
return true;
|
|
858
|
+
}
|
|
859
|
+
return false;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
/** PyYAML single-quoted style — double inner apostrophes, wrap in `'`. */
|
|
863
|
+
function _singleQuoted(s: string): string {
|
|
864
|
+
return `'${s.replace(/'/g, "''")}'`;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
/** PyYAML double-quoted style (used only when single-quoting is forbidden). */
|
|
868
|
+
function _doubleQuoted(s: string): string {
|
|
869
|
+
let out = '"';
|
|
870
|
+
for (const ch of s) {
|
|
871
|
+
const code = ch.codePointAt(0) as number;
|
|
872
|
+
if (ch === '"') out += '\\"';
|
|
873
|
+
else if (ch === '\\') out += '\\\\';
|
|
874
|
+
else if (ch === '\0') out += '\\0';
|
|
875
|
+
else if (ch === '\x07') out += '\\a';
|
|
876
|
+
else if (ch === '\b') out += '\\b';
|
|
877
|
+
else if (ch === '\t') out += '\\t';
|
|
878
|
+
else if (ch === '\n') out += '\\n';
|
|
879
|
+
else if (ch === '\x0b') out += '\\v';
|
|
880
|
+
else if (ch === '\f') out += '\\f';
|
|
881
|
+
else if (ch === '\r') out += '\\r';
|
|
882
|
+
else if (ch === '\x1b') out += '\\e';
|
|
883
|
+
else if (ch === '\x85') out += '\\N';
|
|
884
|
+
else if (ch === '\xa0') out += '\\_';
|
|
885
|
+
else if (ch === '
') out += '\\L';
|
|
886
|
+
else if (ch === '
') out += '\\P';
|
|
887
|
+
else if (code >= 0x20 && code <= 0x7e) out += ch;
|
|
888
|
+
else if (code <= 0xff) out += '\\x' + code.toString(16).padStart(2, '0').toUpperCase();
|
|
889
|
+
else if (code <= 0xffff) out += '\\u' + code.toString(16).padStart(4, '0').toUpperCase();
|
|
890
|
+
else out += '\\U' + code.toString(16).padStart(8, '0').toUpperCase();
|
|
891
|
+
}
|
|
892
|
+
return out + '"';
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
// --- generic helpers ---------------------------------------------------------
|
|
896
|
+
|
|
897
|
+
function _exists(p: string): boolean {
|
|
898
|
+
try {
|
|
899
|
+
fs.statSync(p);
|
|
900
|
+
return true;
|
|
901
|
+
} catch {
|
|
902
|
+
return false;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
function _isDir(p: string): boolean {
|
|
907
|
+
try {
|
|
908
|
+
return fs.statSync(p).isDirectory();
|
|
909
|
+
} catch {
|
|
910
|
+
return false;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
function _isFile(p: string): boolean {
|
|
915
|
+
try {
|
|
916
|
+
return fs.statSync(p).isFile();
|
|
917
|
+
} catch {
|
|
918
|
+
return false;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
function _isPlainObject(v: unknown): v is Dict {
|
|
923
|
+
return typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/** Sorted immediate children as absolute paths (mirrors `sorted(p.iterdir())`). */
|
|
927
|
+
function _iterdirSorted(p: string): string[] {
|
|
928
|
+
let names: string[];
|
|
929
|
+
try {
|
|
930
|
+
names = fs.readdirSync(p);
|
|
931
|
+
} catch {
|
|
932
|
+
return [];
|
|
933
|
+
}
|
|
934
|
+
names.sort();
|
|
935
|
+
return names.map((n) => path.join(p, n));
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/** Mirror `root.rglob("*.md")` → SORTED absolute paths. */
|
|
939
|
+
function _rglobSortedMd(root: string): string[] {
|
|
940
|
+
const out: string[] = [];
|
|
941
|
+
const walk = (dir: string): void => {
|
|
942
|
+
let entries: fs.Dirent[];
|
|
943
|
+
try {
|
|
944
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
945
|
+
} catch {
|
|
946
|
+
return;
|
|
947
|
+
}
|
|
948
|
+
for (const ent of entries) {
|
|
949
|
+
const full = path.join(dir, ent.name);
|
|
950
|
+
if (ent.name.endsWith('.md')) {
|
|
951
|
+
out.push(full);
|
|
952
|
+
}
|
|
953
|
+
if (ent.isDirectory() || (ent.isSymbolicLink() && _isDir(full))) {
|
|
954
|
+
walk(full);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
};
|
|
958
|
+
walk(root);
|
|
959
|
+
out.sort();
|
|
960
|
+
return out;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
function _relativeToPosix(child: string, root: string): string {
|
|
964
|
+
return path.relative(root, child).split(path.sep).join('/');
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
function _stem(p: string): string {
|
|
968
|
+
const base = path.basename(p);
|
|
969
|
+
const dot = base.lastIndexOf('.');
|
|
970
|
+
return dot <= 0 ? base : base.slice(0, dot);
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
function _removePrefix(s: string, prefix: string): string {
|
|
974
|
+
return s.startsWith(prefix) ? s.slice(prefix.length) : s;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/** Python `str.title()` for the single-word category / "Core" cases. */
|
|
978
|
+
function _capitalizeTitle(s: string): string {
|
|
979
|
+
return s.replace(/[A-Za-z]+/g, (w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase());
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
// Python str.strip() whitespace cohort.
|
|
983
|
+
const _PY_WS = [
|
|
984
|
+
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x85, 0xa0, 0x1680, 0x2000,
|
|
985
|
+
0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200a, 0x2028,
|
|
986
|
+
0x2029, 0x202f, 0x205f, 0x3000,
|
|
987
|
+
];
|
|
988
|
+
function _isPyWs(cp: number | undefined): boolean {
|
|
989
|
+
return cp !== undefined && _PY_WS.includes(cp);
|
|
990
|
+
}
|
|
991
|
+
function _pyStrip(s: string): string {
|
|
992
|
+
let start = 0;
|
|
993
|
+
let end = s.length;
|
|
994
|
+
while (start < end && _isPyWs(s.codePointAt(start))) start += 1;
|
|
995
|
+
while (end > start && _isPyWs(s.codePointAt(end - 1))) end -= 1;
|
|
996
|
+
return s.slice(start, end);
|
|
997
|
+
}
|
|
998
|
+
function _pyRstripWs(s: string): string {
|
|
999
|
+
let end = s.length;
|
|
1000
|
+
while (end > 0 && _isPyWs(s.codePointAt(end - 1))) end -= 1;
|
|
1001
|
+
return s.slice(0, end);
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
function _pyTruthy(value: unknown): boolean {
|
|
1005
|
+
if (value === null || value === undefined) return false;
|
|
1006
|
+
if (typeof value === 'boolean') return value;
|
|
1007
|
+
if (typeof value === 'number') return value !== 0;
|
|
1008
|
+
if (typeof value === 'string') return value.length > 0;
|
|
1009
|
+
if (Array.isArray(value)) return value.length > 0;
|
|
1010
|
+
if (typeof value === 'object') return Object.keys(value).length > 0;
|
|
1011
|
+
return true;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
function _cmpStr(a: string, b: string): number {
|
|
1015
|
+
if (a < b) return -1;
|
|
1016
|
+
if (a > b) return 1;
|
|
1017
|
+
return 0;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
const _isCliEntry =
|
|
1021
|
+
process.argv[1] !== undefined &&
|
|
1022
|
+
import.meta.url === pathToFileURL(path.resolve(process.argv[1])).href;
|
|
1023
|
+
if (_isCliEntry || process.argv[1] === _HERE) {
|
|
1024
|
+
process.exit(main());
|
|
1025
|
+
}
|