@specship/specship 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +6 -0
- package/LICENSE +21 -0
- package/README.md +583 -0
- package/agents/specship-explorer.md +29 -0
- package/commands/ss-behaviour.md +116 -0
- package/commands/ss-check.md +43 -0
- package/commands/ss-design-implement.md +84 -0
- package/commands/ss-design-loop.md +125 -0
- package/commands/ss-explore.md +43 -0
- package/commands/ss-spec.md +118 -0
- package/dist/activation/starter-prompt.d.ts +57 -0
- package/dist/activation/starter-prompt.d.ts.map +1 -0
- package/dist/activation/starter-prompt.js +164 -0
- package/dist/activation/starter-prompt.js.map +1 -0
- package/dist/analytics/specship-impact.d.ts +72 -0
- package/dist/analytics/specship-impact.d.ts.map +1 -0
- package/dist/analytics/specship-impact.js +216 -0
- package/dist/analytics/specship-impact.js.map +1 -0
- package/dist/behaviour/behaviour-surface.d.ts +59 -0
- package/dist/behaviour/behaviour-surface.d.ts.map +1 -0
- package/dist/behaviour/behaviour-surface.js +112 -0
- package/dist/behaviour/behaviour-surface.js.map +1 -0
- package/dist/bin/node-version-check.d.ts +37 -0
- package/dist/bin/node-version-check.d.ts.map +1 -0
- package/dist/bin/node-version-check.js +79 -0
- package/dist/bin/node-version-check.js.map +1 -0
- package/dist/bin/specship.d.ts +25 -0
- package/dist/bin/specship.d.ts.map +1 -0
- package/dist/bin/specship.js +2823 -0
- package/dist/bin/specship.js.map +1 -0
- package/dist/bin/uninstall.d.ts +13 -0
- package/dist/bin/uninstall.d.ts.map +1 -0
- package/dist/bin/uninstall.js +35 -0
- package/dist/bin/uninstall.js.map +1 -0
- package/dist/context/formatter.d.ts +30 -0
- package/dist/context/formatter.d.ts.map +1 -0
- package/dist/context/formatter.js +263 -0
- package/dist/context/formatter.js.map +1 -0
- package/dist/context/index.d.ts +119 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +1289 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/markers.d.ts +19 -0
- package/dist/context/markers.d.ts.map +1 -0
- package/dist/context/markers.js +22 -0
- package/dist/context/markers.js.map +1 -0
- package/dist/db/index.d.ts +103 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +279 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrations.d.ts +44 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/migrations.js +503 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/db/queries.d.ts +357 -0
- package/dist/db/queries.d.ts.map +1 -0
- package/dist/db/queries.js +1504 -0
- package/dist/db/queries.js.map +1 -0
- package/dist/db/schema.sql +451 -0
- package/dist/db/spec-queries.d.ts +130 -0
- package/dist/db/spec-queries.d.ts.map +1 -0
- package/dist/db/spec-queries.js +738 -0
- package/dist/db/spec-queries.js.map +1 -0
- package/dist/db/sqlite-adapter.d.ts +65 -0
- package/dist/db/sqlite-adapter.d.ts.map +1 -0
- package/dist/db/sqlite-adapter.js +214 -0
- package/dist/db/sqlite-adapter.js.map +1 -0
- package/dist/designer/artifact-store.js +54 -0
- package/dist/designer/browser.js +141 -0
- package/dist/designer/cdp-ensure.js +60 -0
- package/dist/designer/cdp-env.js +18 -0
- package/dist/designer/cdp-trace.js +599 -0
- package/dist/designer/cross-platform.js +74 -0
- package/dist/designer/designer-controller.js +1413 -0
- package/dist/designer/file-panel.js +39 -0
- package/dist/designer/interstitials.js +97 -0
- package/dist/designer/oopif-reader.js +176 -0
- package/dist/designer/package-meta.js +18 -0
- package/dist/designer/preview-host.js +50 -0
- package/dist/designer/repo-root.js +31 -0
- package/dist/designer/run-state.js +353 -0
- package/dist/designer/session-store.js +59 -0
- package/dist/designer/ui-anchors.js +651 -0
- package/dist/directory.d.ts +67 -0
- package/dist/directory.d.ts.map +1 -0
- package/dist/directory.js +267 -0
- package/dist/directory.js.map +1 -0
- package/dist/enforce/enforce.d.ts +70 -0
- package/dist/enforce/enforce.d.ts.map +1 -0
- package/dist/enforce/enforce.js +125 -0
- package/dist/enforce/enforce.js.map +1 -0
- package/dist/errors.d.ts +136 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +219 -0
- package/dist/errors.js.map +1 -0
- package/dist/extraction/dfm-extractor.d.ts +31 -0
- package/dist/extraction/dfm-extractor.d.ts.map +1 -0
- package/dist/extraction/dfm-extractor.js +151 -0
- package/dist/extraction/dfm-extractor.js.map +1 -0
- package/dist/extraction/generated-detection.d.ts +30 -0
- package/dist/extraction/generated-detection.d.ts.map +1 -0
- package/dist/extraction/generated-detection.js +80 -0
- package/dist/extraction/generated-detection.js.map +1 -0
- package/dist/extraction/grammars.d.ts +100 -0
- package/dist/extraction/grammars.d.ts.map +1 -0
- package/dist/extraction/grammars.js +426 -0
- package/dist/extraction/grammars.js.map +1 -0
- package/dist/extraction/index.d.ts +138 -0
- package/dist/extraction/index.d.ts.map +1 -0
- package/dist/extraction/index.js +1394 -0
- package/dist/extraction/index.js.map +1 -0
- package/dist/extraction/languages/c-cpp.d.ts +4 -0
- package/dist/extraction/languages/c-cpp.d.ts.map +1 -0
- package/dist/extraction/languages/c-cpp.js +171 -0
- package/dist/extraction/languages/c-cpp.js.map +1 -0
- package/dist/extraction/languages/csharp.d.ts +3 -0
- package/dist/extraction/languages/csharp.d.ts.map +1 -0
- package/dist/extraction/languages/csharp.js +73 -0
- package/dist/extraction/languages/csharp.js.map +1 -0
- package/dist/extraction/languages/dart.d.ts +3 -0
- package/dist/extraction/languages/dart.d.ts.map +1 -0
- package/dist/extraction/languages/dart.js +192 -0
- package/dist/extraction/languages/dart.js.map +1 -0
- package/dist/extraction/languages/go.d.ts +3 -0
- package/dist/extraction/languages/go.d.ts.map +1 -0
- package/dist/extraction/languages/go.js +74 -0
- package/dist/extraction/languages/go.js.map +1 -0
- package/dist/extraction/languages/index.d.ts +10 -0
- package/dist/extraction/languages/index.d.ts.map +1 -0
- package/dist/extraction/languages/index.js +51 -0
- package/dist/extraction/languages/index.js.map +1 -0
- package/dist/extraction/languages/java.d.ts +3 -0
- package/dist/extraction/languages/java.d.ts.map +1 -0
- package/dist/extraction/languages/java.js +70 -0
- package/dist/extraction/languages/java.js.map +1 -0
- package/dist/extraction/languages/javascript.d.ts +3 -0
- package/dist/extraction/languages/javascript.d.ts.map +1 -0
- package/dist/extraction/languages/javascript.js +90 -0
- package/dist/extraction/languages/javascript.js.map +1 -0
- package/dist/extraction/languages/kotlin.d.ts +3 -0
- package/dist/extraction/languages/kotlin.d.ts.map +1 -0
- package/dist/extraction/languages/kotlin.js +259 -0
- package/dist/extraction/languages/kotlin.js.map +1 -0
- package/dist/extraction/languages/lua.d.ts +3 -0
- package/dist/extraction/languages/lua.d.ts.map +1 -0
- package/dist/extraction/languages/lua.js +150 -0
- package/dist/extraction/languages/lua.js.map +1 -0
- package/dist/extraction/languages/luau.d.ts +3 -0
- package/dist/extraction/languages/luau.d.ts.map +1 -0
- package/dist/extraction/languages/luau.js +37 -0
- package/dist/extraction/languages/luau.js.map +1 -0
- package/dist/extraction/languages/objc.d.ts +3 -0
- package/dist/extraction/languages/objc.d.ts.map +1 -0
- package/dist/extraction/languages/objc.js +133 -0
- package/dist/extraction/languages/objc.js.map +1 -0
- package/dist/extraction/languages/pascal.d.ts +3 -0
- package/dist/extraction/languages/pascal.d.ts.map +1 -0
- package/dist/extraction/languages/pascal.js +66 -0
- package/dist/extraction/languages/pascal.js.map +1 -0
- package/dist/extraction/languages/php.d.ts +3 -0
- package/dist/extraction/languages/php.d.ts.map +1 -0
- package/dist/extraction/languages/php.js +107 -0
- package/dist/extraction/languages/php.js.map +1 -0
- package/dist/extraction/languages/python.d.ts +3 -0
- package/dist/extraction/languages/python.d.ts.map +1 -0
- package/dist/extraction/languages/python.js +56 -0
- package/dist/extraction/languages/python.js.map +1 -0
- package/dist/extraction/languages/ruby.d.ts +3 -0
- package/dist/extraction/languages/ruby.d.ts.map +1 -0
- package/dist/extraction/languages/ruby.js +114 -0
- package/dist/extraction/languages/ruby.js.map +1 -0
- package/dist/extraction/languages/rust.d.ts +3 -0
- package/dist/extraction/languages/rust.d.ts.map +1 -0
- package/dist/extraction/languages/rust.js +109 -0
- package/dist/extraction/languages/rust.js.map +1 -0
- package/dist/extraction/languages/scala.d.ts +3 -0
- package/dist/extraction/languages/scala.d.ts.map +1 -0
- package/dist/extraction/languages/scala.js +139 -0
- package/dist/extraction/languages/scala.js.map +1 -0
- package/dist/extraction/languages/swift.d.ts +3 -0
- package/dist/extraction/languages/swift.d.ts.map +1 -0
- package/dist/extraction/languages/swift.js +91 -0
- package/dist/extraction/languages/swift.js.map +1 -0
- package/dist/extraction/languages/typescript.d.ts +3 -0
- package/dist/extraction/languages/typescript.d.ts.map +1 -0
- package/dist/extraction/languages/typescript.js +129 -0
- package/dist/extraction/languages/typescript.js.map +1 -0
- package/dist/extraction/liquid-extractor.d.ts +52 -0
- package/dist/extraction/liquid-extractor.d.ts.map +1 -0
- package/dist/extraction/liquid-extractor.js +313 -0
- package/dist/extraction/liquid-extractor.js.map +1 -0
- package/dist/extraction/mybatis-extractor.d.ts +48 -0
- package/dist/extraction/mybatis-extractor.d.ts.map +1 -0
- package/dist/extraction/mybatis-extractor.js +198 -0
- package/dist/extraction/mybatis-extractor.js.map +1 -0
- package/dist/extraction/parse-worker.d.ts +8 -0
- package/dist/extraction/parse-worker.d.ts.map +1 -0
- package/dist/extraction/parse-worker.js +94 -0
- package/dist/extraction/parse-worker.js.map +1 -0
- package/dist/extraction/specs/markdown-spec-extractor.d.ts +114 -0
- package/dist/extraction/specs/markdown-spec-extractor.d.ts.map +1 -0
- package/dist/extraction/specs/markdown-spec-extractor.js +699 -0
- package/dist/extraction/specs/markdown-spec-extractor.js.map +1 -0
- package/dist/extraction/specs/types.d.ts +39 -0
- package/dist/extraction/specs/types.d.ts.map +1 -0
- package/dist/extraction/specs/types.js +8 -0
- package/dist/extraction/specs/types.js.map +1 -0
- package/dist/extraction/svelte-extractor.d.ts +56 -0
- package/dist/extraction/svelte-extractor.d.ts.map +1 -0
- package/dist/extraction/svelte-extractor.js +272 -0
- package/dist/extraction/svelte-extractor.js.map +1 -0
- package/dist/extraction/tree-sitter-helpers.d.ts +28 -0
- package/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
- package/dist/extraction/tree-sitter-helpers.js +103 -0
- package/dist/extraction/tree-sitter-helpers.js.map +1 -0
- package/dist/extraction/tree-sitter-types.d.ts +193 -0
- package/dist/extraction/tree-sitter-types.d.ts.map +1 -0
- package/dist/extraction/tree-sitter-types.js +10 -0
- package/dist/extraction/tree-sitter-types.js.map +1 -0
- package/dist/extraction/tree-sitter.d.ts +317 -0
- package/dist/extraction/tree-sitter.d.ts.map +1 -0
- package/dist/extraction/tree-sitter.js +3092 -0
- package/dist/extraction/tree-sitter.js.map +1 -0
- package/dist/extraction/vue-extractor.d.ts +51 -0
- package/dist/extraction/vue-extractor.d.ts.map +1 -0
- package/dist/extraction/vue-extractor.js +251 -0
- package/dist/extraction/vue-extractor.js.map +1 -0
- package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/dist/extraction/wasm-runtime-flags.d.ts +38 -0
- package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
- package/dist/extraction/wasm-runtime-flags.js +106 -0
- package/dist/extraction/wasm-runtime-flags.js.map +1 -0
- package/dist/fitness/fitness.d.ts +75 -0
- package/dist/fitness/fitness.d.ts.map +1 -0
- package/dist/fitness/fitness.js +204 -0
- package/dist/fitness/fitness.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 +13 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/maintainability.d.ts +115 -0
- package/dist/graph/maintainability.d.ts.map +1 -0
- package/dist/graph/maintainability.js +299 -0
- package/dist/graph/maintainability.js.map +1 -0
- package/dist/graph/queries.d.ts +106 -0
- package/dist/graph/queries.d.ts.map +1 -0
- package/dist/graph/queries.js +366 -0
- package/dist/graph/queries.js.map +1 -0
- package/dist/graph/traversal.d.ts +127 -0
- package/dist/graph/traversal.d.ts.map +1 -0
- package/dist/graph/traversal.js +531 -0
- package/dist/graph/traversal.js.map +1 -0
- package/dist/health/smoke-check.d.ts +85 -0
- package/dist/health/smoke-check.d.ts.map +1 -0
- package/dist/health/smoke-check.js +246 -0
- package/dist/health/smoke-check.js.map +1 -0
- package/dist/index.d.ts +674 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1473 -0
- package/dist/index.js.map +1 -0
- package/dist/installer/config-writer.d.ts +28 -0
- package/dist/installer/config-writer.d.ts.map +1 -0
- package/dist/installer/config-writer.js +91 -0
- package/dist/installer/config-writer.js.map +1 -0
- package/dist/installer/index.d.ts +100 -0
- package/dist/installer/index.d.ts.map +1 -0
- package/dist/installer/index.js +442 -0
- package/dist/installer/index.js.map +1 -0
- package/dist/installer/init-offer.d.ts +31 -0
- package/dist/installer/init-offer.d.ts.map +1 -0
- package/dist/installer/init-offer.js +30 -0
- package/dist/installer/init-offer.js.map +1 -0
- package/dist/installer/instructions-template.d.ts +36 -0
- package/dist/installer/instructions-template.d.ts.map +1 -0
- package/dist/installer/instructions-template.js +57 -0
- package/dist/installer/instructions-template.js.map +1 -0
- package/dist/installer/targets/claude.d.ts +146 -0
- package/dist/installer/targets/claude.d.ts.map +1 -0
- package/dist/installer/targets/claude.js +864 -0
- package/dist/installer/targets/claude.js.map +1 -0
- package/dist/installer/targets/registry.d.ts +19 -0
- package/dist/installer/targets/registry.d.ts.map +1 -0
- package/dist/installer/targets/registry.js +31 -0
- package/dist/installer/targets/registry.js.map +1 -0
- package/dist/installer/targets/shared.d.ts +76 -0
- package/dist/installer/targets/shared.d.ts.map +1 -0
- package/dist/installer/targets/shared.js +260 -0
- package/dist/installer/targets/shared.js.map +1 -0
- package/dist/installer/targets/types.d.ts +95 -0
- package/dist/installer/targets/types.d.ts.map +1 -0
- package/dist/installer/targets/types.js +12 -0
- package/dist/installer/targets/types.js.map +1 -0
- package/dist/isolation/worktree.d.ts +65 -0
- package/dist/isolation/worktree.d.ts.map +1 -0
- package/dist/isolation/worktree.js +231 -0
- package/dist/isolation/worktree.js.map +1 -0
- package/dist/mcp/daemon-paths.d.ts +46 -0
- package/dist/mcp/daemon-paths.d.ts.map +1 -0
- package/dist/mcp/daemon-paths.js +125 -0
- package/dist/mcp/daemon-paths.js.map +1 -0
- package/dist/mcp/daemon.d.ts +161 -0
- package/dist/mcp/daemon.d.ts.map +1 -0
- package/dist/mcp/daemon.js +403 -0
- package/dist/mcp/daemon.js.map +1 -0
- package/dist/mcp/designer-tools.d.ts +33 -0
- package/dist/mcp/designer-tools.d.ts.map +1 -0
- package/dist/mcp/designer-tools.js +313 -0
- package/dist/mcp/designer-tools.js.map +1 -0
- package/dist/mcp/engine.d.ts +105 -0
- package/dist/mcp/engine.d.ts.map +1 -0
- package/dist/mcp/engine.js +270 -0
- package/dist/mcp/engine.js.map +1 -0
- package/dist/mcp/fitness-tool.d.ts +12 -0
- package/dist/mcp/fitness-tool.d.ts.map +1 -0
- package/dist/mcp/fitness-tool.js +46 -0
- package/dist/mcp/fitness-tool.js.map +1 -0
- package/dist/mcp/index.d.ts +112 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +477 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/maintainability-tool.d.ts +13 -0
- package/dist/mcp/maintainability-tool.d.ts.map +1 -0
- package/dist/mcp/maintainability-tool.js +64 -0
- package/dist/mcp/maintainability-tool.js.map +1 -0
- package/dist/mcp/proxy.d.ts +81 -0
- package/dist/mcp/proxy.d.ts.map +1 -0
- package/dist/mcp/proxy.js +510 -0
- package/dist/mcp/proxy.js.map +1 -0
- package/dist/mcp/server-instructions.d.ts +18 -0
- package/dist/mcp/server-instructions.d.ts.map +1 -0
- package/dist/mcp/server-instructions.js +79 -0
- package/dist/mcp/server-instructions.js.map +1 -0
- package/dist/mcp/session.d.ts +77 -0
- package/dist/mcp/session.d.ts.map +1 -0
- package/dist/mcp/session.js +294 -0
- package/dist/mcp/session.js.map +1 -0
- package/dist/mcp/spec-tools.d.ts +39 -0
- package/dist/mcp/spec-tools.d.ts.map +1 -0
- package/dist/mcp/spec-tools.js +534 -0
- package/dist/mcp/spec-tools.js.map +1 -0
- package/dist/mcp/tools.d.ts +417 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +3179 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/transport.d.ts +188 -0
- package/dist/mcp/transport.d.ts.map +1 -0
- package/dist/mcp/transport.js +343 -0
- package/dist/mcp/transport.js.map +1 -0
- package/dist/mcp/version.d.ts +19 -0
- package/dist/mcp/version.d.ts.map +1 -0
- package/dist/mcp/version.js +71 -0
- package/dist/mcp/version.js.map +1 -0
- package/dist/reflect/apply.d.ts +31 -0
- package/dist/reflect/apply.d.ts.map +1 -0
- package/dist/reflect/apply.js +286 -0
- package/dist/reflect/apply.js.map +1 -0
- package/dist/reflect/hash.d.ts +20 -0
- package/dist/reflect/hash.d.ts.map +1 -0
- package/dist/reflect/hash.js +36 -0
- package/dist/reflect/hash.js.map +1 -0
- package/dist/reflect/index.d.ts +16 -0
- package/dist/reflect/index.d.ts.map +1 -0
- package/dist/reflect/index.js +43 -0
- package/dist/reflect/index.js.map +1 -0
- package/dist/reflect/miner.d.ts +21 -0
- package/dist/reflect/miner.d.ts.map +1 -0
- package/dist/reflect/miner.js +463 -0
- package/dist/reflect/miner.js.map +1 -0
- package/dist/reflect/store.d.ts +31 -0
- package/dist/reflect/store.d.ts.map +1 -0
- package/dist/reflect/store.js +101 -0
- package/dist/reflect/store.js.map +1 -0
- package/dist/reflect/sweep.d.ts +26 -0
- package/dist/reflect/sweep.d.ts.map +1 -0
- package/dist/reflect/sweep.js +42 -0
- package/dist/reflect/sweep.js.map +1 -0
- package/dist/reflect/targets.d.ts +52 -0
- package/dist/reflect/targets.d.ts.map +1 -0
- package/dist/reflect/targets.js +192 -0
- package/dist/reflect/targets.js.map +1 -0
- package/dist/reflect/types.d.ts +96 -0
- package/dist/reflect/types.d.ts.map +1 -0
- package/dist/reflect/types.js +13 -0
- package/dist/reflect/types.js.map +1 -0
- package/dist/resolution/brief-link-resolver.d.ts +114 -0
- package/dist/resolution/brief-link-resolver.d.ts.map +1 -0
- package/dist/resolution/brief-link-resolver.js +261 -0
- package/dist/resolution/brief-link-resolver.js.map +1 -0
- package/dist/resolution/callback-synthesizer.d.ts +10 -0
- package/dist/resolution/callback-synthesizer.d.ts.map +1 -0
- package/dist/resolution/callback-synthesizer.js +1300 -0
- package/dist/resolution/callback-synthesizer.js.map +1 -0
- package/dist/resolution/domain-gap-seed.d.ts +60 -0
- package/dist/resolution/domain-gap-seed.d.ts.map +1 -0
- package/dist/resolution/domain-gap-seed.js +87 -0
- package/dist/resolution/domain-gap-seed.js.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.js +225 -0
- package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
- package/dist/resolution/frameworks/csharp.d.ts +8 -0
- package/dist/resolution/frameworks/csharp.d.ts.map +1 -0
- package/dist/resolution/frameworks/csharp.js +241 -0
- package/dist/resolution/frameworks/csharp.js.map +1 -0
- package/dist/resolution/frameworks/drupal.d.ts +51 -0
- package/dist/resolution/frameworks/drupal.d.ts.map +1 -0
- package/dist/resolution/frameworks/drupal.js +367 -0
- package/dist/resolution/frameworks/drupal.js.map +1 -0
- package/dist/resolution/frameworks/expo-modules.d.ts +3 -0
- package/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
- package/dist/resolution/frameworks/expo-modules.js +143 -0
- package/dist/resolution/frameworks/expo-modules.js.map +1 -0
- package/dist/resolution/frameworks/express.d.ts +8 -0
- package/dist/resolution/frameworks/express.d.ts.map +1 -0
- package/dist/resolution/frameworks/express.js +308 -0
- package/dist/resolution/frameworks/express.js.map +1 -0
- package/dist/resolution/frameworks/fabric.d.ts +3 -0
- package/dist/resolution/frameworks/fabric.d.ts.map +1 -0
- package/dist/resolution/frameworks/fabric.js +354 -0
- package/dist/resolution/frameworks/fabric.js.map +1 -0
- package/dist/resolution/frameworks/go.d.ts +8 -0
- package/dist/resolution/frameworks/go.d.ts.map +1 -0
- package/dist/resolution/frameworks/go.js +161 -0
- package/dist/resolution/frameworks/go.js.map +1 -0
- package/dist/resolution/frameworks/index.d.ts +48 -0
- package/dist/resolution/frameworks/index.d.ts.map +1 -0
- package/dist/resolution/frameworks/index.js +161 -0
- package/dist/resolution/frameworks/index.js.map +1 -0
- package/dist/resolution/frameworks/java.d.ts +8 -0
- package/dist/resolution/frameworks/java.d.ts.map +1 -0
- package/dist/resolution/frameworks/java.js +504 -0
- package/dist/resolution/frameworks/java.js.map +1 -0
- package/dist/resolution/frameworks/laravel.d.ts +13 -0
- package/dist/resolution/frameworks/laravel.d.ts.map +1 -0
- package/dist/resolution/frameworks/laravel.js +257 -0
- package/dist/resolution/frameworks/laravel.js.map +1 -0
- package/dist/resolution/frameworks/nestjs.d.ts +26 -0
- package/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
- package/dist/resolution/frameworks/nestjs.js +698 -0
- package/dist/resolution/frameworks/nestjs.js.map +1 -0
- package/dist/resolution/frameworks/play.d.ts +19 -0
- package/dist/resolution/frameworks/play.d.ts.map +1 -0
- package/dist/resolution/frameworks/play.js +111 -0
- package/dist/resolution/frameworks/play.js.map +1 -0
- package/dist/resolution/frameworks/python.d.ts +10 -0
- package/dist/resolution/frameworks/python.d.ts.map +1 -0
- package/dist/resolution/frameworks/python.js +396 -0
- package/dist/resolution/frameworks/python.js.map +1 -0
- package/dist/resolution/frameworks/react-native.d.ts +3 -0
- package/dist/resolution/frameworks/react-native.d.ts.map +1 -0
- package/dist/resolution/frameworks/react-native.js +360 -0
- package/dist/resolution/frameworks/react-native.js.map +1 -0
- package/dist/resolution/frameworks/react.d.ts +8 -0
- package/dist/resolution/frameworks/react.d.ts.map +1 -0
- package/dist/resolution/frameworks/react.js +365 -0
- package/dist/resolution/frameworks/react.js.map +1 -0
- package/dist/resolution/frameworks/ruby.d.ts +8 -0
- package/dist/resolution/frameworks/ruby.d.ts.map +1 -0
- package/dist/resolution/frameworks/ruby.js +302 -0
- package/dist/resolution/frameworks/ruby.js.map +1 -0
- package/dist/resolution/frameworks/rust.d.ts +8 -0
- package/dist/resolution/frameworks/rust.d.ts.map +1 -0
- package/dist/resolution/frameworks/rust.js +304 -0
- package/dist/resolution/frameworks/rust.js.map +1 -0
- package/dist/resolution/frameworks/svelte.d.ts +9 -0
- package/dist/resolution/frameworks/svelte.d.ts.map +1 -0
- package/dist/resolution/frameworks/svelte.js +249 -0
- package/dist/resolution/frameworks/svelte.js.map +1 -0
- package/dist/resolution/frameworks/swift-objc.d.ts +37 -0
- package/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
- package/dist/resolution/frameworks/swift-objc.js +252 -0
- package/dist/resolution/frameworks/swift-objc.js.map +1 -0
- package/dist/resolution/frameworks/swift.d.ts +10 -0
- package/dist/resolution/frameworks/swift.d.ts.map +1 -0
- package/dist/resolution/frameworks/swift.js +400 -0
- package/dist/resolution/frameworks/swift.js.map +1 -0
- package/dist/resolution/frameworks/vue.d.ts +9 -0
- package/dist/resolution/frameworks/vue.d.ts.map +1 -0
- package/dist/resolution/frameworks/vue.js +306 -0
- package/dist/resolution/frameworks/vue.js.map +1 -0
- package/dist/resolution/go-module.d.ts +26 -0
- package/dist/resolution/go-module.d.ts.map +1 -0
- package/dist/resolution/go-module.js +78 -0
- package/dist/resolution/go-module.js.map +1 -0
- package/dist/resolution/import-resolver.d.ts +68 -0
- package/dist/resolution/import-resolver.d.ts.map +1 -0
- package/dist/resolution/import-resolver.js +1275 -0
- package/dist/resolution/import-resolver.js.map +1 -0
- package/dist/resolution/index.d.ts +117 -0
- package/dist/resolution/index.d.ts.map +1 -0
- package/dist/resolution/index.js +895 -0
- package/dist/resolution/index.js.map +1 -0
- package/dist/resolution/lru-cache.d.ts +24 -0
- package/dist/resolution/lru-cache.d.ts.map +1 -0
- package/dist/resolution/lru-cache.js +62 -0
- package/dist/resolution/lru-cache.js.map +1 -0
- package/dist/resolution/name-matcher.d.ts +32 -0
- package/dist/resolution/name-matcher.d.ts.map +1 -0
- package/dist/resolution/name-matcher.js +596 -0
- package/dist/resolution/name-matcher.js.map +1 -0
- package/dist/resolution/path-aliases.d.ts +68 -0
- package/dist/resolution/path-aliases.d.ts.map +1 -0
- package/dist/resolution/path-aliases.js +238 -0
- package/dist/resolution/path-aliases.js.map +1 -0
- package/dist/resolution/spec-link-resolver.d.ts +148 -0
- package/dist/resolution/spec-link-resolver.d.ts.map +1 -0
- package/dist/resolution/spec-link-resolver.js +337 -0
- package/dist/resolution/spec-link-resolver.js.map +1 -0
- package/dist/resolution/strip-comments.d.ts +27 -0
- package/dist/resolution/strip-comments.d.ts.map +1 -0
- package/dist/resolution/strip-comments.js +441 -0
- package/dist/resolution/strip-comments.js.map +1 -0
- package/dist/resolution/swift-objc-bridge.d.ts +134 -0
- package/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
- package/dist/resolution/swift-objc-bridge.js +256 -0
- package/dist/resolution/swift-objc-bridge.js.map +1 -0
- package/dist/resolution/types.d.ts +216 -0
- package/dist/resolution/types.d.ts.map +1 -0
- package/dist/resolution/types.js +8 -0
- package/dist/resolution/types.js.map +1 -0
- package/dist/resolution/workspace-packages.d.ts +48 -0
- package/dist/resolution/workspace-packages.d.ts.map +1 -0
- package/dist/resolution/workspace-packages.js +208 -0
- package/dist/resolution/workspace-packages.js.map +1 -0
- package/dist/search/query-parser.d.ts +57 -0
- package/dist/search/query-parser.d.ts.map +1 -0
- package/dist/search/query-parser.js +177 -0
- package/dist/search/query-parser.js.map +1 -0
- package/dist/search/query-utils.d.ts +71 -0
- package/dist/search/query-utils.d.ts.map +1 -0
- package/dist/search/query-utils.js +380 -0
- package/dist/search/query-utils.js.map +1 -0
- package/dist/server/cli.js +152 -0
- package/dist/server/index.js +12 -0
- package/dist/server/ingest/impact-backfill.js +69 -0
- package/dist/server/ingest/impact-query.js +343 -0
- package/dist/server/ingest/index.js +19 -0
- package/dist/server/ingest/ingestor.js +541 -0
- package/dist/server/ingest/parser.js +104 -0
- package/dist/server/ingest/pricing.js +78 -0
- package/dist/server/ingest/specship-classify.js +153 -0
- package/dist/server/ingest/types.js +9 -0
- package/dist/server/ingest/watcher.js +77 -0
- package/dist/server/package.json +3 -0
- package/dist/server/project-registry.js +101 -0
- package/dist/server/routes/claude.js +907 -0
- package/dist/server/routes/domain.js +0 -0
- package/dist/server/routes/events.js +134 -0
- package/dist/server/routes/graph.js +248 -0
- package/dist/server/routes/maintainability.js +18 -0
- package/dist/server/routes/memory.js +272 -0
- package/dist/server/routes/projects.js +197 -0
- package/dist/server/routes/reflect.js +93 -0
- package/dist/server/routes/spec.js +373 -0
- package/dist/server/routes/status.js +112 -0
- package/dist/server/routes/workflow.js +253 -0
- package/dist/server/server.js +238 -0
- package/dist/server/static-handler.js +87 -0
- package/dist/statusline/active-run.d.ts +16 -0
- package/dist/statusline/active-run.d.ts.map +1 -0
- package/dist/statusline/active-run.js +73 -0
- package/dist/statusline/active-run.js.map +1 -0
- package/dist/statusline/cache.d.ts +21 -0
- package/dist/statusline/cache.d.ts.map +1 -0
- package/dist/statusline/cache.js +34 -0
- package/dist/statusline/cache.js.map +1 -0
- package/dist/statusline/index.d.ts +24 -0
- package/dist/statusline/index.d.ts.map +1 -0
- package/dist/statusline/index.js +128 -0
- package/dist/statusline/index.js.map +1 -0
- package/dist/statusline/paths.d.ts +27 -0
- package/dist/statusline/paths.d.ts.map +1 -0
- package/dist/statusline/paths.js +101 -0
- package/dist/statusline/paths.js.map +1 -0
- package/dist/statusline/render.d.ts +25 -0
- package/dist/statusline/render.d.ts.map +1 -0
- package/dist/statusline/render.js +72 -0
- package/dist/statusline/render.js.map +1 -0
- package/dist/statusline/session-marker.d.ts +30 -0
- package/dist/statusline/session-marker.d.ts.map +1 -0
- package/dist/statusline/session-marker.js +71 -0
- package/dist/statusline/session-marker.js.map +1 -0
- package/dist/statusline/types.d.ts +67 -0
- package/dist/statusline/types.d.ts.map +1 -0
- package/dist/statusline/types.js +16 -0
- package/dist/statusline/types.js.map +1 -0
- package/dist/sync/git-hooks.d.ts +45 -0
- package/dist/sync/git-hooks.d.ts.map +1 -0
- package/dist/sync/git-hooks.js +225 -0
- package/dist/sync/git-hooks.js.map +1 -0
- package/dist/sync/index.d.ts +19 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +35 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/watch-policy.d.ts +48 -0
- package/dist/sync/watch-policy.d.ts.map +1 -0
- package/dist/sync/watch-policy.js +124 -0
- package/dist/sync/watch-policy.js.map +1 -0
- package/dist/sync/watcher.d.ts +283 -0
- package/dist/sync/watcher.d.ts.map +1 -0
- package/dist/sync/watcher.js +606 -0
- package/dist/sync/watcher.js.map +1 -0
- package/dist/sync/worktree.d.ts +54 -0
- package/dist/sync/worktree.d.ts.map +1 -0
- package/dist/sync/worktree.js +137 -0
- package/dist/sync/worktree.js.map +1 -0
- package/dist/types.d.ts +625 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +118 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/glyphs.d.ts +42 -0
- package/dist/ui/glyphs.d.ts.map +1 -0
- package/dist/ui/glyphs.js +78 -0
- package/dist/ui/glyphs.js.map +1 -0
- package/dist/ui/shimmer-progress.d.ts +11 -0
- package/dist/ui/shimmer-progress.d.ts.map +1 -0
- package/dist/ui/shimmer-progress.js +90 -0
- package/dist/ui/shimmer-progress.js.map +1 -0
- package/dist/ui/shimmer-worker.d.ts +2 -0
- package/dist/ui/shimmer-worker.d.ts.map +1 -0
- package/dist/ui/shimmer-worker.js +118 -0
- package/dist/ui/shimmer-worker.js.map +1 -0
- package/dist/ui/types.d.ts +17 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui/types.js +3 -0
- package/dist/ui/types.js.map +1 -0
- package/dist/utils.d.ts +205 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +549 -0
- package/dist/utils.js.map +1 -0
- package/dist/web/chunk-2AJCHB7P.js +1 -0
- package/dist/web/chunk-2CPLUFCH.js +2 -0
- package/dist/web/chunk-2I7L37NS.js +1 -0
- package/dist/web/chunk-2NAWAJB5.js +1 -0
- package/dist/web/chunk-2OJBIPE4.js +1 -0
- package/dist/web/chunk-372AYXK6.js +17 -0
- package/dist/web/chunk-3E2WB6D5.js +1 -0
- package/dist/web/chunk-3EBFYSCH.js +2 -0
- package/dist/web/chunk-3QCQ4BXS.js +1 -0
- package/dist/web/chunk-42XVAQ6I.js +1 -0
- package/dist/web/chunk-4IMMPEYM.js +1 -0
- package/dist/web/chunk-4JYHAP7B.js +1 -0
- package/dist/web/chunk-4TJQJPCZ.js +1 -0
- package/dist/web/chunk-4WZIHTPC.js +1 -0
- package/dist/web/chunk-4YVSYOSD.js +1 -0
- package/dist/web/chunk-52PO6IMB.js +2 -0
- package/dist/web/chunk-54D6RFSW.js +1 -0
- package/dist/web/chunk-5BQIOYKW.js +1 -0
- package/dist/web/chunk-5HGWHUJA.js +1 -0
- package/dist/web/chunk-5XRUOPZE.js +1 -0
- package/dist/web/chunk-5Y244R4G.js +1 -0
- package/dist/web/chunk-6O7Z3P2M.js +1 -0
- package/dist/web/chunk-6QXULGLG.js +1 -0
- package/dist/web/chunk-6RRDPT5Z.js +1 -0
- package/dist/web/chunk-6VKB2ZWM.js +1 -0
- package/dist/web/chunk-7DMFVTU4.js +1 -0
- package/dist/web/chunk-7P5CVBJZ.js +1 -0
- package/dist/web/chunk-7SMPKVEP.js +1 -0
- package/dist/web/chunk-AHLX543M.js +1 -0
- package/dist/web/chunk-AMGJBO7D.js +3 -0
- package/dist/web/chunk-AZJVTPLU.js +1 -0
- package/dist/web/chunk-B3CWIVBW.js +1 -0
- package/dist/web/chunk-BLBRMCN2.js +1 -0
- package/dist/web/chunk-BMIAXD2V.js +2 -0
- package/dist/web/chunk-BPCJLNBS.js +47 -0
- package/dist/web/chunk-BRHEUDLY.js +6 -0
- package/dist/web/chunk-BUXWEHIY.js +1 -0
- package/dist/web/chunk-CD5IZM7Y.js +1 -0
- package/dist/web/chunk-DLQPZWSI.css +1 -0
- package/dist/web/chunk-DSGNOCKQ.js +1 -0
- package/dist/web/chunk-DT5LJYFX.js +1 -0
- package/dist/web/chunk-DYRFLPJA.js +1 -0
- package/dist/web/chunk-E3J3CXR5.js +1 -0
- package/dist/web/chunk-E73OX2P7.js +1 -0
- package/dist/web/chunk-EAXRKDLV.js +1 -0
- package/dist/web/chunk-EBKKDHYI.js +1 -0
- package/dist/web/chunk-EE7V7Q5P.js +1 -0
- package/dist/web/chunk-EKY2FUHU.js +1 -0
- package/dist/web/chunk-EP6XOPXH.js +1 -0
- package/dist/web/chunk-ESGDLJOJ.js +1 -0
- package/dist/web/chunk-ETJG7NCY.js +1 -0
- package/dist/web/chunk-EUUEFEDI.js +1 -0
- package/dist/web/chunk-EX4ZHR4F.js +1 -0
- package/dist/web/chunk-F5UNCSXP.js +1 -0
- package/dist/web/chunk-FFGJXUHI.js +1 -0
- package/dist/web/chunk-FGNZDHTL.js +11 -0
- package/dist/web/chunk-FIJW2UNJ.js +1 -0
- package/dist/web/chunk-FMV5PXRC.js +5 -0
- package/dist/web/chunk-G7VZT5KB.js +3 -0
- package/dist/web/chunk-GCOM4JPR.js +2 -0
- package/dist/web/chunk-GEIIDO6C.js +1 -0
- package/dist/web/chunk-GRZYXPSO.js +7 -0
- package/dist/web/chunk-GWBABPZ5.js +1 -0
- package/dist/web/chunk-GYGPS3AN.js +1 -0
- package/dist/web/chunk-H4GLRD3Q.js +1 -0
- package/dist/web/chunk-H5TWEFYX.js +1 -0
- package/dist/web/chunk-H7AF7YS4.js +1 -0
- package/dist/web/chunk-HCB2N2KH.js +1 -0
- package/dist/web/chunk-HDZDQILN.js +1 -0
- package/dist/web/chunk-HMK6UO6N.js +1 -0
- package/dist/web/chunk-HVVXPI4D.js +1 -0
- package/dist/web/chunk-IHEE5NYJ.js +1 -0
- package/dist/web/chunk-IPB746BT.js +1 -0
- package/dist/web/chunk-ISNEBICW.js +1 -0
- package/dist/web/chunk-J2GZVLHH.js +1 -0
- package/dist/web/chunk-JTFXTIPE.js +903 -0
- package/dist/web/chunk-KHU5M2AL.js +1 -0
- package/dist/web/chunk-KW3DHCFV.js +1 -0
- package/dist/web/chunk-LB6JPLX2.js +1 -0
- package/dist/web/chunk-LBXLFPVN.js +1 -0
- package/dist/web/chunk-LGNSHRCE.js +1 -0
- package/dist/web/chunk-LNSVDHCI.js +1 -0
- package/dist/web/chunk-LVGIY3SO.js +1 -0
- package/dist/web/chunk-LXLHIHEN.js +1 -0
- package/dist/web/chunk-MFHO2F2U.js +4 -0
- package/dist/web/chunk-N5OSSQFZ.js +1 -0
- package/dist/web/chunk-N6SS4G6S.js +1 -0
- package/dist/web/chunk-NAJYJNHS.js +1 -0
- package/dist/web/chunk-NHD66NOI.js +1 -0
- package/dist/web/chunk-NNLJ55MY.js +1 -0
- package/dist/web/chunk-NTBJG6SJ.js +1 -0
- package/dist/web/chunk-NUDB3Q2Y.js +3 -0
- package/dist/web/chunk-OM7JVWQQ.js +1 -0
- package/dist/web/chunk-OXEF5E3E.js +1 -0
- package/dist/web/chunk-PGGJPDJG.js +1 -0
- package/dist/web/chunk-PUYSJNJR.js +1 -0
- package/dist/web/chunk-Q2RVFS45.js +1 -0
- package/dist/web/chunk-Q7L6LLAK.js +1 -0
- package/dist/web/chunk-QCMKJIWY.js +1 -0
- package/dist/web/chunk-QEQRY4QQ.js +1 -0
- package/dist/web/chunk-QH6CF3M3.js +1 -0
- package/dist/web/chunk-QQ5LD7PI.js +1 -0
- package/dist/web/chunk-QR6L3KAC.js +1 -0
- package/dist/web/chunk-QXJS6F3U.js +1 -0
- package/dist/web/chunk-R2DLK4HO.js +1 -0
- package/dist/web/chunk-RD6TVPOT.js +1 -0
- package/dist/web/chunk-RKY4EJYJ.js +1 -0
- package/dist/web/chunk-RONYWVY7.js +1 -0
- package/dist/web/chunk-RSZZWGGC.js +1 -0
- package/dist/web/chunk-RXKXYF2C.js +1 -0
- package/dist/web/chunk-SCNDZRN2.js +1 -0
- package/dist/web/chunk-SH6UVHQC.js +1 -0
- package/dist/web/chunk-SWKJRNYY.js +1 -0
- package/dist/web/chunk-T7AZ65JP.js +1 -0
- package/dist/web/chunk-TCZDVOHD.js +1 -0
- package/dist/web/chunk-TF5TF6IP.js +1 -0
- package/dist/web/chunk-TPTITA3V.js +1 -0
- package/dist/web/chunk-TR335633.js +1 -0
- package/dist/web/chunk-UR5KDXPX.js +1 -0
- package/dist/web/chunk-UR6O2GEH.js +1 -0
- package/dist/web/chunk-UTNMGWTP.js +1 -0
- package/dist/web/chunk-VECWMHJP.js +1 -0
- package/dist/web/chunk-VUACT35R.js +3 -0
- package/dist/web/chunk-VZI7H4SZ.js +1 -0
- package/dist/web/chunk-W22AVG3N.js +1 -0
- package/dist/web/chunk-W6NGHRHX.js +1 -0
- package/dist/web/chunk-WB6YHOD4.js +1 -0
- package/dist/web/chunk-WBT64AWV.js +1 -0
- package/dist/web/chunk-WFXJIXZE.js +4 -0
- package/dist/web/chunk-WTGYRH3Z.js +298 -0
- package/dist/web/chunk-WXTCVDTP.js +1 -0
- package/dist/web/chunk-XCDHWLVH.js +1 -0
- package/dist/web/chunk-Y3H6FFUZ.js +1 -0
- package/dist/web/chunk-Y4F5ULGJ.js +1 -0
- package/dist/web/chunk-YEGKAAEE.js +1 -0
- package/dist/web/chunk-YM2KU57F.js +1 -0
- package/dist/web/chunk-YRERBP6T.js +1 -0
- package/dist/web/chunk-ZLV4VCDG.js +3 -0
- package/dist/web/chunk-ZQUJMA5K.js +4 -0
- package/dist/web/chunk-ZTVI5KFF.js +1 -0
- package/dist/web/favicon-16.png +0 -0
- package/dist/web/favicon-180.png +0 -0
- package/dist/web/favicon-32.png +0 -0
- package/dist/web/favicon-512.png +0 -0
- package/dist/web/favicon-small.svg +15 -0
- package/dist/web/favicon.ico +0 -0
- package/dist/web/favicon.svg +20 -0
- package/dist/web/icon-192.png +0 -0
- package/dist/web/icon-512.png +0 -0
- package/dist/web/index.html +146 -0
- package/dist/web/main-ESADRXN2.css +1 -0
- package/dist/web/main-SQFUMVQA.js +1 -0
- package/dist/web/manifest.webmanifest +15 -0
- package/dist/web/media/codicon-LN6W7LCM.ttf +0 -0
- package/dist/web/styles-KSOPUVDA.css +1 -0
- package/dist/web/sw.js +69 -0
- package/dist/workflows/condition-evaluator.d.ts +75 -0
- package/dist/workflows/condition-evaluator.d.ts.map +1 -0
- package/dist/workflows/condition-evaluator.js +282 -0
- package/dist/workflows/condition-evaluator.js.map +1 -0
- package/dist/workflows/defaults/claude-design-implement.yaml +336 -0
- package/dist/workflows/defaults/index.d.ts +26 -0
- package/dist/workflows/defaults/index.d.ts.map +1 -0
- package/dist/workflows/defaults/index.js +94 -0
- package/dist/workflows/defaults/index.js.map +1 -0
- package/dist/workflows/defaults/spec-author.yaml +214 -0
- package/dist/workflows/defaults/spec-fix.yaml +110 -0
- package/dist/workflows/defaults/spec-implement.yaml +150 -0
- package/dist/workflows/defaults/spec-relink.yaml +81 -0
- package/dist/workflows/defaults/spec-verify.yaml +51 -0
- package/dist/workflows/discovery.d.ts +46 -0
- package/dist/workflows/discovery.d.ts.map +1 -0
- package/dist/workflows/discovery.js +193 -0
- package/dist/workflows/discovery.js.map +1 -0
- package/dist/workflows/executor.d.ts +98 -0
- package/dist/workflows/executor.d.ts.map +1 -0
- package/dist/workflows/executor.js +664 -0
- package/dist/workflows/executor.js.map +1 -0
- package/dist/workflows/runners/approval.d.ts +18 -0
- package/dist/workflows/runners/approval.d.ts.map +1 -0
- package/dist/workflows/runners/approval.js +34 -0
- package/dist/workflows/runners/approval.js.map +1 -0
- package/dist/workflows/runners/bash.d.ts +13 -0
- package/dist/workflows/runners/bash.d.ts.map +1 -0
- package/dist/workflows/runners/bash.js +143 -0
- package/dist/workflows/runners/bash.js.map +1 -0
- package/dist/workflows/runners/cancel.d.ts +10 -0
- package/dist/workflows/runners/cancel.d.ts.map +1 -0
- package/dist/workflows/runners/cancel.js +19 -0
- package/dist/workflows/runners/cancel.js.map +1 -0
- package/dist/workflows/runners/prompt.d.ts +51 -0
- package/dist/workflows/runners/prompt.d.ts.map +1 -0
- package/dist/workflows/runners/prompt.js +306 -0
- package/dist/workflows/runners/prompt.js.map +1 -0
- package/dist/workflows/runners/script.d.ts +17 -0
- package/dist/workflows/runners/script.d.ts.map +1 -0
- package/dist/workflows/runners/script.js +155 -0
- package/dist/workflows/runners/script.js.map +1 -0
- package/dist/workflows/runners/types.d.ts +57 -0
- package/dist/workflows/runners/types.d.ts.map +1 -0
- package/dist/workflows/runners/types.js +13 -0
- package/dist/workflows/runners/types.js.map +1 -0
- package/dist/workflows/schemas/workflow.d.ts +166 -0
- package/dist/workflows/schemas/workflow.d.ts.map +1 -0
- package/dist/workflows/schemas/workflow.js +437 -0
- package/dist/workflows/schemas/workflow.js.map +1 -0
- package/hooks/hooks.json +38 -0
- package/package.json +78 -0
- package/scripts/add-lang/bench.sh +60 -0
- package/scripts/add-lang/check-grammar.mjs +75 -0
- package/scripts/add-lang/dump-ast.mjs +103 -0
- package/scripts/add-lang/verify-extraction.mjs +70 -0
- package/scripts/agent-eval/arms-F.sh +21 -0
- package/scripts/agent-eval/arms-matrix.sh +37 -0
- package/scripts/agent-eval/audit.sh +68 -0
- package/scripts/agent-eval/bench-readme.sh +28 -0
- package/scripts/agent-eval/bench-why-repo.sh +22 -0
- package/scripts/agent-eval/block-read-hook.sh +19 -0
- package/scripts/agent-eval/hook-settings.json +15 -0
- package/scripts/agent-eval/itrun.sh +120 -0
- package/scripts/agent-eval/parse-arms.mjs +116 -0
- package/scripts/agent-eval/parse-bench-readme.mjs +84 -0
- package/scripts/agent-eval/parse-run.mjs +45 -0
- package/scripts/agent-eval/parse-session.mjs +93 -0
- package/scripts/agent-eval/probe-context.mjs +21 -0
- package/scripts/agent-eval/probe-explore.mjs +40 -0
- package/scripts/agent-eval/probe-node.mjs +20 -0
- package/scripts/agent-eval/probe-sweep.mjs +119 -0
- package/scripts/agent-eval/probe-trace.mjs +20 -0
- package/scripts/agent-eval/run-agent.sh +34 -0
- package/scripts/agent-eval/run-all.sh +67 -0
- package/scripts/agent-eval/run-arms.sh +56 -0
- package/scripts/agent-eval/seq-matrix.mjs +137 -0
- package/scripts/build-bundle.sh +118 -0
- package/scripts/build-server-bundle.mjs +80 -0
- package/scripts/build-web-bundle.mjs +66 -0
- package/scripts/extract-release-notes.mjs +130 -0
- package/scripts/local-install.sh +41 -0
- package/scripts/npm-sdk.js +75 -0
- package/scripts/npm-shim.js +246 -0
- package/scripts/offline-install.ps1 +148 -0
- package/scripts/offline-install.sh +149 -0
- package/scripts/pack-npm.sh +119 -0
- package/scripts/prepare-release.mjs +270 -0
- package/scripts/sync-shim-version.mjs +64 -0
- package/selectors.json +41 -0
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Markdown Spec Extractor
|
|
4
|
+
*
|
|
5
|
+
* Parses Markdown spec files where each addressable section carries an
|
|
6
|
+
* embedded ID via `<!-- id: REQ-X -->` immediately above its heading.
|
|
7
|
+
* Per locked v1 design: **embedded IDs are mandatory**. A heading without
|
|
8
|
+
* an embedded ID produces an `error`-severity ExtractionError so the spec
|
|
9
|
+
* author fixes the file; no path-derived fallback.
|
|
10
|
+
*
|
|
11
|
+
* Spec format:
|
|
12
|
+
* ---
|
|
13
|
+
* format: markdown
|
|
14
|
+
* owner: security
|
|
15
|
+
* ---
|
|
16
|
+
* <!-- id: REQ-AUTH-005 -->
|
|
17
|
+
* # Failed login attempts must be rate-limited
|
|
18
|
+
*
|
|
19
|
+
* The login endpoint rejects more than 5 failed attempts per IP per minute.
|
|
20
|
+
*
|
|
21
|
+
* implementations:
|
|
22
|
+
* - src/auth/login.ts:authenticate
|
|
23
|
+
* - src/auth/rate-limit.ts:enforce
|
|
24
|
+
*
|
|
25
|
+
* ## Acceptance
|
|
26
|
+
* <!-- id: REQ-AUTH-005.A1 -->
|
|
27
|
+
* - A 6th failed attempt within 60s from the same IP returns 429.
|
|
28
|
+
*
|
|
29
|
+
* Hierarchy is heading depth: a deeper heading becomes a child of the most
|
|
30
|
+
* recent enclosing heading. The document spec (kind='document') has no
|
|
31
|
+
* parent and gets ID from the first H1 with an embedded ID — OR a
|
|
32
|
+
* document-level `id:` field in the frontmatter.
|
|
33
|
+
*/
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.MarkdownSpecExtractor = void 0;
|
|
36
|
+
exports.parseAcceptanceParentId = parseAcceptanceParentId;
|
|
37
|
+
exports.isAcceptanceContainerHeading = isAcceptanceContainerHeading;
|
|
38
|
+
const crypto_1 = require("crypto");
|
|
39
|
+
/**
|
|
40
|
+
* Pattern: <!-- id: SOMETHING --> (whitespace tolerant). Anchored to its own
|
|
41
|
+
* line so a literal `<!-- id: … -->` written *inside* a bullet's prose (e.g. a
|
|
42
|
+
* spec that documents the marker syntax) is not mistaken for a real marker —
|
|
43
|
+
* real markers always sit alone on a line above their heading/bullet.
|
|
44
|
+
*/
|
|
45
|
+
const ID_COMMENT = /^\s*<!--\s*id\s*:\s*([^\s-][^\s]*)\s*-->\s*$/;
|
|
46
|
+
/** Pattern: heading line (# .. ###### ..) */
|
|
47
|
+
const HEADING = /^(#{1,6})\s+(.+?)\s*$/;
|
|
48
|
+
/** Pattern: implementation reference inside an `implementations:` block */
|
|
49
|
+
const IMPL_REF = /^[-*]\s+([^\s:]+)\s*:\s*([A-Za-z0-9_$.]+)\s*$/;
|
|
50
|
+
/** Pattern: a Markdown list bullet (`- foo` / `* foo`, indentation tolerant). */
|
|
51
|
+
const BULLET = /^\s*[-*]\s+(.*\S)\s*$/;
|
|
52
|
+
/** The four recognized domain-fact `type` values (REQ-DOMAIN-001). */
|
|
53
|
+
const DOMAIN_TYPES = new Set(['term', 'rule', 'decision', 'constraint']);
|
|
54
|
+
/**
|
|
55
|
+
* Derive an acceptance criterion's parent requirement from its id suffix
|
|
56
|
+
* (REQ-ACCEPTANCE-001.A2). The convention is `<REQ-ID>.A<N>` — `REQ-AUTH-001.A2`
|
|
57
|
+
* is owned by `REQ-AUTH-001`. Returns the parent id, or null when the id carries
|
|
58
|
+
* no `.A<N>` suffix (the caller then falls back to the enclosing requirement —
|
|
59
|
+
* REQ-ACCEPTANCE-001.A4).
|
|
60
|
+
*/
|
|
61
|
+
function parseAcceptanceParentId(id) {
|
|
62
|
+
const m = id.match(/^(.+)\.A\d+$/i);
|
|
63
|
+
return m && m[1] ? m[1] : null;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* True when a heading is the canonical acceptance container — `## Acceptance`
|
|
67
|
+
* (case-insensitive), title-only, no id (REQ-ACCEPTANCE-002.A1). A container
|
|
68
|
+
* yields no spec node and, crucially, is exempt from the `spec_missing_id` error
|
|
69
|
+
* that every other id-less heading still raises (REQ-ACCEPTANCE-002.A2).
|
|
70
|
+
*/
|
|
71
|
+
function isAcceptanceContainerHeading(title) {
|
|
72
|
+
return title.trim().toLowerCase() === 'acceptance';
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Heuristic: guess the target node kind from a qualified name. Used only
|
|
76
|
+
* for the `target_node_kind` hint on SpecLinkCandidate — the resolver
|
|
77
|
+
* matches loosely on (file_path, qualified_name).
|
|
78
|
+
*/
|
|
79
|
+
function guessNodeKind(qualifiedName) {
|
|
80
|
+
if (/[A-Z]/.test(qualifiedName[0] ?? ''))
|
|
81
|
+
return 'class';
|
|
82
|
+
if (qualifiedName.includes('.'))
|
|
83
|
+
return 'method';
|
|
84
|
+
return 'function';
|
|
85
|
+
}
|
|
86
|
+
class MarkdownSpecExtractor {
|
|
87
|
+
filePath;
|
|
88
|
+
source;
|
|
89
|
+
constructor(filePath, source) {
|
|
90
|
+
this.filePath = filePath;
|
|
91
|
+
this.source = source;
|
|
92
|
+
}
|
|
93
|
+
extract() {
|
|
94
|
+
const start = Date.now();
|
|
95
|
+
// Brainstorm briefs (`specs/<slug>/brief.md`) take a wholly separate path:
|
|
96
|
+
// they have no `<!-- id: -->`-marked headings, so the requirement parser
|
|
97
|
+
// would only emit `spec_missing_id` errors. Handling them here keeps the
|
|
98
|
+
// document/requirement/acceptance extraction below completely unchanged
|
|
99
|
+
// (REQ-FUNNEL-001.A5).
|
|
100
|
+
if (this.isBriefFile()) {
|
|
101
|
+
return this.extractBrief(start);
|
|
102
|
+
}
|
|
103
|
+
// Domain facts (`specs/domain/*.md`) likewise take a separate path: they are
|
|
104
|
+
// frontmatter-keyed (`id: DOM-<AREA>-NNN`, `type: …`) with freeform prose and
|
|
105
|
+
// no `<!-- id: -->`-marked headings, so the requirement walker below would only
|
|
106
|
+
// emit `spec_missing_id`. Routing them here keeps that walker untouched, which
|
|
107
|
+
// REQ-DOMAIN-001.A1 requires (parse without `spec_missing_id`).
|
|
108
|
+
if (this.isDomainFile()) {
|
|
109
|
+
return this.extractDomain(start);
|
|
110
|
+
}
|
|
111
|
+
const specs = [];
|
|
112
|
+
const linkCandidates = [];
|
|
113
|
+
const errors = [];
|
|
114
|
+
const lines = this.source.split(/\r?\n/);
|
|
115
|
+
const now = Date.now();
|
|
116
|
+
// 1. Frontmatter (optional)
|
|
117
|
+
const { frontmatter, firstContentLine } = this.parseFrontmatter(lines, errors);
|
|
118
|
+
const pendingSections = [];
|
|
119
|
+
const acceptanceBullets = [];
|
|
120
|
+
let pendingId = null;
|
|
121
|
+
let pendingIdLine = -1;
|
|
122
|
+
// The most recent heading section pushed — an acceptance bullet's enclosing
|
|
123
|
+
// requirement, used for the no-suffix fallback + the mismatch check.
|
|
124
|
+
let lastSectionId = null;
|
|
125
|
+
for (let i = firstContentLine; i < lines.length; i++) {
|
|
126
|
+
const line = lines[i];
|
|
127
|
+
if (line === undefined)
|
|
128
|
+
continue;
|
|
129
|
+
const idMatch = line.match(ID_COMMENT);
|
|
130
|
+
if (idMatch) {
|
|
131
|
+
if (pendingId !== null) {
|
|
132
|
+
// Two consecutive ID comments with no heading/bullet between them — the
|
|
133
|
+
// earlier one is stranded. Surface it but don't fail extraction.
|
|
134
|
+
errors.push({
|
|
135
|
+
message: `Stranded <!-- id: ${pendingId} --> on line ${pendingIdLine + 1} (no heading followed)`,
|
|
136
|
+
filePath: this.filePath,
|
|
137
|
+
line: pendingIdLine + 1,
|
|
138
|
+
severity: 'warning',
|
|
139
|
+
code: 'spec_stranded_id',
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
pendingId = idMatch[1] ?? null;
|
|
143
|
+
pendingIdLine = i;
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
const headingMatch = line.match(HEADING);
|
|
147
|
+
if (headingMatch && headingMatch[1] && headingMatch[2]) {
|
|
148
|
+
const level = headingMatch[1].length;
|
|
149
|
+
const title = headingMatch[2];
|
|
150
|
+
if (pendingId === null) {
|
|
151
|
+
// `## Acceptance` with no id is the canonical container — exempt from
|
|
152
|
+
// the missing-id error, and emits no node (REQ-ACCEPTANCE-002.A1).
|
|
153
|
+
if (isAcceptanceContainerHeading(title))
|
|
154
|
+
continue;
|
|
155
|
+
// Any other heading without an embedded ID — load-bearing error per v1
|
|
156
|
+
// (REQ-ACCEPTANCE-002.A2).
|
|
157
|
+
errors.push({
|
|
158
|
+
message: `Heading "${title}" lacks an embedded ID. Add <!-- id: REQ-X --> immediately above it.`,
|
|
159
|
+
filePath: this.filePath,
|
|
160
|
+
line: i + 1,
|
|
161
|
+
severity: 'error',
|
|
162
|
+
code: 'spec_missing_id',
|
|
163
|
+
});
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
pendingSections.push({
|
|
167
|
+
id: pendingId,
|
|
168
|
+
level,
|
|
169
|
+
title,
|
|
170
|
+
startLine: i + 1, // 1-indexed
|
|
171
|
+
headingLineIdx: i,
|
|
172
|
+
});
|
|
173
|
+
lastSectionId = pendingId;
|
|
174
|
+
pendingId = null;
|
|
175
|
+
pendingIdLine = -1;
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
// An id-marked BULLET is an acceptance criterion (REQ-ACCEPTANCE-001.A1):
|
|
179
|
+
// it consumes the pending id (so it no longer strands — A3) and becomes an
|
|
180
|
+
// `acceptance` node. Its body spans continuation lines up to the next id
|
|
181
|
+
// marker, heading, bullet, or blank line.
|
|
182
|
+
if (pendingId !== null) {
|
|
183
|
+
const bulletMatch = line.match(BULLET);
|
|
184
|
+
if (bulletMatch && bulletMatch[1]) {
|
|
185
|
+
const parts = [bulletMatch[1].trim()];
|
|
186
|
+
let endIdx = i;
|
|
187
|
+
for (let j = i + 1; j < lines.length; j++) {
|
|
188
|
+
const cont = lines[j];
|
|
189
|
+
if (cont === undefined || cont.trim() === '')
|
|
190
|
+
break;
|
|
191
|
+
if (ID_COMMENT.test(cont) || HEADING.test(cont) || BULLET.test(cont))
|
|
192
|
+
break;
|
|
193
|
+
parts.push(cont.trim());
|
|
194
|
+
endIdx = j;
|
|
195
|
+
}
|
|
196
|
+
acceptanceBullets.push({
|
|
197
|
+
id: pendingId,
|
|
198
|
+
text: parts.join(' ').trim(),
|
|
199
|
+
startLine: i + 1,
|
|
200
|
+
endLine: endIdx + 1,
|
|
201
|
+
enclosingRequirementId: lastSectionId,
|
|
202
|
+
});
|
|
203
|
+
pendingId = null;
|
|
204
|
+
pendingIdLine = -1;
|
|
205
|
+
i = endIdx; // skip consumed continuation lines
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
// 3. Determine the document node (kind='document', no parent).
|
|
211
|
+
//
|
|
212
|
+
// The document's id comes from the frontmatter `id:`, or — when frontmatter
|
|
213
|
+
// omits it — from the first top-level (H1) section carrying an embedded id.
|
|
214
|
+
// When an H1 carries the document id (the canonical frontmatter-id + same-id
|
|
215
|
+
// H1 pattern), that H1 IS the document: it MUST NOT also be emitted as a
|
|
216
|
+
// requirement. A prior version did, with `parentId = docId` (self-parented),
|
|
217
|
+
// and `INSERT OR REPLACE` then clobbered the real document row — leaving every
|
|
218
|
+
// document mis-typed as a self-parented requirement (REQ-PROJECTION-001).
|
|
219
|
+
const frontmatterId = typeof frontmatter.id === 'string' && frontmatter.id.length > 0
|
|
220
|
+
? frontmatter.id
|
|
221
|
+
: undefined;
|
|
222
|
+
// The H1 that represents the document, if any:
|
|
223
|
+
// - frontmatter id present → the first H1 whose id equals it (same-id pattern);
|
|
224
|
+
// - frontmatter id absent → the first H1 with an id (it becomes the document,
|
|
225
|
+
// per REQ-PROJECTION-002).
|
|
226
|
+
const docSectionIdx = pendingSections.findIndex((s) => s.level === 1 && (frontmatterId === undefined || s.id === frontmatterId));
|
|
227
|
+
const documentSection = docSectionIdx >= 0 ? pendingSections[docSectionIdx] : undefined;
|
|
228
|
+
const docId = frontmatterId ?? documentSection?.id;
|
|
229
|
+
if (docId !== undefined) {
|
|
230
|
+
// Body + line range of the document.
|
|
231
|
+
let docStartLine;
|
|
232
|
+
let docBodyStart;
|
|
233
|
+
let docBodyEnd;
|
|
234
|
+
if (documentSection !== undefined) {
|
|
235
|
+
// The H1 IS the document: its body is the intro prose between the H1 and
|
|
236
|
+
// the first following section (the first requirement) — NOT the H1's full
|
|
237
|
+
// heading-nesting body, which would swallow every requirement beneath it.
|
|
238
|
+
const nextAfterDoc = pendingSections[docSectionIdx + 1];
|
|
239
|
+
docStartLine = documentSection.startLine;
|
|
240
|
+
docBodyStart = documentSection.headingLineIdx + 1;
|
|
241
|
+
docBodyEnd =
|
|
242
|
+
nextAfterDoc !== undefined ? nextAfterDoc.headingLineIdx : lines.length;
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
// Frontmatter id but no matching H1 (requirements start at H2, or the only
|
|
246
|
+
// H1 carries a different id): the document body is the content before the
|
|
247
|
+
// first heading, as before.
|
|
248
|
+
const firstSection = pendingSections[0];
|
|
249
|
+
docStartLine = firstContentLine + 1;
|
|
250
|
+
docBodyStart = firstContentLine;
|
|
251
|
+
docBodyEnd =
|
|
252
|
+
firstSection !== undefined ? firstSection.headingLineIdx : lines.length;
|
|
253
|
+
}
|
|
254
|
+
const docBody = lines.slice(docBodyStart, docBodyEnd).join('\n').trim();
|
|
255
|
+
const docTitle = typeof frontmatter.title === 'string' && frontmatter.title.length > 0
|
|
256
|
+
? frontmatter.title
|
|
257
|
+
: documentSection?.title ?? this.filePath;
|
|
258
|
+
specs.push({
|
|
259
|
+
id: docId,
|
|
260
|
+
kind: 'document',
|
|
261
|
+
title: docTitle,
|
|
262
|
+
body: docBody,
|
|
263
|
+
format: 'markdown',
|
|
264
|
+
sourcePath: this.filePath,
|
|
265
|
+
startLine: docStartLine,
|
|
266
|
+
endLine: docBodyEnd,
|
|
267
|
+
parentId: undefined,
|
|
268
|
+
contentHash: hash(docBody),
|
|
269
|
+
version: typeof frontmatter.version === 'number' ? frontmatter.version : 1,
|
|
270
|
+
owner: typeof frontmatter.owner === 'string' ? frontmatter.owner : undefined,
|
|
271
|
+
priority: typeof frontmatter.priority === 'string' ? frontmatter.priority : undefined,
|
|
272
|
+
metadata: frontmatter.metadata && typeof frontmatter.metadata === 'object'
|
|
273
|
+
? frontmatter.metadata
|
|
274
|
+
: undefined,
|
|
275
|
+
createdAt: now,
|
|
276
|
+
updatedAt: now,
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
// For each section: determine its body range + parent.
|
|
280
|
+
// Body: from line after the heading to the line before the next heading
|
|
281
|
+
// at the same-or-shallower level.
|
|
282
|
+
// Parent: the most recent earlier section with a SHALLOWER level (or
|
|
283
|
+
// the document if none).
|
|
284
|
+
for (let s = 0; s < pendingSections.length; s++) {
|
|
285
|
+
const section = pendingSections[s];
|
|
286
|
+
if (section === undefined)
|
|
287
|
+
continue;
|
|
288
|
+
// The H1 that IS the document was already emitted above (kind='document').
|
|
289
|
+
// Skip it here so it isn't also written as a self-parented requirement.
|
|
290
|
+
if (section === documentSection)
|
|
291
|
+
continue;
|
|
292
|
+
// Find body end: next section at level <= section.level, else EOF.
|
|
293
|
+
let bodyEndLine = lines.length;
|
|
294
|
+
for (let t = s + 1; t < pendingSections.length; t++) {
|
|
295
|
+
const next = pendingSections[t];
|
|
296
|
+
if (next !== undefined && next.level <= section.level) {
|
|
297
|
+
bodyEndLine = next.headingLineIdx;
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
// The body excludes the heading line itself.
|
|
302
|
+
const bodyLines = lines.slice(section.headingLineIdx + 1, bodyEndLine);
|
|
303
|
+
const body = bodyLines.join('\n').trim();
|
|
304
|
+
// Find parent: nearest earlier section with shallower level.
|
|
305
|
+
let parentId = docId;
|
|
306
|
+
for (let p = s - 1; p >= 0; p--) {
|
|
307
|
+
const earlier = pendingSections[p];
|
|
308
|
+
if (earlier !== undefined && earlier.level < section.level) {
|
|
309
|
+
parentId = earlier.id;
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
// Classify kind by content / title — `## Acceptance` is the canonical
|
|
314
|
+
// acceptance container; bullet lists under it are individual criteria.
|
|
315
|
+
// For v1 we keep it simple: H1/H2 = 'requirement', deeper = 'acceptance'.
|
|
316
|
+
const kind = section.level >= 3 ? 'acceptance' : 'requirement';
|
|
317
|
+
specs.push({
|
|
318
|
+
id: section.id,
|
|
319
|
+
kind,
|
|
320
|
+
title: section.title,
|
|
321
|
+
body,
|
|
322
|
+
format: 'markdown',
|
|
323
|
+
sourcePath: this.filePath,
|
|
324
|
+
startLine: section.startLine,
|
|
325
|
+
endLine: bodyEndLine,
|
|
326
|
+
parentId,
|
|
327
|
+
contentHash: hash(body),
|
|
328
|
+
version: 1,
|
|
329
|
+
createdAt: now,
|
|
330
|
+
updatedAt: now,
|
|
331
|
+
});
|
|
332
|
+
// Scan the body for `implementations:` blocks — bullet-list refs.
|
|
333
|
+
const candidates = this.extractImplementationRefs(section.id, bodyLines);
|
|
334
|
+
linkCandidates.push(...candidates);
|
|
335
|
+
}
|
|
336
|
+
// Acceptance criteria authored as id-marked bullets → `acceptance` nodes
|
|
337
|
+
// (REQ-ACCEPTANCE-001). Parent from the id suffix, falling back to the
|
|
338
|
+
// enclosing requirement when there's no `.A<N>` suffix (A2 / A4).
|
|
339
|
+
for (const ab of acceptanceBullets) {
|
|
340
|
+
const suffixParent = parseAcceptanceParentId(ab.id);
|
|
341
|
+
const parentId = suffixParent ?? ab.enclosingRequirementId ?? docId;
|
|
342
|
+
// The id names one requirement but the bullet sits under another — parent
|
|
343
|
+
// per the id, but flag the misplacement (REQ-ACCEPTANCE-003.A4).
|
|
344
|
+
if (suffixParent &&
|
|
345
|
+
ab.enclosingRequirementId &&
|
|
346
|
+
suffixParent !== ab.enclosingRequirementId) {
|
|
347
|
+
errors.push({
|
|
348
|
+
message: `Acceptance criterion ${ab.id} is placed under ${ab.enclosingRequirementId} but its id names ${suffixParent} as its parent`,
|
|
349
|
+
filePath: this.filePath,
|
|
350
|
+
line: ab.startLine,
|
|
351
|
+
severity: 'warning',
|
|
352
|
+
code: 'spec_acceptance_parent_mismatch',
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
const title = ab.text.length > 120 ? `${ab.text.slice(0, 117)}…` : ab.text;
|
|
356
|
+
specs.push({
|
|
357
|
+
id: ab.id,
|
|
358
|
+
kind: 'acceptance',
|
|
359
|
+
title,
|
|
360
|
+
body: ab.text,
|
|
361
|
+
format: 'markdown',
|
|
362
|
+
sourcePath: this.filePath,
|
|
363
|
+
startLine: ab.startLine,
|
|
364
|
+
endLine: ab.endLine,
|
|
365
|
+
parentId,
|
|
366
|
+
contentHash: hash(ab.text),
|
|
367
|
+
version: 1,
|
|
368
|
+
createdAt: now,
|
|
369
|
+
updatedAt: now,
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
return {
|
|
373
|
+
specs,
|
|
374
|
+
linkCandidates,
|
|
375
|
+
errors,
|
|
376
|
+
format: 'markdown',
|
|
377
|
+
durationMs: Date.now() - start,
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
/** True when this file is a brainstorm brief (`.../brief.md`). */
|
|
381
|
+
isBriefFile() {
|
|
382
|
+
const base = this.filePath.split(/[/\\]/).pop() ?? '';
|
|
383
|
+
return base.toLowerCase() === 'brief.md';
|
|
384
|
+
}
|
|
385
|
+
/** True when this file lives under a `specs/domain/` directory. */
|
|
386
|
+
isDomainFile() {
|
|
387
|
+
return this.filePath.replace(/\\/g, '/').includes('specs/domain/');
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Extract a domain fact (`specs/domain/*.md`) as a single `domain`-kind spec.
|
|
391
|
+
*
|
|
392
|
+
* A domain fact carries `id` / `title` / `type` frontmatter and freeform prose
|
|
393
|
+
* (no `<!-- id: -->`-marked headings). It becomes one spec entity:
|
|
394
|
+
* - id the frontmatter `id` (the `DOM-<AREA>-NNN` value)
|
|
395
|
+
* - kind 'domain'
|
|
396
|
+
* - title the frontmatter `title`, else the first `# ` heading, else the id
|
|
397
|
+
* - body the full post-frontmatter prose (so it is full-text searchable)
|
|
398
|
+
* - metadata the frontmatter metadata, which carries `type`
|
|
399
|
+
*
|
|
400
|
+
* The `type` (term / rule / decision / constraint) lives in `metadata` — no new
|
|
401
|
+
* column. An unknown `type` value emits a `warning` (`spec_unknown_domain_type`)
|
|
402
|
+
* but the fact is still indexed, never dropped (REQ-DOMAIN-001.A3).
|
|
403
|
+
*
|
|
404
|
+
* A domain file with no `id` in its frontmatter isn't addressable, so it is
|
|
405
|
+
* skipped gracefully — no spec, no fatal error — matching the brief path.
|
|
406
|
+
*/
|
|
407
|
+
extractDomain(start) {
|
|
408
|
+
const errors = [];
|
|
409
|
+
const lines = this.source.split(/\r?\n/);
|
|
410
|
+
const now = Date.now();
|
|
411
|
+
const { frontmatter, firstContentLine } = this.parseFrontmatter(lines, errors);
|
|
412
|
+
const id = typeof frontmatter.id === 'string' && frontmatter.id.trim().length > 0
|
|
413
|
+
? frontmatter.id.trim()
|
|
414
|
+
: undefined;
|
|
415
|
+
if (id === undefined) {
|
|
416
|
+
// Not an addressable domain fact — skip without erroring.
|
|
417
|
+
return {
|
|
418
|
+
specs: [],
|
|
419
|
+
linkCandidates: [],
|
|
420
|
+
errors,
|
|
421
|
+
format: 'markdown',
|
|
422
|
+
durationMs: Date.now() - start,
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
const meta = frontmatter.metadata && typeof frontmatter.metadata === 'object'
|
|
426
|
+
? frontmatter.metadata
|
|
427
|
+
: {};
|
|
428
|
+
// Type validation: present but unrecognized → warn, but still emit the fact.
|
|
429
|
+
const type = meta.type;
|
|
430
|
+
if (typeof type === 'string' && !DOMAIN_TYPES.has(type)) {
|
|
431
|
+
errors.push({
|
|
432
|
+
message: `Domain fact "${id}" has unknown type "${type}" (expected one of: term, rule, decision, constraint)`,
|
|
433
|
+
filePath: this.filePath,
|
|
434
|
+
line: 1,
|
|
435
|
+
severity: 'warning',
|
|
436
|
+
code: 'spec_unknown_domain_type',
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
// Title: frontmatter `title`, else the first heading, else the id.
|
|
440
|
+
let title = typeof frontmatter.title === 'string' && frontmatter.title.length > 0
|
|
441
|
+
? frontmatter.title
|
|
442
|
+
: id;
|
|
443
|
+
if (title === id) {
|
|
444
|
+
for (let i = firstContentLine; i < lines.length; i++) {
|
|
445
|
+
const h = (lines[i] ?? '').match(HEADING);
|
|
446
|
+
if (h && h[2]) {
|
|
447
|
+
title = h[2];
|
|
448
|
+
break;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
const body = lines.slice(firstContentLine).join('\n').trim();
|
|
453
|
+
// Spec-tier linking (REQ-DOMAIN-002): a domain fact attaches to requirement
|
|
454
|
+
// specs via `parent_id` (single) and/or `depends_on` (one or many). Code
|
|
455
|
+
// association + drift are inherited transitively through those specs'
|
|
456
|
+
// `implements` links — there is NO direct domain→code row. Missing/unknown
|
|
457
|
+
// referenced specs stay silent here (no link candidate emitted); the fact
|
|
458
|
+
// still indexes (A3) and the dangling id surfaces later as a gap.
|
|
459
|
+
const parentId = typeof meta.parent_id === 'string' && meta.parent_id.trim().length > 0
|
|
460
|
+
? meta.parent_id.trim()
|
|
461
|
+
: undefined;
|
|
462
|
+
if (parentId !== undefined)
|
|
463
|
+
delete meta.parent_id; // promoted to spec.parentId
|
|
464
|
+
const dependsOn = normalizeSpecIdList(meta.depends_on);
|
|
465
|
+
if (dependsOn.length > 0)
|
|
466
|
+
meta.depends_on = dependsOn;
|
|
467
|
+
else
|
|
468
|
+
delete meta.depends_on;
|
|
469
|
+
const spec = {
|
|
470
|
+
id,
|
|
471
|
+
kind: 'domain',
|
|
472
|
+
title,
|
|
473
|
+
body,
|
|
474
|
+
format: 'markdown',
|
|
475
|
+
sourcePath: this.filePath,
|
|
476
|
+
startLine: firstContentLine + 1,
|
|
477
|
+
endLine: lines.length,
|
|
478
|
+
parentId,
|
|
479
|
+
contentHash: hash(body),
|
|
480
|
+
version: typeof frontmatter.version === 'number' ? frontmatter.version : 1,
|
|
481
|
+
owner: typeof frontmatter.owner === 'string' ? frontmatter.owner : undefined,
|
|
482
|
+
priority: typeof frontmatter.priority === 'string' ? frontmatter.priority : undefined,
|
|
483
|
+
metadata: meta,
|
|
484
|
+
createdAt: now,
|
|
485
|
+
updatedAt: now,
|
|
486
|
+
};
|
|
487
|
+
return {
|
|
488
|
+
specs: [spec],
|
|
489
|
+
linkCandidates: [],
|
|
490
|
+
errors,
|
|
491
|
+
format: 'markdown',
|
|
492
|
+
durationMs: Date.now() - start,
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Extract a brainstorm brief as a single `brief`-kind spec.
|
|
497
|
+
*
|
|
498
|
+
* A brief carries `slug` / `spec` / `created` frontmatter and freeform prose
|
|
499
|
+
* (no `<!-- id: -->`-marked headings). It becomes one spec entity:
|
|
500
|
+
* - id `brief:<slug>` (stable, derived from the brief's slug)
|
|
501
|
+
* - kind 'brief'
|
|
502
|
+
* - title the first heading (`# Brainstorm: <feature>`), else the slug
|
|
503
|
+
* - body the full brief prose (so it is full-text searchable, A2)
|
|
504
|
+
* - metadata the frontmatter (slug / spec / created) — `spec` is what
|
|
505
|
+
* REQ-FUNNEL-002 reconciles the brief → spec link against.
|
|
506
|
+
*
|
|
507
|
+
* A brief with no `slug` in its frontmatter isn't addressable, so it is
|
|
508
|
+
* skipped gracefully — no spec, no fatal error — and the rest of the index
|
|
509
|
+
* proceeds (REQ-FUNNEL-001.A4).
|
|
510
|
+
*/
|
|
511
|
+
extractBrief(start) {
|
|
512
|
+
const errors = [];
|
|
513
|
+
const lines = this.source.split(/\r?\n/);
|
|
514
|
+
const now = Date.now();
|
|
515
|
+
const { frontmatter, firstContentLine } = this.parseFrontmatter(lines, errors);
|
|
516
|
+
const meta = frontmatter.metadata && typeof frontmatter.metadata === 'object'
|
|
517
|
+
? frontmatter.metadata
|
|
518
|
+
: {};
|
|
519
|
+
const slug = typeof meta.slug === 'string' && meta.slug.trim().length > 0
|
|
520
|
+
? meta.slug.trim()
|
|
521
|
+
: undefined;
|
|
522
|
+
if (slug === undefined) {
|
|
523
|
+
// Not an addressable brief — skip without erroring.
|
|
524
|
+
return {
|
|
525
|
+
specs: [],
|
|
526
|
+
linkCandidates: [],
|
|
527
|
+
errors,
|
|
528
|
+
format: 'markdown',
|
|
529
|
+
durationMs: Date.now() - start,
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
// Title: the first heading line (the `# Brainstorm: …` H1), else the slug.
|
|
533
|
+
let title = slug;
|
|
534
|
+
for (let i = firstContentLine; i < lines.length; i++) {
|
|
535
|
+
const h = (lines[i] ?? '').match(HEADING);
|
|
536
|
+
if (h && h[2]) {
|
|
537
|
+
title = h[2];
|
|
538
|
+
break;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
const body = lines.slice(firstContentLine).join('\n').trim();
|
|
542
|
+
const spec = {
|
|
543
|
+
id: `brief:${slug}`,
|
|
544
|
+
kind: 'brief',
|
|
545
|
+
title,
|
|
546
|
+
body,
|
|
547
|
+
format: 'markdown',
|
|
548
|
+
sourcePath: this.filePath,
|
|
549
|
+
startLine: firstContentLine + 1,
|
|
550
|
+
endLine: lines.length,
|
|
551
|
+
parentId: undefined,
|
|
552
|
+
contentHash: hash(body),
|
|
553
|
+
version: 1,
|
|
554
|
+
metadata: meta,
|
|
555
|
+
createdAt: now,
|
|
556
|
+
updatedAt: now,
|
|
557
|
+
};
|
|
558
|
+
return {
|
|
559
|
+
specs: [spec],
|
|
560
|
+
linkCandidates: [],
|
|
561
|
+
errors,
|
|
562
|
+
format: 'markdown',
|
|
563
|
+
durationMs: Date.now() - start,
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Parse YAML-ish frontmatter. We only extract a handful of known keys
|
|
568
|
+
* (`id`, `title`, `owner`, `priority`, `version`); arbitrary structure
|
|
569
|
+
* goes into `metadata`. Keeps the v1 extractor dependency-free — full
|
|
570
|
+
* YAML can come later when YAML/Gherkin extractors land.
|
|
571
|
+
*/
|
|
572
|
+
parseFrontmatter(lines, errors) {
|
|
573
|
+
const frontmatter = {};
|
|
574
|
+
if (lines.length === 0 || (lines[0] ?? '').trim() !== '---') {
|
|
575
|
+
return { frontmatter, firstContentLine: 0 };
|
|
576
|
+
}
|
|
577
|
+
let closingIdx = -1;
|
|
578
|
+
for (let i = 1; i < lines.length; i++) {
|
|
579
|
+
if ((lines[i] ?? '').trim() === '---') {
|
|
580
|
+
closingIdx = i;
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
if (closingIdx === -1) {
|
|
585
|
+
errors.push({
|
|
586
|
+
message: 'Unterminated frontmatter block (missing closing ---)',
|
|
587
|
+
filePath: this.filePath,
|
|
588
|
+
line: 1,
|
|
589
|
+
severity: 'warning',
|
|
590
|
+
code: 'spec_unterminated_frontmatter',
|
|
591
|
+
});
|
|
592
|
+
return { frontmatter, firstContentLine: 0 };
|
|
593
|
+
}
|
|
594
|
+
// Simple `key: value` parser. Known keys are extracted; rest goes to
|
|
595
|
+
// metadata.
|
|
596
|
+
const knownKeys = new Set(['id', 'title', 'owner', 'priority', 'version']);
|
|
597
|
+
const metadata = {};
|
|
598
|
+
for (let i = 1; i < closingIdx; i++) {
|
|
599
|
+
const line = (lines[i] ?? '').trim();
|
|
600
|
+
if (!line || line.startsWith('#'))
|
|
601
|
+
continue;
|
|
602
|
+
const colonIdx = line.indexOf(':');
|
|
603
|
+
if (colonIdx <= 0)
|
|
604
|
+
continue;
|
|
605
|
+
const key = line.slice(0, colonIdx).trim();
|
|
606
|
+
let value = line.slice(colonIdx + 1).trim();
|
|
607
|
+
// Strip surrounding quotes
|
|
608
|
+
if (typeof value === 'string') {
|
|
609
|
+
if ((value.startsWith('"') && value.endsWith('"')) ||
|
|
610
|
+
(value.startsWith("'") && value.endsWith("'"))) {
|
|
611
|
+
value = value.slice(1, -1);
|
|
612
|
+
}
|
|
613
|
+
if (/^\d+$/.test(value))
|
|
614
|
+
value = parseInt(value, 10);
|
|
615
|
+
}
|
|
616
|
+
if (knownKeys.has(key)) {
|
|
617
|
+
frontmatter[key] = value;
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
metadata[key] = value;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
if (Object.keys(metadata).length > 0) {
|
|
624
|
+
frontmatter.metadata = metadata;
|
|
625
|
+
}
|
|
626
|
+
return { frontmatter, firstContentLine: closingIdx + 1 };
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
* Scan a body block for a bullet-list `implementations:` declaration.
|
|
630
|
+
* Format:
|
|
631
|
+
*
|
|
632
|
+
* implementations:
|
|
633
|
+
* - src/auth/login.ts:authenticate
|
|
634
|
+
* - src/auth/rate-limit.ts:enforce
|
|
635
|
+
*
|
|
636
|
+
* Each match becomes a SpecLinkCandidate with kind='implements'.
|
|
637
|
+
* Tolerant of indentation; stops at the first non-bullet, non-blank line.
|
|
638
|
+
*/
|
|
639
|
+
extractImplementationRefs(specId, bodyLines) {
|
|
640
|
+
const out = [];
|
|
641
|
+
for (let i = 0; i < bodyLines.length; i++) {
|
|
642
|
+
const line = (bodyLines[i] ?? '').trim();
|
|
643
|
+
if (line !== 'implementations:' && !line.startsWith('implementations:'))
|
|
644
|
+
continue;
|
|
645
|
+
// Walk subsequent lines collecting `- path:symbol` entries.
|
|
646
|
+
for (let j = i + 1; j < bodyLines.length; j++) {
|
|
647
|
+
const subline = (bodyLines[j] ?? '').trim();
|
|
648
|
+
if (subline === '')
|
|
649
|
+
continue;
|
|
650
|
+
const m = subline.match(IMPL_REF);
|
|
651
|
+
if (!m)
|
|
652
|
+
break;
|
|
653
|
+
const refPath = m[1];
|
|
654
|
+
const refSymbol = m[2];
|
|
655
|
+
if (!refPath || !refSymbol)
|
|
656
|
+
continue;
|
|
657
|
+
out.push({
|
|
658
|
+
specId,
|
|
659
|
+
targetFilePath: refPath,
|
|
660
|
+
targetQualifiedName: refSymbol,
|
|
661
|
+
targetNodeKind: guessNodeKind(refSymbol),
|
|
662
|
+
kind: 'implements',
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
// Stop after first `implementations:` block — no need to find more.
|
|
666
|
+
break;
|
|
667
|
+
}
|
|
668
|
+
return out;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
exports.MarkdownSpecExtractor = MarkdownSpecExtractor;
|
|
672
|
+
function hash(s) {
|
|
673
|
+
return (0, crypto_1.createHash)('sha256').update(s).digest('hex').substring(0, 32);
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Normalize a `depends_on` frontmatter value into a list of spec ids.
|
|
677
|
+
*
|
|
678
|
+
* The dependency-free frontmatter parser yields strings, so we accept both a
|
|
679
|
+
* single id and a comma-separated / inline-`[a, b]` list; an already-array
|
|
680
|
+
* value (future YAML extractor) is taken as-is. Empty entries are dropped and
|
|
681
|
+
* the result is deduped.
|
|
682
|
+
*/
|
|
683
|
+
function normalizeSpecIdList(value) {
|
|
684
|
+
let parts;
|
|
685
|
+
if (Array.isArray(value)) {
|
|
686
|
+
parts = value.filter((v) => typeof v === 'string');
|
|
687
|
+
}
|
|
688
|
+
else if (typeof value === 'string') {
|
|
689
|
+
parts = value
|
|
690
|
+
.replace(/^\[|\]$/g, '') // tolerate inline `[a, b]`
|
|
691
|
+
.split(',');
|
|
692
|
+
}
|
|
693
|
+
else {
|
|
694
|
+
return [];
|
|
695
|
+
}
|
|
696
|
+
const out = parts.map((p) => p.trim()).filter((p) => p.length > 0);
|
|
697
|
+
return [...new Set(out)];
|
|
698
|
+
}
|
|
699
|
+
//# sourceMappingURL=markdown-spec-extractor.js.map
|