raptor-aios 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/LICENSE +21 -0
- package/README.md +315 -0
- package/bin/raptor.js +5 -0
- package/dist/_core/dist/agents/adapters/antigravity.d.ts +9 -0
- package/dist/_core/dist/agents/adapters/antigravity.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/antigravity.js +72 -0
- package/dist/_core/dist/agents/adapters/antigravity.js.map +1 -0
- package/dist/_core/dist/agents/adapters/claude-code.d.ts +9 -0
- package/dist/_core/dist/agents/adapters/claude-code.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/claude-code.js +71 -0
- package/dist/_core/dist/agents/adapters/claude-code.js.map +1 -0
- package/dist/_core/dist/agents/adapters/codex.d.ts +12 -0
- package/dist/_core/dist/agents/adapters/codex.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/codex.js +69 -0
- package/dist/_core/dist/agents/adapters/codex.js.map +1 -0
- package/dist/_core/dist/agents/adapters/copilot.d.ts +12 -0
- package/dist/_core/dist/agents/adapters/copilot.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/copilot.js +71 -0
- package/dist/_core/dist/agents/adapters/copilot.js.map +1 -0
- package/dist/_core/dist/agents/adapters/cursor.d.ts +9 -0
- package/dist/_core/dist/agents/adapters/cursor.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/cursor.js +62 -0
- package/dist/_core/dist/agents/adapters/cursor.js.map +1 -0
- package/dist/_core/dist/agents/adapters/gemini.d.ts +11 -0
- package/dist/_core/dist/agents/adapters/gemini.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/gemini.js +68 -0
- package/dist/_core/dist/agents/adapters/gemini.js.map +1 -0
- package/dist/_core/dist/agents/adapters/human.d.ts +10 -0
- package/dist/_core/dist/agents/adapters/human.d.ts.map +1 -0
- package/dist/_core/dist/agents/adapters/human.js +48 -0
- package/dist/_core/dist/agents/adapters/human.js.map +1 -0
- package/dist/_core/dist/agents/artifact-watcher.d.ts +86 -0
- package/dist/_core/dist/agents/artifact-watcher.d.ts.map +1 -0
- package/dist/_core/dist/agents/artifact-watcher.js +214 -0
- package/dist/_core/dist/agents/artifact-watcher.js.map +1 -0
- package/dist/_core/dist/agents/backup.d.ts +69 -0
- package/dist/_core/dist/agents/backup.d.ts.map +1 -0
- package/dist/_core/dist/agents/backup.js +107 -0
- package/dist/_core/dist/agents/backup.js.map +1 -0
- package/dist/_core/dist/agents/config.d.ts +36 -0
- package/dist/_core/dist/agents/config.d.ts.map +1 -0
- package/dist/_core/dist/agents/config.js +270 -0
- package/dist/_core/dist/agents/config.js.map +1 -0
- package/dist/_core/dist/agents/context-file.d.ts +35 -0
- package/dist/_core/dist/agents/context-file.d.ts.map +1 -0
- package/dist/_core/dist/agents/context-file.js +106 -0
- package/dist/_core/dist/agents/context-file.js.map +1 -0
- package/dist/_core/dist/agents/handoff.d.ts +57 -0
- package/dist/_core/dist/agents/handoff.d.ts.map +1 -0
- package/dist/_core/dist/agents/handoff.js +71 -0
- package/dist/_core/dist/agents/handoff.js.map +1 -0
- package/dist/_core/dist/agents/index.d.ts +32 -0
- package/dist/_core/dist/agents/index.d.ts.map +1 -0
- package/dist/_core/dist/agents/index.js +37 -0
- package/dist/_core/dist/agents/index.js.map +1 -0
- package/dist/_core/dist/agents/keys.d.ts +50 -0
- package/dist/_core/dist/agents/keys.d.ts.map +1 -0
- package/dist/_core/dist/agents/keys.js +91 -0
- package/dist/_core/dist/agents/keys.js.map +1 -0
- package/dist/_core/dist/agents/materialize.d.ts +37 -0
- package/dist/_core/dist/agents/materialize.d.ts.map +1 -0
- package/dist/_core/dist/agents/materialize.js +157 -0
- package/dist/_core/dist/agents/materialize.js.map +1 -0
- package/dist/_core/dist/agents/prompt-builder.d.ts +35 -0
- package/dist/_core/dist/agents/prompt-builder.d.ts.map +1 -0
- package/dist/_core/dist/agents/prompt-builder.js +261 -0
- package/dist/_core/dist/agents/prompt-builder.js.map +1 -0
- package/dist/_core/dist/agents/prompt-markers.d.ts +69 -0
- package/dist/_core/dist/agents/prompt-markers.d.ts.map +1 -0
- package/dist/_core/dist/agents/prompt-markers.js +111 -0
- package/dist/_core/dist/agents/prompt-markers.js.map +1 -0
- package/dist/_core/dist/agents/registry.d.ts +35 -0
- package/dist/_core/dist/agents/registry.d.ts.map +1 -0
- package/dist/_core/dist/agents/registry.js +102 -0
- package/dist/_core/dist/agents/registry.js.map +1 -0
- package/dist/_core/dist/agents/selector.d.ts +33 -0
- package/dist/_core/dist/agents/selector.d.ts.map +1 -0
- package/dist/_core/dist/agents/selector.js +120 -0
- package/dist/_core/dist/agents/selector.js.map +1 -0
- package/dist/_core/dist/agents/slash-materializer.d.ts +63 -0
- package/dist/_core/dist/agents/slash-materializer.d.ts.map +1 -0
- package/dist/_core/dist/agents/slash-materializer.js +131 -0
- package/dist/_core/dist/agents/slash-materializer.js.map +1 -0
- package/dist/_core/dist/agents/types.d.ts +121 -0
- package/dist/_core/dist/agents/types.d.ts.map +1 -0
- package/dist/_core/dist/agents/types.js +10 -0
- package/dist/_core/dist/agents/types.js.map +1 -0
- package/dist/_core/dist/audit/hash.d.ts +4 -0
- package/dist/_core/dist/audit/hash.d.ts.map +1 -0
- package/dist/_core/dist/audit/hash.js +12 -0
- package/dist/_core/dist/audit/hash.js.map +1 -0
- package/dist/_core/dist/audit/index.d.ts +6 -0
- package/dist/_core/dist/audit/index.d.ts.map +1 -0
- package/dist/_core/dist/audit/index.js +6 -0
- package/dist/_core/dist/audit/index.js.map +1 -0
- package/dist/_core/dist/audit/logger.d.ts +77 -0
- package/dist/_core/dist/audit/logger.d.ts.map +1 -0
- package/dist/_core/dist/audit/logger.js +93 -0
- package/dist/_core/dist/audit/logger.js.map +1 -0
- package/dist/_core/dist/audit/query.d.ts +13 -0
- package/dist/_core/dist/audit/query.d.ts.map +1 -0
- package/dist/_core/dist/audit/query.js +57 -0
- package/dist/_core/dist/audit/query.js.map +1 -0
- package/dist/_core/dist/audit/schema.d.ts +455 -0
- package/dist/_core/dist/audit/schema.d.ts.map +1 -0
- package/dist/_core/dist/audit/schema.js +341 -0
- package/dist/_core/dist/audit/schema.js.map +1 -0
- package/dist/_core/dist/audit/validate.d.ts +21 -0
- package/dist/_core/dist/audit/validate.d.ts.map +1 -0
- package/dist/_core/dist/audit/validate.js +139 -0
- package/dist/_core/dist/audit/validate.js.map +1 -0
- package/dist/_core/dist/constitution/core.d.ts +22 -0
- package/dist/_core/dist/constitution/core.d.ts.map +1 -0
- package/dist/_core/dist/constitution/core.js +102 -0
- package/dist/_core/dist/constitution/core.js.map +1 -0
- package/dist/_core/dist/constitution/index.d.ts +2 -0
- package/dist/_core/dist/constitution/index.d.ts.map +1 -0
- package/dist/_core/dist/constitution/index.js +2 -0
- package/dist/_core/dist/constitution/index.js.map +1 -0
- package/dist/_core/dist/extensions/index.d.ts +12 -0
- package/dist/_core/dist/extensions/index.d.ts.map +1 -0
- package/dist/_core/dist/extensions/index.js +12 -0
- package/dist/_core/dist/extensions/index.js.map +1 -0
- package/dist/_core/dist/extensions/integrate.d.ts +69 -0
- package/dist/_core/dist/extensions/integrate.d.ts.map +1 -0
- package/dist/_core/dist/extensions/integrate.js +181 -0
- package/dist/_core/dist/extensions/integrate.js.map +1 -0
- package/dist/_core/dist/extensions/loader.d.ts +24 -0
- package/dist/_core/dist/extensions/loader.d.ts.map +1 -0
- package/dist/_core/dist/extensions/loader.js +73 -0
- package/dist/_core/dist/extensions/loader.js.map +1 -0
- package/dist/_core/dist/extensions/manifest.d.ts +23 -0
- package/dist/_core/dist/extensions/manifest.d.ts.map +1 -0
- package/dist/_core/dist/extensions/manifest.js +176 -0
- package/dist/_core/dist/extensions/manifest.js.map +1 -0
- package/dist/_core/dist/extensions/registry.d.ts +32 -0
- package/dist/_core/dist/extensions/registry.d.ts.map +1 -0
- package/dist/_core/dist/extensions/registry.js +57 -0
- package/dist/_core/dist/extensions/registry.js.map +1 -0
- package/dist/_core/dist/extensions/resolver.d.ts +55 -0
- package/dist/_core/dist/extensions/resolver.d.ts.map +1 -0
- package/dist/_core/dist/extensions/resolver.js +143 -0
- package/dist/_core/dist/extensions/resolver.js.map +1 -0
- package/dist/_core/dist/extensions/types.d.ts +173 -0
- package/dist/_core/dist/extensions/types.d.ts.map +1 -0
- package/dist/_core/dist/extensions/types.js +83 -0
- package/dist/_core/dist/extensions/types.js.map +1 -0
- package/dist/_core/dist/frontmatter/index.d.ts +10 -0
- package/dist/_core/dist/frontmatter/index.d.ts.map +1 -0
- package/dist/_core/dist/frontmatter/index.js +24 -0
- package/dist/_core/dist/frontmatter/index.js.map +1 -0
- package/dist/_core/dist/gates/agent-gates.d.ts +16 -0
- package/dist/_core/dist/gates/agent-gates.d.ts.map +1 -0
- package/dist/_core/dist/gates/agent-gates.js +205 -0
- package/dist/_core/dist/gates/agent-gates.js.map +1 -0
- package/dist/_core/dist/gates/builtin.d.ts +18 -0
- package/dist/_core/dist/gates/builtin.d.ts.map +1 -0
- package/dist/_core/dist/gates/builtin.js +860 -0
- package/dist/_core/dist/gates/builtin.js.map +1 -0
- package/dist/_core/dist/gates/index.d.ts +7 -0
- package/dist/_core/dist/gates/index.d.ts.map +1 -0
- package/dist/_core/dist/gates/index.js +7 -0
- package/dist/_core/dist/gates/index.js.map +1 -0
- package/dist/_core/dist/gates/m7-gates.d.ts +17 -0
- package/dist/_core/dist/gates/m7-gates.d.ts.map +1 -0
- package/dist/_core/dist/gates/m7-gates.js +309 -0
- package/dist/_core/dist/gates/m7-gates.js.map +1 -0
- package/dist/_core/dist/gates/phase-gates.d.ts +18 -0
- package/dist/_core/dist/gates/phase-gates.d.ts.map +1 -0
- package/dist/_core/dist/gates/phase-gates.js +275 -0
- package/dist/_core/dist/gates/phase-gates.js.map +1 -0
- package/dist/_core/dist/gates/runner.d.ts +4 -0
- package/dist/_core/dist/gates/runner.d.ts.map +1 -0
- package/dist/_core/dist/gates/runner.js +64 -0
- package/dist/_core/dist/gates/runner.js.map +1 -0
- package/dist/_core/dist/gates/types.d.ts +36 -0
- package/dist/_core/dist/gates/types.d.ts.map +1 -0
- package/dist/_core/dist/gates/types.js +2 -0
- package/dist/_core/dist/gates/types.js.map +1 -0
- package/dist/_core/dist/hooks/index.d.ts +4 -0
- package/dist/_core/dist/hooks/index.d.ts.map +1 -0
- package/dist/_core/dist/hooks/index.js +4 -0
- package/dist/_core/dist/hooks/index.js.map +1 -0
- package/dist/_core/dist/hooks/runner.d.ts +28 -0
- package/dist/_core/dist/hooks/runner.d.ts.map +1 -0
- package/dist/_core/dist/hooks/runner.js +294 -0
- package/dist/_core/dist/hooks/runner.js.map +1 -0
- package/dist/_core/dist/hooks/runtime.d.ts +65 -0
- package/dist/_core/dist/hooks/runtime.d.ts.map +1 -0
- package/dist/_core/dist/hooks/runtime.js +212 -0
- package/dist/_core/dist/hooks/runtime.js.map +1 -0
- package/dist/_core/dist/hooks/types.d.ts +36 -0
- package/dist/_core/dist/hooks/types.d.ts.map +1 -0
- package/dist/_core/dist/hooks/types.js +23 -0
- package/dist/_core/dist/hooks/types.js.map +1 -0
- package/dist/_core/dist/index.d.ts +21 -0
- package/dist/_core/dist/index.d.ts.map +1 -0
- package/dist/_core/dist/index.js +20 -0
- package/dist/_core/dist/index.js.map +1 -0
- package/dist/_core/dist/manifest/index.d.ts +119 -0
- package/dist/_core/dist/manifest/index.d.ts.map +1 -0
- package/dist/_core/dist/manifest/index.js +125 -0
- package/dist/_core/dist/manifest/index.js.map +1 -0
- package/dist/_core/dist/markers/index.d.ts +47 -0
- package/dist/_core/dist/markers/index.d.ts.map +1 -0
- package/dist/_core/dist/markers/index.js +97 -0
- package/dist/_core/dist/markers/index.js.map +1 -0
- package/dist/_core/dist/mcp/config.d.ts +19 -0
- package/dist/_core/dist/mcp/config.d.ts.map +1 -0
- package/dist/_core/dist/mcp/config.js +114 -0
- package/dist/_core/dist/mcp/config.js.map +1 -0
- package/dist/_core/dist/mcp/index.d.ts +9 -0
- package/dist/_core/dist/mcp/index.d.ts.map +1 -0
- package/dist/_core/dist/mcp/index.js +8 -0
- package/dist/_core/dist/mcp/index.js.map +1 -0
- package/dist/_core/dist/mcp/materializer.d.ts +40 -0
- package/dist/_core/dist/mcp/materializer.d.ts.map +1 -0
- package/dist/_core/dist/mcp/materializer.js +161 -0
- package/dist/_core/dist/mcp/materializer.js.map +1 -0
- package/dist/_core/dist/mcp/targets.d.ts +37 -0
- package/dist/_core/dist/mcp/targets.d.ts.map +1 -0
- package/dist/_core/dist/mcp/targets.js +56 -0
- package/dist/_core/dist/mcp/targets.js.map +1 -0
- package/dist/_core/dist/mcp/types.d.ts +34 -0
- package/dist/_core/dist/mcp/types.d.ts.map +1 -0
- package/dist/_core/dist/mcp/types.js +8 -0
- package/dist/_core/dist/mcp/types.js.map +1 -0
- package/dist/_core/dist/models/analyze.d.ts +131 -0
- package/dist/_core/dist/models/analyze.d.ts.map +1 -0
- package/dist/_core/dist/models/analyze.js +301 -0
- package/dist/_core/dist/models/analyze.js.map +1 -0
- package/dist/_core/dist/models/checklist.d.ts +113 -0
- package/dist/_core/dist/models/checklist.d.ts.map +1 -0
- package/dist/_core/dist/models/checklist.js +159 -0
- package/dist/_core/dist/models/checklist.js.map +1 -0
- package/dist/_core/dist/models/clarify.d.ts +116 -0
- package/dist/_core/dist/models/clarify.d.ts.map +1 -0
- package/dist/_core/dist/models/clarify.js +166 -0
- package/dist/_core/dist/models/clarify.js.map +1 -0
- package/dist/_core/dist/models/impl-log.d.ts +64 -0
- package/dist/_core/dist/models/impl-log.d.ts.map +1 -0
- package/dist/_core/dist/models/impl-log.js +137 -0
- package/dist/_core/dist/models/impl-log.js.map +1 -0
- package/dist/_core/dist/models/index.d.ts +8 -0
- package/dist/_core/dist/models/index.d.ts.map +1 -0
- package/dist/_core/dist/models/index.js +8 -0
- package/dist/_core/dist/models/index.js.map +1 -0
- package/dist/_core/dist/models/plan.d.ts +24 -0
- package/dist/_core/dist/models/plan.d.ts.map +1 -0
- package/dist/_core/dist/models/plan.js +15 -0
- package/dist/_core/dist/models/plan.js.map +1 -0
- package/dist/_core/dist/models/spec.d.ts +23 -0
- package/dist/_core/dist/models/spec.d.ts.map +1 -0
- package/dist/_core/dist/models/spec.js +22 -0
- package/dist/_core/dist/models/spec.js.map +1 -0
- package/dist/_core/dist/models/tasks.d.ts +33 -0
- package/dist/_core/dist/models/tasks.d.ts.map +1 -0
- package/dist/_core/dist/models/tasks.js +78 -0
- package/dist/_core/dist/models/tasks.js.map +1 -0
- package/dist/_core/dist/presets/gates.d.ts +9 -0
- package/dist/_core/dist/presets/gates.d.ts.map +1 -0
- package/dist/_core/dist/presets/gates.js +173 -0
- package/dist/_core/dist/presets/gates.js.map +1 -0
- package/dist/_core/dist/presets/index.d.ts +10 -0
- package/dist/_core/dist/presets/index.d.ts.map +1 -0
- package/dist/_core/dist/presets/index.js +7 -0
- package/dist/_core/dist/presets/index.js.map +1 -0
- package/dist/_core/dist/presets/loader.d.ts +56 -0
- package/dist/_core/dist/presets/loader.d.ts.map +1 -0
- package/dist/_core/dist/presets/loader.js +216 -0
- package/dist/_core/dist/presets/loader.js.map +1 -0
- package/dist/_core/dist/presets/mobile-opinionated.d.ts +3 -0
- package/dist/_core/dist/presets/mobile-opinionated.d.ts.map +1 -0
- package/dist/_core/dist/presets/mobile-opinionated.js +78 -0
- package/dist/_core/dist/presets/mobile-opinionated.js.map +1 -0
- package/dist/_core/dist/presets/registry.d.ts +5 -0
- package/dist/_core/dist/presets/registry.d.ts.map +1 -0
- package/dist/_core/dist/presets/registry.js +14 -0
- package/dist/_core/dist/presets/registry.js.map +1 -0
- package/dist/_core/dist/presets/renderer.d.ts +5 -0
- package/dist/_core/dist/presets/renderer.d.ts.map +1 -0
- package/dist/_core/dist/presets/renderer.js +37 -0
- package/dist/_core/dist/presets/renderer.js.map +1 -0
- package/dist/_core/dist/presets/stacking.d.ts +29 -0
- package/dist/_core/dist/presets/stacking.d.ts.map +1 -0
- package/dist/_core/dist/presets/stacking.js +91 -0
- package/dist/_core/dist/presets/stacking.js.map +1 -0
- package/dist/_core/dist/presets/types.d.ts +22 -0
- package/dist/_core/dist/presets/types.d.ts.map +1 -0
- package/dist/_core/dist/presets/types.js +2 -0
- package/dist/_core/dist/presets/types.js.map +1 -0
- package/dist/_core/dist/prompts/audit-log.d.ts +73 -0
- package/dist/_core/dist/prompts/audit-log.d.ts.map +1 -0
- package/dist/_core/dist/prompts/audit-log.js +73 -0
- package/dist/_core/dist/prompts/audit-log.js.map +1 -0
- package/dist/_core/dist/prompts/index.d.ts +9 -0
- package/dist/_core/dist/prompts/index.d.ts.map +1 -0
- package/dist/_core/dist/prompts/index.js +7 -0
- package/dist/_core/dist/prompts/index.js.map +1 -0
- package/dist/_core/dist/prompts/renderer.d.ts +73 -0
- package/dist/_core/dist/prompts/renderer.d.ts.map +1 -0
- package/dist/_core/dist/prompts/renderer.js +179 -0
- package/dist/_core/dist/prompts/renderer.js.map +1 -0
- package/dist/_core/dist/prompts/resumption.d.ts +59 -0
- package/dist/_core/dist/prompts/resumption.d.ts.map +1 -0
- package/dist/_core/dist/prompts/resumption.js +149 -0
- package/dist/_core/dist/prompts/resumption.js.map +1 -0
- package/dist/_core/dist/skills/config.d.ts +27 -0
- package/dist/_core/dist/skills/config.d.ts.map +1 -0
- package/dist/_core/dist/skills/config.js +102 -0
- package/dist/_core/dist/skills/config.js.map +1 -0
- package/dist/_core/dist/skills/index.d.ts +9 -0
- package/dist/_core/dist/skills/index.d.ts.map +1 -0
- package/dist/_core/dist/skills/index.js +8 -0
- package/dist/_core/dist/skills/index.js.map +1 -0
- package/dist/_core/dist/skills/materializer.d.ts +45 -0
- package/dist/_core/dist/skills/materializer.d.ts.map +1 -0
- package/dist/_core/dist/skills/materializer.js +97 -0
- package/dist/_core/dist/skills/materializer.js.map +1 -0
- package/dist/_core/dist/skills/registry.d.ts +18 -0
- package/dist/_core/dist/skills/registry.d.ts.map +1 -0
- package/dist/_core/dist/skills/registry.js +36 -0
- package/dist/_core/dist/skills/registry.js.map +1 -0
- package/dist/_core/dist/skills/types.d.ts +39 -0
- package/dist/_core/dist/skills/types.d.ts.map +1 -0
- package/dist/_core/dist/skills/types.js +13 -0
- package/dist/_core/dist/skills/types.js.map +1 -0
- package/dist/_core/dist/state/feature.d.ts +58 -0
- package/dist/_core/dist/state/feature.d.ts.map +1 -0
- package/dist/_core/dist/state/feature.js +81 -0
- package/dist/_core/dist/state/feature.js.map +1 -0
- package/dist/_core/dist/state/index.d.ts +8 -0
- package/dist/_core/dist/state/index.d.ts.map +1 -0
- package/dist/_core/dist/state/index.js +6 -0
- package/dist/_core/dist/state/index.js.map +1 -0
- package/dist/_core/dist/state/init-options.d.ts +60 -0
- package/dist/_core/dist/state/init-options.d.ts.map +1 -0
- package/dist/_core/dist/state/init-options.js +74 -0
- package/dist/_core/dist/state/init-options.js.map +1 -0
- package/dist/_core/dist/template/engine.d.ts +7 -0
- package/dist/_core/dist/template/engine.d.ts.map +1 -0
- package/dist/_core/dist/template/engine.js +86 -0
- package/dist/_core/dist/template/engine.js.map +1 -0
- package/dist/_core/dist/template/helpers.d.ts +5 -0
- package/dist/_core/dist/template/helpers.d.ts.map +1 -0
- package/dist/_core/dist/template/helpers.js +59 -0
- package/dist/_core/dist/template/helpers.js.map +1 -0
- package/dist/_core/dist/template/index.d.ts +6 -0
- package/dist/_core/dist/template/index.d.ts.map +1 -0
- package/dist/_core/dist/template/index.js +6 -0
- package/dist/_core/dist/template/index.js.map +1 -0
- package/dist/_core/dist/template/loader.d.ts +36 -0
- package/dist/_core/dist/template/loader.d.ts.map +1 -0
- package/dist/_core/dist/template/loader.js +62 -0
- package/dist/_core/dist/template/loader.js.map +1 -0
- package/dist/_core/dist/template/parser.d.ts +3 -0
- package/dist/_core/dist/template/parser.d.ts.map +1 -0
- package/dist/_core/dist/template/parser.js +234 -0
- package/dist/_core/dist/template/parser.js.map +1 -0
- package/dist/_core/dist/template/types.d.ts +40 -0
- package/dist/_core/dist/template/types.d.ts.map +1 -0
- package/dist/_core/dist/template/types.js +14 -0
- package/dist/_core/dist/template/types.js.map +1 -0
- package/dist/_core/dist/verify/a11y.d.ts +36 -0
- package/dist/_core/dist/verify/a11y.d.ts.map +1 -0
- package/dist/_core/dist/verify/a11y.js +153 -0
- package/dist/_core/dist/verify/a11y.js.map +1 -0
- package/dist/_core/dist/verify/architecture.d.ts +37 -0
- package/dist/_core/dist/verify/architecture.d.ts.map +1 -0
- package/dist/_core/dist/verify/architecture.js +113 -0
- package/dist/_core/dist/verify/architecture.js.map +1 -0
- package/dist/_core/dist/verify/index.d.ts +10 -0
- package/dist/_core/dist/verify/index.d.ts.map +1 -0
- package/dist/_core/dist/verify/index.js +10 -0
- package/dist/_core/dist/verify/index.js.map +1 -0
- package/dist/_core/dist/verify/os-matrix.d.ts +35 -0
- package/dist/_core/dist/verify/os-matrix.d.ts.map +1 -0
- package/dist/_core/dist/verify/os-matrix.js +104 -0
- package/dist/_core/dist/verify/os-matrix.js.map +1 -0
- package/dist/_core/dist/verify/perf.d.ts +43 -0
- package/dist/_core/dist/verify/perf.d.ts.map +1 -0
- package/dist/_core/dist/verify/perf.js +69 -0
- package/dist/_core/dist/verify/perf.js.map +1 -0
- package/dist/_core/dist/verify/stores.d.ts +38 -0
- package/dist/_core/dist/verify/stores.d.ts.map +1 -0
- package/dist/_core/dist/verify/stores.js +57 -0
- package/dist/_core/dist/verify/stores.js.map +1 -0
- package/dist/_core/dist/version.d.ts +8 -0
- package/dist/_core/dist/version.d.ts.map +1 -0
- package/dist/_core/dist/version.js +11 -0
- package/dist/_core/dist/version.js.map +1 -0
- package/dist/_core/dist/workflows/bundled.d.ts +32 -0
- package/dist/_core/dist/workflows/bundled.d.ts.map +1 -0
- package/dist/_core/dist/workflows/bundled.js +254 -0
- package/dist/_core/dist/workflows/bundled.js.map +1 -0
- package/dist/_core/dist/workflows/engine.d.ts +74 -0
- package/dist/_core/dist/workflows/engine.d.ts.map +1 -0
- package/dist/_core/dist/workflows/engine.js +574 -0
- package/dist/_core/dist/workflows/engine.js.map +1 -0
- package/dist/_core/dist/workflows/expressions.d.ts +48 -0
- package/dist/_core/dist/workflows/expressions.d.ts.map +1 -0
- package/dist/_core/dist/workflows/expressions.js +336 -0
- package/dist/_core/dist/workflows/expressions.js.map +1 -0
- package/dist/_core/dist/workflows/index.d.ts +16 -0
- package/dist/_core/dist/workflows/index.d.ts.map +1 -0
- package/dist/_core/dist/workflows/index.js +15 -0
- package/dist/_core/dist/workflows/index.js.map +1 -0
- package/dist/_core/dist/workflows/parser.d.ts +38 -0
- package/dist/_core/dist/workflows/parser.d.ts.map +1 -0
- package/dist/_core/dist/workflows/parser.js +386 -0
- package/dist/_core/dist/workflows/parser.js.map +1 -0
- package/dist/_core/dist/workflows/sdd-flow.d.ts +85 -0
- package/dist/_core/dist/workflows/sdd-flow.d.ts.map +1 -0
- package/dist/_core/dist/workflows/sdd-flow.js +269 -0
- package/dist/_core/dist/workflows/sdd-flow.js.map +1 -0
- package/dist/_core/dist/workflows/types.d.ts +285 -0
- package/dist/_core/dist/workflows/types.d.ts.map +1 -0
- package/dist/_core/dist/workflows/types.js +13 -0
- package/dist/_core/dist/workflows/types.js.map +1 -0
- package/dist/_core/package.json +6 -0
- package/dist/_core/templates/constitution.md.hbs +46 -0
- package/dist/_core/templates/ghaWorkflow.yml.hbs +58 -0
- package/dist/_core/templates/hotfix.md.hbs +39 -0
- package/dist/_core/templates/plan.md.hbs +212 -0
- package/dist/_core/templates/preCommitHook.sh.hbs +30 -0
- package/dist/_core/templates/prePushHook.sh.hbs +45 -0
- package/dist/_core/templates/raptor.yml.hbs +24 -0
- package/dist/_core/templates/spec.md.hbs +127 -0
- package/dist/_core/templates/tasks.md.hbs +71 -0
- package/dist/commands/add-agent.d.ts +22 -0
- package/dist/commands/add-agent.d.ts.map +1 -0
- package/dist/commands/add-agent.js +121 -0
- package/dist/commands/add-agent.js.map +1 -0
- package/dist/commands/add-extension.d.ts +18 -0
- package/dist/commands/add-extension.d.ts.map +1 -0
- package/dist/commands/add-extension.js +83 -0
- package/dist/commands/add-extension.js.map +1 -0
- package/dist/commands/analyze.d.ts +18 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +323 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/approve.d.ts +14 -0
- package/dist/commands/approve.d.ts.map +1 -0
- package/dist/commands/approve.js +116 -0
- package/dist/commands/approve.js.map +1 -0
- package/dist/commands/audit/query.d.ts +23 -0
- package/dist/commands/audit/query.d.ts.map +1 -0
- package/dist/commands/audit/query.js +118 -0
- package/dist/commands/audit/query.js.map +1 -0
- package/dist/commands/audit/show.d.ts +17 -0
- package/dist/commands/audit/show.d.ts.map +1 -0
- package/dist/commands/audit/show.js +53 -0
- package/dist/commands/audit/show.js.map +1 -0
- package/dist/commands/checklist.d.ts +17 -0
- package/dist/commands/checklist.d.ts.map +1 -0
- package/dist/commands/checklist.js +255 -0
- package/dist/commands/checklist.js.map +1 -0
- package/dist/commands/clarify.d.ts +17 -0
- package/dist/commands/clarify.d.ts.map +1 -0
- package/dist/commands/clarify.js +254 -0
- package/dist/commands/clarify.js.map +1 -0
- package/dist/commands/doctor.d.ts +8 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +435 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/extension/add.d.ts +15 -0
- package/dist/commands/extension/add.d.ts.map +1 -0
- package/dist/commands/extension/add.js +93 -0
- package/dist/commands/extension/add.js.map +1 -0
- package/dist/commands/extension/info.d.ts +13 -0
- package/dist/commands/extension/info.d.ts.map +1 -0
- package/dist/commands/extension/info.js +75 -0
- package/dist/commands/extension/info.js.map +1 -0
- package/dist/commands/extension/list.d.ts +10 -0
- package/dist/commands/extension/list.d.ts.map +1 -0
- package/dist/commands/extension/list.js +71 -0
- package/dist/commands/extension/list.js.map +1 -0
- package/dist/commands/extension/remove.d.ts +14 -0
- package/dist/commands/extension/remove.d.ts.map +1 -0
- package/dist/commands/extension/remove.js +49 -0
- package/dist/commands/extension/remove.js.map +1 -0
- package/dist/commands/gate/approve.d.ts +15 -0
- package/dist/commands/gate/approve.d.ts.map +1 -0
- package/dist/commands/gate/approve.js +106 -0
- package/dist/commands/gate/approve.js.map +1 -0
- package/dist/commands/gate/list.d.ts +6 -0
- package/dist/commands/gate/list.d.ts.map +1 -0
- package/dist/commands/gate/list.js +38 -0
- package/dist/commands/gate/list.js.map +1 -0
- package/dist/commands/gate/skip.d.ts +14 -0
- package/dist/commands/gate/skip.d.ts.map +1 -0
- package/dist/commands/gate/skip.js +95 -0
- package/dist/commands/gate/skip.js.map +1 -0
- package/dist/commands/hook/list.d.ts +11 -0
- package/dist/commands/hook/list.d.ts.map +1 -0
- package/dist/commands/hook/list.js +152 -0
- package/dist/commands/hook/list.js.map +1 -0
- package/dist/commands/hook/run.d.ts +16 -0
- package/dist/commands/hook/run.d.ts.map +1 -0
- package/dist/commands/hook/run.js +74 -0
- package/dist/commands/hook/run.js.map +1 -0
- package/dist/commands/hotfix.d.ts +21 -0
- package/dist/commands/hotfix.d.ts.map +1 -0
- package/dist/commands/hotfix.js +216 -0
- package/dist/commands/hotfix.js.map +1 -0
- package/dist/commands/implement.d.ts +19 -0
- package/dist/commands/implement.d.ts.map +1 -0
- package/dist/commands/implement.js +282 -0
- package/dist/commands/implement.js.map +1 -0
- package/dist/commands/init.d.ts +43 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +465 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list-agents.d.ts +12 -0
- package/dist/commands/list-agents.d.ts.map +1 -0
- package/dist/commands/list-agents.js +55 -0
- package/dist/commands/list-agents.js.map +1 -0
- package/dist/commands/mcp/add.d.ts +21 -0
- package/dist/commands/mcp/add.d.ts.map +1 -0
- package/dist/commands/mcp/add.js +119 -0
- package/dist/commands/mcp/add.js.map +1 -0
- package/dist/commands/mcp/list.d.ts +10 -0
- package/dist/commands/mcp/list.d.ts.map +1 -0
- package/dist/commands/mcp/list.js +54 -0
- package/dist/commands/mcp/list.js.map +1 -0
- package/dist/commands/mcp/remove.d.ts +10 -0
- package/dist/commands/mcp/remove.d.ts.map +1 -0
- package/dist/commands/mcp/remove.js +53 -0
- package/dist/commands/mcp/remove.js.map +1 -0
- package/dist/commands/mcp/sync.d.ts +7 -0
- package/dist/commands/mcp/sync.d.ts.map +1 -0
- package/dist/commands/mcp/sync.js +31 -0
- package/dist/commands/mcp/sync.js.map +1 -0
- package/dist/commands/new.d.ts +19 -0
- package/dist/commands/new.d.ts.map +1 -0
- package/dist/commands/new.js +306 -0
- package/dist/commands/new.js.map +1 -0
- package/dist/commands/plan.d.ts +17 -0
- package/dist/commands/plan.d.ts.map +1 -0
- package/dist/commands/plan.js +200 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/preset/add.d.ts +13 -0
- package/dist/commands/preset/add.d.ts.map +1 -0
- package/dist/commands/preset/add.js +66 -0
- package/dist/commands/preset/add.js.map +1 -0
- package/dist/commands/preset/info.d.ts +13 -0
- package/dist/commands/preset/info.d.ts.map +1 -0
- package/dist/commands/preset/info.js +80 -0
- package/dist/commands/preset/info.js.map +1 -0
- package/dist/commands/preset/list.d.ts +10 -0
- package/dist/commands/preset/list.d.ts.map +1 -0
- package/dist/commands/preset/list.js +63 -0
- package/dist/commands/preset/list.js.map +1 -0
- package/dist/commands/preset/remove.d.ts +14 -0
- package/dist/commands/preset/remove.d.ts.map +1 -0
- package/dist/commands/preset/remove.js +60 -0
- package/dist/commands/preset/remove.js.map +1 -0
- package/dist/commands/repair/constitution.d.ts +11 -0
- package/dist/commands/repair/constitution.d.ts.map +1 -0
- package/dist/commands/repair/constitution.js +117 -0
- package/dist/commands/repair/constitution.js.map +1 -0
- package/dist/commands/resync.d.ts +22 -0
- package/dist/commands/resync.d.ts.map +1 -0
- package/dist/commands/resync.js +103 -0
- package/dist/commands/resync.js.map +1 -0
- package/dist/commands/skill/add.d.ts +19 -0
- package/dist/commands/skill/add.d.ts.map +1 -0
- package/dist/commands/skill/add.js +107 -0
- package/dist/commands/skill/add.js.map +1 -0
- package/dist/commands/skill/list.d.ts +10 -0
- package/dist/commands/skill/list.d.ts.map +1 -0
- package/dist/commands/skill/list.js +56 -0
- package/dist/commands/skill/list.js.map +1 -0
- package/dist/commands/skill/remove.d.ts +10 -0
- package/dist/commands/skill/remove.d.ts.map +1 -0
- package/dist/commands/skill/remove.js +47 -0
- package/dist/commands/skill/remove.js.map +1 -0
- package/dist/commands/skill/sync.d.ts +7 -0
- package/dist/commands/skill/sync.d.ts.map +1 -0
- package/dist/commands/skill/sync.js +30 -0
- package/dist/commands/skill/sync.js.map +1 -0
- package/dist/commands/status.d.ts +17 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +265 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/tasks.d.ts +16 -0
- package/dist/commands/tasks.d.ts.map +1 -0
- package/dist/commands/tasks.js +176 -0
- package/dist/commands/tasks.js.map +1 -0
- package/dist/commands/trace.d.ts +16 -0
- package/dist/commands/trace.d.ts.map +1 -0
- package/dist/commands/trace.js +113 -0
- package/dist/commands/trace.js.map +1 -0
- package/dist/commands/upgrade.d.ts +20 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +178 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/commands/verify/a11y.d.ts +15 -0
- package/dist/commands/verify/a11y.d.ts.map +1 -0
- package/dist/commands/verify/a11y.js +121 -0
- package/dist/commands/verify/a11y.js.map +1 -0
- package/dist/commands/verify/architecture.d.ts +11 -0
- package/dist/commands/verify/architecture.d.ts.map +1 -0
- package/dist/commands/verify/architecture.js +71 -0
- package/dist/commands/verify/architecture.js.map +1 -0
- package/dist/commands/verify/audit.d.ts +18 -0
- package/dist/commands/verify/audit.d.ts.map +1 -0
- package/dist/commands/verify/audit.js +108 -0
- package/dist/commands/verify/audit.js.map +1 -0
- package/dist/commands/verify/constitution.d.ts +10 -0
- package/dist/commands/verify/constitution.d.ts.map +1 -0
- package/dist/commands/verify/constitution.js +91 -0
- package/dist/commands/verify/constitution.js.map +1 -0
- package/dist/commands/verify/os-matrix.d.ts +14 -0
- package/dist/commands/verify/os-matrix.d.ts.map +1 -0
- package/dist/commands/verify/os-matrix.js +108 -0
- package/dist/commands/verify/os-matrix.js.map +1 -0
- package/dist/commands/verify/perf.d.ts +17 -0
- package/dist/commands/verify/perf.d.ts.map +1 -0
- package/dist/commands/verify/perf.js +106 -0
- package/dist/commands/verify/perf.js.map +1 -0
- package/dist/commands/verify/stores.d.ts +14 -0
- package/dist/commands/verify/stores.d.ts.map +1 -0
- package/dist/commands/verify/stores.js +98 -0
- package/dist/commands/verify/stores.js.map +1 -0
- package/dist/commands/verify.d.ts +14 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +97 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/commands/workflow/catalog.d.ts +11 -0
- package/dist/commands/workflow/catalog.d.ts.map +1 -0
- package/dist/commands/workflow/catalog.js +164 -0
- package/dist/commands/workflow/catalog.js.map +1 -0
- package/dist/commands/workflow/list.d.ts +7 -0
- package/dist/commands/workflow/list.d.ts.map +1 -0
- package/dist/commands/workflow/list.js +50 -0
- package/dist/commands/workflow/list.js.map +1 -0
- package/dist/commands/workflow/resume.d.ts +13 -0
- package/dist/commands/workflow/resume.d.ts.map +1 -0
- package/dist/commands/workflow/resume.js +126 -0
- package/dist/commands/workflow/resume.js.map +1 -0
- package/dist/commands/workflow/run.d.ts +14 -0
- package/dist/commands/workflow/run.d.ts.map +1 -0
- package/dist/commands/workflow/run.js +139 -0
- package/dist/commands/workflow/run.js.map +1 -0
- package/dist/commands/workflow/status.d.ts +10 -0
- package/dist/commands/workflow/status.d.ts.map +1 -0
- package/dist/commands/workflow/status.js +86 -0
- package/dist/commands/workflow/status.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/shared/agents.d.ts +12 -0
- package/dist/shared/agents.d.ts.map +1 -0
- package/dist/shared/agents.js +31 -0
- package/dist/shared/agents.js.map +1 -0
- package/dist/shared/artifact-io.d.ts +54 -0
- package/dist/shared/artifact-io.d.ts.map +1 -0
- package/dist/shared/artifact-io.js +71 -0
- package/dist/shared/artifact-io.js.map +1 -0
- package/dist/shared/feature-prompt.d.ts +18 -0
- package/dist/shared/feature-prompt.d.ts.map +1 -0
- package/dist/shared/feature-prompt.js +21 -0
- package/dist/shared/feature-prompt.js.map +1 -0
- package/dist/shared/hooks.d.ts +7 -0
- package/dist/shared/hooks.d.ts.map +1 -0
- package/dist/shared/hooks.js +52 -0
- package/dist/shared/hooks.js.map +1 -0
- package/dist/shared/mcp.d.ts +9 -0
- package/dist/shared/mcp.d.ts.map +1 -0
- package/dist/shared/mcp.js +15 -0
- package/dist/shared/mcp.js.map +1 -0
- package/dist/shared/project.d.ts +42 -0
- package/dist/shared/project.d.ts.map +1 -0
- package/dist/shared/project.js +98 -0
- package/dist/shared/project.js.map +1 -0
- package/dist/shared/workflow-resolver.d.ts +19 -0
- package/dist/shared/workflow-resolver.d.ts.map +1 -0
- package/dist/shared/workflow-resolver.js +71 -0
- package/dist/shared/workflow-resolver.js.map +1 -0
- package/dist/workflow/args-builder.d.ts +31 -0
- package/dist/workflow/args-builder.d.ts.map +1 -0
- package/dist/workflow/args-builder.js +110 -0
- package/dist/workflow/args-builder.js.map +1 -0
- package/dist/workflow/executor.d.ts +18 -0
- package/dist/workflow/executor.d.ts.map +1 -0
- package/dist/workflow/executor.js +112 -0
- package/dist/workflow/executor.js.map +1 -0
- package/extensions/git/commands/rpt.git.feature.md +85 -0
- package/extensions/git/extension.yml +47 -0
- package/package.json +58 -0
- package/scripts/bash/check-prerequisites.sh +149 -0
- package/scripts/bash/common.sh +389 -0
- package/scripts/bash/create-new-feature.sh +164 -0
- package/scripts/bash/setup-plan.sh +113 -0
- package/scripts/check-naming.sh +138 -0
- package/scripts/check-prompts.sh +165 -0
- package/scripts/check-tasks.sh +166 -0
- package/scripts/powershell/check-prerequisites.ps1 +117 -0
- package/scripts/powershell/common.ps1 +328 -0
- package/scripts/powershell/create-new-feature.ps1 +138 -0
- package/scripts/powershell/setup-plan.ps1 +96 -0
- package/scripts/prepare-npm.mjs +157 -0
- package/templates/checklist-template.md +103 -0
- package/templates/commands/analyze.md +103 -0
- package/templates/commands/checklist.md +87 -0
- package/templates/commands/clarify.md +85 -0
- package/templates/commands/constitution.md +126 -0
- package/templates/commands/implement.md +117 -0
- package/templates/commands/plan.md +125 -0
- package/templates/commands/specify.md +127 -0
- package/templates/commands/tasks.md +98 -0
- package/templates/commands/taskstoissues.md +81 -0
- package/templates/constitution-template.md +48 -0
- package/templates/plan-template.md +150 -0
- package/templates/spec-template.md +116 -0
- package/templates/tasks-template.md +77 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class PresetInfo extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/commands/preset/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AASnD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,OAAO;IAC7C,OAAgB,WAAW,SAC2E;IAEtG,OAAgB,QAAQ,WAGtB;IAEF,OAAgB,IAAI;;MAElB;IAEF,OAAgB,KAAK;;MAEnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkE3B"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Args, Command, Flags } from "@oclif/core";
|
|
2
|
+
import { relative } from "node:path";
|
|
3
|
+
import { getPreset, loadPresetsFromProject, PresetManifestError, } from "../../_core/dist/index.js";
|
|
4
|
+
import { requireProjectRoot, readConfig, activePresetIds } from "../../shared/project.js";
|
|
5
|
+
export default class PresetInfo extends Command {
|
|
6
|
+
static description = "Show the articles and gate ids composing a preset, plus whether the current project activates it.";
|
|
7
|
+
static examples = [
|
|
8
|
+
"<%= config.bin %> preset info mobile-opinionated",
|
|
9
|
+
"<%= config.bin %> preset info mobile-opinionated --json",
|
|
10
|
+
];
|
|
11
|
+
static args = {
|
|
12
|
+
id: Args.string({ description: "Preset id", required: true }),
|
|
13
|
+
};
|
|
14
|
+
static flags = {
|
|
15
|
+
json: Flags.boolean({ description: "Emit JSON output.", default: false }),
|
|
16
|
+
};
|
|
17
|
+
async run() {
|
|
18
|
+
const { args, flags } = await this.parse(PresetInfo);
|
|
19
|
+
const root = requireProjectRoot();
|
|
20
|
+
const cfg = readConfig(root);
|
|
21
|
+
const active = activePresetIds(cfg).includes(args.id);
|
|
22
|
+
const bundled = getPreset(args.id);
|
|
23
|
+
let disk;
|
|
24
|
+
try {
|
|
25
|
+
disk = loadPresetsFromProject(root).find((p) => p.manifest.id === args.id);
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
if (err instanceof PresetManifestError)
|
|
29
|
+
this.error(err.message);
|
|
30
|
+
throw err;
|
|
31
|
+
}
|
|
32
|
+
if (!bundled && !disk) {
|
|
33
|
+
this.error(`preset "${args.id}" is not known. Run 'raptor preset list' to see available ones.`);
|
|
34
|
+
}
|
|
35
|
+
const payload = bundled
|
|
36
|
+
? {
|
|
37
|
+
source: "bundled",
|
|
38
|
+
id: bundled.id,
|
|
39
|
+
name: bundled.name,
|
|
40
|
+
version: bundled.version,
|
|
41
|
+
description: bundled.description,
|
|
42
|
+
articles: bundled.articles,
|
|
43
|
+
gateIds: bundled.gates.map((g) => g.id),
|
|
44
|
+
active,
|
|
45
|
+
}
|
|
46
|
+
: {
|
|
47
|
+
source: "disk",
|
|
48
|
+
id: disk.manifest.id,
|
|
49
|
+
name: disk.manifest.name,
|
|
50
|
+
version: disk.manifest.version,
|
|
51
|
+
description: disk.manifest.description ?? "",
|
|
52
|
+
articles: disk.manifest.articles ?? [],
|
|
53
|
+
gateIds: disk.manifest.gates ?? [],
|
|
54
|
+
path: relative(root, disk.manifestPath),
|
|
55
|
+
active,
|
|
56
|
+
};
|
|
57
|
+
if (flags.json) {
|
|
58
|
+
this.log(JSON.stringify(payload, null, 2));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
this.log(`Preset: ${payload.id}`);
|
|
62
|
+
this.log(` Name: ${payload.name}`);
|
|
63
|
+
this.log(` Version: ${payload.version}`);
|
|
64
|
+
this.log(` Source: ${payload.source}${"path" in payload ? ` (${payload.path})` : ""}`);
|
|
65
|
+
this.log(` Active: ${payload.active ? "yes" : "no"}`);
|
|
66
|
+
if (payload.description) {
|
|
67
|
+
this.log(` Description: ${payload.description}`);
|
|
68
|
+
}
|
|
69
|
+
this.log("");
|
|
70
|
+
this.log(` Articles (${payload.articles.length}):`);
|
|
71
|
+
for (const a of payload.articles) {
|
|
72
|
+
this.log(` - ${a.id}: ${a.title}`);
|
|
73
|
+
}
|
|
74
|
+
this.log("");
|
|
75
|
+
this.log(` Gates (${payload.gateIds.length}):`);
|
|
76
|
+
for (const g of payload.gateIds)
|
|
77
|
+
this.log(` - ${g}`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/commands/preset/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO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I,CAAC,CAAC;QACjD,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,OAAO;YAAE,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC1D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class PresetList extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/preset/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAU7C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,OAAO;IAC7C,OAAgB,WAAW,SAE8B;IAEzD,OAAgB,QAAQ,WAGtB;IAEF,OAAgB,KAAK;;MAEnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAmD3B"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Command, Flags } from "@oclif/core";
|
|
2
|
+
import { relative } from "node:path";
|
|
3
|
+
import { knownPresetIds, loadPresetsFromProject, listPresets, PresetManifestError, } from "../../_core/dist/index.js";
|
|
4
|
+
import { requireProjectRoot, readConfig, activePresetIds } from "../../shared/project.js";
|
|
5
|
+
export default class PresetList extends Command {
|
|
6
|
+
static description = "List presets available to this project: both bundled TypeScript presets and any disk-based presets under .raptor/presets/. " +
|
|
7
|
+
"Marks which ones are active according to raptor.yml.";
|
|
8
|
+
static examples = [
|
|
9
|
+
"<%= config.bin %> preset list",
|
|
10
|
+
"<%= config.bin %> preset list --json",
|
|
11
|
+
];
|
|
12
|
+
static flags = {
|
|
13
|
+
json: Flags.boolean({ description: "Emit JSON output.", default: false }),
|
|
14
|
+
};
|
|
15
|
+
async run() {
|
|
16
|
+
const { flags } = await this.parse(PresetList);
|
|
17
|
+
const root = requireProjectRoot();
|
|
18
|
+
const cfg = readConfig(root);
|
|
19
|
+
const active = new Set(activePresetIds(cfg));
|
|
20
|
+
const bundled = listPresets().map((p) => ({
|
|
21
|
+
id: p.id,
|
|
22
|
+
name: p.name,
|
|
23
|
+
version: p.version,
|
|
24
|
+
source: "bundled",
|
|
25
|
+
path: null,
|
|
26
|
+
}));
|
|
27
|
+
let disk;
|
|
28
|
+
try {
|
|
29
|
+
disk = loadPresetsFromProject(root).map((p) => ({
|
|
30
|
+
id: p.manifest.id,
|
|
31
|
+
name: p.manifest.name,
|
|
32
|
+
version: p.manifest.version,
|
|
33
|
+
source: "disk",
|
|
34
|
+
path: relative(root, p.manifestPath),
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
if (err instanceof PresetManifestError)
|
|
39
|
+
this.error(err.message);
|
|
40
|
+
throw err;
|
|
41
|
+
}
|
|
42
|
+
const bundledIds = new Set(bundled.map((b) => b.id));
|
|
43
|
+
const combined = [...bundled, ...disk.filter((d) => !bundledIds.has(d.id))];
|
|
44
|
+
const rows = combined.map((r) => ({ ...r, active: active.has(r.id) }));
|
|
45
|
+
if (flags.json) {
|
|
46
|
+
this.log(JSON.stringify({ active: [...active], presets: rows }, null, 2));
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (rows.length === 0) {
|
|
50
|
+
this.log("(no presets discovered)");
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
for (const r of rows) {
|
|
54
|
+
const tag = r.active ? "●" : "○";
|
|
55
|
+
const location = r.source === "bundled" ? "(bundled)" : `(${r.path})`;
|
|
56
|
+
this.log(`${tag} ${r.id}@${r.version} — ${r.name} ${location}`);
|
|
57
|
+
}
|
|
58
|
+
this.log("");
|
|
59
|
+
this.log(`Active: ${[...active].join(", ") || "(none)"}`);
|
|
60
|
+
this.log(`Known bundled ids: ${knownPresetIds().join(", ")}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/preset/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1F,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,OAAO;IAC7C,MAAM,CAAU,WAAW,GACzB,6HAA6H;QAC7H,sDAAsD,CAAC;IAEzD,MAAM,CAAU,QAAQ,GAAG;QACzB,+BAA+B;QAC/B,sCAAsC;KACvC,CAAC;IAEF,MAAM,CAAU,KAAK,GAAG;QACtB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,mBAAmB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;KAC1E,CAAC;IAEF,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC/C,MAAM,IAAI,GAAG,kBAAkB,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QAC7B,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;QAE7C,MAAM,OAAO,GAAG,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACx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static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
"dry-run": import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=remove.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/commands/preset/remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAMnD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IAC/C,OAAgB,WAAW,SAEgF;IAE3G,OAAgB,QAAQ,WAGtB;IAEF,OAAgB,IAAI;;MAElB;IAEF,OAAgB,KAAK;;;MASnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoC3B"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Args, Command, Flags } from "@oclif/core";
|
|
2
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
|
|
5
|
+
import { requireProjectRoot, activePresetIds, readConfig } from "../../shared/project.js";
|
|
6
|
+
export default class PresetRemove extends Command {
|
|
7
|
+
static description = "Deactivate a preset by removing it from the `presets:` array in .raptor/raptor.yml. " +
|
|
8
|
+
"Disk files under .raptor/presets/<id>/ are NOT deleted — rerun with 'raptor preset add' to reactivate.";
|
|
9
|
+
static examples = [
|
|
10
|
+
"<%= config.bin %> preset remove mobile-opinionated",
|
|
11
|
+
"<%= config.bin %> preset remove legacy-baseline --force",
|
|
12
|
+
];
|
|
13
|
+
static args = {
|
|
14
|
+
id: Args.string({ description: "Preset id to deactivate", required: true }),
|
|
15
|
+
};
|
|
16
|
+
static flags = {
|
|
17
|
+
force: Flags.boolean({
|
|
18
|
+
description: "Do not error when the preset is not active",
|
|
19
|
+
default: false,
|
|
20
|
+
}),
|
|
21
|
+
"dry-run": Flags.boolean({
|
|
22
|
+
description: "Print the change without updating raptor.yml",
|
|
23
|
+
default: false,
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
async run() {
|
|
27
|
+
const { args, flags } = await this.parse(PresetRemove);
|
|
28
|
+
const root = requireProjectRoot();
|
|
29
|
+
const cfg = readConfig(root);
|
|
30
|
+
const active = activePresetIds(cfg);
|
|
31
|
+
if (!active.includes(args.id)) {
|
|
32
|
+
if (flags.force) {
|
|
33
|
+
this.log(`(not active — nothing to do)`);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this.error(`preset "${args.id}" is not active. Re-run with --force to suppress this error.`);
|
|
37
|
+
}
|
|
38
|
+
const ymlPath = join(root, ".raptor", "raptor.yml");
|
|
39
|
+
if (!existsSync(ymlPath)) {
|
|
40
|
+
this.error(`.raptor/raptor.yml does not exist at ${ymlPath}`);
|
|
41
|
+
}
|
|
42
|
+
const raw = readFileSync(ymlPath, "utf8");
|
|
43
|
+
const parsed = (parseYaml(raw) ?? {});
|
|
44
|
+
const next = active.filter((p) => p !== args.id);
|
|
45
|
+
if (next.length > 0)
|
|
46
|
+
parsed["presets"] = next;
|
|
47
|
+
else
|
|
48
|
+
delete parsed["presets"];
|
|
49
|
+
if ("preset" in parsed)
|
|
50
|
+
delete parsed["preset"];
|
|
51
|
+
if (flags["dry-run"]) {
|
|
52
|
+
this.log(`[dry-run] presets: ${JSON.stringify(next)}`);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
writeFileSync(ymlPath, stringifyYaml(parsed));
|
|
56
|
+
this.log(`✓ Removed "${args.id}"`);
|
|
57
|
+
this.log(` Active presets: ${next.join(", ") || "(none)"}`);
|
|
58
|
+
}
|
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C;YACvD,OAAO;QACT,CAAC;QAED,aAAa,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9C,IAAI,CAAC,GAAG,CAAC,cAAc,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACnC,IAAI,CAAC,GAAG,CAAC,qBAAqB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC;IAC/D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class RepairConstitution extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
confirm: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
"dry-run": import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
};
|
|
9
|
+
run(): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=constitution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constitution.d.ts","sourceRoot":"","sources":["../../../src/commands/repair/constitution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAc7C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,OAAO;IACrD,OAAgB,WAAW,SAC+I;IAE1K,OAAgB,QAAQ,WAGtB;IAEF,OAAgB,KAAK;;;MASnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA8G3B"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Command, Flags } from "@oclif/core";
|
|
2
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { appendAuditEvent, CORE_VERSION, coreHash, extractCoreBlock, hashString, rewriteCoreBlock, } from "../../_core/dist/index.js";
|
|
5
|
+
import { currentActor, requireProjectRoot } from "../../shared/project.js";
|
|
6
|
+
import { runAfterHook, runBeforeHook } from "../../shared/hooks.js";
|
|
7
|
+
export default class RepairConstitution extends Command {
|
|
8
|
+
static description = "Rewrite the RAPTOR-CORE block in .raptor/constitution.md to the canonical text of the installed CLI. Records a constitution.repaired entry in amendments.log (C4/C5).";
|
|
9
|
+
static examples = [
|
|
10
|
+
"<%= config.bin %> repair constitution --confirm",
|
|
11
|
+
"<%= config.bin %> repair constitution --dry-run",
|
|
12
|
+
];
|
|
13
|
+
static flags = {
|
|
14
|
+
confirm: Flags.boolean({
|
|
15
|
+
description: "Required acknowledgement that the block will be rewritten.",
|
|
16
|
+
default: false,
|
|
17
|
+
}),
|
|
18
|
+
"dry-run": Flags.boolean({
|
|
19
|
+
description: "Show what would change without writing or logging.",
|
|
20
|
+
default: false,
|
|
21
|
+
}),
|
|
22
|
+
};
|
|
23
|
+
async run() {
|
|
24
|
+
const { flags } = await this.parse(RepairConstitution);
|
|
25
|
+
const root = requireProjectRoot();
|
|
26
|
+
const path = join(root, ".raptor", "constitution.md");
|
|
27
|
+
const amendmentsLog = join(root, ".raptor", "memory", "amendments.log");
|
|
28
|
+
if (!existsSync(path)) {
|
|
29
|
+
this.error(`constitution.md missing at ${path}`);
|
|
30
|
+
}
|
|
31
|
+
const actor0 = currentActor("human");
|
|
32
|
+
runBeforeHook(this, {
|
|
33
|
+
event: "before_repair_constitution",
|
|
34
|
+
command: `raptor repair constitution${flags.confirm ? " --confirm" : ""}${flags["dry-run"] ? " --dry-run" : ""}`,
|
|
35
|
+
projectRoot: root,
|
|
36
|
+
actor: { user: actor0.email ?? actor0.user, via: actor0.via },
|
|
37
|
+
extra: {
|
|
38
|
+
...(flags.confirm ? { confirm: "1" } : {}),
|
|
39
|
+
...(flags["dry-run"] ? { dry_run: "1" } : {}),
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
const source = readFileSync(path, "utf8");
|
|
43
|
+
const before = extractCoreBlock(source);
|
|
44
|
+
const previousFileHash = hashString(source);
|
|
45
|
+
this.log(`Constitution: ${path}`);
|
|
46
|
+
if (before) {
|
|
47
|
+
this.log(` Current block: v=${before.version} hash=${before.declaredHash}`);
|
|
48
|
+
this.log(` Intact=${before.isIntact} canonical=${before.isCanonical}`);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
this.log(" Current block: (missing — canonical block will be inserted)");
|
|
52
|
+
}
|
|
53
|
+
this.log(` Target: v=${CORE_VERSION} hash=${coreHash()}`);
|
|
54
|
+
if (before?.isCanonical) {
|
|
55
|
+
this.log("");
|
|
56
|
+
this.log("✓ Block is already canonical — nothing to repair.");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (flags["dry-run"]) {
|
|
60
|
+
this.log("");
|
|
61
|
+
this.log("(dry-run) Would rewrite the RAPTOR-CORE block to the canonical text.");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (!flags.confirm) {
|
|
65
|
+
this.error("Repair is destructive to the current RAPTOR-CORE block. Pass --confirm to proceed, or --dry-run to preview.");
|
|
66
|
+
}
|
|
67
|
+
const actor = currentActor("human");
|
|
68
|
+
if (!actor.email) {
|
|
69
|
+
this.error("C5: `constitution.repaired` requires a human approver — configure `git config user.email` before running repair.");
|
|
70
|
+
}
|
|
71
|
+
const next = rewriteCoreBlock(source);
|
|
72
|
+
writeFileSync(path, next);
|
|
73
|
+
const newFileHash = hashString(next);
|
|
74
|
+
appendAuditEvent(amendmentsLog, {
|
|
75
|
+
event: "constitution.repaired",
|
|
76
|
+
command: "raptor repair constitution",
|
|
77
|
+
actor: { user: actor.user, via: actor.via },
|
|
78
|
+
article: "C4",
|
|
79
|
+
inputs: [
|
|
80
|
+
{
|
|
81
|
+
path: ".raptor/constitution.md",
|
|
82
|
+
hash: previousFileHash,
|
|
83
|
+
role: "constitution",
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
outputs: [
|
|
87
|
+
{
|
|
88
|
+
path: ".raptor/constitution.md",
|
|
89
|
+
hash: newFileHash,
|
|
90
|
+
role: "constitution",
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
meta: {
|
|
94
|
+
previous_version: before?.version ?? null,
|
|
95
|
+
previous_block_hash: before?.declaredHash ?? null,
|
|
96
|
+
previous_intact: before?.isIntact ?? null,
|
|
97
|
+
previous_canonical: before?.isCanonical ?? null,
|
|
98
|
+
new_version: CORE_VERSION,
|
|
99
|
+
new_block_hash: coreHash(),
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
this.log("");
|
|
103
|
+
this.log("✓ RAPTOR-CORE block rewritten to canonical text.");
|
|
104
|
+
this.log(` Recorded constitution.repaired in ${amendmentsLog}`);
|
|
105
|
+
runAfterHook(this, {
|
|
106
|
+
event: "after_repair_constitution",
|
|
107
|
+
command: "raptor repair constitution",
|
|
108
|
+
projectRoot: root,
|
|
109
|
+
actor: { user: actor.email ?? actor.user, via: actor.via },
|
|
110
|
+
extra: {
|
|
111
|
+
new_version: CORE_VERSION,
|
|
112
|
+
new_hash: coreHash(),
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=constitution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constitution.js","sourceRoot":"","sources":["../../../src/commands/repair/constitution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,YAAY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AW,EAAE,YAAY;gBACzB,cAAc,EAAE,QAAQ,EAAE;aAC3B;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACb,IAAI,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;QAC7D,IAAI,CAAC,GAAG,CAAC,uCAAuC,aAAa,EAAE,CAAC,CAAC;QAEjE,YAAY,CAAC,IAAI,EAAE;YACjB,KAAK,EAAE,2BAA2B;YAClC,OAAO,EAAE,4BAA4B;YACrC,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;YAC1D,KAAK,EAAE;gBACL,WAAW,EAAE,YAAY;gBACzB,QAAQ,EAAE,QAAQ,EAAE;aACrB;SACF,CAAC,CAAC;IACL,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
/**
|
|
3
|
+
* resync — re-bless downstream input-hashes after an INTENTIONAL upstream edit.
|
|
4
|
+
*
|
|
5
|
+
* Editing an approved spec.md changes its hash, which makes plan.md's
|
|
6
|
+
* `spec_hash` (and transitively tasks.md's `plan_hash`) stale — blocking the
|
|
7
|
+
* staleness gates even though the change was deliberate. `resync` updates those
|
|
8
|
+
* input-hashes to the current upstream content and records an audit event, so
|
|
9
|
+
* you don't have to regenerate (and lose) authored downstream content.
|
|
10
|
+
*/
|
|
11
|
+
export default class Resync extends Command {
|
|
12
|
+
static description: string;
|
|
13
|
+
static examples: string[];
|
|
14
|
+
static args: {
|
|
15
|
+
feature: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
16
|
+
};
|
|
17
|
+
static flags: {
|
|
18
|
+
artifact: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
};
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=resync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resync.d.ts","sourceRoot":"","sources":["../../src/commands/resync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAWnD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,OAAO;IACzC,OAAgB,WAAW,SAC8F;IAEzH,OAAgB,QAAQ,WAGtB;IAEF,OAAgB,IAAI;;MAKlB;IAEF,OAAgB,KAAK;;MAMnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwE3B"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Args, Command, Flags } from "@oclif/core";
|
|
2
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { basename, join } from "node:path";
|
|
4
|
+
import { appendAuditEvent, parsePlan, parseSpec, updateFrontmatter, } from "../_core/dist/index.js";
|
|
5
|
+
import { currentActor, featureDir, requireProjectRoot } from "../shared/project.js";
|
|
6
|
+
/**
|
|
7
|
+
* resync — re-bless downstream input-hashes after an INTENTIONAL upstream edit.
|
|
8
|
+
*
|
|
9
|
+
* Editing an approved spec.md changes its hash, which makes plan.md's
|
|
10
|
+
* `spec_hash` (and transitively tasks.md's `plan_hash`) stale — blocking the
|
|
11
|
+
* staleness gates even though the change was deliberate. `resync` updates those
|
|
12
|
+
* input-hashes to the current upstream content and records an audit event, so
|
|
13
|
+
* you don't have to regenerate (and lose) authored downstream content.
|
|
14
|
+
*/
|
|
15
|
+
export default class Resync extends Command {
|
|
16
|
+
static description = "Re-point downstream input-hashes (plan.spec_hash, tasks.plan_hash) to the current upstream after an intentional edit";
|
|
17
|
+
static examples = [
|
|
18
|
+
"<%= config.bin %> resync 001-home-screen",
|
|
19
|
+
"<%= config.bin %> resync 001-home-screen --artifact plan",
|
|
20
|
+
];
|
|
21
|
+
static args = {
|
|
22
|
+
feature: Args.string({
|
|
23
|
+
description: "Feature slug or NNN-slug",
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
27
|
+
static flags = {
|
|
28
|
+
artifact: Flags.string({
|
|
29
|
+
description: "Which downstream artifact to resync",
|
|
30
|
+
options: ["plan", "tasks", "all"],
|
|
31
|
+
default: "all",
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
async run() {
|
|
35
|
+
const { args, flags } = await this.parse(Resync);
|
|
36
|
+
const root = requireProjectRoot();
|
|
37
|
+
const dir = featureDir(root, args.feature);
|
|
38
|
+
const featureName = basename(dir);
|
|
39
|
+
const specPath = join(dir, "spec.md");
|
|
40
|
+
const planPath = join(dir, "plan.md");
|
|
41
|
+
const tasksPath = join(dir, "tasks.md");
|
|
42
|
+
const auditPath = join(dir, "audit.jsonl");
|
|
43
|
+
const actor = currentActor("human");
|
|
44
|
+
if (!existsSync(specPath))
|
|
45
|
+
this.error(`spec.md missing at ${specPath}`);
|
|
46
|
+
const target = flags.artifact;
|
|
47
|
+
const changes = [];
|
|
48
|
+
// 1. plan.spec_hash <- current spec hash
|
|
49
|
+
if (target === "plan" || target === "all") {
|
|
50
|
+
if (!existsSync(planPath)) {
|
|
51
|
+
if (target === "plan")
|
|
52
|
+
this.error(`plan.md missing at ${planPath}`);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
const spec = parseSpec(specPath);
|
|
56
|
+
const planRaw = readFileSync(planPath, "utf8");
|
|
57
|
+
const planFm = parsePlan(planPath).data;
|
|
58
|
+
if (planFm.spec_hash !== spec.hash) {
|
|
59
|
+
writeFileSync(planPath, updateFrontmatter(planRaw, { spec_hash: spec.hash }));
|
|
60
|
+
changes.push({ artifact: "plan.md", key: "spec_hash", to: spec.hash });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// 2. tasks.plan_hash <- current plan hash (read AFTER any plan rewrite)
|
|
65
|
+
if (target === "tasks" || target === "all") {
|
|
66
|
+
if (!existsSync(tasksPath)) {
|
|
67
|
+
if (target === "tasks")
|
|
68
|
+
this.error(`tasks.md missing at ${tasksPath}`);
|
|
69
|
+
}
|
|
70
|
+
else if (existsSync(planPath)) {
|
|
71
|
+
const plan = parsePlan(planPath);
|
|
72
|
+
const tasksRaw = readFileSync(tasksPath, "utf8");
|
|
73
|
+
const tasksFm = parsePlan(tasksPath).data;
|
|
74
|
+
if (tasksFm.plan_hash !== plan.hash) {
|
|
75
|
+
writeFileSync(tasksPath, updateFrontmatter(tasksRaw, { plan_hash: plan.hash }));
|
|
76
|
+
changes.push({ artifact: "tasks.md", key: "plan_hash", to: plan.hash });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (changes.length === 0) {
|
|
81
|
+
this.log(`✓ ${featureName} already in sync — nothing to do.`);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
appendAuditEvent(auditPath, {
|
|
85
|
+
event: "artifact.resynced",
|
|
86
|
+
feature: featureName,
|
|
87
|
+
command: `raptor resync ${args.feature}`,
|
|
88
|
+
actor: { user: actor.email ?? actor.user, via: actor.via },
|
|
89
|
+
meta: {
|
|
90
|
+
artifact: target,
|
|
91
|
+
changes: changes.map((c) => `${c.artifact}:${c.key}`),
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
this.log(`✓ Resynced ${featureName}:`);
|
|
95
|
+
for (const c of changes) {
|
|
96
|
+
this.log(` ${c.artifact} ${c.key} → ${c.to.slice(0, 24)}…`);
|
|
97
|
+
}
|
|
98
|
+
this.log("");
|
|
99
|
+
this.log(" Note: this re-blesses the input hash after your edit. Re-run 'raptor verify' " +
|
|
100
|
+
"and re-approve if the change is material.");
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=resync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resync.js","sourceRoot":"","sources":["../../src/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EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;YAC1D,IAAI,EAAE;gBACJ,QAAQ,EAAE,MAAM;gBAChB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;aACtD;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,cAAc,WAAW,GAAG,CAAC,CAAC;QACvC,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;QAC/D,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACb,IAAI,CAAC,GAAG,CACN,iFAAiF;YAC/E,2CAA2C,CAC9C,CAAC;IACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class SkillAdd extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
description: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
prompt: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
"prompt-file": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
agents: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
private registerInManifest;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=add.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/commands/skill/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAcnD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO;IAC3C,OAAgB,WAAW,SACkE;IAE7F,OAAgB,QAAQ,WAGtB;IAEF,OAAgB,IAAI;;MAElB;IAEF,OAAgB,KAAK;;;;;;;MAiBnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAqE1B,OAAO,CAAC,kBAAkB;CAgB3B"}
|