@selvakumaresra/specship 0.1.3 → 0.4.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 +2 -2
- package/commands/ss-design-implement.md +84 -0
- package/commands/ss-design-loop.md +125 -0
- package/commands/{cg-drifted.md → ss-drifted.md} +2 -2
- package/commands/{cg-fix.md → ss-fix.md} +1 -1
- package/commands/{cg-implement.md → ss-implement.md} +1 -1
- package/commands/ss-spec-author.md +43 -0
- package/commands/ss-spec-review.md +48 -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 +2085 -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 +462 -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 +419 -0
- package/dist/db/spec-queries.d.ts +101 -0
- package/dist/db/spec-queries.d.ts.map +1 -0
- package/dist/db/spec-queries.js +675 -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/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 +59 -0
- package/dist/extraction/specs/markdown-spec-extractor.d.ts.map +1 -0
- package/dist/extraction/specs/markdown-spec-extractor.js +327 -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/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/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/index.d.ts +551 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1165 -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 +92 -0
- package/dist/installer/index.d.ts.map +1 -0
- package/dist/installer/index.js +416 -0
- package/dist/installer/index.js.map +1 -0
- package/dist/installer/instructions-template.d.ts +35 -0
- package/dist/installer/instructions-template.d.ts.map +1 -0
- package/dist/installer/instructions-template.js +51 -0
- package/dist/installer/instructions-template.js.map +1 -0
- package/dist/installer/targets/claude.d.ts +117 -0
- package/dist/installer/targets/claude.d.ts.map +1 -0
- package/dist/installer/targets/claude.js +736 -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 +256 -0
- package/dist/installer/targets/shared.js.map +1 -0
- package/dist/installer/targets/types.d.ts +84 -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/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/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 +77 -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 +326 -0
- package/dist/mcp/spec-tools.js.map +1 -0
- package/dist/mcp/tools.d.ts +404 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +3087 -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/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/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 +103 -0
- package/dist/resolution/spec-link-resolver.d.ts.map +1 -0
- package/dist/resolution/spec-link-resolver.js +259 -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/index.js +18 -0
- package/dist/server/ingest/ingestor.js +506 -0
- package/dist/server/ingest/parser.js +104 -0
- package/dist/server/ingest/pricing.js +78 -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 +868 -0
- package/dist/server/routes/graph.js +211 -0
- package/dist/server/routes/memory.js +272 -0
- package/dist/server/routes/projects.js +197 -0
- package/dist/server/routes/spec.js +265 -0
- package/dist/server/routes/status.js +112 -0
- package/dist/server/routes/workflow.js +212 -0
- package/dist/server/server.js +206 -0
- package/dist/server/static-handler.js +87 -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 +623 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +108 -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-2GBEK2GM.js +1 -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-2YUJNZ2Y.js +6 -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-45QHGCB4.js +17 -0
- package/dist/web/chunk-4IMMPEYM.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-5BQIOYKW.js +1 -0
- package/dist/web/chunk-5HGWHUJA.js +1 -0
- package/dist/web/chunk-5Y244R4G.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-7RNS77UP.js +1 -0
- package/dist/web/chunk-7SMPKVEP.js +1 -0
- package/dist/web/chunk-A5R3MJMO.js +1 -0
- package/dist/web/chunk-ASZ77FMZ.js +1 -0
- package/dist/web/chunk-AZJVTPLU.js +1 -0
- package/dist/web/chunk-B3YPFY6A.js +1 -0
- package/dist/web/chunk-BLBRMCN2.js +1 -0
- package/dist/web/chunk-BMIAXD2V.js +2 -0
- package/dist/web/chunk-BUXWEHIY.js +1 -0
- package/dist/web/chunk-BYZFQSM6.js +1 -0
- package/dist/web/chunk-D5OCNEJA.js +2 -0
- package/dist/web/chunk-DLQPZWSI.css +1 -0
- package/dist/web/chunk-DTRN7FZR.js +1 -0
- package/dist/web/chunk-DYRFLPJA.js +1 -0
- package/dist/web/chunk-E3J3CXR5.js +1 -0
- package/dist/web/chunk-E44X4RH2.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-EMGMOEVR.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-FGNZDHTL.js +11 -0
- package/dist/web/chunk-FHZHD2ZG.js +1 -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-GR72OOCN.js +1 -0
- package/dist/web/chunk-GRZYXPSO.js +7 -0
- package/dist/web/chunk-GWPVKJIY.js +1 -0
- package/dist/web/chunk-GYGPS3AN.js +1 -0
- package/dist/web/chunk-H7AF7YS4.js +1 -0
- package/dist/web/chunk-HDZDQILN.js +1 -0
- package/dist/web/chunk-HMK6UO6N.js +1 -0
- package/dist/web/chunk-HZA6NEAB.js +1 -0
- package/dist/web/chunk-IHEE5NYJ.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-L37MTFSG.js +3 -0
- package/dist/web/chunk-LB6JPLX2.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-MC4DFIHG.js +1 -0
- package/dist/web/chunk-MVOMVPYB.js +1 -0
- package/dist/web/chunk-N6SS4G6S.js +1 -0
- package/dist/web/chunk-NTBJG6SJ.js +1 -0
- package/dist/web/chunk-NUDB3Q2Y.js +3 -0
- package/dist/web/chunk-NZEZCT65.js +1 -0
- package/dist/web/chunk-OXEF5E3E.js +1 -0
- package/dist/web/chunk-PDN6QYGJ.js +4 -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-QH6CF3M3.js +1 -0
- package/dist/web/chunk-QQ5LD7PI.js +1 -0
- package/dist/web/chunk-QR6L3KAC.js +1 -0
- package/dist/web/chunk-R2DLK4HO.js +1 -0
- package/dist/web/chunk-R5W2MDZN.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-RXKXYF2C.js +1 -0
- package/dist/web/chunk-SBWU7JFC.js +1 -0
- package/dist/web/chunk-SEXBRGYK.js +1 -0
- package/dist/web/chunk-SHPTC4RL.js +1 -0
- package/dist/web/chunk-SUZYBYDW.js +1 -0
- package/dist/web/chunk-SWKJRNYY.js +1 -0
- package/dist/web/chunk-T66XVKGB.js +1 -0
- package/dist/web/chunk-T7AZ65JP.js +1 -0
- package/dist/web/chunk-TCZDVOHD.js +1 -0
- package/dist/web/chunk-TPTITA3V.js +1 -0
- package/dist/web/chunk-TR335633.js +1 -0
- package/dist/web/chunk-UBOZGQNK.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-UYC52MBC.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-WAI2JMZP.js +1 -0
- package/dist/web/chunk-WB6YHOD4.js +1 -0
- package/dist/web/chunk-WBT64AWV.js +1 -0
- package/dist/web/chunk-WCKHQIYN.js +1 -0
- package/dist/web/chunk-WDU3WICG.js +1 -0
- package/dist/web/chunk-WFXJIXZE.js +4 -0
- package/dist/web/chunk-WLIMNDS3.js +1 -0
- package/dist/web/chunk-WTGYRH3Z.js +298 -0
- package/dist/web/chunk-WXTCVDTP.js +1 -0
- package/dist/web/chunk-X2HTISHL.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-YAMRN47K.js +2 -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-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/index.html +145 -0
- package/dist/web/main-ESADRXN2.css +1 -0
- package/dist/web/main-R53HA54V.js +1 -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 +83 -0
- package/dist/workflows/executor.d.ts.map +1 -0
- package/dist/workflows/executor.js +624 -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 +28 -0
- package/dist/workflows/runners/prompt.d.ts.map +1 -0
- package/dist/workflows/runners/prompt.js +212 -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 +51 -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 +11 -0
- package/package.json +7 -3
- package/scripts/offline-install.sh +19 -6
- package/selectors.json +41 -0
- /package/commands/{cg-explore.md → ss-explore.md} +0 -0
- /package/commands/{cg-impact.md → ss-impact.md} +0 -0
- /package/commands/{cg-relink.md → ss-relink.md} +0 -0
- /package/commands/{cg-spec.md → ss-spec.md} +0 -0
- /package/commands/{cg-sync.md → ss-sync.md} +0 -0
- /package/commands/{cg-trace.md → ss-trace.md} +0 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
name: spec-fix
|
|
2
|
+
description: Fix a bug surfaced as a drifted/broken spec link. Diagnose → approve → fix → verify → re-verify link.
|
|
3
|
+
tags: [spec, default]
|
|
4
|
+
requires: [specship, git]
|
|
5
|
+
|
|
6
|
+
worktree:
|
|
7
|
+
enabled: true
|
|
8
|
+
|
|
9
|
+
inputs:
|
|
10
|
+
- name: SPEC_ID
|
|
11
|
+
description: The spec ID with the drifted or broken link
|
|
12
|
+
required: true
|
|
13
|
+
|
|
14
|
+
systemPromptAppend: |
|
|
15
|
+
You are fixing code so a spec's link returns to "verified" state.
|
|
16
|
+
Call specship_spec($INPUT.SPEC_ID) first to see the current state and
|
|
17
|
+
drift_axis. After fixing, call specship_link_verify({result: "pass"})
|
|
18
|
+
on each affected link before reporting done.
|
|
19
|
+
|
|
20
|
+
nodes:
|
|
21
|
+
- id: diagnose
|
|
22
|
+
kind: prompt
|
|
23
|
+
output_type: diagnosis
|
|
24
|
+
allowed_tools:
|
|
25
|
+
- mcp__specship__specship_spec
|
|
26
|
+
- mcp__specship__specship_node
|
|
27
|
+
- mcp__specship__specship_explore
|
|
28
|
+
- Read
|
|
29
|
+
prompt: |
|
|
30
|
+
Spec ID: $INPUT.SPEC_ID
|
|
31
|
+
|
|
32
|
+
Call specship_spec to inspect this spec's current state. Look at:
|
|
33
|
+
- which linked_code entries are drifted, broken, or orphaned
|
|
34
|
+
- their drift_axis (spec → spec body changed; code → code changed)
|
|
35
|
+
- the spec body itself
|
|
36
|
+
|
|
37
|
+
Output: (a) which links are out-of-spec, (b) for each, what likely
|
|
38
|
+
broke (code refactor, signature change, spec edit), and (c) a
|
|
39
|
+
proposed fix.
|
|
40
|
+
|
|
41
|
+
- id: approve_fix
|
|
42
|
+
kind: approval
|
|
43
|
+
depends_on: [diagnose]
|
|
44
|
+
message: |
|
|
45
|
+
Diagnosis for $INPUT.SPEC_ID:
|
|
46
|
+
|
|
47
|
+
$diagnose.output
|
|
48
|
+
|
|
49
|
+
Approve to apply the proposed fix, or reject with guidance.
|
|
50
|
+
capture_response: true
|
|
51
|
+
|
|
52
|
+
- id: apply
|
|
53
|
+
kind: prompt
|
|
54
|
+
depends_on: [approve_fix]
|
|
55
|
+
output_type: diff
|
|
56
|
+
allowed_tools:
|
|
57
|
+
- Read
|
|
58
|
+
- Edit
|
|
59
|
+
- Write
|
|
60
|
+
- Bash
|
|
61
|
+
- mcp__specship__specship_node
|
|
62
|
+
- mcp__specship__specship_spec
|
|
63
|
+
prompt: |
|
|
64
|
+
Apply the fix proposed in the diagnosis. Follow any guidance from
|
|
65
|
+
the reviewer.
|
|
66
|
+
|
|
67
|
+
Diagnosis:
|
|
68
|
+
$diagnose.output
|
|
69
|
+
|
|
70
|
+
Reviewer feedback (if any):
|
|
71
|
+
$approve_fix.output
|
|
72
|
+
|
|
73
|
+
Output: a short list of files changed.
|
|
74
|
+
|
|
75
|
+
- id: verify
|
|
76
|
+
kind: bash
|
|
77
|
+
depends_on: [apply]
|
|
78
|
+
output_type: test_results
|
|
79
|
+
timeout: 600000
|
|
80
|
+
bash: |
|
|
81
|
+
if [ -f package.json ]; then
|
|
82
|
+
npm test
|
|
83
|
+
elif [ -f Cargo.toml ]; then
|
|
84
|
+
cargo test
|
|
85
|
+
elif [ -f pyproject.toml ] || [ -f requirements.txt ]; then
|
|
86
|
+
python -m pytest
|
|
87
|
+
else
|
|
88
|
+
echo "no recognised test framework; skipping"
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
- id: link_verify
|
|
92
|
+
kind: prompt
|
|
93
|
+
depends_on: [verify]
|
|
94
|
+
output_type: link_summary
|
|
95
|
+
allowed_tools:
|
|
96
|
+
- mcp__specship__specship_spec
|
|
97
|
+
- mcp__specship__specship_link_assert
|
|
98
|
+
- mcp__specship__specship_link_verify
|
|
99
|
+
prompt: |
|
|
100
|
+
For each link that was drifted/broken on $INPUT.SPEC_ID, now that
|
|
101
|
+
the fix has been applied and tests pass, call specship_link_verify
|
|
102
|
+
with result="pass" (or "fail" if a test failed for that link).
|
|
103
|
+
|
|
104
|
+
If a link is orphaned because the symbol moved, call
|
|
105
|
+
specship_link_assert at the new location.
|
|
106
|
+
|
|
107
|
+
Test results:
|
|
108
|
+
$verify.output
|
|
109
|
+
|
|
110
|
+
Output: one line per link with the new state.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
name: spec-implement
|
|
2
|
+
description: Implement an unimplemented spec. Plan → review → implement → verify → link → review → done.
|
|
3
|
+
tags: [spec, default]
|
|
4
|
+
requires: [specship, git]
|
|
5
|
+
|
|
6
|
+
worktree:
|
|
7
|
+
enabled: true
|
|
8
|
+
|
|
9
|
+
inputs:
|
|
10
|
+
- name: SPEC_ID
|
|
11
|
+
description: The spec ID to implement (e.g. REQ-AUTH-005)
|
|
12
|
+
required: true
|
|
13
|
+
|
|
14
|
+
systemPromptAppend: |
|
|
15
|
+
You are implementing a specific requirement. Before editing code, call
|
|
16
|
+
specship_spec($INPUT.SPEC_ID) to see the spec body and any code it
|
|
17
|
+
already links to. After editing, call specship_link_assert with the
|
|
18
|
+
spec_id and the symbol you implemented BEFORE reporting done.
|
|
19
|
+
|
|
20
|
+
nodes:
|
|
21
|
+
- id: fetch_spec
|
|
22
|
+
kind: prompt
|
|
23
|
+
output_type: spec_summary
|
|
24
|
+
allowed_tools:
|
|
25
|
+
- mcp__specship__specship_spec
|
|
26
|
+
- mcp__specship__specship_explore
|
|
27
|
+
prompt: |
|
|
28
|
+
Spec ID: $INPUT.SPEC_ID
|
|
29
|
+
|
|
30
|
+
Call specship_spec to fetch the spec. Then call specship_explore on
|
|
31
|
+
a small bag of terms drawn from the spec title and acceptance
|
|
32
|
+
criteria to find the relevant code area.
|
|
33
|
+
|
|
34
|
+
Output: a short summary (≤300 words) of (a) what the spec asks for,
|
|
35
|
+
(b) which code areas / symbols are most relevant, and (c) whether
|
|
36
|
+
any code currently claims to implement it (look at linked_code).
|
|
37
|
+
|
|
38
|
+
- id: plan
|
|
39
|
+
kind: prompt
|
|
40
|
+
depends_on: [fetch_spec]
|
|
41
|
+
output_type: plan
|
|
42
|
+
allowed_tools:
|
|
43
|
+
- mcp__specship__specship_explore
|
|
44
|
+
- mcp__specship__specship_node
|
|
45
|
+
- mcp__specship__specship_spec
|
|
46
|
+
- Read
|
|
47
|
+
prompt: |
|
|
48
|
+
Based on this spec summary, write a concrete implementation plan:
|
|
49
|
+
|
|
50
|
+
$fetch_spec.output
|
|
51
|
+
|
|
52
|
+
The plan should list:
|
|
53
|
+
- Files to create or modify (with project-relative paths)
|
|
54
|
+
- Specific functions/methods/classes to add or change
|
|
55
|
+
- Tests to add or update
|
|
56
|
+
- Order of changes
|
|
57
|
+
|
|
58
|
+
Keep it tight (≤500 words). Do NOT edit code in this step.
|
|
59
|
+
|
|
60
|
+
- id: approve_plan
|
|
61
|
+
kind: approval
|
|
62
|
+
depends_on: [plan]
|
|
63
|
+
message: |
|
|
64
|
+
Plan ready for $INPUT.SPEC_ID. Review the plan output and approve
|
|
65
|
+
to proceed with implementation, or reject with feedback to revise.
|
|
66
|
+
capture_response: true
|
|
67
|
+
on_reject:
|
|
68
|
+
prompt: |
|
|
69
|
+
The plan was rejected with this feedback. Revise:
|
|
70
|
+
|
|
71
|
+
$approve_plan.output
|
|
72
|
+
max_attempts: 3
|
|
73
|
+
|
|
74
|
+
- id: implement
|
|
75
|
+
kind: prompt
|
|
76
|
+
depends_on: [approve_plan]
|
|
77
|
+
output_type: diff
|
|
78
|
+
allowed_tools:
|
|
79
|
+
- Read
|
|
80
|
+
- Edit
|
|
81
|
+
- Write
|
|
82
|
+
- Bash
|
|
83
|
+
- mcp__specship__specship_explore
|
|
84
|
+
- mcp__specship__specship_node
|
|
85
|
+
- mcp__specship__specship_spec
|
|
86
|
+
prompt: |
|
|
87
|
+
Implement the approved plan. Follow it closely.
|
|
88
|
+
|
|
89
|
+
Plan:
|
|
90
|
+
$plan.output
|
|
91
|
+
|
|
92
|
+
Approval feedback (if any):
|
|
93
|
+
$approve_plan.output
|
|
94
|
+
|
|
95
|
+
When done, output a short diff summary (which files changed and why).
|
|
96
|
+
|
|
97
|
+
- id: verify
|
|
98
|
+
kind: bash
|
|
99
|
+
depends_on: [implement]
|
|
100
|
+
output_type: test_results
|
|
101
|
+
timeout: 600000
|
|
102
|
+
bash: |
|
|
103
|
+
# Run the project's test suite. The verify node's exit code drives
|
|
104
|
+
# the gating for the link node — non-zero halts the workflow.
|
|
105
|
+
if [ -f package.json ]; then
|
|
106
|
+
npm test
|
|
107
|
+
elif [ -f Cargo.toml ]; then
|
|
108
|
+
cargo test
|
|
109
|
+
elif [ -f pyproject.toml ] || [ -f requirements.txt ]; then
|
|
110
|
+
python -m pytest
|
|
111
|
+
else
|
|
112
|
+
echo "no recognised test framework; skipping"
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
- id: link
|
|
116
|
+
kind: prompt
|
|
117
|
+
depends_on: [verify]
|
|
118
|
+
output_type: link_summary
|
|
119
|
+
allowed_tools:
|
|
120
|
+
- mcp__specship__specship_link_assert
|
|
121
|
+
- mcp__specship__specship_link_verify
|
|
122
|
+
- mcp__specship__specship_spec
|
|
123
|
+
prompt: |
|
|
124
|
+
Assert spec→code links for the changes made in the implement step.
|
|
125
|
+
For each symbol that implements $INPUT.SPEC_ID (or its child
|
|
126
|
+
requirements), call specship_link_assert with the spec_id, the
|
|
127
|
+
file path, and the qualified symbol name. After each assert, if
|
|
128
|
+
tests passed in the verify step, call specship_link_verify with
|
|
129
|
+
result="pass".
|
|
130
|
+
|
|
131
|
+
Implementation diff summary:
|
|
132
|
+
$implement.output
|
|
133
|
+
|
|
134
|
+
Test results:
|
|
135
|
+
$verify.output
|
|
136
|
+
|
|
137
|
+
Output: a short list of "spec_id → file:symbol [verified|implemented]"
|
|
138
|
+
lines.
|
|
139
|
+
|
|
140
|
+
- id: final_review
|
|
141
|
+
kind: approval
|
|
142
|
+
depends_on: [link]
|
|
143
|
+
message: |
|
|
144
|
+
Implementation complete for $INPUT.SPEC_ID.
|
|
145
|
+
|
|
146
|
+
Links asserted:
|
|
147
|
+
$link.output
|
|
148
|
+
|
|
149
|
+
Approve to finalize the run (worktree is left for you to inspect
|
|
150
|
+
and merge), or reject to abandon.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: spec-relink
|
|
2
|
+
description: Re-attach an orphaned spec link after a refactor. Search for the moved/renamed symbol → approve → assert new link.
|
|
3
|
+
tags: [spec, default]
|
|
4
|
+
requires: [specship]
|
|
5
|
+
|
|
6
|
+
worktree:
|
|
7
|
+
enabled: false
|
|
8
|
+
|
|
9
|
+
inputs:
|
|
10
|
+
- name: SPEC_ID
|
|
11
|
+
description: The spec ID with an orphaned link
|
|
12
|
+
required: true
|
|
13
|
+
|
|
14
|
+
systemPromptAppend: |
|
|
15
|
+
You are reattaching a spec link whose target symbol has moved or been
|
|
16
|
+
renamed. Use specship_search and specship_explore to locate the new
|
|
17
|
+
symbol; do NOT edit code in this workflow.
|
|
18
|
+
|
|
19
|
+
nodes:
|
|
20
|
+
- id: present_orphan
|
|
21
|
+
kind: prompt
|
|
22
|
+
output_type: orphan_summary
|
|
23
|
+
allowed_tools:
|
|
24
|
+
- mcp__specship__specship_spec
|
|
25
|
+
prompt: |
|
|
26
|
+
Spec ID: $INPUT.SPEC_ID
|
|
27
|
+
|
|
28
|
+
Call specship_spec to find the orphaned link(s). For each:
|
|
29
|
+
output its old target_file_path and target_qualified_name plus
|
|
30
|
+
a short description of what the spec asks for.
|
|
31
|
+
|
|
32
|
+
- id: search_candidates
|
|
33
|
+
kind: prompt
|
|
34
|
+
depends_on: [present_orphan]
|
|
35
|
+
output_type: candidates
|
|
36
|
+
allowed_tools:
|
|
37
|
+
- mcp__specship__specship_search
|
|
38
|
+
- mcp__specship__specship_explore
|
|
39
|
+
- mcp__specship__specship_node
|
|
40
|
+
prompt: |
|
|
41
|
+
The orphan(s):
|
|
42
|
+
$present_orphan.output
|
|
43
|
+
|
|
44
|
+
For each orphaned target_qualified_name, use specship_search to
|
|
45
|
+
see if a symbol by that name (or a closely related name) exists
|
|
46
|
+
anywhere in the current codebase. Then call specship_explore on
|
|
47
|
+
the most likely matches to see if their bodies match the spec's
|
|
48
|
+
intent.
|
|
49
|
+
|
|
50
|
+
Output: a numbered list of CANDIDATES with file:symbol and a
|
|
51
|
+
one-line justification.
|
|
52
|
+
|
|
53
|
+
- id: approve_relink
|
|
54
|
+
kind: approval
|
|
55
|
+
depends_on: [search_candidates]
|
|
56
|
+
message: |
|
|
57
|
+
Candidates for $INPUT.SPEC_ID:
|
|
58
|
+
|
|
59
|
+
$search_candidates.output
|
|
60
|
+
|
|
61
|
+
Reply with the number of the correct candidate (or "none" to
|
|
62
|
+
abandon and leave the link orphaned).
|
|
63
|
+
capture_response: true
|
|
64
|
+
|
|
65
|
+
- id: assert_link
|
|
66
|
+
kind: prompt
|
|
67
|
+
depends_on: [approve_relink]
|
|
68
|
+
output_type: link_summary
|
|
69
|
+
allowed_tools:
|
|
70
|
+
- mcp__specship__specship_link_assert
|
|
71
|
+
prompt: |
|
|
72
|
+
The reviewer chose candidate #$approve_relink.output for spec
|
|
73
|
+
$INPUT.SPEC_ID.
|
|
74
|
+
|
|
75
|
+
Candidates were:
|
|
76
|
+
$search_candidates.output
|
|
77
|
+
|
|
78
|
+
Call specship_link_assert with the chosen candidate's path and
|
|
79
|
+
qualified_name (and the original kind, default "implements").
|
|
80
|
+
|
|
81
|
+
Output: confirmation of the new link.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: spec-verify
|
|
2
|
+
description: Run verification across all 'implemented' spec links. Use as a CI gate or pre-commit check.
|
|
3
|
+
tags: [spec, default, ci]
|
|
4
|
+
requires: [specship, tests]
|
|
5
|
+
|
|
6
|
+
# No worktree — runs in-place against the current checkout.
|
|
7
|
+
worktree:
|
|
8
|
+
enabled: false
|
|
9
|
+
|
|
10
|
+
nodes:
|
|
11
|
+
- id: run_tests
|
|
12
|
+
kind: bash
|
|
13
|
+
output_type: test_results
|
|
14
|
+
timeout: 600000
|
|
15
|
+
bash: |
|
|
16
|
+
if [ -f package.json ]; then
|
|
17
|
+
npm test
|
|
18
|
+
elif [ -f Cargo.toml ]; then
|
|
19
|
+
cargo test
|
|
20
|
+
elif [ -f pyproject.toml ] || [ -f requirements.txt ]; then
|
|
21
|
+
python -m pytest
|
|
22
|
+
else
|
|
23
|
+
echo "no recognised test framework; skipping" >&2
|
|
24
|
+
exit 0
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
- id: summarize
|
|
28
|
+
kind: prompt
|
|
29
|
+
depends_on: [run_tests]
|
|
30
|
+
output_type: link_summary
|
|
31
|
+
trigger_rule: all_done
|
|
32
|
+
allowed_tools:
|
|
33
|
+
- mcp__specship__specship_drifted
|
|
34
|
+
- mcp__specship__specship_spec
|
|
35
|
+
- mcp__specship__specship_link_verify
|
|
36
|
+
prompt: |
|
|
37
|
+
Test run completed. Output (truncated):
|
|
38
|
+
|
|
39
|
+
$run_tests.output
|
|
40
|
+
|
|
41
|
+
1. Call specship_drifted to see any drifted/broken/orphaned links.
|
|
42
|
+
2. If tests passed (no failures reported), iterate over each
|
|
43
|
+
'implemented' link and call specship_link_verify(result: "pass")
|
|
44
|
+
to promote them to "verified". (Skip links that are already
|
|
45
|
+
verified.)
|
|
46
|
+
3. If tests failed, identify which specs the failing tests are
|
|
47
|
+
tied to and call specship_link_verify(result: "fail", reason:
|
|
48
|
+
"<test name>") on those links.
|
|
49
|
+
|
|
50
|
+
Output: a short summary of how many links moved to verified,
|
|
51
|
+
how many to broken, and which specs are still drifted.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow discovery — three-tier precedence loader.
|
|
3
|
+
*
|
|
4
|
+
* Inspired by Archon's `packages/workflows/src/workflow-discovery.ts:205-361`.
|
|
5
|
+
*
|
|
6
|
+
* Precedence (highest wins on filename collision):
|
|
7
|
+
* 1. Bundled defaults (compiled-in, see ./defaults/index.ts)
|
|
8
|
+
* 2. Global `~/.specship/workflows/`
|
|
9
|
+
* 3. Project `<projectRoot>/.specship/workflows/`
|
|
10
|
+
*
|
|
11
|
+
* One level of nesting (`subdir/foo.yaml`) is allowed; deeper paths are
|
|
12
|
+
* silently ignored to keep discovery cheap and predictable. Per-file YAML
|
|
13
|
+
* parse or validation failures are isolated — one broken workflow does
|
|
14
|
+
* not abort discovery of its peers.
|
|
15
|
+
*/
|
|
16
|
+
import { WorkflowDefinition, ValidationError } from './schemas/workflow';
|
|
17
|
+
export type WorkflowScope = 'bundled' | 'global' | 'project';
|
|
18
|
+
export interface WorkflowWithSource {
|
|
19
|
+
workflow: WorkflowDefinition;
|
|
20
|
+
scope: WorkflowScope;
|
|
21
|
+
sourcePath: string;
|
|
22
|
+
}
|
|
23
|
+
export interface WorkflowLoadError {
|
|
24
|
+
scope: WorkflowScope;
|
|
25
|
+
sourcePath: string;
|
|
26
|
+
errors: ValidationError[];
|
|
27
|
+
}
|
|
28
|
+
export interface WorkflowLoadResult {
|
|
29
|
+
/** Discovered workflows, after precedence resolution. */
|
|
30
|
+
workflows: WorkflowWithSource[];
|
|
31
|
+
/** Errors per failed workflow file. */
|
|
32
|
+
errors: WorkflowLoadError[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Discover workflows from bundled defaults + global + project scopes.
|
|
36
|
+
* Project overrides global; global overrides bundled. Matching is by
|
|
37
|
+
* filename stem (e.g. `spec-implement.yaml` at project level overrides
|
|
38
|
+
* any `spec-implement.yaml` from bundled).
|
|
39
|
+
*/
|
|
40
|
+
export declare function discoverWorkflows(projectRoot: string): WorkflowLoadResult;
|
|
41
|
+
/**
|
|
42
|
+
* Load a single workflow by name from the resolved discovery layer.
|
|
43
|
+
* Returns null if no workflow with that name exists in any scope.
|
|
44
|
+
*/
|
|
45
|
+
export declare function loadWorkflowByName(projectRoot: string, name: string): WorkflowWithSource | null;
|
|
46
|
+
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/workflows/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EACL,kBAAkB,EAElB,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE7D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,KAAK,EAAE,aAAa,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,aAAa,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,uCAAuC;IACvC,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,kBAAkB,CAoCzE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACX,kBAAkB,GAAG,IAAI,CAG3B"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Workflow discovery — three-tier precedence loader.
|
|
4
|
+
*
|
|
5
|
+
* Inspired by Archon's `packages/workflows/src/workflow-discovery.ts:205-361`.
|
|
6
|
+
*
|
|
7
|
+
* Precedence (highest wins on filename collision):
|
|
8
|
+
* 1. Bundled defaults (compiled-in, see ./defaults/index.ts)
|
|
9
|
+
* 2. Global `~/.specship/workflows/`
|
|
10
|
+
* 3. Project `<projectRoot>/.specship/workflows/`
|
|
11
|
+
*
|
|
12
|
+
* One level of nesting (`subdir/foo.yaml`) is allowed; deeper paths are
|
|
13
|
+
* silently ignored to keep discovery cheap and predictable. Per-file YAML
|
|
14
|
+
* parse or validation failures are isolated — one broken workflow does
|
|
15
|
+
* not abort discovery of its peers.
|
|
16
|
+
*/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.discoverWorkflows = discoverWorkflows;
|
|
52
|
+
exports.loadWorkflowByName = loadWorkflowByName;
|
|
53
|
+
const fs = __importStar(require("fs"));
|
|
54
|
+
const path = __importStar(require("path"));
|
|
55
|
+
const os = __importStar(require("os"));
|
|
56
|
+
const yaml = __importStar(require("yaml"));
|
|
57
|
+
const workflow_1 = require("./schemas/workflow");
|
|
58
|
+
const defaults_1 = require("./defaults");
|
|
59
|
+
/**
|
|
60
|
+
* Discover workflows from bundled defaults + global + project scopes.
|
|
61
|
+
* Project overrides global; global overrides bundled. Matching is by
|
|
62
|
+
* filename stem (e.g. `spec-implement.yaml` at project level overrides
|
|
63
|
+
* any `spec-implement.yaml` from bundled).
|
|
64
|
+
*/
|
|
65
|
+
function discoverWorkflows(projectRoot) {
|
|
66
|
+
const byName = new Map();
|
|
67
|
+
const errors = [];
|
|
68
|
+
// 1. Bundled (lowest precedence)
|
|
69
|
+
for (const entry of defaults_1.bundledDefaults) {
|
|
70
|
+
const result = parseAndValidate(entry.yaml);
|
|
71
|
+
if (result.workflow) {
|
|
72
|
+
byName.set(entry.name, {
|
|
73
|
+
workflow: result.workflow,
|
|
74
|
+
scope: 'bundled',
|
|
75
|
+
sourcePath: `bundled:${entry.name}.yaml`,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
errors.push({
|
|
80
|
+
scope: 'bundled',
|
|
81
|
+
sourcePath: `bundled:${entry.name}.yaml`,
|
|
82
|
+
errors: result.errors,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
// 2. Global
|
|
87
|
+
const globalDir = path.join(os.homedir(), '.specship', 'workflows');
|
|
88
|
+
loadFromDir(globalDir, 'global', byName, errors);
|
|
89
|
+
// 3. Project (highest precedence)
|
|
90
|
+
const projectDir = path.join(projectRoot, '.specship', 'workflows');
|
|
91
|
+
loadFromDir(projectDir, 'project', byName, errors);
|
|
92
|
+
return {
|
|
93
|
+
workflows: [...byName.values()].sort((a, b) => a.workflow.name.localeCompare(b.workflow.name)),
|
|
94
|
+
errors,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Load a single workflow by name from the resolved discovery layer.
|
|
99
|
+
* Returns null if no workflow with that name exists in any scope.
|
|
100
|
+
*/
|
|
101
|
+
function loadWorkflowByName(projectRoot, name) {
|
|
102
|
+
const all = discoverWorkflows(projectRoot);
|
|
103
|
+
return all.workflows.find((w) => w.workflow.name === name) ?? null;
|
|
104
|
+
}
|
|
105
|
+
// =============================================================================
|
|
106
|
+
// internal
|
|
107
|
+
// =============================================================================
|
|
108
|
+
function loadFromDir(dir, scope, byName, errors) {
|
|
109
|
+
let entries;
|
|
110
|
+
try {
|
|
111
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
return; // directory doesn't exist — fine, scope is empty
|
|
115
|
+
}
|
|
116
|
+
const filesToLoad = [];
|
|
117
|
+
for (const entry of entries) {
|
|
118
|
+
const full = path.join(dir, entry.name);
|
|
119
|
+
if (entry.isFile() && isYamlFile(entry.name)) {
|
|
120
|
+
filesToLoad.push(full);
|
|
121
|
+
}
|
|
122
|
+
else if (entry.isDirectory() && !entry.name.startsWith('.')) {
|
|
123
|
+
// One level of nesting only.
|
|
124
|
+
try {
|
|
125
|
+
const nested = fs.readdirSync(full, { withFileTypes: true });
|
|
126
|
+
for (const n of nested) {
|
|
127
|
+
if (n.isFile() && isYamlFile(n.name)) {
|
|
128
|
+
filesToLoad.push(path.join(full, n.name));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
catch {
|
|
133
|
+
// ignore
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
for (const file of filesToLoad) {
|
|
138
|
+
let source;
|
|
139
|
+
try {
|
|
140
|
+
source = fs.readFileSync(file, 'utf-8');
|
|
141
|
+
}
|
|
142
|
+
catch (err) {
|
|
143
|
+
errors.push({
|
|
144
|
+
scope,
|
|
145
|
+
sourcePath: file,
|
|
146
|
+
errors: [
|
|
147
|
+
{
|
|
148
|
+
path: '$',
|
|
149
|
+
message: `read failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
});
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
const result = parseAndValidate(source);
|
|
156
|
+
if (result.workflow) {
|
|
157
|
+
byName.set(result.workflow.name, {
|
|
158
|
+
workflow: result.workflow,
|
|
159
|
+
scope,
|
|
160
|
+
sourcePath: file,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
errors.push({ scope, sourcePath: file, errors: result.errors });
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function isYamlFile(name) {
|
|
169
|
+
const lower = name.toLowerCase();
|
|
170
|
+
return lower.endsWith('.yaml') || lower.endsWith('.yml');
|
|
171
|
+
}
|
|
172
|
+
function parseAndValidate(source) {
|
|
173
|
+
let parsed;
|
|
174
|
+
try {
|
|
175
|
+
parsed = yaml.parse(source);
|
|
176
|
+
}
|
|
177
|
+
catch (err) {
|
|
178
|
+
return {
|
|
179
|
+
errors: [
|
|
180
|
+
{
|
|
181
|
+
path: '$',
|
|
182
|
+
message: `YAML parse error: ${err instanceof Error ? err.message : String(err)}`,
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
const validation = (0, workflow_1.validateWorkflow)(parsed);
|
|
188
|
+
if (!validation.ok || !validation.workflow) {
|
|
189
|
+
return { errors: validation.errors };
|
|
190
|
+
}
|
|
191
|
+
return { workflow: validation.workflow, errors: [] };
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../../src/workflows/discovery.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCH,8CAoCC;AAMD,gDAMC;AAtFD,uCAAyB;AACzB,2CAA6B;AA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