@prodara/compiler 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/README.md +204 -0
- package/dist/agent/agent.d.ts +10 -0
- package/dist/agent/agent.d.ts.map +1 -0
- package/dist/agent/agent.js +122 -0
- package/dist/agent/agent.js.map +1 -0
- package/dist/agent/api-client.d.ts +29 -0
- package/dist/agent/api-client.d.ts.map +1 -0
- package/dist/agent/api-client.js +167 -0
- package/dist/agent/api-client.js.map +1 -0
- package/dist/agent/index.d.ts +5 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +3 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/party.d.ts +48 -0
- package/dist/agent/party.d.ts.map +1 -0
- package/dist/agent/party.js +79 -0
- package/dist/agent/party.js.map +1 -0
- package/dist/agent/types.d.ts +35 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +5 -0
- package/dist/agent/types.js.map +1 -0
- package/dist/audit/audit.d.ts +32 -0
- package/dist/audit/audit.d.ts.map +1 -0
- package/dist/audit/audit.js +120 -0
- package/dist/audit/audit.js.map +1 -0
- package/dist/audit/index.d.ts +3 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +2 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/types.d.ts +25 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/audit/types.js +5 -0
- package/dist/audit/types.js.map +1 -0
- package/dist/binder/binder.d.ts +34 -0
- package/dist/binder/binder.d.ts.map +1 -0
- package/dist/binder/binder.js +202 -0
- package/dist/binder/binder.js.map +1 -0
- package/dist/binder/index.d.ts +3 -0
- package/dist/binder/index.d.ts.map +1 -0
- package/dist/binder/index.js +2 -0
- package/dist/binder/index.js.map +1 -0
- package/dist/build-state/build-state.d.ts +40 -0
- package/dist/build-state/build-state.d.ts.map +1 -0
- package/dist/build-state/build-state.js +180 -0
- package/dist/build-state/build-state.js.map +1 -0
- package/dist/build-state/index.d.ts +3 -0
- package/dist/build-state/index.d.ts.map +1 -0
- package/dist/build-state/index.js +2 -0
- package/dist/build-state/index.js.map +1 -0
- package/dist/checker/index.d.ts +5 -0
- package/dist/checker/index.d.ts.map +1 -0
- package/dist/checker/index.js +3 -0
- package/dist/checker/index.js.map +1 -0
- package/dist/checker/type-checker.d.ts +8 -0
- package/dist/checker/type-checker.d.ts.map +1 -0
- package/dist/checker/type-checker.js +136 -0
- package/dist/checker/type-checker.js.map +1 -0
- package/dist/checker/validator.d.ts +8 -0
- package/dist/checker/validator.d.ts.map +1 -0
- package/dist/checker/validator.js +251 -0
- package/dist/checker/validator.js.map +1 -0
- package/dist/cli/agent-setup.d.ts +27 -0
- package/dist/cli/agent-setup.d.ts.map +1 -0
- package/dist/cli/agent-setup.js +829 -0
- package/dist/cli/agent-setup.js.map +1 -0
- package/dist/cli/analyze.d.ts +28 -0
- package/dist/cli/analyze.d.ts.map +1 -0
- package/dist/cli/analyze.js +188 -0
- package/dist/cli/analyze.js.map +1 -0
- package/dist/cli/checklist.d.ts +27 -0
- package/dist/cli/checklist.d.ts.map +1 -0
- package/dist/cli/checklist.js +153 -0
- package/dist/cli/checklist.js.map +1 -0
- package/dist/cli/compile.d.ts +26 -0
- package/dist/cli/compile.d.ts.map +1 -0
- package/dist/cli/compile.js +112 -0
- package/dist/cli/compile.js.map +1 -0
- package/dist/cli/dashboard.d.ts +19 -0
- package/dist/cli/dashboard.d.ts.map +1 -0
- package/dist/cli/dashboard.js +73 -0
- package/dist/cli/dashboard.js.map +1 -0
- package/dist/cli/explain.d.ts +23 -0
- package/dist/cli/explain.d.ts.map +1 -0
- package/dist/cli/explain.js +144 -0
- package/dist/cli/explain.js.map +1 -0
- package/dist/cli/git.d.ts +14 -0
- package/dist/cli/git.d.ts.map +1 -0
- package/dist/cli/git.js +44 -0
- package/dist/cli/git.js.map +1 -0
- package/dist/cli/lifecycle.d.ts +28 -0
- package/dist/cli/lifecycle.d.ts.map +1 -0
- package/dist/cli/lifecycle.js +82 -0
- package/dist/cli/lifecycle.js.map +1 -0
- package/dist/cli/main.d.ts +10 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +1072 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/notify.d.ts +13 -0
- package/dist/cli/notify.d.ts.map +1 -0
- package/dist/cli/notify.js +36 -0
- package/dist/cli/notify.js.map +1 -0
- package/dist/cli/starters.d.ts +12 -0
- package/dist/cli/starters.d.ts.map +1 -0
- package/dist/cli/starters.js +439 -0
- package/dist/cli/starters.js.map +1 -0
- package/dist/config/config.d.ts +194 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +434 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +5 -0
- package/dist/config/index.js.map +1 -0
- package/dist/diagnostics/diagnostic.d.ts +44 -0
- package/dist/diagnostics/diagnostic.d.ts.map +1 -0
- package/dist/diagnostics/diagnostic.js +44 -0
- package/dist/diagnostics/diagnostic.js.map +1 -0
- package/dist/diagnostics/index.d.ts +4 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/index.js +3 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/diagnostics/reporter.d.ts +43 -0
- package/dist/diagnostics/reporter.d.ts.map +1 -0
- package/dist/diagnostics/reporter.js +74 -0
- package/dist/diagnostics/reporter.js.map +1 -0
- package/dist/discovery/discovery.d.ts +6 -0
- package/dist/discovery/discovery.d.ts.map +1 -0
- package/dist/discovery/discovery.js +66 -0
- package/dist/discovery/discovery.js.map +1 -0
- package/dist/discovery/index.d.ts +2 -0
- package/dist/discovery/index.d.ts.map +1 -0
- package/dist/discovery/index.js +2 -0
- package/dist/discovery/index.js.map +1 -0
- package/dist/doc-gen/doc-gen-types.d.ts +174 -0
- package/dist/doc-gen/doc-gen-types.d.ts.map +1 -0
- package/dist/doc-gen/doc-gen-types.js +7 -0
- package/dist/doc-gen/doc-gen-types.js.map +1 -0
- package/dist/doc-gen/doc-renderer.d.ts +17 -0
- package/dist/doc-gen/doc-renderer.d.ts.map +1 -0
- package/dist/doc-gen/doc-renderer.js +65 -0
- package/dist/doc-gen/doc-renderer.js.map +1 -0
- package/dist/doc-gen/format-helpers.d.ts +18 -0
- package/dist/doc-gen/format-helpers.d.ts.map +1 -0
- package/dist/doc-gen/format-helpers.js +92 -0
- package/dist/doc-gen/format-helpers.js.map +1 -0
- package/dist/doc-gen/index.d.ts +5 -0
- package/dist/doc-gen/index.d.ts.map +1 -0
- package/dist/doc-gen/index.js +5 -0
- package/dist/doc-gen/index.js.map +1 -0
- package/dist/doc-gen/link-resolver.d.ts +10 -0
- package/dist/doc-gen/link-resolver.d.ts.map +1 -0
- package/dist/doc-gen/link-resolver.js +87 -0
- package/dist/doc-gen/link-resolver.js.map +1 -0
- package/dist/doc-gen/mermaid-renderers.d.ts +12 -0
- package/dist/doc-gen/mermaid-renderers.d.ts.map +1 -0
- package/dist/doc-gen/mermaid-renderers.js +197 -0
- package/dist/doc-gen/mermaid-renderers.js.map +1 -0
- package/dist/doc-gen/module-renderer.d.ts +6 -0
- package/dist/doc-gen/module-renderer.d.ts.map +1 -0
- package/dist/doc-gen/module-renderer.js +54 -0
- package/dist/doc-gen/module-renderer.js.map +1 -0
- package/dist/doc-gen/product-renderer.d.ts +6 -0
- package/dist/doc-gen/product-renderer.d.ts.map +1 -0
- package/dist/doc-gen/product-renderer.js +101 -0
- package/dist/doc-gen/product-renderer.js.map +1 -0
- package/dist/doc-gen/section-renderers.d.ts +20 -0
- package/dist/doc-gen/section-renderers.d.ts.map +1 -0
- package/dist/doc-gen/section-renderers.js +357 -0
- package/dist/doc-gen/section-renderers.js.map +1 -0
- package/dist/doc-gen/string-resolver.d.ts +8 -0
- package/dist/doc-gen/string-resolver.d.ts.map +1 -0
- package/dist/doc-gen/string-resolver.js +47 -0
- package/dist/doc-gen/string-resolver.js.map +1 -0
- package/dist/doc-gen/surface-ascii.d.ts +7 -0
- package/dist/doc-gen/surface-ascii.d.ts.map +1 -0
- package/dist/doc-gen/surface-ascii.js +87 -0
- package/dist/doc-gen/surface-ascii.js.map +1 -0
- package/dist/drift/drift.d.ts +16 -0
- package/dist/drift/drift.d.ts.map +1 -0
- package/dist/drift/drift.js +149 -0
- package/dist/drift/drift.js.map +1 -0
- package/dist/drift/index.d.ts +3 -0
- package/dist/drift/index.d.ts.map +1 -0
- package/dist/drift/index.js +2 -0
- package/dist/drift/index.js.map +1 -0
- package/dist/extensions/index.d.ts +6 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +7 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/loader.d.ts +21 -0
- package/dist/extensions/loader.d.ts.map +1 -0
- package/dist/extensions/loader.js +101 -0
- package/dist/extensions/loader.js.map +1 -0
- package/dist/extensions/marketplace.d.ts +22 -0
- package/dist/extensions/marketplace.d.ts.map +1 -0
- package/dist/extensions/marketplace.js +40 -0
- package/dist/extensions/marketplace.js.map +1 -0
- package/dist/extensions/registry.d.ts +45 -0
- package/dist/extensions/registry.d.ts.map +1 -0
- package/dist/extensions/registry.js +82 -0
- package/dist/extensions/registry.js.map +1 -0
- package/dist/extensions/types.d.ts +41 -0
- package/dist/extensions/types.d.ts.map +1 -0
- package/dist/extensions/types.js +5 -0
- package/dist/extensions/types.js.map +1 -0
- package/dist/generator/contracts.d.ts +67 -0
- package/dist/generator/contracts.d.ts.map +1 -0
- package/dist/generator/contracts.js +94 -0
- package/dist/generator/contracts.js.map +1 -0
- package/dist/generator/index.d.ts +3 -0
- package/dist/generator/index.d.ts.map +1 -0
- package/dist/generator/index.js +2 -0
- package/dist/generator/index.js.map +1 -0
- package/dist/governance/governance.d.ts +24 -0
- package/dist/governance/governance.d.ts.map +1 -0
- package/dist/governance/governance.js +238 -0
- package/dist/governance/governance.js.map +1 -0
- package/dist/governance/index.d.ts +3 -0
- package/dist/governance/index.d.ts.map +1 -0
- package/dist/governance/index.js +2 -0
- package/dist/governance/index.js.map +1 -0
- package/dist/governance/types.d.ts +14 -0
- package/dist/governance/types.d.ts.map +1 -0
- package/dist/governance/types.js +5 -0
- package/dist/governance/types.js.map +1 -0
- package/dist/graph/builder.d.ts +10 -0
- package/dist/graph/builder.d.ts.map +1 -0
- package/dist/graph/builder.js +573 -0
- package/dist/graph/builder.js.map +1 -0
- package/dist/graph/graph-types.d.ts +64 -0
- package/dist/graph/graph-types.d.ts.map +1 -0
- package/dist/graph/graph-types.js +29 -0
- package/dist/graph/graph-types.js.map +1 -0
- package/dist/graph/index.d.ts +8 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +5 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/serializer.d.ts +9 -0
- package/dist/graph/serializer.d.ts.map +1 -0
- package/dist/graph/serializer.js +31 -0
- package/dist/graph/serializer.js.map +1 -0
- package/dist/graph/validator.d.ts +14 -0
- package/dist/graph/validator.d.ts.map +1 -0
- package/dist/graph/validator.js +96 -0
- package/dist/graph/validator.js.map +1 -0
- package/dist/implement/implement.d.ts +30 -0
- package/dist/implement/implement.d.ts.map +1 -0
- package/dist/implement/implement.js +299 -0
- package/dist/implement/implement.js.map +1 -0
- package/dist/implement/index.d.ts +3 -0
- package/dist/implement/index.d.ts.map +1 -0
- package/dist/implement/index.js +2 -0
- package/dist/implement/index.js.map +1 -0
- package/dist/implement/types.d.ts +41 -0
- package/dist/implement/types.d.ts.map +1 -0
- package/dist/implement/types.js +5 -0
- package/dist/implement/types.js.map +1 -0
- package/dist/incremental/incremental-spec.d.ts +12 -0
- package/dist/incremental/incremental-spec.d.ts.map +1 -0
- package/dist/incremental/incremental-spec.js +100 -0
- package/dist/incremental/incremental-spec.js.map +1 -0
- package/dist/incremental/index.d.ts +3 -0
- package/dist/incremental/index.d.ts.map +1 -0
- package/dist/incremental/index.js +5 -0
- package/dist/incremental/index.js.map +1 -0
- package/dist/incremental/types.d.ts +28 -0
- package/dist/incremental/types.d.ts.map +1 -0
- package/dist/incremental/types.js +7 -0
- package/dist/incremental/types.js.map +1 -0
- package/dist/index.d.ts +106 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/lexer/index.d.ts +6 -0
- package/dist/lexer/index.d.ts.map +1 -0
- package/dist/lexer/index.js +5 -0
- package/dist/lexer/index.js.map +1 -0
- package/dist/lexer/keywords.d.ts +3 -0
- package/dist/lexer/keywords.d.ts.map +1 -0
- package/dist/lexer/keywords.js +142 -0
- package/dist/lexer/keywords.js.map +1 -0
- package/dist/lexer/lexer.d.ts +19 -0
- package/dist/lexer/lexer.d.ts.map +1 -0
- package/dist/lexer/lexer.js +286 -0
- package/dist/lexer/lexer.js.map +1 -0
- package/dist/lexer/source.d.ts +13 -0
- package/dist/lexer/source.d.ts.map +1 -0
- package/dist/lexer/source.js +59 -0
- package/dist/lexer/source.js.map +1 -0
- package/dist/lexer/tokens.d.ts +157 -0
- package/dist/lexer/tokens.d.ts.map +1 -0
- package/dist/lexer/tokens.js +173 -0
- package/dist/lexer/tokens.js.map +1 -0
- package/dist/orchestrator/index.d.ts +5 -0
- package/dist/orchestrator/index.d.ts.map +1 -0
- package/dist/orchestrator/index.js +3 -0
- package/dist/orchestrator/index.js.map +1 -0
- package/dist/orchestrator/orchestrator.d.ts +14 -0
- package/dist/orchestrator/orchestrator.d.ts.map +1 -0
- package/dist/orchestrator/orchestrator.js +129 -0
- package/dist/orchestrator/orchestrator.js.map +1 -0
- package/dist/orchestrator/pipeline.d.ts +31 -0
- package/dist/orchestrator/pipeline.d.ts.map +1 -0
- package/dist/orchestrator/pipeline.js +290 -0
- package/dist/orchestrator/pipeline.js.map +1 -0
- package/dist/orchestrator/types.d.ts +60 -0
- package/dist/orchestrator/types.d.ts.map +1 -0
- package/dist/orchestrator/types.js +8 -0
- package/dist/orchestrator/types.js.map +1 -0
- package/dist/parser/ast.d.ts +502 -0
- package/dist/parser/ast.d.ts.map +1 -0
- package/dist/parser/ast.js +7 -0
- package/dist/parser/ast.js.map +1 -0
- package/dist/parser/expressions.d.ts +18 -0
- package/dist/parser/expressions.d.ts.map +1 -0
- package/dist/parser/expressions.js +230 -0
- package/dist/parser/expressions.js.map +1 -0
- package/dist/parser/index.d.ts +4 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/index.js +2 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/parser.d.ts +83 -0
- package/dist/parser/parser.d.ts.map +1 -0
- package/dist/parser/parser.js +2149 -0
- package/dist/parser/parser.js.map +1 -0
- package/dist/planner/differ.d.ts +4 -0
- package/dist/planner/differ.d.ts.map +1 -0
- package/dist/planner/differ.js +96 -0
- package/dist/planner/differ.js.map +1 -0
- package/dist/planner/index.d.ts +7 -0
- package/dist/planner/index.d.ts.map +1 -0
- package/dist/planner/index.js +5 -0
- package/dist/planner/index.js.map +1 -0
- package/dist/planner/plan-types.d.ts +26 -0
- package/dist/planner/plan-types.d.ts.map +1 -0
- package/dist/planner/plan-types.js +5 -0
- package/dist/planner/plan-types.js.map +1 -0
- package/dist/planner/planner.d.ts +8 -0
- package/dist/planner/planner.d.ts.map +1 -0
- package/dist/planner/planner.js +83 -0
- package/dist/planner/planner.js.map +1 -0
- package/dist/planner/propagator.d.ts +4 -0
- package/dist/planner/propagator.d.ts.map +1 -0
- package/dist/planner/propagator.js +45 -0
- package/dist/planner/propagator.js.map +1 -0
- package/dist/planner/semantic-diff.d.ts +27 -0
- package/dist/planner/semantic-diff.d.ts.map +1 -0
- package/dist/planner/semantic-diff.js +253 -0
- package/dist/planner/semantic-diff.js.map +1 -0
- package/dist/presets/index.d.ts +3 -0
- package/dist/presets/index.d.ts.map +1 -0
- package/dist/presets/index.js +5 -0
- package/dist/presets/index.js.map +1 -0
- package/dist/presets/loader.d.ts +28 -0
- package/dist/presets/loader.d.ts.map +1 -0
- package/dist/presets/loader.js +99 -0
- package/dist/presets/loader.js.map +1 -0
- package/dist/presets/types.d.ts +21 -0
- package/dist/presets/types.d.ts.map +1 -0
- package/dist/presets/types.js +5 -0
- package/dist/presets/types.js.map +1 -0
- package/dist/proposal/index.d.ts +3 -0
- package/dist/proposal/index.d.ts.map +1 -0
- package/dist/proposal/index.js +7 -0
- package/dist/proposal/index.js.map +1 -0
- package/dist/proposal/proposal.d.ts +9 -0
- package/dist/proposal/proposal.d.ts.map +1 -0
- package/dist/proposal/proposal.js +169 -0
- package/dist/proposal/proposal.js.map +1 -0
- package/dist/proposal/types.d.ts +15 -0
- package/dist/proposal/types.d.ts.map +1 -0
- package/dist/proposal/types.js +5 -0
- package/dist/proposal/types.js.map +1 -0
- package/dist/registry/index.d.ts +3 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +2 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/resolution.d.ts +39 -0
- package/dist/registry/resolution.d.ts.map +1 -0
- package/dist/registry/resolution.js +70 -0
- package/dist/registry/resolution.js.map +1 -0
- package/dist/reviewers/adversarial.d.ts +3 -0
- package/dist/reviewers/adversarial.d.ts.map +1 -0
- package/dist/reviewers/adversarial.js +111 -0
- package/dist/reviewers/adversarial.js.map +1 -0
- package/dist/reviewers/architecture.d.ts +3 -0
- package/dist/reviewers/architecture.d.ts.map +1 -0
- package/dist/reviewers/architecture.js +71 -0
- package/dist/reviewers/architecture.js.map +1 -0
- package/dist/reviewers/code-quality.d.ts +3 -0
- package/dist/reviewers/code-quality.d.ts.map +1 -0
- package/dist/reviewers/code-quality.js +72 -0
- package/dist/reviewers/code-quality.js.map +1 -0
- package/dist/reviewers/edge-case.d.ts +3 -0
- package/dist/reviewers/edge-case.d.ts.map +1 -0
- package/dist/reviewers/edge-case.js +107 -0
- package/dist/reviewers/edge-case.js.map +1 -0
- package/dist/reviewers/index.d.ts +21 -0
- package/dist/reviewers/index.d.ts.map +1 -0
- package/dist/reviewers/index.js +39 -0
- package/dist/reviewers/index.js.map +1 -0
- package/dist/reviewers/prompt-loader.d.ts +24 -0
- package/dist/reviewers/prompt-loader.d.ts.map +1 -0
- package/dist/reviewers/prompt-loader.js +67 -0
- package/dist/reviewers/prompt-loader.js.map +1 -0
- package/dist/reviewers/quality.d.ts +3 -0
- package/dist/reviewers/quality.d.ts.map +1 -0
- package/dist/reviewers/quality.js +76 -0
- package/dist/reviewers/quality.js.map +1 -0
- package/dist/reviewers/reviewer.d.ts +39 -0
- package/dist/reviewers/reviewer.d.ts.map +1 -0
- package/dist/reviewers/reviewer.js +149 -0
- package/dist/reviewers/reviewer.js.map +1 -0
- package/dist/reviewers/security.d.ts +3 -0
- package/dist/reviewers/security.d.ts.map +1 -0
- package/dist/reviewers/security.js +87 -0
- package/dist/reviewers/security.js.map +1 -0
- package/dist/reviewers/specification.d.ts +3 -0
- package/dist/reviewers/specification.d.ts.map +1 -0
- package/dist/reviewers/specification.js +79 -0
- package/dist/reviewers/specification.js.map +1 -0
- package/dist/reviewers/test-quality.d.ts +3 -0
- package/dist/reviewers/test-quality.d.ts.map +1 -0
- package/dist/reviewers/test-quality.js +88 -0
- package/dist/reviewers/test-quality.js.map +1 -0
- package/dist/reviewers/types.d.ts +32 -0
- package/dist/reviewers/types.d.ts.map +1 -0
- package/dist/reviewers/types.js +5 -0
- package/dist/reviewers/types.js.map +1 -0
- package/dist/reviewers/ux.d.ts +3 -0
- package/dist/reviewers/ux.d.ts.map +1 -0
- package/dist/reviewers/ux.js +94 -0
- package/dist/reviewers/ux.js.map +1 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/resolution.d.ts +30 -0
- package/dist/runtime/resolution.d.ts.map +1 -0
- package/dist/runtime/resolution.js +59 -0
- package/dist/runtime/resolution.js.map +1 -0
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +2 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/test-runner.d.ts +18 -0
- package/dist/testing/test-runner.d.ts.map +1 -0
- package/dist/testing/test-runner.js +131 -0
- package/dist/testing/test-runner.js.map +1 -0
- package/dist/types.d.ts +36 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +127 -0
- package/dist/types.js.map +1 -0
- package/dist/validation/index.d.ts +3 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +2 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/types.d.ts +16 -0
- package/dist/validation/types.d.ts.map +1 -0
- package/dist/validation/types.js +5 -0
- package/dist/validation/types.js.map +1 -0
- package/dist/validation/validation.d.ts +8 -0
- package/dist/validation/validation.d.ts.map +1 -0
- package/dist/validation/validation.js +101 -0
- package/dist/validation/validation.js.map +1 -0
- package/dist/verification/index.d.ts +3 -0
- package/dist/verification/index.d.ts.map +1 -0
- package/dist/verification/index.js +5 -0
- package/dist/verification/index.js.map +1 -0
- package/dist/verification/types.d.ts +14 -0
- package/dist/verification/types.d.ts.map +1 -0
- package/dist/verification/types.js +5 -0
- package/dist/verification/types.js.map +1 -0
- package/dist/verification/verify.d.ts +7 -0
- package/dist/verification/verify.d.ts.map +1 -0
- package/dist/verification/verify.js +127 -0
- package/dist/verification/verify.js.map +1 -0
- package/dist/workflow/clarify.d.ts +7 -0
- package/dist/workflow/clarify.d.ts.map +1 -0
- package/dist/workflow/clarify.js +165 -0
- package/dist/workflow/clarify.js.map +1 -0
- package/dist/workflow/engine.d.ts +19 -0
- package/dist/workflow/engine.d.ts.map +1 -0
- package/dist/workflow/engine.js +265 -0
- package/dist/workflow/engine.js.map +1 -0
- package/dist/workflow/index.d.ts +6 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +7 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/types.d.ts +95 -0
- package/dist/workflow/types.d.ts.map +1 -0
- package/dist/workflow/types.js +18 -0
- package/dist/workflow/types.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,829 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Prodara CLI — Agent Slash Command Generation
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Generates AI agent-specific slash command files during `prodara init --ai`.
|
|
5
|
+
// Supports 26 AI agent platforms including Copilot, Claude, Cursor, Gemini,
|
|
6
|
+
// Windsurf, Codex, OpenCode, Amp, Roo, Kiro, Jules, Aider, Cline,
|
|
7
|
+
// Continue, Zed, Bolt, Aide, Trae, Augment, Sourcegraph, Tabnine,
|
|
8
|
+
// Supermaven, Void, PearAI, Double, and a generic fallback.
|
|
9
|
+
import { writeFileSync, mkdirSync } from 'node:fs';
|
|
10
|
+
import { join, dirname } from 'node:path';
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
// Agent Configurations
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
const AGENT_CONFIGS = {
|
|
15
|
+
copilot: {
|
|
16
|
+
agentId: 'copilot',
|
|
17
|
+
commandsDir: '.github/prompts',
|
|
18
|
+
commandExtension: '.prompt.md',
|
|
19
|
+
frontmatterStyle: 'yaml',
|
|
20
|
+
needsToolsField: true,
|
|
21
|
+
},
|
|
22
|
+
claude: {
|
|
23
|
+
agentId: 'claude',
|
|
24
|
+
commandsDir: '.claude/commands',
|
|
25
|
+
commandExtension: '.md',
|
|
26
|
+
frontmatterStyle: 'none',
|
|
27
|
+
needsToolsField: false,
|
|
28
|
+
},
|
|
29
|
+
cursor: {
|
|
30
|
+
agentId: 'cursor',
|
|
31
|
+
commandsDir: '.cursor/rules',
|
|
32
|
+
commandExtension: '.mdc',
|
|
33
|
+
frontmatterStyle: 'yaml',
|
|
34
|
+
needsToolsField: false,
|
|
35
|
+
},
|
|
36
|
+
gemini: {
|
|
37
|
+
agentId: 'gemini',
|
|
38
|
+
commandsDir: '.gemini/prompts',
|
|
39
|
+
commandExtension: '.md',
|
|
40
|
+
frontmatterStyle: 'none',
|
|
41
|
+
needsToolsField: false,
|
|
42
|
+
},
|
|
43
|
+
windsurf: {
|
|
44
|
+
agentId: 'windsurf',
|
|
45
|
+
commandsDir: '.windsurf/commands',
|
|
46
|
+
commandExtension: '.md',
|
|
47
|
+
frontmatterStyle: 'none',
|
|
48
|
+
needsToolsField: false,
|
|
49
|
+
},
|
|
50
|
+
codex: {
|
|
51
|
+
agentId: 'codex',
|
|
52
|
+
commandsDir: '.codex',
|
|
53
|
+
commandExtension: '.md',
|
|
54
|
+
frontmatterStyle: 'none',
|
|
55
|
+
needsToolsField: false,
|
|
56
|
+
},
|
|
57
|
+
opencode: {
|
|
58
|
+
agentId: 'opencode',
|
|
59
|
+
commandsDir: '.opencode/agent',
|
|
60
|
+
commandExtension: '.md',
|
|
61
|
+
frontmatterStyle: 'none',
|
|
62
|
+
needsToolsField: false,
|
|
63
|
+
},
|
|
64
|
+
amp: {
|
|
65
|
+
agentId: 'amp',
|
|
66
|
+
commandsDir: '.amp/commands',
|
|
67
|
+
commandExtension: '.md',
|
|
68
|
+
frontmatterStyle: 'none',
|
|
69
|
+
needsToolsField: false,
|
|
70
|
+
},
|
|
71
|
+
roo: {
|
|
72
|
+
agentId: 'roo',
|
|
73
|
+
commandsDir: '.roo/commands',
|
|
74
|
+
commandExtension: '.md',
|
|
75
|
+
frontmatterStyle: 'none',
|
|
76
|
+
needsToolsField: false,
|
|
77
|
+
},
|
|
78
|
+
kiro: {
|
|
79
|
+
agentId: 'kiro',
|
|
80
|
+
commandsDir: '.kiro/commands',
|
|
81
|
+
commandExtension: '.md',
|
|
82
|
+
frontmatterStyle: 'none',
|
|
83
|
+
needsToolsField: false,
|
|
84
|
+
},
|
|
85
|
+
jules: {
|
|
86
|
+
agentId: 'jules',
|
|
87
|
+
commandsDir: '.jules/prompts',
|
|
88
|
+
commandExtension: '.md',
|
|
89
|
+
frontmatterStyle: 'none',
|
|
90
|
+
needsToolsField: false,
|
|
91
|
+
},
|
|
92
|
+
aider: {
|
|
93
|
+
agentId: 'aider',
|
|
94
|
+
commandsDir: '.aider/prompts',
|
|
95
|
+
commandExtension: '.md',
|
|
96
|
+
frontmatterStyle: 'none',
|
|
97
|
+
needsToolsField: false,
|
|
98
|
+
},
|
|
99
|
+
cline: {
|
|
100
|
+
agentId: 'cline',
|
|
101
|
+
commandsDir: '.cline/rules',
|
|
102
|
+
commandExtension: '.md',
|
|
103
|
+
frontmatterStyle: 'none',
|
|
104
|
+
needsToolsField: false,
|
|
105
|
+
},
|
|
106
|
+
continue: {
|
|
107
|
+
agentId: 'continue',
|
|
108
|
+
commandsDir: '.continue/rules',
|
|
109
|
+
commandExtension: '.md',
|
|
110
|
+
frontmatterStyle: 'none',
|
|
111
|
+
needsToolsField: false,
|
|
112
|
+
},
|
|
113
|
+
zed: {
|
|
114
|
+
agentId: 'zed',
|
|
115
|
+
commandsDir: '.zed/prompts',
|
|
116
|
+
commandExtension: '.md',
|
|
117
|
+
frontmatterStyle: 'none',
|
|
118
|
+
needsToolsField: false,
|
|
119
|
+
},
|
|
120
|
+
bolt: {
|
|
121
|
+
agentId: 'bolt',
|
|
122
|
+
commandsDir: '.bolt/prompts',
|
|
123
|
+
commandExtension: '.md',
|
|
124
|
+
frontmatterStyle: 'none',
|
|
125
|
+
needsToolsField: false,
|
|
126
|
+
},
|
|
127
|
+
aide: {
|
|
128
|
+
agentId: 'aide',
|
|
129
|
+
commandsDir: '.aide/prompts',
|
|
130
|
+
commandExtension: '.md',
|
|
131
|
+
frontmatterStyle: 'none',
|
|
132
|
+
needsToolsField: false,
|
|
133
|
+
},
|
|
134
|
+
trae: {
|
|
135
|
+
agentId: 'trae',
|
|
136
|
+
commandsDir: '.trae/rules',
|
|
137
|
+
commandExtension: '.md',
|
|
138
|
+
frontmatterStyle: 'none',
|
|
139
|
+
needsToolsField: false,
|
|
140
|
+
},
|
|
141
|
+
augment: {
|
|
142
|
+
agentId: 'augment',
|
|
143
|
+
commandsDir: '.augment/prompts',
|
|
144
|
+
commandExtension: '.md',
|
|
145
|
+
frontmatterStyle: 'none',
|
|
146
|
+
needsToolsField: false,
|
|
147
|
+
},
|
|
148
|
+
sourcegraph: {
|
|
149
|
+
agentId: 'sourcegraph',
|
|
150
|
+
commandsDir: '.sourcegraph/prompts',
|
|
151
|
+
commandExtension: '.md',
|
|
152
|
+
frontmatterStyle: 'none',
|
|
153
|
+
needsToolsField: false,
|
|
154
|
+
},
|
|
155
|
+
tabnine: {
|
|
156
|
+
agentId: 'tabnine',
|
|
157
|
+
commandsDir: '.tabnine/prompts',
|
|
158
|
+
commandExtension: '.md',
|
|
159
|
+
frontmatterStyle: 'none',
|
|
160
|
+
needsToolsField: false,
|
|
161
|
+
},
|
|
162
|
+
supermaven: {
|
|
163
|
+
agentId: 'supermaven',
|
|
164
|
+
commandsDir: '.supermaven/prompts',
|
|
165
|
+
commandExtension: '.md',
|
|
166
|
+
frontmatterStyle: 'none',
|
|
167
|
+
needsToolsField: false,
|
|
168
|
+
},
|
|
169
|
+
void: {
|
|
170
|
+
agentId: 'void',
|
|
171
|
+
commandsDir: '.void/prompts',
|
|
172
|
+
commandExtension: '.md',
|
|
173
|
+
frontmatterStyle: 'none',
|
|
174
|
+
needsToolsField: false,
|
|
175
|
+
},
|
|
176
|
+
pear: {
|
|
177
|
+
agentId: 'pear',
|
|
178
|
+
commandsDir: '.pear/prompts',
|
|
179
|
+
commandExtension: '.md',
|
|
180
|
+
frontmatterStyle: 'none',
|
|
181
|
+
needsToolsField: false,
|
|
182
|
+
},
|
|
183
|
+
double: {
|
|
184
|
+
agentId: 'double',
|
|
185
|
+
commandsDir: '.double/prompts',
|
|
186
|
+
commandExtension: '.md',
|
|
187
|
+
frontmatterStyle: 'none',
|
|
188
|
+
needsToolsField: false,
|
|
189
|
+
},
|
|
190
|
+
generic: {
|
|
191
|
+
agentId: 'generic',
|
|
192
|
+
commandsDir: '.ai/commands',
|
|
193
|
+
commandExtension: '.md',
|
|
194
|
+
frontmatterStyle: 'none',
|
|
195
|
+
needsToolsField: false,
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
function getCommandDefs(productName) {
|
|
199
|
+
return [
|
|
200
|
+
// -- Workflow commands --
|
|
201
|
+
{
|
|
202
|
+
slug: 'build',
|
|
203
|
+
title: 'Full Build Pipeline',
|
|
204
|
+
description: 'Run the full build pipeline: compile → workflow → review → verify',
|
|
205
|
+
category: 'workflow',
|
|
206
|
+
instructions: [
|
|
207
|
+
`Run the full Prodara build pipeline for "${productName}":`,
|
|
208
|
+
'',
|
|
209
|
+
'```bash',
|
|
210
|
+
'prodara build',
|
|
211
|
+
'```',
|
|
212
|
+
'',
|
|
213
|
+
'This compiles all .prd files, builds the product graph,',
|
|
214
|
+
'runs the workflow engine, review loop, and verification.',
|
|
215
|
+
].join('\n'),
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
slug: 'validate',
|
|
219
|
+
title: 'Validate Specification',
|
|
220
|
+
description: 'Parse and validate .prd files without running the full pipeline',
|
|
221
|
+
category: 'workflow',
|
|
222
|
+
instructions: [
|
|
223
|
+
'Validate the Prodara specification files:',
|
|
224
|
+
'',
|
|
225
|
+
'```bash',
|
|
226
|
+
'prodara validate --format human',
|
|
227
|
+
'```',
|
|
228
|
+
'',
|
|
229
|
+
'This checks for syntax errors, type errors, and semantic issues',
|
|
230
|
+
'without running implementation or review phases.',
|
|
231
|
+
].join('\n'),
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
slug: 'constitution',
|
|
235
|
+
title: 'Read Product Constitution',
|
|
236
|
+
description: 'Read product constitution and governance rules from .prd files',
|
|
237
|
+
category: 'workflow',
|
|
238
|
+
instructions: [
|
|
239
|
+
`Read the .prd specification files in this project to understand the product "${productName}".`,
|
|
240
|
+
'Focus on:',
|
|
241
|
+
'- The `product` block for high-level product definition',
|
|
242
|
+
'- Any `constitution` blocks for governance rules and constraints',
|
|
243
|
+
'- Module structure and entity relationships',
|
|
244
|
+
'',
|
|
245
|
+
'After reading, summarize:',
|
|
246
|
+
'1. Product name and purpose',
|
|
247
|
+
'2. Modules and their responsibilities',
|
|
248
|
+
'3. Key governance rules and constraints',
|
|
249
|
+
'4. Cross-module relationships',
|
|
250
|
+
].join('\n'),
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
slug: 'specify',
|
|
254
|
+
title: 'Create Specification',
|
|
255
|
+
description: 'Create or modify .prd specification files',
|
|
256
|
+
category: 'workflow',
|
|
257
|
+
instructions: [
|
|
258
|
+
`You are working on "${productName}", which uses the Prodara specification language (.prd files).`,
|
|
259
|
+
'',
|
|
260
|
+
'## .prd Language Quick Reference',
|
|
261
|
+
'- `product <name> { title, version, modules }` — Top-level product definition',
|
|
262
|
+
'- `module <name> { ... }` — Logical grouping of entities, workflows, surfaces',
|
|
263
|
+
'- `entity <name> { field: type }` — Data model with typed fields',
|
|
264
|
+
'- `workflow <name> { steps }` — Business process definition',
|
|
265
|
+
'- `surface <name> { sections }` — UI surface specification',
|
|
266
|
+
'- `event <name> { fields }` — Domain event definition',
|
|
267
|
+
'- `integration <name> { endpoints }` — External service integration',
|
|
268
|
+
'- Primitive types: `string`, `int`, `float`, `boolean`, `uuid`, `datetime`, `money`',
|
|
269
|
+
'- Generic wrappers: `list<T>`, `optional<T>`, `map<K,V>`',
|
|
270
|
+
'',
|
|
271
|
+
'## Workflow',
|
|
272
|
+
'1. Create or edit .prd files following the language spec above',
|
|
273
|
+
'2. Run `prodara validate` to check for syntax and type errors',
|
|
274
|
+
'3. Run `prodara graph` to visualize the product graph',
|
|
275
|
+
'4. Run `prodara build` to compile and plan implementation',
|
|
276
|
+
].join('\n'),
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
slug: 'plan',
|
|
280
|
+
title: 'Review Implementation Plan',
|
|
281
|
+
description: 'Run `prodara plan` and review the incremental plan',
|
|
282
|
+
category: 'workflow',
|
|
283
|
+
instructions: [
|
|
284
|
+
'Run the Prodara planner to generate an incremental implementation plan:',
|
|
285
|
+
'',
|
|
286
|
+
'```bash',
|
|
287
|
+
'prodara plan --format json',
|
|
288
|
+
'```',
|
|
289
|
+
'',
|
|
290
|
+
'Review the output and explain:',
|
|
291
|
+
'1. What changes are planned (added, modified, removed nodes)',
|
|
292
|
+
'2. Which modules are affected',
|
|
293
|
+
'3. Task ordering and dependencies',
|
|
294
|
+
'4. Any potential risks or conflicts',
|
|
295
|
+
'',
|
|
296
|
+
'If there is no previous build, use `prodara plan --format human` for a readable overview.',
|
|
297
|
+
].join('\n'),
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
slug: 'implement',
|
|
301
|
+
title: 'Implement Plan',
|
|
302
|
+
description: 'Run `prodara build` to implement plan tasks',
|
|
303
|
+
category: 'workflow',
|
|
304
|
+
instructions: [
|
|
305
|
+
'Run the full Prodara build pipeline:',
|
|
306
|
+
'',
|
|
307
|
+
'```bash',
|
|
308
|
+
'prodara build',
|
|
309
|
+
'```',
|
|
310
|
+
'',
|
|
311
|
+
'This will:',
|
|
312
|
+
'1. Compile .prd files into a Product Graph',
|
|
313
|
+
'2. Diff against the previous graph to detect changes',
|
|
314
|
+
'3. Generate an implementation plan with ordered tasks',
|
|
315
|
+
'4. Produce implementation instructions for each task',
|
|
316
|
+
'',
|
|
317
|
+
'Follow the implementation instructions for each task in order.',
|
|
318
|
+
'After completing each task, run `prodara validate` to verify correctness.',
|
|
319
|
+
].join('\n'),
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
slug: 'clarify',
|
|
323
|
+
title: 'Clarify Ambiguities',
|
|
324
|
+
description: 'Run `prodara build` in clarify mode to resolve ambiguity questions',
|
|
325
|
+
category: 'workflow',
|
|
326
|
+
instructions: [
|
|
327
|
+
'Run Prodara to identify ambiguities in the specification:',
|
|
328
|
+
'',
|
|
329
|
+
'```bash',
|
|
330
|
+
'prodara build --auto-clarify',
|
|
331
|
+
'```',
|
|
332
|
+
'',
|
|
333
|
+
'Review the clarify phase output for questions about:',
|
|
334
|
+
'- Missing field types or defaults',
|
|
335
|
+
'- Ambiguous entity relationships',
|
|
336
|
+
'- Unclear workflow steps',
|
|
337
|
+
'- Underspecified authorization rules',
|
|
338
|
+
'',
|
|
339
|
+
'For each question, either:',
|
|
340
|
+
'1. Update the .prd file to resolve the ambiguity',
|
|
341
|
+
'2. Document the decision as a comment in the spec',
|
|
342
|
+
].join('\n'),
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
slug: 'review',
|
|
346
|
+
title: 'Run Review',
|
|
347
|
+
description: 'Run the review loop only, without full build',
|
|
348
|
+
category: 'workflow',
|
|
349
|
+
instructions: [
|
|
350
|
+
'Run the review phase against the current product graph:',
|
|
351
|
+
'',
|
|
352
|
+
'```bash',
|
|
353
|
+
'prodara build --only review',
|
|
354
|
+
'```',
|
|
355
|
+
'',
|
|
356
|
+
'Reviews the specification from multiple perspectives:',
|
|
357
|
+
'architecture, security, code quality, test quality, and UX quality.',
|
|
358
|
+
'Reports findings with severity levels and suggestions.',
|
|
359
|
+
].join('\n'),
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
slug: 'propose',
|
|
363
|
+
title: 'Create Change Proposal',
|
|
364
|
+
description: 'Create a structured change proposal with impact analysis',
|
|
365
|
+
category: 'workflow',
|
|
366
|
+
instructions: [
|
|
367
|
+
`Create a change proposal for "${productName}":`,
|
|
368
|
+
'',
|
|
369
|
+
'```bash',
|
|
370
|
+
'prodara propose "<description>"',
|
|
371
|
+
'```',
|
|
372
|
+
'',
|
|
373
|
+
'This generates:',
|
|
374
|
+
'- proposal.md — structured change description',
|
|
375
|
+
'- delta.prd — specification changes',
|
|
376
|
+
'- tasks.md — implementation task list',
|
|
377
|
+
'',
|
|
378
|
+
'Review the proposal and approve or modify before implementation.',
|
|
379
|
+
].join('\n'),
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
slug: 'explore',
|
|
383
|
+
title: 'Exploration Mode',
|
|
384
|
+
description: 'Explore a topic within the product graph context',
|
|
385
|
+
category: 'workflow',
|
|
386
|
+
instructions: [
|
|
387
|
+
`Explore a topic within the context of "${productName}".`,
|
|
388
|
+
'',
|
|
389
|
+
'Analyze the current product graph and specification to:',
|
|
390
|
+
'1. Understand existing entities, workflows, and relationships',
|
|
391
|
+
'2. Suggest possible approaches or enhancements',
|
|
392
|
+
'3. Highlight trade-offs and considerations',
|
|
393
|
+
'4. Identify affected modules and dependencies',
|
|
394
|
+
'',
|
|
395
|
+
'This is a read-only investigation — no files are modified.',
|
|
396
|
+
].join('\n'),
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
slug: 'party',
|
|
400
|
+
title: 'Party Mode',
|
|
401
|
+
description: 'Multi-perspective discussion from reviewer agents',
|
|
402
|
+
category: 'workflow',
|
|
403
|
+
instructions: [
|
|
404
|
+
'Run a multi-perspective party discussion:',
|
|
405
|
+
'',
|
|
406
|
+
'```bash',
|
|
407
|
+
'prodara party "<topic>"',
|
|
408
|
+
'```',
|
|
409
|
+
'',
|
|
410
|
+
'Each reviewer agent provides its analysis from a unique perspective:',
|
|
411
|
+
'- Architecture, Security, Code Quality, Test Quality, UX',
|
|
412
|
+
'- Custom reviewers if configured',
|
|
413
|
+
'',
|
|
414
|
+
'The discussion concludes with a synthesis of all perspectives.',
|
|
415
|
+
].join('\n'),
|
|
416
|
+
},
|
|
417
|
+
// -- Spec editing commands --
|
|
418
|
+
{
|
|
419
|
+
slug: 'add-module',
|
|
420
|
+
title: 'Add Module',
|
|
421
|
+
description: 'Add a new module to the .prd specification',
|
|
422
|
+
category: 'spec-edit',
|
|
423
|
+
instructions: [
|
|
424
|
+
'Add a new module to the product specification.',
|
|
425
|
+
'',
|
|
426
|
+
'Create a new .prd file for the module with the basic structure:',
|
|
427
|
+
'```',
|
|
428
|
+
'module <name> {',
|
|
429
|
+
' // entities, workflows, surfaces',
|
|
430
|
+
'}',
|
|
431
|
+
'```',
|
|
432
|
+
'',
|
|
433
|
+
'Then add the module name to the product block\'s `modules` list.',
|
|
434
|
+
'Run `prodara validate` to verify the new module is correct.',
|
|
435
|
+
].join('\n'),
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
slug: 'add-entity',
|
|
439
|
+
title: 'Add Entity',
|
|
440
|
+
description: 'Add a new entity to a module',
|
|
441
|
+
category: 'spec-edit',
|
|
442
|
+
instructions: [
|
|
443
|
+
'Add a new entity to an existing module:',
|
|
444
|
+
'',
|
|
445
|
+
'```',
|
|
446
|
+
'entity <name> {',
|
|
447
|
+
' id: uuid',
|
|
448
|
+
' // Add fields with types',
|
|
449
|
+
'}',
|
|
450
|
+
'```',
|
|
451
|
+
'',
|
|
452
|
+
'Ensure the entity is placed inside the correct module block.',
|
|
453
|
+
'Run `prodara validate` after adding.',
|
|
454
|
+
].join('\n'),
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
slug: 'add-workflow',
|
|
458
|
+
title: 'Add Workflow',
|
|
459
|
+
description: 'Add a new workflow to a module',
|
|
460
|
+
category: 'spec-edit',
|
|
461
|
+
instructions: [
|
|
462
|
+
'Add a new workflow to an existing module:',
|
|
463
|
+
'',
|
|
464
|
+
'```',
|
|
465
|
+
'workflow <name> {',
|
|
466
|
+
' // Define steps, triggers, and emissions',
|
|
467
|
+
'}',
|
|
468
|
+
'```',
|
|
469
|
+
'',
|
|
470
|
+
'Connect the workflow to relevant entities via reads/writes edges.',
|
|
471
|
+
'Run `prodara validate` after adding.',
|
|
472
|
+
].join('\n'),
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
slug: 'add-screen',
|
|
476
|
+
title: 'Add Screen / Surface',
|
|
477
|
+
description: 'Add a new screen or surface to a module',
|
|
478
|
+
category: 'spec-edit',
|
|
479
|
+
instructions: [
|
|
480
|
+
'Add a new surface (screen/page) to an existing module:',
|
|
481
|
+
'',
|
|
482
|
+
'```',
|
|
483
|
+
'surface <name> {',
|
|
484
|
+
' // Define sections and actions',
|
|
485
|
+
'}',
|
|
486
|
+
'```',
|
|
487
|
+
'',
|
|
488
|
+
'Connect the surface to relevant entities and workflows.',
|
|
489
|
+
'Run `prodara validate` after adding.',
|
|
490
|
+
].join('\n'),
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
slug: 'add-policy',
|
|
494
|
+
title: 'Add Policy / Rule',
|
|
495
|
+
description: 'Add a new policy or governance rule to a module',
|
|
496
|
+
category: 'spec-edit',
|
|
497
|
+
instructions: [
|
|
498
|
+
'Add a new policy or rule to an existing module:',
|
|
499
|
+
'',
|
|
500
|
+
'```',
|
|
501
|
+
'policy <name> {',
|
|
502
|
+
' // Define governance rules and constraints',
|
|
503
|
+
'}',
|
|
504
|
+
'```',
|
|
505
|
+
'',
|
|
506
|
+
'Policies enforce constraints across entities and workflows.',
|
|
507
|
+
'Run `prodara validate` after adding.',
|
|
508
|
+
].join('\n'),
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
slug: 'rename',
|
|
512
|
+
title: 'Rename Node',
|
|
513
|
+
description: 'Rename an entity, workflow, surface, or module',
|
|
514
|
+
category: 'spec-edit',
|
|
515
|
+
instructions: [
|
|
516
|
+
'Rename a node in the product specification:',
|
|
517
|
+
'',
|
|
518
|
+
'1. Find the declaration in the .prd file',
|
|
519
|
+
'2. Update the name',
|
|
520
|
+
'3. Update ALL references to this node across all .prd files',
|
|
521
|
+
'4. Run `prodara validate` to verify no broken references',
|
|
522
|
+
'',
|
|
523
|
+
'Use `prodara graph --format json` to find all references.',
|
|
524
|
+
].join('\n'),
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
slug: 'move',
|
|
528
|
+
title: 'Move Node Between Modules',
|
|
529
|
+
description: 'Move an entity, workflow, or surface to a different module',
|
|
530
|
+
category: 'spec-edit',
|
|
531
|
+
instructions: [
|
|
532
|
+
'Move a node from one module to another:',
|
|
533
|
+
'',
|
|
534
|
+
'1. Cut the node declaration from the source module',
|
|
535
|
+
'2. Paste it into the target module .prd file',
|
|
536
|
+
'3. Update import statements in both modules',
|
|
537
|
+
'4. Run `prodara validate` to verify the move',
|
|
538
|
+
'',
|
|
539
|
+
'Use `prodara graph --format json` to check impact.',
|
|
540
|
+
].join('\n'),
|
|
541
|
+
},
|
|
542
|
+
// -- Query commands --
|
|
543
|
+
{
|
|
544
|
+
slug: 'explain',
|
|
545
|
+
title: 'Explain Node',
|
|
546
|
+
description: 'Explain any node in the product graph',
|
|
547
|
+
category: 'query',
|
|
548
|
+
instructions: [
|
|
549
|
+
'Explain a node from the product graph:',
|
|
550
|
+
'',
|
|
551
|
+
'```bash',
|
|
552
|
+
'prodara explain <node-id>',
|
|
553
|
+
'```',
|
|
554
|
+
'',
|
|
555
|
+
'Shows: node type, fields, relationships (edges),',
|
|
556
|
+
'containing module, and related governance rules.',
|
|
557
|
+
].join('\n'),
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
slug: 'why',
|
|
561
|
+
title: 'Explain Diagnostic',
|
|
562
|
+
description: 'Explain a compiler diagnostic code',
|
|
563
|
+
category: 'query',
|
|
564
|
+
instructions: [
|
|
565
|
+
'Explain a Prodara diagnostic code:',
|
|
566
|
+
'',
|
|
567
|
+
'```bash',
|
|
568
|
+
'prodara explain --diagnostic <code>',
|
|
569
|
+
'```',
|
|
570
|
+
'',
|
|
571
|
+
'Shows the diagnostic meaning, common causes, and suggested fixes.',
|
|
572
|
+
'Diagnostic codes follow the pattern PRDxxxx.',
|
|
573
|
+
].join('\n'),
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
slug: 'graph',
|
|
577
|
+
title: 'Visualize Product Graph',
|
|
578
|
+
description: 'Output the product graph for visualization',
|
|
579
|
+
category: 'query',
|
|
580
|
+
instructions: [
|
|
581
|
+
'Generate the product graph:',
|
|
582
|
+
'',
|
|
583
|
+
'```bash',
|
|
584
|
+
'prodara graph --format json',
|
|
585
|
+
'```',
|
|
586
|
+
'',
|
|
587
|
+
'The graph includes all nodes (modules, entities, workflows,',
|
|
588
|
+
'surfaces, policies, tests) and their relationships (edges).',
|
|
589
|
+
].join('\n'),
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
slug: 'diff',
|
|
593
|
+
title: 'Show Semantic Diff',
|
|
594
|
+
description: 'Show semantic diff between current and previous build',
|
|
595
|
+
category: 'query',
|
|
596
|
+
instructions: [
|
|
597
|
+
'Show what changed since the last build:',
|
|
598
|
+
'',
|
|
599
|
+
'```bash',
|
|
600
|
+
'prodara diff --semantic',
|
|
601
|
+
'```',
|
|
602
|
+
'',
|
|
603
|
+
'Reports added, modified, and removed nodes with impact analysis.',
|
|
604
|
+
].join('\n'),
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
slug: 'drift',
|
|
608
|
+
title: 'Check Specification Drift',
|
|
609
|
+
description: 'Check for specification drift since the last build',
|
|
610
|
+
category: 'query',
|
|
611
|
+
instructions: [
|
|
612
|
+
'Check if .prd specifications have changed since the last build:',
|
|
613
|
+
'',
|
|
614
|
+
'```bash',
|
|
615
|
+
'prodara drift',
|
|
616
|
+
'```',
|
|
617
|
+
'',
|
|
618
|
+
'If drift is detected:',
|
|
619
|
+
'1. Run `prodara diff --semantic` to see what changed',
|
|
620
|
+
'2. Review the semantic diff for impact on the product graph',
|
|
621
|
+
'3. Run `prodara build` to re-compile with the latest changes',
|
|
622
|
+
'',
|
|
623
|
+
'If no drift is detected, the specification matches the last build.',
|
|
624
|
+
].join('\n'),
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
slug: 'analyze',
|
|
628
|
+
title: 'Analyze Consistency',
|
|
629
|
+
description: 'Run cross-spec consistency analysis via the product graph',
|
|
630
|
+
category: 'query',
|
|
631
|
+
instructions: [
|
|
632
|
+
'Run Prodara to analyze the product graph for consistency:',
|
|
633
|
+
'',
|
|
634
|
+
'```bash',
|
|
635
|
+
'prodara graph --format json',
|
|
636
|
+
'```',
|
|
637
|
+
'',
|
|
638
|
+
'Check for:',
|
|
639
|
+
'1. **Orphan entities** — entities not referenced by any workflow or surface',
|
|
640
|
+
'2. **Missing relationships** — workflows referencing entities from other modules without imports',
|
|
641
|
+
'3. **Test coverage** — entities and workflows without corresponding test blocks',
|
|
642
|
+
'4. **Authorization gaps** — data-modifying workflows without authorization checks',
|
|
643
|
+
'',
|
|
644
|
+
'Report findings and suggest .prd file changes to address issues.',
|
|
645
|
+
].join('\n'),
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
slug: 'checklist',
|
|
649
|
+
title: 'Quality Checklist',
|
|
650
|
+
description: 'Generate a quality checklist from governance rules',
|
|
651
|
+
category: 'query',
|
|
652
|
+
instructions: [
|
|
653
|
+
'Generate a quality validation checklist by analyzing the spec:',
|
|
654
|
+
'',
|
|
655
|
+
'```bash',
|
|
656
|
+
'prodara validate --format json',
|
|
657
|
+
'```',
|
|
658
|
+
'',
|
|
659
|
+
'Then review the product graph for:',
|
|
660
|
+
'- [ ] All entities have an `id` field',
|
|
661
|
+
'- [ ] All workflows have clear step definitions',
|
|
662
|
+
'- [ ] Security-sensitive entities have authorization rules',
|
|
663
|
+
'- [ ] All modules are referenced in the product block',
|
|
664
|
+
'- [ ] Test blocks exist for key entities and workflows',
|
|
665
|
+
'- [ ] Surfaces reference existing entities and workflows',
|
|
666
|
+
'',
|
|
667
|
+
'Format the output as a markdown checklist grouped by category.',
|
|
668
|
+
].join('\n'),
|
|
669
|
+
},
|
|
670
|
+
// -- Management commands --
|
|
671
|
+
{
|
|
672
|
+
slug: 'help',
|
|
673
|
+
title: 'Interactive Help',
|
|
674
|
+
description: 'Get contextual help based on your project state',
|
|
675
|
+
category: 'management',
|
|
676
|
+
instructions: [
|
|
677
|
+
'Inspect the current project state and provide contextual guidance:',
|
|
678
|
+
'',
|
|
679
|
+
'1. Check which .prd files exist and their contents',
|
|
680
|
+
'2. Check what has been built (look for .prodara/ directory)',
|
|
681
|
+
'3. Suggest next steps based on project completeness',
|
|
682
|
+
'',
|
|
683
|
+
'Common recommendations:',
|
|
684
|
+
'- No .prd files → create a product declaration',
|
|
685
|
+
'- Basic spec → add workflows and surfaces',
|
|
686
|
+
'- Complete spec → run build, review output',
|
|
687
|
+
].join('\n'),
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
slug: 'onboard',
|
|
691
|
+
title: 'Interactive Onboarding',
|
|
692
|
+
description: 'Guided onboarding for new Prodara users',
|
|
693
|
+
category: 'management',
|
|
694
|
+
instructions: [
|
|
695
|
+
'Guide the user through getting started with Prodara:',
|
|
696
|
+
'',
|
|
697
|
+
'1. Check if prodara is installed (`prodara --version`)',
|
|
698
|
+
'2. Check if a product spec exists',
|
|
699
|
+
'3. Walk through creating a basic spec if needed',
|
|
700
|
+
'4. Run first build and explain the output',
|
|
701
|
+
'',
|
|
702
|
+
'Adapt guidance based on the user\'s current project state.',
|
|
703
|
+
].join('\n'),
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
slug: 'extensions',
|
|
707
|
+
title: 'Manage Extensions',
|
|
708
|
+
description: 'Search, install, and manage Prodara extensions',
|
|
709
|
+
category: 'management',
|
|
710
|
+
instructions: [
|
|
711
|
+
'Manage Prodara extensions:',
|
|
712
|
+
'',
|
|
713
|
+
'```bash',
|
|
714
|
+
'prodara extensions list # List installed',
|
|
715
|
+
'prodara extensions search <q> # Search npm',
|
|
716
|
+
'prodara extensions add <name> # Install',
|
|
717
|
+
'prodara extensions remove <name> # Remove',
|
|
718
|
+
'```',
|
|
719
|
+
'',
|
|
720
|
+
'Extensions add custom reviewers, templates, and workflows.',
|
|
721
|
+
].join('\n'),
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
slug: 'presets',
|
|
725
|
+
title: 'Manage Presets',
|
|
726
|
+
description: 'Search, install, and manage configuration presets',
|
|
727
|
+
category: 'management',
|
|
728
|
+
instructions: [
|
|
729
|
+
'Manage Prodara presets:',
|
|
730
|
+
'',
|
|
731
|
+
'```bash',
|
|
732
|
+
'prodara presets list # List installed',
|
|
733
|
+
'prodara presets search <q> # Search npm',
|
|
734
|
+
'prodara presets add <name> # Install',
|
|
735
|
+
'prodara presets remove <name> # Remove',
|
|
736
|
+
'```',
|
|
737
|
+
'',
|
|
738
|
+
'Presets provide pre-configured reviewer, phase, and agent settings.',
|
|
739
|
+
].join('\n'),
|
|
740
|
+
},
|
|
741
|
+
];
|
|
742
|
+
}
|
|
743
|
+
/** Total number of registered slash commands. */
|
|
744
|
+
export const SLASH_COMMAND_COUNT = 29;
|
|
745
|
+
// ---------------------------------------------------------------------------
|
|
746
|
+
// Generation
|
|
747
|
+
// ---------------------------------------------------------------------------
|
|
748
|
+
export function getAgentConfig(agentId) {
|
|
749
|
+
/* v8 ignore next -- agentId is always a valid key */
|
|
750
|
+
return AGENT_CONFIGS[agentId] ?? null;
|
|
751
|
+
}
|
|
752
|
+
export function listSupportedAgents() {
|
|
753
|
+
return Object.keys(AGENT_CONFIGS);
|
|
754
|
+
}
|
|
755
|
+
export function isValidAgentId(value) {
|
|
756
|
+
return value in AGENT_CONFIGS;
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* Generate slash command files for a given AI agent.
|
|
760
|
+
* Returns file paths (relative to root) and their content.
|
|
761
|
+
*/
|
|
762
|
+
export function generateSlashCommands(agentId, root, productName, customDir) {
|
|
763
|
+
const config = AGENT_CONFIGS[agentId];
|
|
764
|
+
/* v8 ignore next -- config is always found for valid AgentId */
|
|
765
|
+
if (!config)
|
|
766
|
+
return [];
|
|
767
|
+
const commandsDir = customDir ?? config.commandsDir;
|
|
768
|
+
const commands = getCommandDefs(productName);
|
|
769
|
+
const files = [];
|
|
770
|
+
for (const cmd of commands) {
|
|
771
|
+
const fileName = `prodara-${cmd.slug}${config.commandExtension}`;
|
|
772
|
+
const filePath = join(root, commandsDir, fileName);
|
|
773
|
+
const content = renderCommandFile(config, cmd);
|
|
774
|
+
files.push({ path: filePath, content });
|
|
775
|
+
}
|
|
776
|
+
return files;
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Write generated slash command files to disk.
|
|
780
|
+
*/
|
|
781
|
+
export function writeSlashCommands(commands) {
|
|
782
|
+
for (const cmd of commands) {
|
|
783
|
+
mkdirSync(dirname(cmd.path), { recursive: true });
|
|
784
|
+
writeFileSync(cmd.path, cmd.content, 'utf-8');
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
// ---------------------------------------------------------------------------
|
|
788
|
+
// Rendering
|
|
789
|
+
// ---------------------------------------------------------------------------
|
|
790
|
+
function renderCommandFile(config, cmd) {
|
|
791
|
+
const sections = [];
|
|
792
|
+
// Platform-specific frontmatter
|
|
793
|
+
if (config.frontmatterStyle === 'yaml') {
|
|
794
|
+
sections.push('---');
|
|
795
|
+
if (config.agentId === 'copilot') {
|
|
796
|
+
sections.push('mode: agent');
|
|
797
|
+
sections.push('tools:');
|
|
798
|
+
sections.push(' - terminal');
|
|
799
|
+
sections.push(' - file_search');
|
|
800
|
+
sections.push(' - read_file');
|
|
801
|
+
}
|
|
802
|
+
if (config.agentId === 'cursor') {
|
|
803
|
+
sections.push(`description: "${cmd.description}"`);
|
|
804
|
+
sections.push('globs: ["**/*.prd"]');
|
|
805
|
+
}
|
|
806
|
+
sections.push('---');
|
|
807
|
+
sections.push('');
|
|
808
|
+
}
|
|
809
|
+
// Command header
|
|
810
|
+
sections.push(`# Prodara: ${cmd.title}`);
|
|
811
|
+
sections.push('');
|
|
812
|
+
sections.push(cmd.description);
|
|
813
|
+
sections.push('');
|
|
814
|
+
// Instructions
|
|
815
|
+
sections.push('## Instructions');
|
|
816
|
+
sections.push('');
|
|
817
|
+
sections.push(cmd.instructions);
|
|
818
|
+
sections.push('');
|
|
819
|
+
// Reference section
|
|
820
|
+
sections.push('## Reference');
|
|
821
|
+
sections.push('');
|
|
822
|
+
sections.push('- Configuration: `prodara.config.json`');
|
|
823
|
+
sections.push('- Specifications: `*.prd` files');
|
|
824
|
+
sections.push('- Build state: `.prodara/` directory');
|
|
825
|
+
sections.push('- Documentation: `docs/` directory (if present)');
|
|
826
|
+
sections.push('');
|
|
827
|
+
return sections.join('\n');
|
|
828
|
+
}
|
|
829
|
+
//# sourceMappingURL=agent-setup.js.map
|