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
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
|
+
|
|
6
|
+
## [0.1.0] - 2026-04-24
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- **Full SDD Lifecycle:** `new` → `clarify` → `plan` → `tasks` → `implement` → `analyze` → `checklist` with mandatory gate enforcement between phases.
|
|
10
|
+
- **Workflow Engine:** Declarative YAML-based workflow orchestration with resumable state machine, conditional steps, loops, branches, fan-out/fan-in, and human gates.
|
|
11
|
+
- **Real Shell Executor:** `child_process.spawn`-based async shell execution with configurable timeout (default 30s), environment injection, and stream-based stdout/stderr capture. Replaces the previous `execSync` blocking implementation.
|
|
12
|
+
- **Structured Command Executor:** `CommandExecutorResult` with `exitCode`, `status`, `durationMs`, `stdout`, `stderr`, and `error` fields. Command step failures now propagate properly through the engine.
|
|
13
|
+
- **Async Hooks (G-05):** `runHooksAsync()` using `spawn` + streams for non-blocking hook execution. Supports `AbortSignal` cancellation, configurable timeout, and serial execution with `before_*` abort chain semantics. Sync `runHooks()` preserved for backward compatibility.
|
|
14
|
+
- **32 Hook Events:** 16 commands × 2 phases (before/after). Scripts in `.raptor/hooks/<event>` or `<event>.d/*` with sorted execution order.
|
|
15
|
+
- **Slash Command Materialization:** Auto-generates agent commands (`.claude/commands/`, `.cursor/rules/`) during `raptor init` for all 7 SDD lifecycle phases.
|
|
16
|
+
- **Extension System:** Self-contained packages with manifests, custom gates, hook contributions, and workflow definitions. Installed in `.raptor/extensions/<id>/`.
|
|
17
|
+
- **Preset System:** Reusable article + gate bundles with stackable first-wins semantics. Bundled preset: `mobile-opinionated` (6 articles: M1–M6, 6 gates).
|
|
18
|
+
- **Audit Trail:** Append-only `audit.jsonl` with SHA-256 hash chain enforcement and provenance tracking (C5 identity requirement).
|
|
19
|
+
- **Constitution:** Immutable core articles (C1–C5) with hash-sealed blocks, automatic repair, and version-aware verification.
|
|
20
|
+
- **22 CLI Commands:** `new`, `clarify`, `plan`, `tasks`, `implement`, `analyze`, `checklist`, `approve`, `status`, `doctor`, `hotfix`, `trace`, `init`, `verify` (audit/constitution), `repair`, `hook` (list/run), `workflow` (catalog/run/resume/status), `preset` (list/add/remove/info), `extension` (add/list/info), `gate` (approve).
|
|
21
|
+
- **593 Tests:** 467 core + 126 CLI, 0 failures.
|
|
22
|
+
|
|
23
|
+
### Infrastructure
|
|
24
|
+
- Monorepo: `@raptor/core` + `@raptor/cli` via pnpm workspaces.
|
|
25
|
+
- TypeScript strict mode, ESM (NodeNext), Node.js ≥ 20.
|
|
26
|
+
- Oclif-based CLI with dynamic command loading.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lucaspedronet
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
# 🦖 Raptor
|
|
2
|
+
|
|
3
|
+
> *Velocidade cirúrgica na caça pela especificação perfeita — desenvolvimento mobile guiado por specs, com governança e verificação reais.*
|
|
4
|
+
|
|
5
|
+
**Raptor** é uma CLI de **Spec-Driven Development (SDD)** feita para apps mobile modernos. Ele é um *blueprint* fiel do [GitHub Spec Kit](https://github.com/github/spec-kit): **não** escreve a spec nem o código por você — ele orquestra o ciclo (specify → plan → tasks → implement), aplica **gates constitucionais**, mantia uma **trilha de auditoria** verificável, e materializa **slash commands ricos** para o seu agente de IA executar. O diferencial do Raptor é a **ponta de verificação**: ele *mede a realidade* do app (acessibilidade, performance, permissões de loja, matriz de SO) em vez de só declará-la.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g raptor-aios
|
|
9
|
+
raptor init
|
|
10
|
+
raptor new minha-feature
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Índice
|
|
16
|
+
|
|
17
|
+
- [Por que Raptor](#por-que-raptor)
|
|
18
|
+
- [Instalação](#instalação)
|
|
19
|
+
- [Quickstart (5 minutos)](#quickstart-5-minutos)
|
|
20
|
+
- [Como funciona: o ciclo SDD](#como-funciona-o-ciclo-sdd)
|
|
21
|
+
- [Gates constitucionais: C1–C5, M1–M6, M7](#gates-constitucionais)
|
|
22
|
+
- [M1–M6 explicados](#m1m6-explicados)
|
|
23
|
+
- [A ponta de verificação (verify)](#a-ponta-de-verificação-verify)
|
|
24
|
+
- [Recursos](#recursos)
|
|
25
|
+
- [Referência de comandos](#referência-de-comandos)
|
|
26
|
+
- [Exemplo prático ponta a ponta](#exemplo-prático-ponta-a-ponta)
|
|
27
|
+
- [Estrutura criada no projeto](#estrutura-criada-no-projeto)
|
|
28
|
+
- [Desenvolvimento local](#desenvolvimento-local)
|
|
29
|
+
- [Governança & contribuição](#governança--contribuição)
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Por que Raptor
|
|
34
|
+
|
|
35
|
+
Spec Kit prova que specs executáveis + um agente de IA capaz produzem software melhor que "vibe coding". Raptor leva isso para mobile e adiciona o que falta para uso sério em equipe:
|
|
36
|
+
|
|
37
|
+
- **Governança como código** — uma *constituição* com artigos imutáveis (RAPTOR-CORE) e um preset opinativo para mobile (M1–M6). Nada de plan/tasks/implement sem aprovação humana registrada.
|
|
38
|
+
- **Trilha de auditoria** — cada passo emite eventos em `audit.jsonl`, validáveis contra um JSON Schema canônico.
|
|
39
|
+
- **Rastreabilidade código↔spec (M7)** — cada artefato de código aponta para os critérios de aceitação que satisfaz, com evidência pareada (code + test).
|
|
40
|
+
- **Verificação real** — `verify a11y/perf/stores/os-matrix` medem o app de verdade e comparam com o que a spec/plan declararam.
|
|
41
|
+
- **Agnóstico de agente** — materializa slash commands para Claude Code, Cursor, Copilot, Codex, Gemini, Antigravity.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Instalação
|
|
46
|
+
|
|
47
|
+
Requer **Node.js ≥ 20**.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install -g raptor-aios
|
|
51
|
+
# ou, sem instalar global:
|
|
52
|
+
npx raptor-aios init
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
O binário instalado chama-se `raptor`:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
raptor --version
|
|
59
|
+
raptor doctor # checagem de saúde do ambiente/projeto
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Quickstart (5 minutos)
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# 1. Inicialize o Raptor no seu projeto (mobile)
|
|
68
|
+
cd meu-app-react-native
|
|
69
|
+
raptor init --ai=claude-code --preset=mobile-opinionated
|
|
70
|
+
|
|
71
|
+
# 2. Crie uma feature (gera spec.md + audit.jsonl)
|
|
72
|
+
raptor new home-screen
|
|
73
|
+
|
|
74
|
+
# 3. Preencha a spec (você ou seu agente via /raptor-specify), depois aprove
|
|
75
|
+
raptor approve home-screen --artifact spec
|
|
76
|
+
|
|
77
|
+
# 4. Gere e aprove o plano (roda os gates Phase -1: C1–C5 + M1–M6)
|
|
78
|
+
raptor plan home-screen
|
|
79
|
+
raptor approve home-screen --artifact plan --phase-minus-one passed
|
|
80
|
+
|
|
81
|
+
# 5. Tarefas → implementação
|
|
82
|
+
raptor tasks home-screen
|
|
83
|
+
raptor approve home-screen --artifact tasks
|
|
84
|
+
raptor implement home-screen --task T001 --files src/Foo.tsx --acceptance AC-1 --kind code
|
|
85
|
+
|
|
86
|
+
# 6. Verifique tudo
|
|
87
|
+
raptor verify home-screen
|
|
88
|
+
raptor verify a11y home-screen # scan estático WCAG AA
|
|
89
|
+
raptor verify perf home-screen # TTFI real (adb am start -W)
|
|
90
|
+
raptor verify stores home-screen --fix # permissões nativas vs spec
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Como funciona: o ciclo SDD
|
|
96
|
+
|
|
97
|
+
Raptor implementa os **9 comandos do Spec Kit** como slash commands ricos + comandos de CLI que registram a auditoria:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
constitution → specify → clarify → plan → tasks → analyze → checklist → implement → taskstoissues
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
| Fase | Comando CLI | Slash command | O que faz |
|
|
104
|
+
|------|-------------|---------------|-----------|
|
|
105
|
+
| Constituição | — | `/raptor-constitution` | Define princípios do projeto |
|
|
106
|
+
| Especificar | `raptor new` | `/raptor-specify` | Cria `spec.md` (problema, user stories, FRs, AC) |
|
|
107
|
+
| Clarificar | `raptor clarify` | `/raptor-clarify` | Resolve marcadores `[NEEDS CLARIFICATION]` |
|
|
108
|
+
| Planejar | `raptor plan` | `/raptor-plan` | `plan.md` + **Phase -1 gates** |
|
|
109
|
+
| Tarefas | `raptor tasks` | `/raptor-tasks` | `tasks.md` decompondo o plano |
|
|
110
|
+
| Analisar | `raptor analyze` | `/raptor-analyze` | Drift, cobertura, órfãos, IDs |
|
|
111
|
+
| Checklist | `raptor checklist` | `/raptor-checklist` | Checklists temáticos (a11y, security…) |
|
|
112
|
+
| Implementar | `raptor implement` | `/raptor-implement` | Marca tarefa + registra evidência (M7) |
|
|
113
|
+
| Issues | — | `/raptor-taskstoissues` | Exporta tarefas para issues |
|
|
114
|
+
|
|
115
|
+
Cada transição passa por **gates** e dispara **hooks**. Aprovações exigem um humano identificável (via `git config user.email`).
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Gates constitucionais
|
|
120
|
+
|
|
121
|
+
Gates são checagens versionadas com um **nível**: `critical` (bloqueia, imutável), `required` (bloqueia, do preset) ou `advisory` (avisa).
|
|
122
|
+
|
|
123
|
+
### C1–C5 — RAPTOR-CORE (críticos, imutáveis)
|
|
124
|
+
|
|
125
|
+
| Artigo | Gate | Valida |
|
|
126
|
+
|--------|------|--------|
|
|
127
|
+
| **C1** | `gate.spec.exists` | A feature tem `spec.md` aprovada que governa o plano |
|
|
128
|
+
| **C2** | `gate.audit.complete` | `audit.jsonl` existe e está bem-formado |
|
|
129
|
+
| **C3** | `gate.plan.approved` | Plano aprovado + `phase_minus_one: passed` antes de tasks/implement |
|
|
130
|
+
| **C4** | `gate.constitution.integrity` | O bloco RAPTOR-CORE não foi adulterado (hash) |
|
|
131
|
+
| **C5** | (no `approve`) | Aprovação de criticals exige humano identificável |
|
|
132
|
+
|
|
133
|
+
### M7 — Rastreabilidade código↔spec
|
|
134
|
+
|
|
135
|
+
| Gate | Nível | Valida |
|
|
136
|
+
|------|-------|--------|
|
|
137
|
+
| `gate.m7.code_traces_acceptance` | critical | Todo artefato em `impl-log.md` aponta para ≥1 critério de aceitação |
|
|
138
|
+
| `gate.m7.acceptance_has_coverage` | required | Todo `[AC-N]` da spec tem cobertura |
|
|
139
|
+
| `gate.m7.code_tested` | required | Toda task que produz `code` tem teste pareado |
|
|
140
|
+
| `gate.m7.coverage_evidence_valid` | required | Cada AC tem evidência pareada (code + test/integration/e2e) |
|
|
141
|
+
| `gate.m7.diff_hash_matches` | required | O hash declarado bate com o conteúdo do arquivo |
|
|
142
|
+
|
|
143
|
+
### M1–M6 explicados
|
|
144
|
+
|
|
145
|
+
O preset **`mobile-opinionated`** adiciona seis gates opinativos para qualidade mobile. Cada um exige campos no *frontmatter* de `spec.md` ou `plan.md` — declarativos, verificáveis, e (para alguns) **mensuráveis** via `verify`.
|
|
146
|
+
|
|
147
|
+
| Gate | Artigo | Nível | Exige no frontmatter | Verificável por |
|
|
148
|
+
|------|--------|-------|----------------------|-----------------|
|
|
149
|
+
| **M1 — App/Play Store Compliance** | `gate.mobile.stores` | required | `spec.stores.ios_permissions`, `spec.stores.android_permissions` | `verify stores` |
|
|
150
|
+
| **M2 — Privacidade & Residência (LGPD/GDPR)** | `gate.mobile.privacy` | required | `plan.privacy.lawful_basis`, `.residency`, `.retention` | — |
|
|
151
|
+
| **M3 — Paridade de Acessibilidade (WCAG AA)** | `gate.mobile.a11y` | required | `spec.a11y.wcag_level` (`AA`), `spec.a11y.criteria` | `verify a11y` |
|
|
152
|
+
| **M4 — Matriz de SO** | `gate.mobile.os_matrix` | required | `plan.os_matrix.ios_min`, `.android_min` | `verify os-matrix` |
|
|
153
|
+
| **M5 — Orçamento de Performance** | `gate.mobile.perf_budget` | required | `plan.perf_budget.ttfi_ms`, `.interactions_ms` | `verify perf` |
|
|
154
|
+
| **M6 — Crash-Free SLO & Observabilidade** | `gate.mobile.crash_free` | advisory | `plan.crash_free_slo` (≥99.5), `plan.observability.provider` | — |
|
|
155
|
+
|
|
156
|
+
**Exemplo — frontmatter que satisfaz M1 (spec.md):**
|
|
157
|
+
|
|
158
|
+
```yaml
|
|
159
|
+
stores:
|
|
160
|
+
ios_permissions:
|
|
161
|
+
- NSLocationWhenInUseUsageDescription — posição no mapa da home
|
|
162
|
+
android_permissions:
|
|
163
|
+
- android.permission.ACCESS_FINE_LOCATION — posição no mapa
|
|
164
|
+
- android.permission.POST_NOTIFICATIONS — alertas de entrega
|
|
165
|
+
a11y: # M3
|
|
166
|
+
wcag_level: AA
|
|
167
|
+
criteria:
|
|
168
|
+
- Todos os controles expõem labels e roles acessíveis.
|
|
169
|
+
- Contraste de texto ≥ 4.5:1; alvos de toque ≥ 44dp.
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Exemplo — frontmatter que satisfaz M2/M4/M5/M6 (plan.md):**
|
|
173
|
+
|
|
174
|
+
```yaml
|
|
175
|
+
privacy: # M2
|
|
176
|
+
lawful_basis: LGPD Art. 7 V (execução de contrato)
|
|
177
|
+
residency: br-southeast
|
|
178
|
+
retention: cache no dispositivo; não persistido além da sessão
|
|
179
|
+
os_matrix: # M4
|
|
180
|
+
ios_min: "15.1"
|
|
181
|
+
android_min: "7.0"
|
|
182
|
+
perf_budget: # M5
|
|
183
|
+
ttfi_ms: 2000
|
|
184
|
+
interactions_ms: 100
|
|
185
|
+
crash_free_slo: 99.9 # M6
|
|
186
|
+
observability:
|
|
187
|
+
provider: Sentry React Native
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## A ponta de verificação (verify)
|
|
193
|
+
|
|
194
|
+
Declarar não é cumprir. O Raptor **mede** e compara com o declarado:
|
|
195
|
+
|
|
196
|
+
| Comando | Artigo | Como mede |
|
|
197
|
+
|---------|--------|-----------|
|
|
198
|
+
| `raptor verify a11y <feat>` | M3 | Scan estático do JSX (labels/roles/contraste/touch targets) contra a declaração WCAG |
|
|
199
|
+
| `raptor verify perf <feat>` | M5 | Cold-start real no Android (`adb am start -W`), mediana vs `perf_budget.ttfi_ms` |
|
|
200
|
+
| `raptor verify stores <feat>` | M1 | Compara `spec.stores` com os manifests nativos (`AndroidManifest.xml`, `Info.plist`); `--fix` adiciona faltantes |
|
|
201
|
+
| `raptor verify os-matrix <feat>` | M4 | Compara `plan.os_matrix` com a config nativa (Gradle/Podfile); `--fix` alinha |
|
|
202
|
+
| `raptor verify architecture <feat>` | M8 (exp.) | Checagem estática de arquitetura limpa sobre o grafo de imports |
|
|
203
|
+
|
|
204
|
+
> Ex.: num app real, `verify stores` detectou que `ACCESS_FINE_LOCATION` e `POST_NOTIFICATIONS` estavam na spec mas **ausentes** do `AndroidManifest.xml` — e `--fix` corrigiu. `verify perf` mediu TTFI mediano de **957ms** contra orçamento de 2000ms. *(requer `adb reverse tcp:8081 tcp:8081` ativo para o bundle carregar.)*
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Recursos
|
|
209
|
+
|
|
210
|
+
- **Presets** — conjuntos reusáveis de artigos + gates, empilháveis (first-wins). Bundled: `mobile-opinionated`. `raptor preset list|add|info|remove`.
|
|
211
|
+
- **Workflows** — orquestram o ciclo via YAML, com gates de revisão humana. Bundled: `sdd-cycle` (11 passos). `raptor workflow catalog|run|status|resume`.
|
|
212
|
+
- **Agentes** — `raptor add-agent`, `raptor list-agents`. Materializa slash commands por agente (Claude Code, Cursor, Copilot, Codex, Gemini, Antigravity).
|
|
213
|
+
- **Skills** — habilidades reusáveis materializadas para os agentes. `raptor skill add|list|sync|remove`.
|
|
214
|
+
- **MCP** — registra servidores MCP e materializa nas configs nativas dos agentes. `raptor mcp add|list|sync|remove`.
|
|
215
|
+
- **Hooks** — scripts em `.raptor/hooks/<event>` disparados em ~20 pontos do ciclo. `raptor hook list|run`.
|
|
216
|
+
- **Extensões** — pacotes self-contained (templates/gates/hooks/workflows). `raptor extension add|list|info|remove`.
|
|
217
|
+
- **Auditoria & rastreamento** — `raptor audit query|show`, `raptor trace`, `raptor verify audit`.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Referência de comandos
|
|
222
|
+
|
|
223
|
+
**Ciclo:** `init` · `new` · `clarify` · `plan` · `tasks` · `analyze` · `checklist` · `implement` · `approve`
|
|
224
|
+
**Verificação:** `verify` · `verify a11y` · `verify perf` · `verify stores` · `verify os-matrix` · `verify architecture` · `verify audit` · `verify constitution`
|
|
225
|
+
**Status:** `status` · `doctor` · `trace` · `audit query|show`
|
|
226
|
+
**Governança:** `gate list|approve|skip` · `repair constitution` · `hotfix` · `resync` · `upgrade`
|
|
227
|
+
**Extensibilidade:** `preset …` · `workflow …` · `skill …` · `mcp …` · `hook …` · `extension …` · `add-agent` · `list-agents` · `add-extension`
|
|
228
|
+
|
|
229
|
+
Rode `raptor <comando> --help` para detalhes de cada um.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Exemplo prático ponta a ponta
|
|
234
|
+
|
|
235
|
+
Construindo a tela **Home** de um app React Native (CLI bare) a partir de um design Figma:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
raptor init --ai=claude-code --preset=mobile-opinionated
|
|
239
|
+
raptor new home-disponivel
|
|
240
|
+
|
|
241
|
+
# spec.md: user stories, FRs, AC, frontmatter stores+a11y (M1/M3)
|
|
242
|
+
raptor approve home-disponivel --artifact spec
|
|
243
|
+
|
|
244
|
+
# plan.md: tokens do Figma, decisões D1..Dn, frontmatter privacy/os_matrix/perf_budget (M2/M4/M5/M6)
|
|
245
|
+
raptor plan home-disponivel
|
|
246
|
+
raptor approve home-disponivel --artifact plan --phase-minus-one passed
|
|
247
|
+
raptor verify home-disponivel # 24 pass / 0 fail
|
|
248
|
+
|
|
249
|
+
# tasks.md: T001..T0nn com tags [US#] [AC-#] [D#]
|
|
250
|
+
raptor tasks home-disponivel
|
|
251
|
+
raptor approve home-disponivel --artifact tasks
|
|
252
|
+
raptor analyze home-disponivel # 0 findings
|
|
253
|
+
|
|
254
|
+
# implementa cada task registrando evidência (M7)
|
|
255
|
+
raptor implement home-disponivel --task T004 --files src/components/Header.tsx --acceptance AC-1,AC-2 --kind code
|
|
256
|
+
raptor implement home-disponivel --task T004 --files __tests__/components.test.tsx --acceptance AC-1,AC-2 --kind test --amend
|
|
257
|
+
|
|
258
|
+
# verificação real
|
|
259
|
+
raptor verify a11y home-disponivel # 0 violações
|
|
260
|
+
raptor verify os-matrix home-disponivel # bate com nativo
|
|
261
|
+
raptor verify stores home-disponivel --fix
|
|
262
|
+
raptor verify perf home-disponivel # TTFI mediano < orçamento
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Ao final: `raptor status home-disponivel` mostra fase `done`, M7 com 100% das aceitações cobertas (code + test).
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Estrutura criada no projeto
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
.raptor/
|
|
273
|
+
├── constitution.md # RAPTOR-CORE (C4) + artigos do preset
|
|
274
|
+
├── raptor.yml # config (preset, ai, script_type, branch_numbering)
|
|
275
|
+
├── raptor.manifest.json # manifest do Spec Kit
|
|
276
|
+
├── agents.yml · skills.yml · mcp.yml
|
|
277
|
+
├── specs/<NNN-slug>/ # spec.md · plan.md · tasks.md · impl-log.md · audit.jsonl · checklists/
|
|
278
|
+
├── templates/ # cópia bundlada (commands/*.md + *-template.md)
|
|
279
|
+
├── memory/ # constitution copy · amendments.log · decisions.md · glossary.md
|
|
280
|
+
├── extensions/ · workflows/ · presets/ · hooks/ · scripts/ · cache/
|
|
281
|
+
CLAUDE.md # bloco de contexto do agente
|
|
282
|
+
.claude/commands/ # slash commands materializados (raptor-specify.md, …)
|
|
283
|
+
.github/workflows/ # CI opcional (--with-ci)
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Desenvolvimento local
|
|
289
|
+
|
|
290
|
+
Monorepo pnpm (`packages/core` = `@raptor/core`, `packages/cli` = binário `raptor`).
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
pnpm install
|
|
294
|
+
pnpm build
|
|
295
|
+
pnpm -r test && pnpm test:e2e
|
|
296
|
+
|
|
297
|
+
# usar a CLI local em outro projeto:
|
|
298
|
+
cd packages/cli && npm link # ou: pnpm link --global
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Publicar no npm** (pacote único `raptor-aios`, com o core vendorizado):
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
pnpm build
|
|
305
|
+
node scripts/prepare-npm.mjs # monta build/npm/ autossuficiente
|
|
306
|
+
cd build/npm && npm publish # requer `npm login`
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Governança & contribuição
|
|
312
|
+
|
|
313
|
+
- [GOVERNANCE.md](GOVERNANCE.md) — modelo de governança e emendas constitucionais.
|
|
314
|
+
- [CONTRIBUTING.md](CONTRIBUTING.md) — exige sign-off DCO nos commits.
|
|
315
|
+
- Licença: [MIT](LICENSE).
|
package/bin/raptor.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Antigravity adapter.
|
|
3
|
+
*
|
|
4
|
+
* Generates `.antigravity/playbooks/<command>.md` with playbook header.
|
|
5
|
+
* Blueprint ref: 17.5.3.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentAdapter } from "../types.js";
|
|
8
|
+
export declare const antigravityAdapter: AgentAdapter;
|
|
9
|
+
//# sourceMappingURL=antigravity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/antigravity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,kBAAkB,EAAE,YAmChC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Antigravity adapter.
|
|
3
|
+
*
|
|
4
|
+
* Generates `.antigravity/playbooks/<command>.md` with playbook header.
|
|
5
|
+
* Blueprint ref: 17.5.3.
|
|
6
|
+
*/
|
|
7
|
+
export const antigravityAdapter = {
|
|
8
|
+
id: "antigravity",
|
|
9
|
+
displayName: "Antigravity",
|
|
10
|
+
commandDir: ".antigravity/playbooks",
|
|
11
|
+
commandExt: ".md",
|
|
12
|
+
contextFile: ".antigravity/AGENTS.md",
|
|
13
|
+
argumentSyntax: "$ARGUMENTS",
|
|
14
|
+
capabilities: [
|
|
15
|
+
"reasoning",
|
|
16
|
+
"coding",
|
|
17
|
+
"ui-validation",
|
|
18
|
+
"visual-diff",
|
|
19
|
+
"ux-review",
|
|
20
|
+
],
|
|
21
|
+
quirks: {},
|
|
22
|
+
packPrompt(canonical) {
|
|
23
|
+
const header = [
|
|
24
|
+
`# Playbook Raptor — ${canonical.command}`,
|
|
25
|
+
"",
|
|
26
|
+
`> Agente: Antigravity`,
|
|
27
|
+
`> Comando: ${canonical.command}`,
|
|
28
|
+
`> Feature: ${canonical.feature}`,
|
|
29
|
+
`> Prompt hash: ${canonical.promptHash}`,
|
|
30
|
+
`> Gerado em: ${canonical.generatedAt}`,
|
|
31
|
+
].join("\n");
|
|
32
|
+
const body = buildAntigravityBody(canonical);
|
|
33
|
+
return `${header}\n\n${body}\n`;
|
|
34
|
+
},
|
|
35
|
+
commandFileName(command) {
|
|
36
|
+
return `raptor-${command}.md`;
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
function buildAntigravityBody(canonical) {
|
|
40
|
+
const sections = [];
|
|
41
|
+
sections.push("## Trigger\n");
|
|
42
|
+
sections.push(`Executar via \"Run Playbook → raptor-${canonical.command}\" na UI do Antigravity.\n`);
|
|
43
|
+
sections.push("## Contrato\n");
|
|
44
|
+
sections.push(canonical.body);
|
|
45
|
+
if (canonical.invariants.length > 0) {
|
|
46
|
+
sections.push("\n## Invariantes\n");
|
|
47
|
+
for (const inv of canonical.invariants) {
|
|
48
|
+
sections.push(`- ${inv}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (canonical.inputs.length > 0) {
|
|
52
|
+
sections.push("\n## Entradas\n");
|
|
53
|
+
for (const input of canonical.inputs) {
|
|
54
|
+
sections.push(`- \`${input.path}\` (${input.role}, hash: \`${input.hash.slice(0, 16)}…\`)`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
sections.push("\n## Saída esperada\n");
|
|
58
|
+
sections.push(`- Arquivo: \`${canonical.expectedOutput}\``);
|
|
59
|
+
sections.push(`- Schema: \`${canonical.outputSchema}\``);
|
|
60
|
+
if (canonical.articles.length > 0) {
|
|
61
|
+
sections.push("\n## Artigos constitucionais\n");
|
|
62
|
+
sections.push(`- ${canonical.articles.join(", ")}`);
|
|
63
|
+
}
|
|
64
|
+
sections.push("\n## Escopo\n");
|
|
65
|
+
sections.push(`- **Leitura**: ${canonical.scope.read.join(", ") || "(sem restrição)"}`);
|
|
66
|
+
sections.push(`- **Escrita**: ${canonical.scope.write.join(", ") || "(sem restrição)"}`);
|
|
67
|
+
if (canonical.scope.forbidden.length > 0) {
|
|
68
|
+
sections.push(`- **Proibido**: ${canonical.scope.forbidden.join(", ")}`);
|
|
69
|
+
}
|
|
70
|
+
return sections.join("\n");
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=antigravity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../../src/agents/adapters/antigravity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAiB;IAC9C,EAAE,EAAE,aAAa;IACjB,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,wBAAwB;IACpC,UAAU,EAAE,KAAK;IACjB,WAAW,EAAE,wBAAwB;IACrC,cAAc,EAAE,YAAY;IAC5B,YAAY,EAAE;QACZ,WAAW;QACX,QAAQ;QACR,eAAe;QACf,aAAa;QACb,WAAW;KACZ;IACD,MAAM,EAAE,EAAE;IAEV,UAAU,CAAC,SAA0B;QACnC,MAAM,MAAM,GAAG;YACb,uBAAuB,SAAS,CAAC,OAAO,EAAE;YAC1C,EAAE;YACF,uBAAuB;YACvB,cAAc,SAAS,CAAC,OAAO,EAAE;YACjC,cAAc,SAAS,CAAC,OAAO,EAAE;YACjC,kBAAkB,SAAS,CAAC,UAAU,EAAE;YACxC,gBAAgB,SAAS,CAAC,WAAW,EAAE;SACxC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEb,MAAM,IAAI,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;QAE7C,OAAO,GAAG,MAAM,OAAO,IAAI,IAAI,CAAC;IAClC,CAAC;IAED,eAAe,CAAC,OAAe;QAC7B,OAAO,UAAU,OAAO,KAAK,CAAC;IAChC,CAAC;CACF,CAAC;AAEF,SAAS,oBAAoB,CAAC,SAA0B;IACtD,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,QAAQ,CAAC,IAAI,CA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AC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC/B,QAAQ,CAAC,IAAI,CACX,kBAAkB,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,iBAAiB,EAAE,CACzE,CAAC;IACF,QAAQ,CAAC,IAAI,CACX,kBAAkB,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,iBAAiB,EAAE,CAC1E,CAAC;IACF,IAAI,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code adapter.
|
|
3
|
+
*
|
|
4
|
+
* Generates `.claude/commands/<command>.md` with YAML frontmatter.
|
|
5
|
+
* Blueprint ref: 17.5.1.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentAdapter } from "../types.js";
|
|
8
|
+
export declare const claudeCodeAdapter: AgentAdapter;
|
|
9
|
+
//# sourceMappingURL=claude-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/claude-code.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,iBAAiB,EAAE,YAqC/B,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code adapter.
|
|
3
|
+
*
|
|
4
|
+
* Generates `.claude/commands/<command>.md` with YAML frontmatter.
|
|
5
|
+
* Blueprint ref: 17.5.1.
|
|
6
|
+
*/
|
|
7
|
+
export const claudeCodeAdapter = {
|
|
8
|
+
id: "claude-code",
|
|
9
|
+
displayName: "Claude Code",
|
|
10
|
+
commandDir: ".claude/commands",
|
|
11
|
+
commandExt: ".md",
|
|
12
|
+
contextFile: "CLAUDE.md",
|
|
13
|
+
argumentSyntax: "$ARGUMENTS",
|
|
14
|
+
capabilities: ["reasoning", "coding", "refactoring", "planning"],
|
|
15
|
+
quirks: {},
|
|
16
|
+
installCheck: "which claude",
|
|
17
|
+
packPrompt(canonical) {
|
|
18
|
+
const frontmatter = [
|
|
19
|
+
"---",
|
|
20
|
+
`raptor.command: ${canonical.command}`,
|
|
21
|
+
`raptor.feature: "${canonical.feature}"`,
|
|
22
|
+
`raptor.prompt_hash: "${canonical.promptHash}"`,
|
|
23
|
+
`raptor.generated_at: "${canonical.generatedAt}"`,
|
|
24
|
+
"---",
|
|
25
|
+
].join("\n");
|
|
26
|
+
const header = `# Comando: ${canonical.command} — Feature ${canonical.feature}`;
|
|
27
|
+
const contract = buildContractSection(canonical);
|
|
28
|
+
return `${frontmatter}\n\n${header}\n\n${contract}\n`;
|
|
29
|
+
},
|
|
30
|
+
commandFileName(command) {
|
|
31
|
+
return `raptor-${command}.md`;
|
|
32
|
+
},
|
|
33
|
+
// Claude Code discovers skills under `.claude/skills/<name>/SKILL.md`.
|
|
34
|
+
skillDir: ".claude/skills",
|
|
35
|
+
skillFileName(skillId) {
|
|
36
|
+
return `raptor-${skillId}/SKILL.md`;
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
function buildContractSection(canonical) {
|
|
40
|
+
const sections = [];
|
|
41
|
+
sections.push("## Contrato operacional\n");
|
|
42
|
+
sections.push(canonical.body);
|
|
43
|
+
if (canonical.invariants.length > 0) {
|
|
44
|
+
sections.push("\n## Invariantes a preservar\n");
|
|
45
|
+
for (const inv of canonical.invariants) {
|
|
46
|
+
sections.push(`- ${inv}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (canonical.inputs.length > 0) {
|
|
50
|
+
sections.push("\n## Entradas\n");
|
|
51
|
+
for (const input of canonical.inputs) {
|
|
52
|
+
sections.push(`- \`${input.path}\` (${input.role}, hash: \`${input.hash.slice(0, 16)}…\`)`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
sections.push("\n## Saída esperada\n");
|
|
56
|
+
sections.push(`- Arquivo: \`${canonical.expectedOutput}\``);
|
|
57
|
+
sections.push(`- Schema: \`${canonical.outputSchema}\``);
|
|
58
|
+
if (canonical.articles.length > 0) {
|
|
59
|
+
sections.push("\n## Artigos constitucionais aplicáveis\n");
|
|
60
|
+
sections.push(`- ${canonical.articles.join(", ")}`);
|
|
61
|
+
}
|
|
62
|
+
sections.push("\n## Escopo de arquivos\n");
|
|
63
|
+
sections.push(`- **Leitura**: ${canonical.scope.read.join(", ") || "(sem restrição)"}`);
|
|
64
|
+
sections.push(`- **Escrita**: ${canonical.scope.write.join(", ") || "(sem restrição)"}`);
|
|
65
|
+
if (canonical.scope.forbidden.length > 0) {
|
|
66
|
+
sections.push(`- **Proibido**: ${canonical.scope.forbidden.join(", ")}`);
|
|
67
|
+
}
|
|
68
|
+
sections.push("\n## Forma de assinatura\n", "Ao finalizar, grave o arquivo diretamente. O Raptor detectará via hash.", "NÃO adicione comentários como `// gerado por Claude`.");
|
|
69
|
+
return sections.join("\n");
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=claude-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../../src/agents/adapters/claude-code.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAAiB;IAC7C,EAAE,EAAE,aAAa;IACjB,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,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AI,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,QAAQ,CAAC,IAAI,CACX,4BAA4B,EAC5B,yEAAyE,EACzE,uDAAuD,CACxD,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Codex CLI adapter.
|
|
3
|
+
*
|
|
4
|
+
* Materializes Raptor commands into `.codex/commands/<command>.md`
|
|
5
|
+
* and uses `AGENTS.md` as the agent-neutral context file (the convention
|
|
6
|
+
* adopted by the Codex CLI and other AGENTS.md-aware tools).
|
|
7
|
+
*
|
|
8
|
+
* Spec Kit ref: E11 — "Adaptador Codex".
|
|
9
|
+
*/
|
|
10
|
+
import type { AgentAdapter } from "../types.js";
|
|
11
|
+
export declare const codexAdapter: AgentAdapter;
|
|
12
|
+
//# sourceMappingURL=codex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,YAAY,EAAE,YA+B1B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Codex CLI adapter.
|
|
3
|
+
*
|
|
4
|
+
* Materializes Raptor commands into `.codex/commands/<command>.md`
|
|
5
|
+
* and uses `AGENTS.md` as the agent-neutral context file (the convention
|
|
6
|
+
* adopted by the Codex CLI and other AGENTS.md-aware tools).
|
|
7
|
+
*
|
|
8
|
+
* Spec Kit ref: E11 — "Adaptador Codex".
|
|
9
|
+
*/
|
|
10
|
+
export const codexAdapter = {
|
|
11
|
+
id: "codex",
|
|
12
|
+
displayName: "OpenAI Codex",
|
|
13
|
+
commandDir: ".codex/commands",
|
|
14
|
+
commandExt: ".md",
|
|
15
|
+
contextFile: "AGENTS.md",
|
|
16
|
+
argumentSyntax: "$ARGUMENTS",
|
|
17
|
+
capabilities: ["reasoning", "coding", "refactoring", "planning"],
|
|
18
|
+
quirks: {},
|
|
19
|
+
installCheck: "which codex",
|
|
20
|
+
packPrompt(canonical) {
|
|
21
|
+
const frontmatter = [
|
|
22
|
+
"---",
|
|
23
|
+
`raptor.command: ${canonical.command}`,
|
|
24
|
+
`raptor.feature: "${canonical.feature}"`,
|
|
25
|
+
`raptor.prompt_hash: "${canonical.promptHash}"`,
|
|
26
|
+
`raptor.generated_at: "${canonical.generatedAt}"`,
|
|
27
|
+
"---",
|
|
28
|
+
].join("\n");
|
|
29
|
+
const header = `# Comando: ${canonical.command} — Feature ${canonical.feature}`;
|
|
30
|
+
const contract = buildContractSection(canonical);
|
|
31
|
+
return `${frontmatter}\n\n${header}\n\n${contract}\n`;
|
|
32
|
+
},
|
|
33
|
+
commandFileName(command) {
|
|
34
|
+
return `raptor-${command}.md`;
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
function buildContractSection(canonical) {
|
|
38
|
+
const sections = [];
|
|
39
|
+
sections.push("## Contrato operacional\n");
|
|
40
|
+
sections.push(canonical.body);
|
|
41
|
+
if (canonical.invariants.length > 0) {
|
|
42
|
+
sections.push("\n## Invariantes a preservar\n");
|
|
43
|
+
for (const inv of canonical.invariants) {
|
|
44
|
+
sections.push(`- ${inv}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (canonical.inputs.length > 0) {
|
|
48
|
+
sections.push("\n## Entradas\n");
|
|
49
|
+
for (const input of canonical.inputs) {
|
|
50
|
+
sections.push(`- \`${input.path}\` (${input.role}, hash: \`${input.hash.slice(0, 16)}…\`)`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
sections.push("\n## Saída esperada\n");
|
|
54
|
+
sections.push(`- Arquivo: \`${canonical.expectedOutput}\``);
|
|
55
|
+
sections.push(`- Schema: \`${canonical.outputSchema}\``);
|
|
56
|
+
if (canonical.articles.length > 0) {
|
|
57
|
+
sections.push("\n## Artigos constitucionais aplicáveis\n");
|
|
58
|
+
sections.push(`- ${canonical.articles.join(", ")}`);
|
|
59
|
+
}
|
|
60
|
+
sections.push("\n## Escopo de arquivos\n");
|
|
61
|
+
sections.push(`- **Leitura**: ${canonical.scope.read.join(", ") || "(sem restrição)"}`);
|
|
62
|
+
sections.push(`- **Escrita**: ${canonical.scope.write.join(", ") || "(sem restrição)"}`);
|
|
63
|
+
if (canonical.scope.forbidden.length > 0) {
|
|
64
|
+
sections.push(`- **Proibido**: ${canonical.scope.forbidden.join(", ")}`);
|
|
65
|
+
}
|
|
66
|
+
sections.push("\n## Forma de assinatura\n", "Ao finalizar, grave o arquivo diretamente. O Raptor detectará via hash.", "NÃO adicione comentários como `// gerado por Codex`.");
|
|
67
|
+
return sections.join("\n");
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=codex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/agents/adapters/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,EAAE,EAAE,OAAO;IACX,WAAW,EAAE,cAAc;IAC3B,UAAU,EAAE,iBAAiB;IAC7B,UAAU,EAAE,KAAK;IACjB,WAAW,EAAE,WAAW;IACxB,cAAc,EAAE,YAAY;IAC5B,YAAY,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,CAAC;IAChE,MAAM,EAAE,EAAE;IACV,YAAY,EAAE,aAAa;IAE3B,UAAU,CAAC,SAA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