@vpxa/aikit 0.1.1
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/LICENSE +21 -0
- package/README.md +1207 -0
- package/bin/aikit.mjs +10 -0
- package/package.json +92 -0
- package/packages/aikit-client/dist/direct-client.d.ts +37 -0
- package/packages/aikit-client/dist/direct-client.js +1 -0
- package/packages/aikit-client/dist/index.d.ts +5 -0
- package/packages/aikit-client/dist/index.js +1 -0
- package/packages/aikit-client/dist/mcp-client.d.ts +19 -0
- package/packages/aikit-client/dist/mcp-client.js +4 -0
- package/packages/aikit-client/dist/parsers.d.ts +35 -0
- package/packages/aikit-client/dist/parsers.js +2 -0
- package/packages/aikit-client/dist/types.d.ts +62 -0
- package/packages/aikit-client/dist/types.js +1 -0
- package/packages/analyzers/dist/blast-radius-analyzer.d.ts +19 -0
- package/packages/analyzers/dist/blast-radius-analyzer.js +6 -0
- package/packages/analyzers/dist/dependency-analyzer.d.ts +32 -0
- package/packages/analyzers/dist/dependency-analyzer.js +8 -0
- package/packages/analyzers/dist/diagram-generator.d.ts +16 -0
- package/packages/analyzers/dist/diagram-generator.js +2 -0
- package/packages/analyzers/dist/entry-point-analyzer.d.ts +40 -0
- package/packages/analyzers/dist/entry-point-analyzer.js +4 -0
- package/packages/analyzers/dist/index.d.ts +12 -0
- package/packages/analyzers/dist/index.js +1 -0
- package/packages/analyzers/dist/knowledge-producer.d.ts +40 -0
- package/packages/analyzers/dist/knowledge-producer.js +26 -0
- package/packages/analyzers/dist/pattern-analyzer.d.ts +15 -0
- package/packages/analyzers/dist/pattern-analyzer.js +2 -0
- package/packages/analyzers/dist/regex-call-graph.d.ts +10 -0
- package/packages/analyzers/dist/regex-call-graph.js +1 -0
- package/packages/analyzers/dist/structure-analyzer.d.ts +19 -0
- package/packages/analyzers/dist/structure-analyzer.js +4 -0
- package/packages/analyzers/dist/symbol-analyzer.d.ts +14 -0
- package/packages/analyzers/dist/symbol-analyzer.js +9 -0
- package/packages/analyzers/dist/ts-call-graph.d.ts +29 -0
- package/packages/analyzers/dist/ts-call-graph.js +1 -0
- package/packages/analyzers/dist/types.d.ts +110 -0
- package/packages/analyzers/dist/types.js +1 -0
- package/packages/chunker/dist/call-graph-extractor.d.ts +25 -0
- package/packages/chunker/dist/call-graph-extractor.js +1 -0
- package/packages/chunker/dist/chunker-factory.d.ts +19 -0
- package/packages/chunker/dist/chunker-factory.js +1 -0
- package/packages/chunker/dist/chunker.interface.d.ts +13 -0
- package/packages/chunker/dist/chunker.interface.js +1 -0
- package/packages/chunker/dist/code-chunker.d.ts +17 -0
- package/packages/chunker/dist/code-chunker.js +11 -0
- package/packages/chunker/dist/extractors/call-extractor.d.ts +24 -0
- package/packages/chunker/dist/extractors/call-extractor.js +1 -0
- package/packages/chunker/dist/extractors/entry-point-detector.d.ts +14 -0
- package/packages/chunker/dist/extractors/entry-point-detector.js +1 -0
- package/packages/chunker/dist/extractors/import-extractor.d.ts +14 -0
- package/packages/chunker/dist/extractors/import-extractor.js +1 -0
- package/packages/chunker/dist/extractors/pattern-detector.d.ts +14 -0
- package/packages/chunker/dist/extractors/pattern-detector.js +1 -0
- package/packages/chunker/dist/extractors/scope-resolver.d.ts +26 -0
- package/packages/chunker/dist/extractors/scope-resolver.js +1 -0
- package/packages/chunker/dist/extractors/symbol-extractor.d.ts +14 -0
- package/packages/chunker/dist/extractors/symbol-extractor.js +3 -0
- package/packages/chunker/dist/extractors/types.d.ts +44 -0
- package/packages/chunker/dist/extractors/types.js +1 -0
- package/packages/chunker/dist/generic-chunker.d.ts +15 -0
- package/packages/chunker/dist/generic-chunker.js +5 -0
- package/packages/chunker/dist/index.d.ts +19 -0
- package/packages/chunker/dist/index.js +1 -0
- package/packages/chunker/dist/markdown-chunker.d.ts +17 -0
- package/packages/chunker/dist/markdown-chunker.js +3 -0
- package/packages/chunker/dist/wasm/languages.d.ts +18 -0
- package/packages/chunker/dist/wasm/languages.js +1 -0
- package/packages/chunker/dist/wasm/query-executor.d.ts +70 -0
- package/packages/chunker/dist/wasm/query-executor.js +1 -0
- package/packages/chunker/dist/wasm/runtime.d.ts +44 -0
- package/packages/chunker/dist/wasm/runtime.js +1 -0
- package/packages/chunker/dist/wasm/types.d.ts +84 -0
- package/packages/chunker/dist/wasm/types.js +1 -0
- package/packages/chunker/dist/wasm-chunker.d.ts +23 -0
- package/packages/chunker/dist/wasm-chunker.js +6 -0
- package/packages/chunker/src/queries/go/calls.scm +11 -0
- package/packages/chunker/src/queries/go/entry-points.scm +20 -0
- package/packages/chunker/src/queries/go/imports.scm +6 -0
- package/packages/chunker/src/queries/go/patterns.scm +25 -0
- package/packages/chunker/src/queries/go/symbols.scm +26 -0
- package/packages/chunker/src/queries/java/calls.scm +10 -0
- package/packages/chunker/src/queries/java/entry-points.scm +27 -0
- package/packages/chunker/src/queries/java/imports.scm +11 -0
- package/packages/chunker/src/queries/java/patterns.scm +27 -0
- package/packages/chunker/src/queries/java/symbols.scm +28 -0
- package/packages/chunker/src/queries/javascript/calls.scm +21 -0
- package/packages/chunker/src/queries/javascript/entry-points.scm +31 -0
- package/packages/chunker/src/queries/javascript/imports.scm +32 -0
- package/packages/chunker/src/queries/javascript/patterns.scm +28 -0
- package/packages/chunker/src/queries/javascript/symbols.scm +52 -0
- package/packages/chunker/src/queries/python/calls.scm +11 -0
- package/packages/chunker/src/queries/python/entry-points.scm +21 -0
- package/packages/chunker/src/queries/python/imports.scm +14 -0
- package/packages/chunker/src/queries/python/patterns.scm +25 -0
- package/packages/chunker/src/queries/python/symbols.scm +17 -0
- package/packages/chunker/src/queries/rust/calls.scm +20 -0
- package/packages/chunker/src/queries/rust/entry-points.scm +7 -0
- package/packages/chunker/src/queries/rust/imports.scm +26 -0
- package/packages/chunker/src/queries/rust/patterns.scm +18 -0
- package/packages/chunker/src/queries/rust/symbols.scm +73 -0
- package/packages/chunker/src/queries/typescript/calls.scm +21 -0
- package/packages/chunker/src/queries/typescript/entry-points.scm +48 -0
- package/packages/chunker/src/queries/typescript/imports.scm +35 -0
- package/packages/chunker/src/queries/typescript/patterns.scm +47 -0
- package/packages/chunker/src/queries/typescript/symbols.scm +79 -0
- package/packages/chunker/wasm/tree-sitter-c.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-cpp.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-go.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-java.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-javascript.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-kotlin.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-php.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-python.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-ruby.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-rust.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-scala.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-swift.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-typescript.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter.wasm +0 -0
- package/packages/cli/dist/aikit-init.d.ts +54 -0
- package/packages/cli/dist/aikit-init.js +1 -0
- package/packages/cli/dist/commands/analyze.d.ts +6 -0
- package/packages/cli/dist/commands/analyze.js +2 -0
- package/packages/cli/dist/commands/context-cmds.d.ts +6 -0
- package/packages/cli/dist/commands/context-cmds.js +1 -0
- package/packages/cli/dist/commands/environment.d.ts +6 -0
- package/packages/cli/dist/commands/environment.js +1 -0
- package/packages/cli/dist/commands/execution.d.ts +6 -0
- package/packages/cli/dist/commands/execution.js +1 -0
- package/packages/cli/dist/commands/flow.d.ts +6 -0
- package/packages/cli/dist/commands/flow.js +1 -0
- package/packages/cli/dist/commands/graph.d.ts +6 -0
- package/packages/cli/dist/commands/graph.js +6 -0
- package/packages/cli/dist/commands/init/adapters.d.ts +28 -0
- package/packages/cli/dist/commands/init/adapters.js +1 -0
- package/packages/cli/dist/commands/init/config.d.ts +10 -0
- package/packages/cli/dist/commands/init/config.js +3 -0
- package/packages/cli/dist/commands/init/constants.d.ts +41 -0
- package/packages/cli/dist/commands/init/constants.js +1 -0
- package/packages/cli/dist/commands/init/curated.d.ts +7 -0
- package/packages/cli/dist/commands/init/curated.js +1 -0
- package/packages/cli/dist/commands/init/frontmatter.d.ts +54 -0
- package/packages/cli/dist/commands/init/frontmatter.js +2 -0
- package/packages/cli/dist/commands/init/index.d.ts +36 -0
- package/packages/cli/dist/commands/init/index.js +5 -0
- package/packages/cli/dist/commands/init/manifest.d.ts +71 -0
- package/packages/cli/dist/commands/init/manifest.js +1 -0
- package/packages/cli/dist/commands/init/scaffold.d.ts +46 -0
- package/packages/cli/dist/commands/init/scaffold.js +1 -0
- package/packages/cli/dist/commands/init/templates.d.ts +9 -0
- package/packages/cli/dist/commands/init/templates.js +194 -0
- package/packages/cli/dist/commands/init/user.d.ts +61 -0
- package/packages/cli/dist/commands/init/user.js +5 -0
- package/packages/cli/dist/commands/knowledge.d.ts +6 -0
- package/packages/cli/dist/commands/knowledge.js +1 -0
- package/packages/cli/dist/commands/search.d.ts +6 -0
- package/packages/cli/dist/commands/search.js +1 -0
- package/packages/cli/dist/commands/system.d.ts +6 -0
- package/packages/cli/dist/commands/system.js +4 -0
- package/packages/cli/dist/commands/upgrade.d.ts +6 -0
- package/packages/cli/dist/commands/upgrade.js +1 -0
- package/packages/cli/dist/commands/workspace.d.ts +6 -0
- package/packages/cli/dist/commands/workspace.js +1 -0
- package/packages/cli/dist/context.d.ts +7 -0
- package/packages/cli/dist/context.js +1 -0
- package/packages/cli/dist/helpers.d.ts +55 -0
- package/packages/cli/dist/helpers.js +5 -0
- package/packages/cli/dist/index.d.ts +10 -0
- package/packages/cli/dist/index.js +3 -0
- package/packages/cli/dist/types.d.ts +9 -0
- package/packages/cli/dist/types.js +1 -0
- package/packages/core/dist/constants.d.ts +74 -0
- package/packages/core/dist/constants.js +1 -0
- package/packages/core/dist/content-detector.d.ts +13 -0
- package/packages/core/dist/content-detector.js +1 -0
- package/packages/core/dist/errors.d.ts +20 -0
- package/packages/core/dist/errors.js +1 -0
- package/packages/core/dist/global-registry.d.ts +63 -0
- package/packages/core/dist/global-registry.js +1 -0
- package/packages/core/dist/index.d.ts +7 -0
- package/packages/core/dist/index.js +1 -0
- package/packages/core/dist/logger.d.ts +32 -0
- package/packages/core/dist/logger.js +1 -0
- package/packages/core/dist/types.d.ts +133 -0
- package/packages/core/dist/types.js +1 -0
- package/packages/dashboard/dist/assets/index-BjA4YODs.js +21 -0
- package/packages/dashboard/dist/assets/index-BjA4YODs.js.map +1 -0
- package/packages/dashboard/dist/assets/index-CHpVij2M.css +1 -0
- package/packages/dashboard/dist/index.html +18 -0
- package/packages/elicitation/dist/build.d.ts +14 -0
- package/packages/elicitation/dist/build.js +1 -0
- package/packages/elicitation/dist/fields.d.ts +32 -0
- package/packages/elicitation/dist/fields.js +1 -0
- package/packages/elicitation/dist/index.d.ts +5 -0
- package/packages/elicitation/dist/index.js +1 -0
- package/packages/elicitation/dist/normalize.d.ts +15 -0
- package/packages/elicitation/dist/normalize.js +1 -0
- package/packages/elicitation/dist/types.d.ts +88 -0
- package/packages/elicitation/dist/types.js +1 -0
- package/packages/embeddings/dist/embedder.interface.d.ts +26 -0
- package/packages/embeddings/dist/embedder.interface.js +1 -0
- package/packages/embeddings/dist/index.d.ts +3 -0
- package/packages/embeddings/dist/index.js +1 -0
- package/packages/embeddings/dist/onnx-embedder.d.ts +22 -0
- package/packages/embeddings/dist/onnx-embedder.js +1 -0
- package/packages/enterprise-bridge/dist/cache.d.ts +28 -0
- package/packages/enterprise-bridge/dist/cache.js +1 -0
- package/packages/enterprise-bridge/dist/er-client.d.ts +37 -0
- package/packages/enterprise-bridge/dist/er-client.js +1 -0
- package/packages/enterprise-bridge/dist/evolution-collector.d.ts +62 -0
- package/packages/enterprise-bridge/dist/evolution-collector.js +1 -0
- package/packages/enterprise-bridge/dist/index.d.ts +8 -0
- package/packages/enterprise-bridge/dist/index.js +1 -0
- package/packages/enterprise-bridge/dist/policy-store.d.ts +45 -0
- package/packages/enterprise-bridge/dist/policy-store.js +1 -0
- package/packages/enterprise-bridge/dist/push-adapter.d.ts +23 -0
- package/packages/enterprise-bridge/dist/push-adapter.js +1 -0
- package/packages/enterprise-bridge/dist/result-merger.d.ts +14 -0
- package/packages/enterprise-bridge/dist/result-merger.js +1 -0
- package/packages/enterprise-bridge/dist/types.d.ts +81 -0
- package/packages/enterprise-bridge/dist/types.js +1 -0
- package/packages/flows/dist/adapters/claude-plugin.d.ts +12 -0
- package/packages/flows/dist/adapters/claude-plugin.js +1 -0
- package/packages/flows/dist/adapters/copilot.d.ts +10 -0
- package/packages/flows/dist/adapters/copilot.js +1 -0
- package/packages/flows/dist/adapters/index.d.ts +11 -0
- package/packages/flows/dist/adapters/index.js +1 -0
- package/packages/flows/dist/adapters/native.d.ts +10 -0
- package/packages/flows/dist/adapters/native.js +1 -0
- package/packages/flows/dist/builtins.d.ts +16 -0
- package/packages/flows/dist/builtins.js +1 -0
- package/packages/flows/dist/foundation.d.ts +20 -0
- package/packages/flows/dist/foundation.js +11 -0
- package/packages/flows/dist/git.d.ts +34 -0
- package/packages/flows/dist/git.js +1 -0
- package/packages/flows/dist/index.d.ts +12 -0
- package/packages/flows/dist/index.js +1 -0
- package/packages/flows/dist/loader.d.ts +13 -0
- package/packages/flows/dist/loader.js +2 -0
- package/packages/flows/dist/registry.d.ts +23 -0
- package/packages/flows/dist/registry.js +1 -0
- package/packages/flows/dist/state-machine.d.ts +23 -0
- package/packages/flows/dist/state-machine.js +1 -0
- package/packages/flows/dist/symlinks.d.ts +17 -0
- package/packages/flows/dist/symlinks.js +1 -0
- package/packages/flows/dist/types.d.ts +112 -0
- package/packages/flows/dist/types.js +1 -0
- package/packages/indexer/dist/file-hasher.d.ts +13 -0
- package/packages/indexer/dist/file-hasher.js +1 -0
- package/packages/indexer/dist/filesystem-crawler.d.ts +29 -0
- package/packages/indexer/dist/filesystem-crawler.js +1 -0
- package/packages/indexer/dist/graph-extractor.d.ts +18 -0
- package/packages/indexer/dist/graph-extractor.js +1 -0
- package/packages/indexer/dist/hash-cache.d.ts +24 -0
- package/packages/indexer/dist/hash-cache.js +1 -0
- package/packages/indexer/dist/incremental-indexer.d.ts +56 -0
- package/packages/indexer/dist/incremental-indexer.js +1 -0
- package/packages/indexer/dist/index.d.ts +6 -0
- package/packages/indexer/dist/index.js +1 -0
- package/packages/present/dist/index.html +709 -0
- package/packages/server/dist/api.d.ts +3 -0
- package/packages/server/dist/api.js +1 -0
- package/packages/server/dist/auto-gc.d.ts +30 -0
- package/packages/server/dist/auto-gc.js +1 -0
- package/packages/server/dist/completions.d.ts +14 -0
- package/packages/server/dist/completions.js +1 -0
- package/packages/server/dist/config.d.ts +14 -0
- package/packages/server/dist/config.js +1 -0
- package/packages/server/dist/cross-workspace.d.ts +43 -0
- package/packages/server/dist/cross-workspace.js +1 -0
- package/packages/server/dist/curated-manager.d.ts +92 -0
- package/packages/server/dist/curated-manager.js +5 -0
- package/packages/server/dist/dashboard-static.d.ts +27 -0
- package/packages/server/dist/dashboard-static.js +1 -0
- package/packages/server/dist/elicitor.d.ts +18 -0
- package/packages/server/dist/elicitor.js +1 -0
- package/packages/server/dist/index.d.ts +1 -0
- package/packages/server/dist/index.js +1 -0
- package/packages/server/dist/mcp-logging.d.ts +11 -0
- package/packages/server/dist/mcp-logging.js +1 -0
- package/packages/server/dist/output-schemas.d.ts +242 -0
- package/packages/server/dist/output-schemas.js +1 -0
- package/packages/server/dist/prompts.d.ts +13 -0
- package/packages/server/dist/prompts.js +13 -0
- package/packages/server/dist/replay-interceptor.d.ts +23 -0
- package/packages/server/dist/replay-interceptor.js +1 -0
- package/packages/server/dist/resource-links.d.ts +34 -0
- package/packages/server/dist/resource-links.js +1 -0
- package/packages/server/dist/resources/curated-resources.d.ts +13 -0
- package/packages/server/dist/resources/curated-resources.js +2 -0
- package/packages/server/dist/resources/resource-notifier.d.ts +45 -0
- package/packages/server/dist/resources/resource-notifier.js +1 -0
- package/packages/server/dist/resources/resources.d.ts +8 -0
- package/packages/server/dist/resources/resources.js +2 -0
- package/packages/server/dist/sampling.d.ts +41 -0
- package/packages/server/dist/sampling.js +2 -0
- package/packages/server/dist/server.d.ts +47 -0
- package/packages/server/dist/server.js +3 -0
- package/packages/server/dist/structured-content-guard.d.ts +26 -0
- package/packages/server/dist/structured-content-guard.js +1 -0
- package/packages/server/dist/task-manager.d.ts +40 -0
- package/packages/server/dist/task-manager.js +1 -0
- package/packages/server/dist/tool-metadata.d.ts +38 -0
- package/packages/server/dist/tool-metadata.js +1 -0
- package/packages/server/dist/tool-prefix.d.ts +12 -0
- package/packages/server/dist/tool-prefix.js +1 -0
- package/packages/server/dist/tools/analyze.tools.d.ts +14 -0
- package/packages/server/dist/tools/analyze.tools.js +8 -0
- package/packages/server/dist/tools/audit.tool.d.ts +8 -0
- package/packages/server/dist/tools/audit.tool.js +1 -0
- package/packages/server/dist/tools/brainstorm.tool.d.ts +7 -0
- package/packages/server/dist/tools/brainstorm.tool.js +9 -0
- package/packages/server/dist/tools/bridge.tools.d.ts +34 -0
- package/packages/server/dist/tools/bridge.tools.js +15 -0
- package/packages/server/dist/tools/context.tools.d.ts +15 -0
- package/packages/server/dist/tools/context.tools.js +10 -0
- package/packages/server/dist/tools/evolution.tools.d.ts +7 -0
- package/packages/server/dist/tools/evolution.tools.js +5 -0
- package/packages/server/dist/tools/execution.tools.d.ts +14 -0
- package/packages/server/dist/tools/execution.tools.js +4 -0
- package/packages/server/dist/tools/flow.tools.d.ts +7 -0
- package/packages/server/dist/tools/flow.tools.js +1 -0
- package/packages/server/dist/tools/forge.tools.d.ts +13 -0
- package/packages/server/dist/tools/forge.tools.js +10 -0
- package/packages/server/dist/tools/forget.tool.d.ts +8 -0
- package/packages/server/dist/tools/forget.tool.js +1 -0
- package/packages/server/dist/tools/graph.tool.d.ts +7 -0
- package/packages/server/dist/tools/graph.tool.js +5 -0
- package/packages/server/dist/tools/infra.tools.d.ts +10 -0
- package/packages/server/dist/tools/infra.tools.js +5 -0
- package/packages/server/dist/tools/list.tool.d.ts +7 -0
- package/packages/server/dist/tools/list.tool.js +2 -0
- package/packages/server/dist/tools/lookup.tool.d.ts +7 -0
- package/packages/server/dist/tools/lookup.tool.js +3 -0
- package/packages/server/dist/tools/manipulation.tools.d.ts +10 -0
- package/packages/server/dist/tools/manipulation.tools.js +4 -0
- package/packages/server/dist/tools/onboard.tool.d.ts +9 -0
- package/packages/server/dist/tools/onboard.tool.js +2 -0
- package/packages/server/dist/tools/persistence.tools.d.ts +10 -0
- package/packages/server/dist/tools/persistence.tools.js +5 -0
- package/packages/server/dist/tools/policy.tools.d.ts +7 -0
- package/packages/server/dist/tools/policy.tools.js +3 -0
- package/packages/server/dist/tools/present/browser.d.ts +4 -0
- package/packages/server/dist/tools/present/browser.js +93 -0
- package/packages/server/dist/tools/present/helpers.d.ts +18 -0
- package/packages/server/dist/tools/present/helpers.js +1 -0
- package/packages/server/dist/tools/present/html.d.ts +18 -0
- package/packages/server/dist/tools/present/html.js +5 -0
- package/packages/server/dist/tools/present/index.d.ts +2 -0
- package/packages/server/dist/tools/present/index.js +1 -0
- package/packages/server/dist/tools/present/markdown.d.ts +17 -0
- package/packages/server/dist/tools/present/markdown.js +8 -0
- package/packages/server/dist/tools/present/templates.d.ts +14 -0
- package/packages/server/dist/tools/present/templates.js +472 -0
- package/packages/server/dist/tools/present/tool.d.ts +27 -0
- package/packages/server/dist/tools/present/tool.js +19 -0
- package/packages/server/dist/tools/present-blocks.d.ts +46 -0
- package/packages/server/dist/tools/present-blocks.js +27 -0
- package/packages/server/dist/tools/present-charts.d.ts +31 -0
- package/packages/server/dist/tools/present-charts.js +34 -0
- package/packages/server/dist/tools/present-theme.d.ts +14 -0
- package/packages/server/dist/tools/present-theme.js +395 -0
- package/packages/server/dist/tools/present-utils.d.ts +11 -0
- package/packages/server/dist/tools/present-utils.js +1 -0
- package/packages/server/dist/tools/present.tool.d.ts +2 -0
- package/packages/server/dist/tools/present.tool.js +1 -0
- package/packages/server/dist/tools/produce.tool.d.ts +7 -0
- package/packages/server/dist/tools/produce.tool.js +4 -0
- package/packages/server/dist/tools/read.tool.d.ts +7 -0
- package/packages/server/dist/tools/read.tool.js +2 -0
- package/packages/server/dist/tools/reindex.tool.d.ts +11 -0
- package/packages/server/dist/tools/reindex.tool.js +3 -0
- package/packages/server/dist/tools/remember.tool.d.ts +9 -0
- package/packages/server/dist/tools/remember.tool.js +4 -0
- package/packages/server/dist/tools/replay.tool.d.ts +6 -0
- package/packages/server/dist/tools/replay.tool.js +3 -0
- package/packages/server/dist/tools/restore.tool.d.ts +6 -0
- package/packages/server/dist/tools/restore.tool.js +3 -0
- package/packages/server/dist/tools/search.tool.d.ts +11 -0
- package/packages/server/dist/tools/search.tool.js +10 -0
- package/packages/server/dist/tools/status.tool.d.ts +20 -0
- package/packages/server/dist/tools/status.tool.js +3 -0
- package/packages/server/dist/tools/update.tool.d.ts +8 -0
- package/packages/server/dist/tools/update.tool.js +1 -0
- package/packages/server/dist/tools/utility.tools.d.ts +15 -0
- package/packages/server/dist/tools/utility.tools.js +13 -0
- package/packages/server/dist/version-check.d.ts +32 -0
- package/packages/server/dist/version-check.js +1 -0
- package/packages/store/dist/graph-store.interface.d.ts +118 -0
- package/packages/store/dist/graph-store.interface.js +1 -0
- package/packages/store/dist/index.d.ts +6 -0
- package/packages/store/dist/index.js +1 -0
- package/packages/store/dist/lance-store.d.ts +44 -0
- package/packages/store/dist/lance-store.js +1 -0
- package/packages/store/dist/sqlite-graph-store.d.ts +45 -0
- package/packages/store/dist/sqlite-graph-store.js +58 -0
- package/packages/store/dist/store-factory.d.ts +12 -0
- package/packages/store/dist/store-factory.js +1 -0
- package/packages/store/dist/store.interface.d.ts +54 -0
- package/packages/store/dist/store.interface.js +1 -0
- package/packages/tools/dist/audit.d.ts +65 -0
- package/packages/tools/dist/audit.js +6 -0
- package/packages/tools/dist/batch.d.ts +23 -0
- package/packages/tools/dist/batch.js +1 -0
- package/packages/tools/dist/changelog.d.ts +36 -0
- package/packages/tools/dist/changelog.js +2 -0
- package/packages/tools/dist/check.d.ts +48 -0
- package/packages/tools/dist/check.js +2 -0
- package/packages/tools/dist/checkpoint.d.ts +19 -0
- package/packages/tools/dist/checkpoint.js +1 -0
- package/packages/tools/dist/codemod.d.ts +39 -0
- package/packages/tools/dist/codemod.js +2 -0
- package/packages/tools/dist/compact.d.ts +41 -0
- package/packages/tools/dist/compact.js +3 -0
- package/packages/tools/dist/config-extractor.d.ts +9 -0
- package/packages/tools/dist/config-extractor.js +7 -0
- package/packages/tools/dist/data-transform.d.ts +12 -0
- package/packages/tools/dist/data-transform.js +1 -0
- package/packages/tools/dist/dead-symbols.d.ts +28 -0
- package/packages/tools/dist/dead-symbols.js +2 -0
- package/packages/tools/dist/delegate.d.ts +36 -0
- package/packages/tools/dist/delegate.js +1 -0
- package/packages/tools/dist/diagram-builder.d.ts +9 -0
- package/packages/tools/dist/diagram-builder.js +9 -0
- package/packages/tools/dist/diff-parse.d.ts +28 -0
- package/packages/tools/dist/diff-parse.js +3 -0
- package/packages/tools/dist/digest.d.ts +50 -0
- package/packages/tools/dist/digest.js +6 -0
- package/packages/tools/dist/dogfood-log.d.ts +49 -0
- package/packages/tools/dist/dogfood-log.js +2 -0
- package/packages/tools/dist/encode.d.ts +16 -0
- package/packages/tools/dist/encode.js +1 -0
- package/packages/tools/dist/env-info.d.ts +30 -0
- package/packages/tools/dist/env-info.js +1 -0
- package/packages/tools/dist/eval.d.ts +15 -0
- package/packages/tools/dist/eval.js +2 -0
- package/packages/tools/dist/evidence-map.d.ts +92 -0
- package/packages/tools/dist/evidence-map.js +2 -0
- package/packages/tools/dist/file-cache.d.ts +41 -0
- package/packages/tools/dist/file-cache.js +3 -0
- package/packages/tools/dist/file-summary.d.ts +52 -0
- package/packages/tools/dist/file-summary.js +2 -0
- package/packages/tools/dist/file-walk.d.ts +6 -0
- package/packages/tools/dist/file-walk.js +1 -0
- package/packages/tools/dist/find-examples.d.ts +29 -0
- package/packages/tools/dist/find-examples.js +3 -0
- package/packages/tools/dist/find.d.ts +49 -0
- package/packages/tools/dist/find.js +1 -0
- package/packages/tools/dist/forge-classify.d.ts +44 -0
- package/packages/tools/dist/forge-classify.js +2 -0
- package/packages/tools/dist/forge-ground.d.ts +61 -0
- package/packages/tools/dist/forge-ground.js +1 -0
- package/packages/tools/dist/git-context.d.ts +25 -0
- package/packages/tools/dist/git-context.js +3 -0
- package/packages/tools/dist/graph-query.d.ts +86 -0
- package/packages/tools/dist/graph-query.js +1 -0
- package/packages/tools/dist/guide.d.ts +25 -0
- package/packages/tools/dist/guide.js +1 -0
- package/packages/tools/dist/health.d.ts +16 -0
- package/packages/tools/dist/health.js +2 -0
- package/packages/tools/dist/http-request.d.ts +25 -0
- package/packages/tools/dist/http-request.js +1 -0
- package/packages/tools/dist/index.d.ts +57 -0
- package/packages/tools/dist/index.js +1 -0
- package/packages/tools/dist/lane.d.ts +41 -0
- package/packages/tools/dist/lane.js +6 -0
- package/packages/tools/dist/measure.d.ts +42 -0
- package/packages/tools/dist/measure.js +2 -0
- package/packages/tools/dist/onboard-utils.d.ts +12 -0
- package/packages/tools/dist/onboard-utils.js +1 -0
- package/packages/tools/dist/onboard.d.ts +50 -0
- package/packages/tools/dist/onboard.js +18 -0
- package/packages/tools/dist/parse-output.d.ts +82 -0
- package/packages/tools/dist/parse-output.js +2 -0
- package/packages/tools/dist/path-resolver.d.ts +14 -0
- package/packages/tools/dist/path-resolver.js +1 -0
- package/packages/tools/dist/process-manager.d.ts +20 -0
- package/packages/tools/dist/process-manager.js +1 -0
- package/packages/tools/dist/queue.d.ts +40 -0
- package/packages/tools/dist/queue.js +1 -0
- package/packages/tools/dist/regex-test.d.ts +33 -0
- package/packages/tools/dist/regex-test.js +1 -0
- package/packages/tools/dist/regex-utils.d.ts +8 -0
- package/packages/tools/dist/regex-utils.js +1 -0
- package/packages/tools/dist/rename.d.ts +31 -0
- package/packages/tools/dist/rename.js +2 -0
- package/packages/tools/dist/replay.d.ts +59 -0
- package/packages/tools/dist/replay.js +4 -0
- package/packages/tools/dist/response-envelope.d.ts +43 -0
- package/packages/tools/dist/response-envelope.js +1 -0
- package/packages/tools/dist/restore-points.d.ts +22 -0
- package/packages/tools/dist/restore-points.js +1 -0
- package/packages/tools/dist/schema-validate.d.ts +25 -0
- package/packages/tools/dist/schema-validate.js +1 -0
- package/packages/tools/dist/scope-map.d.ts +51 -0
- package/packages/tools/dist/scope-map.js +1 -0
- package/packages/tools/dist/snippet.d.ts +35 -0
- package/packages/tools/dist/snippet.js +1 -0
- package/packages/tools/dist/stash.d.ts +14 -0
- package/packages/tools/dist/stash.js +1 -0
- package/packages/tools/dist/stratum-card.d.ts +30 -0
- package/packages/tools/dist/stratum-card.js +4 -0
- package/packages/tools/dist/symbol.d.ts +45 -0
- package/packages/tools/dist/symbol.js +3 -0
- package/packages/tools/dist/synthesis-engine.d.ts +13 -0
- package/packages/tools/dist/synthesis-engine.js +6 -0
- package/packages/tools/dist/test-run.d.ts +28 -0
- package/packages/tools/dist/test-run.js +2 -0
- package/packages/tools/dist/text-utils.d.ts +24 -0
- package/packages/tools/dist/text-utils.js +2 -0
- package/packages/tools/dist/time-utils.d.ts +20 -0
- package/packages/tools/dist/time-utils.js +1 -0
- package/packages/tools/dist/trace.d.ts +29 -0
- package/packages/tools/dist/trace.js +2 -0
- package/packages/tools/dist/truncation.d.ts +33 -0
- package/packages/tools/dist/truncation.js +7 -0
- package/packages/tools/dist/watch.d.ts +32 -0
- package/packages/tools/dist/watch.js +1 -0
- package/packages/tools/dist/web-fetch.d.ts +47 -0
- package/packages/tools/dist/web-fetch.js +8 -0
- package/packages/tools/dist/web-search.d.ts +25 -0
- package/packages/tools/dist/web-search.js +1 -0
- package/packages/tools/dist/workset.d.ts +47 -0
- package/packages/tools/dist/workset.js +1 -0
- package/packages/tui/dist/App-DU2KEylW.js +2 -0
- package/packages/tui/dist/App.d.ts +13 -0
- package/packages/tui/dist/App.js +2 -0
- package/packages/tui/dist/CuratedPanel-BIamXLNy.js +2 -0
- package/packages/tui/dist/LogPanel-Bo8a8QXB.js +3 -0
- package/packages/tui/dist/SearchPanel-CpJGczAc.js +2 -0
- package/packages/tui/dist/StatusPanel-BAbUxyqQ.js +2 -0
- package/packages/tui/dist/chunk-D6axbAb-.js +2 -0
- package/packages/tui/dist/devtools-DMOZMn70.js +7 -0
- package/packages/tui/dist/hooks/useKBClient.d.ts +9 -0
- package/packages/tui/dist/hooks/useKBClient.js +2 -0
- package/packages/tui/dist/hooks/usePolling.d.ts +8 -0
- package/packages/tui/dist/hooks/usePolling.js +2 -0
- package/packages/tui/dist/index-BXafekwr.d.ts +64 -0
- package/packages/tui/dist/index.d.ts +7 -0
- package/packages/tui/dist/index.js +2 -0
- package/packages/tui/dist/jsx-runtime-y6Gdq5PZ.js +294 -0
- package/packages/tui/dist/panels/CuratedPanel.d.ts +7 -0
- package/packages/tui/dist/panels/CuratedPanel.js +2 -0
- package/packages/tui/dist/panels/LogPanel.d.ts +7 -0
- package/packages/tui/dist/panels/LogPanel.js +2 -0
- package/packages/tui/dist/panels/SearchPanel.d.ts +7 -0
- package/packages/tui/dist/panels/SearchPanel.js +2 -0
- package/packages/tui/dist/panels/StatusPanel.d.ts +7 -0
- package/packages/tui/dist/panels/StatusPanel.js +2 -0
- package/packages/tui/dist/react-D__J1GQe.js +24 -0
- package/packages/tui/dist/useKBClient-C35iA4uG.js +2 -0
- package/packages/tui/dist/usePolling-BbjnRWgx.js +2 -0
- package/scaffold/README.md +192 -0
- package/scaffold/adapters/claude-code.mjs +56 -0
- package/scaffold/adapters/copilot.mjs +270 -0
- package/scaffold/definitions/agents.mjs +189 -0
- package/scaffold/definitions/bodies.mjs +487 -0
- package/scaffold/definitions/hooks.mjs +43 -0
- package/scaffold/definitions/models.mjs +56 -0
- package/scaffold/definitions/plugins.mjs +38 -0
- package/scaffold/definitions/prompts.mjs +145 -0
- package/scaffold/definitions/protocols.mjs +679 -0
- package/scaffold/definitions/tools.mjs +229 -0
- package/scaffold/flows/aikit-advanced/flow.json +60 -0
- package/scaffold/flows/aikit-advanced/skills/execute/SKILL.md +124 -0
- package/scaffold/flows/aikit-advanced/skills/plan/SKILL.md +100 -0
- package/scaffold/flows/aikit-advanced/skills/spec/SKILL.md +100 -0
- package/scaffold/flows/aikit-advanced/skills/task/SKILL.md +99 -0
- package/scaffold/flows/aikit-advanced/skills/verify/SKILL.md +122 -0
- package/scaffold/flows/aikit-basic/flow.json +36 -0
- package/scaffold/flows/aikit-basic/skills/assess/SKILL.md +82 -0
- package/scaffold/flows/aikit-basic/skills/implement/SKILL.md +105 -0
- package/scaffold/flows/aikit-basic/skills/verify/SKILL.md +96 -0
- package/scaffold/general/agents/Architect-Reviewer-Alpha.agent.md +21 -0
- package/scaffold/general/agents/Architect-Reviewer-Beta.agent.md +21 -0
- package/scaffold/general/agents/Code-Reviewer-Alpha.agent.md +12 -0
- package/scaffold/general/agents/Code-Reviewer-Beta.agent.md +12 -0
- package/scaffold/general/agents/Debugger.agent.md +34 -0
- package/scaffold/general/agents/Documenter.agent.md +53 -0
- package/scaffold/general/agents/Explorer.agent.md +63 -0
- package/scaffold/general/agents/Frontend.agent.md +29 -0
- package/scaffold/general/agents/Implementer.agent.md +33 -0
- package/scaffold/general/agents/Orchestrator.agent.md +149 -0
- package/scaffold/general/agents/Planner.agent.md +79 -0
- package/scaffold/general/agents/README.md +57 -0
- package/scaffold/general/agents/Refactor.agent.md +36 -0
- package/scaffold/general/agents/Researcher-Alpha.agent.md +20 -0
- package/scaffold/general/agents/Researcher-Beta.agent.md +20 -0
- package/scaffold/general/agents/Researcher-Delta.agent.md +20 -0
- package/scaffold/general/agents/Researcher-Gamma.agent.md +20 -0
- package/scaffold/general/agents/Security.agent.md +55 -0
- package/scaffold/general/agents/_shared/architect-reviewer-base.md +60 -0
- package/scaffold/general/agents/_shared/code-agent-base.md +262 -0
- package/scaffold/general/agents/_shared/code-reviewer-base.md +64 -0
- package/scaffold/general/agents/_shared/decision-protocol.md +27 -0
- package/scaffold/general/agents/_shared/forge-protocol.md +90 -0
- package/scaffold/general/agents/_shared/researcher-base.md +101 -0
- package/scaffold/general/agents/templates/adr-template.md +28 -0
- package/scaffold/general/agents/templates/execution-state.md +26 -0
- package/scaffold/general/prompts/ask.prompt.md +21 -0
- package/scaffold/general/prompts/debug.prompt.md +25 -0
- package/scaffold/general/prompts/design.prompt.md +23 -0
- package/scaffold/general/prompts/implement.prompt.md +26 -0
- package/scaffold/general/prompts/plan.prompt.md +25 -0
- package/scaffold/general/prompts/review.prompt.md +32 -0
- package/scaffold/general/skills/adr-skill/SKILL.md +329 -0
- package/scaffold/general/skills/adr-skill/assets/templates/adr-madr.md +89 -0
- package/scaffold/general/skills/adr-skill/assets/templates/adr-readme.md +20 -0
- package/scaffold/general/skills/adr-skill/assets/templates/adr-simple.md +46 -0
- package/scaffold/general/skills/adr-skill/references/adr-conventions.md +95 -0
- package/scaffold/general/skills/adr-skill/references/examples.md +193 -0
- package/scaffold/general/skills/adr-skill/references/review-checklist.md +77 -0
- package/scaffold/general/skills/adr-skill/references/template-variants.md +52 -0
- package/scaffold/general/skills/adr-skill/scripts/bootstrap_adr.js +259 -0
- package/scaffold/general/skills/adr-skill/scripts/new_adr.js +391 -0
- package/scaffold/general/skills/adr-skill/scripts/set_adr_status.js +169 -0
- package/scaffold/general/skills/aikit/SKILL.md +521 -0
- package/scaffold/general/skills/brainstorming/SKILL.md +259 -0
- package/scaffold/general/skills/brainstorming/scripts/frame-template.html +365 -0
- package/scaffold/general/skills/brainstorming/scripts/helper.js +216 -0
- package/scaffold/general/skills/brainstorming/scripts/server.cjs +9 -0
- package/scaffold/general/skills/brainstorming/scripts/server.src.cjs +249 -0
- package/scaffold/general/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/scaffold/general/skills/brainstorming/visual-companion.md +430 -0
- package/scaffold/general/skills/c4-architecture/SKILL.md +295 -0
- package/scaffold/general/skills/c4-architecture/references/advanced-patterns.md +552 -0
- package/scaffold/general/skills/c4-architecture/references/c4-syntax.md +492 -0
- package/scaffold/general/skills/c4-architecture/references/common-mistakes.md +437 -0
- package/scaffold/general/skills/lesson-learned/SKILL.md +105 -0
- package/scaffold/general/skills/lesson-learned/references/anti-patterns.md +55 -0
- package/scaffold/general/skills/lesson-learned/references/se-principles.md +109 -0
- package/scaffold/general/skills/multi-agents-development/SKILL.md +435 -0
- package/scaffold/general/skills/multi-agents-development/architecture-review-prompt.md +81 -0
- package/scaffold/general/skills/multi-agents-development/code-quality-review-prompt.md +91 -0
- package/scaffold/general/skills/multi-agents-development/implementer-prompt.md +93 -0
- package/scaffold/general/skills/multi-agents-development/parallel-dispatch-example.md +167 -0
- package/scaffold/general/skills/multi-agents-development/spec-review-prompt.md +81 -0
- package/scaffold/general/skills/present/SKILL.md +424 -0
- package/scaffold/general/skills/requirements-clarity/SKILL.md +324 -0
- package/scaffold/general/skills/session-handoff/SKILL.md +189 -0
- package/scaffold/general/skills/session-handoff/references/handoff-template.md +139 -0
- package/scaffold/general/skills/session-handoff/references/resume-checklist.md +80 -0
- package/scaffold/general/skills/session-handoff/scripts/check_staleness.js +269 -0
- package/scaffold/general/skills/session-handoff/scripts/create_handoff.js +299 -0
- package/scaffold/general/skills/session-handoff/scripts/list_handoffs.js +113 -0
- package/scaffold/general/skills/session-handoff/scripts/validate_handoff.js +241 -0
- package/scaffold/generate.mjs +82 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Resume Checklist
|
|
2
|
+
|
|
3
|
+
Follow this checklist when resuming work from a handoff document to ensure zero-ambiguity continuation.
|
|
4
|
+
|
|
5
|
+
## Pre-Resume Verification
|
|
6
|
+
|
|
7
|
+
- [ ] Read the entire handoff document before taking any action
|
|
8
|
+
- [ ] Verify you are in the correct project directory
|
|
9
|
+
- [ ] Confirm the git branch matches (or understand why it might differ)
|
|
10
|
+
- [ ] Check the handoff timestamp - how stale is this context?
|
|
11
|
+
|
|
12
|
+
## Context Validation
|
|
13
|
+
|
|
14
|
+
- [ ] Review "Important Context" section thoroughly
|
|
15
|
+
- [ ] Understand all assumptions listed - are they still valid?
|
|
16
|
+
- [ ] Check if any blockers have been resolved since handoff
|
|
17
|
+
- [ ] Review "Potential Gotchas" to avoid known pitfalls
|
|
18
|
+
|
|
19
|
+
## State Verification
|
|
20
|
+
|
|
21
|
+
- [ ] Run `git status` to see current file state
|
|
22
|
+
- [ ] Compare modified files list in handoff vs current state
|
|
23
|
+
- [ ] Check if any environment variables need to be set
|
|
24
|
+
- [ ] Verify any required services/processes are running
|
|
25
|
+
|
|
26
|
+
## Resume Execution
|
|
27
|
+
|
|
28
|
+
- [ ] Start with "Immediate Next Steps" item #1
|
|
29
|
+
- [ ] Reference "Files Modified" table for context on recent changes
|
|
30
|
+
- [ ] Apply patterns documented in "Key Patterns Discovered"
|
|
31
|
+
- [ ] Follow architectural insights from "Architecture Overview"
|
|
32
|
+
|
|
33
|
+
## During Work
|
|
34
|
+
|
|
35
|
+
- [ ] Update handoff document if major new context is discovered
|
|
36
|
+
- [ ] Mark completed items in "Pending Work" as you finish them
|
|
37
|
+
- [ ] Add new blockers/questions as they arise
|
|
38
|
+
- [ ] Consider creating a new handoff if session becomes long
|
|
39
|
+
|
|
40
|
+
## Red Flags - Stop and Verify
|
|
41
|
+
|
|
42
|
+
If you encounter any of these, pause and verify context before proceeding:
|
|
43
|
+
|
|
44
|
+
1. **Files mentioned in handoff don't exist** - codebase may have changed significantly
|
|
45
|
+
2. **Branch has diverged substantially** - check git log for recent commits
|
|
46
|
+
3. **Assumptions are clearly invalid** - reassess the approach
|
|
47
|
+
4. **Blockers marked as unresolved are now blocking you** - escalate to user
|
|
48
|
+
5. **Architecture has changed** - re-explore before continuing
|
|
49
|
+
|
|
50
|
+
## Quick Start Commands
|
|
51
|
+
|
|
52
|
+
After reading the handoff, these commands help verify state:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Check current branch and status
|
|
56
|
+
git branch --show-current
|
|
57
|
+
git status
|
|
58
|
+
|
|
59
|
+
# See recent commits (compare with handoff)
|
|
60
|
+
git log --oneline -10
|
|
61
|
+
|
|
62
|
+
# Check for any running processes mentioned
|
|
63
|
+
ps aux | grep [process-name]
|
|
64
|
+
|
|
65
|
+
# Verify environment
|
|
66
|
+
env | grep [relevant-var]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Handoff Quality Assessment
|
|
70
|
+
|
|
71
|
+
Rate the handoff quality to identify if more exploration is needed:
|
|
72
|
+
|
|
73
|
+
| Aspect | Good | Needs Exploration |
|
|
74
|
+
|--------|------|-------------------|
|
|
75
|
+
| Next steps | Clear, actionable | Vague or missing |
|
|
76
|
+
| File references | Specific paths/lines | General descriptions |
|
|
77
|
+
| Decisions | Rationale included | Just outcomes |
|
|
78
|
+
| Context | Complete picture | Gaps or assumptions |
|
|
79
|
+
|
|
80
|
+
If multiple aspects "Need Exploration", spend time re-exploring the codebase before continuing implementation.
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Check staleness of a handoff document compared to current project state.
|
|
4
|
+
*
|
|
5
|
+
* Analyzes:
|
|
6
|
+
* - Time since handoff was created
|
|
7
|
+
* - Git commits since handoff
|
|
8
|
+
* - Files that changed since handoff
|
|
9
|
+
* - Branch divergence
|
|
10
|
+
* - Modified files status
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* node check_staleness.js <handoff-file>
|
|
14
|
+
* node check_staleness.js .handoffs/2024-01-15-143022-auth.md
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const fs = require('node:fs');
|
|
18
|
+
const path = require('node:path');
|
|
19
|
+
const { execSync } = require('node:child_process');
|
|
20
|
+
|
|
21
|
+
function _die(msg) {
|
|
22
|
+
process.stderr.write(`${msg}\n`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function runCmd(cmd, cwd) {
|
|
27
|
+
try {
|
|
28
|
+
return { ok: true, out: execSync(cmd, { cwd, timeout: 10_000, encoding: 'utf-8' }).trim() };
|
|
29
|
+
} catch {
|
|
30
|
+
return { ok: false, out: '' };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function parseHandoffMetadata(filepath) {
|
|
35
|
+
const content = fs.readFileSync(filepath, 'utf-8');
|
|
36
|
+
const meta = { created: null, branch: null, projectPath: null, modifiedFiles: [] };
|
|
37
|
+
|
|
38
|
+
const createdMatch = content.match(/Created:\s*(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})/);
|
|
39
|
+
if (createdMatch) meta.created = new Date(createdMatch[1].replace(' ', 'T'));
|
|
40
|
+
|
|
41
|
+
const branchMatch = content.match(/Branch:\s*(\S+)/);
|
|
42
|
+
if (branchMatch && !branchMatch[1].startsWith('[')) meta.branch = branchMatch[1];
|
|
43
|
+
|
|
44
|
+
const projMatch = content.match(/Project:\s*(.+?)(?:\n|$)/);
|
|
45
|
+
if (projMatch) meta.projectPath = projMatch[1].trim();
|
|
46
|
+
|
|
47
|
+
const fileMatches = content.matchAll(/\|\s*([a-zA-Z0-9_\-./]+\.[a-zA-Z]+)\s*\|/g);
|
|
48
|
+
for (const m of fileMatches) {
|
|
49
|
+
if (m[1].includes('/') && !m[1].startsWith('[')) meta.modifiedFiles.push(m[1]);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return meta;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function getCommitsSince(timestamp, cwd) {
|
|
56
|
+
if (!timestamp) return [];
|
|
57
|
+
const iso = timestamp.toISOString();
|
|
58
|
+
const { ok, out } = runCmd(`git log --since="${iso}" --oneline --no-decorate`, cwd);
|
|
59
|
+
return ok && out ? out.split('\n') : [];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function getChangedFilesSince(timestamp, cwd) {
|
|
63
|
+
if (!timestamp) return [];
|
|
64
|
+
const iso = timestamp.toISOString();
|
|
65
|
+
const { ok, out } = runCmd(`git log --since="${iso}" --name-only --pretty=format:`, cwd);
|
|
66
|
+
if (ok && out) {
|
|
67
|
+
return [
|
|
68
|
+
...new Set(
|
|
69
|
+
out
|
|
70
|
+
.split('\n')
|
|
71
|
+
.map((f) => f.trim())
|
|
72
|
+
.filter(Boolean),
|
|
73
|
+
),
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function checkFilesExist(files, cwd) {
|
|
80
|
+
const existing = [];
|
|
81
|
+
const missing = [];
|
|
82
|
+
for (const f of files) {
|
|
83
|
+
if (fs.existsSync(path.join(cwd, f))) existing.push(f);
|
|
84
|
+
else missing.push(f);
|
|
85
|
+
}
|
|
86
|
+
return { existing, missing };
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function calculateStaleness(daysOld, commitsSince, filesChanged, branchMatches, filesMissing) {
|
|
90
|
+
const issues = [];
|
|
91
|
+
let score = 0;
|
|
92
|
+
|
|
93
|
+
if (daysOld > 30) {
|
|
94
|
+
score += 3;
|
|
95
|
+
issues.push(`Handoff is ${Math.floor(daysOld)} days old`);
|
|
96
|
+
} else if (daysOld > 7) {
|
|
97
|
+
score += 2;
|
|
98
|
+
issues.push(`Handoff is ${Math.floor(daysOld)} days old`);
|
|
99
|
+
} else if (daysOld > 1) {
|
|
100
|
+
score += 1;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (commitsSince > 50) {
|
|
104
|
+
score += 3;
|
|
105
|
+
issues.push(`${commitsSince} commits since handoff - significant changes`);
|
|
106
|
+
} else if (commitsSince > 20) {
|
|
107
|
+
score += 2;
|
|
108
|
+
issues.push(`${commitsSince} commits since handoff`);
|
|
109
|
+
} else if (commitsSince > 5) {
|
|
110
|
+
score += 1;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (!branchMatches) {
|
|
114
|
+
score += 2;
|
|
115
|
+
issues.push('Current branch differs from handoff branch');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (filesMissing > 5) {
|
|
119
|
+
score += 2;
|
|
120
|
+
issues.push(`${filesMissing} referenced files no longer exist`);
|
|
121
|
+
} else if (filesMissing > 0) {
|
|
122
|
+
score += 1;
|
|
123
|
+
issues.push(`${filesMissing} referenced file(s) missing`);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (filesChanged > 20) {
|
|
127
|
+
score += 2;
|
|
128
|
+
issues.push(`${filesChanged} files changed since handoff`);
|
|
129
|
+
} else if (filesChanged > 5) {
|
|
130
|
+
score += 1;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
let level, recommendation;
|
|
134
|
+
if (score === 0) {
|
|
135
|
+
level = 'FRESH';
|
|
136
|
+
recommendation = 'Safe to resume - minimal changes since handoff';
|
|
137
|
+
} else if (score <= 2) {
|
|
138
|
+
level = 'SLIGHTLY_STALE';
|
|
139
|
+
recommendation = 'Generally safe to resume - review changes before continuing';
|
|
140
|
+
} else if (score <= 4) {
|
|
141
|
+
level = 'STALE';
|
|
142
|
+
recommendation = 'Proceed with caution - significant changes may affect context';
|
|
143
|
+
} else {
|
|
144
|
+
level = 'VERY_STALE';
|
|
145
|
+
recommendation = 'Consider creating new handoff - too many changes since original';
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return { level, recommendation, issues };
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function checkStaleness(handoffPath) {
|
|
152
|
+
if (!fs.existsSync(handoffPath)) return { error: `Handoff file not found: ${handoffPath}` };
|
|
153
|
+
|
|
154
|
+
const meta = parseHandoffMetadata(handoffPath);
|
|
155
|
+
const projectPath =
|
|
156
|
+
meta.projectPath && fs.existsSync(meta.projectPath)
|
|
157
|
+
? meta.projectPath
|
|
158
|
+
: path.resolve(path.dirname(handoffPath), '..'); // Up from .handoffs/
|
|
159
|
+
|
|
160
|
+
const isGitRepo = runCmd('git rev-parse --git-dir', projectPath).ok;
|
|
161
|
+
|
|
162
|
+
const result = {
|
|
163
|
+
handoffFile: handoffPath,
|
|
164
|
+
projectPath,
|
|
165
|
+
isGitRepo,
|
|
166
|
+
created: meta.created,
|
|
167
|
+
handoffBranch: meta.branch,
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
if (meta.created) {
|
|
171
|
+
const age = Date.now() - meta.created.getTime();
|
|
172
|
+
result.daysOld = age / 86_400_000;
|
|
173
|
+
result.hoursOld = age / 3_600_000;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (isGitRepo) {
|
|
177
|
+
const { out: currentBranch } = runCmd('git branch --show-current', projectPath);
|
|
178
|
+
result.currentBranch = currentBranch;
|
|
179
|
+
result.branchMatches = meta.branch ? currentBranch === meta.branch : true;
|
|
180
|
+
|
|
181
|
+
const commits = getCommitsSince(meta.created, projectPath);
|
|
182
|
+
result.commitsSince = commits.length;
|
|
183
|
+
result.recentCommits = commits.slice(0, 5);
|
|
184
|
+
|
|
185
|
+
const changedFiles = getChangedFilesSince(meta.created, projectPath);
|
|
186
|
+
result.filesChangedCount = changedFiles.length;
|
|
187
|
+
result.filesChanged = changedFiles.slice(0, 10);
|
|
188
|
+
|
|
189
|
+
const { existing, missing } = checkFilesExist(meta.modifiedFiles, projectPath);
|
|
190
|
+
result.referencedFilesExist = existing.length;
|
|
191
|
+
result.referencedFilesMissing = missing;
|
|
192
|
+
|
|
193
|
+
const { level, recommendation, issues } = calculateStaleness(
|
|
194
|
+
result.daysOld || 0,
|
|
195
|
+
result.commitsSince,
|
|
196
|
+
result.filesChangedCount,
|
|
197
|
+
result.branchMatches,
|
|
198
|
+
missing.length,
|
|
199
|
+
);
|
|
200
|
+
result.stalenessLevel = level;
|
|
201
|
+
result.recommendation = recommendation;
|
|
202
|
+
result.issues = issues;
|
|
203
|
+
} else {
|
|
204
|
+
result.stalenessLevel = 'UNKNOWN';
|
|
205
|
+
result.recommendation = 'Not a git repo - unable to detect changes';
|
|
206
|
+
result.issues = ['Project is not a git repository'];
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return result;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function printReport(result) {
|
|
213
|
+
if (result.error) {
|
|
214
|
+
console.log(`Error: ${result.error}`);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
console.log(`\n${'='.repeat(60)}`);
|
|
219
|
+
console.log('Handoff Staleness Report');
|
|
220
|
+
console.log('='.repeat(60));
|
|
221
|
+
console.log(`File: ${result.handoffFile}`);
|
|
222
|
+
console.log(`Project: ${result.projectPath}`);
|
|
223
|
+
|
|
224
|
+
if (result.created) {
|
|
225
|
+
console.log(`Created: ${result.created.toISOString().replace('T', ' ').slice(0, 19)}`);
|
|
226
|
+
if (result.daysOld != null) {
|
|
227
|
+
console.log(
|
|
228
|
+
result.daysOld < 1
|
|
229
|
+
? `Age: ${result.hoursOld.toFixed(1)} hours`
|
|
230
|
+
: `Age: ${result.daysOld.toFixed(1)} days`,
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
console.log(`\nStaleness: ${result.stalenessLevel}`);
|
|
236
|
+
console.log(`Recommendation: ${result.recommendation}`);
|
|
237
|
+
|
|
238
|
+
if (result.issues && result.issues.length > 0) {
|
|
239
|
+
console.log('\nIssues:');
|
|
240
|
+
for (const issue of result.issues) console.log(` - ${issue}`);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (result.isGitRepo) {
|
|
244
|
+
console.log(
|
|
245
|
+
`\nBranch: ${result.currentBranch || 'detached'}${result.branchMatches ? ' (matches handoff)' : ` (handoff: ${result.handoffBranch})`}`,
|
|
246
|
+
);
|
|
247
|
+
console.log(`Commits since handoff: ${result.commitsSince}`);
|
|
248
|
+
console.log(`Files changed since handoff: ${result.filesChangedCount}`);
|
|
249
|
+
if (result.referencedFilesMissing.length > 0) {
|
|
250
|
+
console.log(`Missing referenced files: ${result.referencedFilesMissing.join(', ')}`);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// --- Main ---
|
|
256
|
+
const args = process.argv.slice(2);
|
|
257
|
+
if (args.includes('--help') || args.includes('-h') || args.length === 0) {
|
|
258
|
+
console.log('Usage: node check_staleness.js <handoff-file>');
|
|
259
|
+
console.log(' node check_staleness.js .handoffs/2024-01-15-143022-auth.md');
|
|
260
|
+
process.exit(args.length === 0 ? 1 : 0);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (args.includes('--json')) {
|
|
264
|
+
const result = checkStaleness(args.find((a) => !a.startsWith('-')));
|
|
265
|
+
console.log(JSON.stringify(result, null, 2));
|
|
266
|
+
} else {
|
|
267
|
+
const result = checkStaleness(args[0]);
|
|
268
|
+
printReport(result);
|
|
269
|
+
}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Smart scaffold generator for handoff documents.
|
|
4
|
+
*
|
|
5
|
+
* Creates a new handoff document with auto-detected metadata:
|
|
6
|
+
* - Current timestamp
|
|
7
|
+
* - Project path
|
|
8
|
+
* - Git branch (if available)
|
|
9
|
+
* - Recent git log
|
|
10
|
+
* - Modified/staged files
|
|
11
|
+
* - Handoff chain linking
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* node create_handoff.js [task-slug]
|
|
15
|
+
* node create_handoff.js "implementing-auth"
|
|
16
|
+
* node create_handoff.js "auth-part-2" --continues-from 2024-01-15-auth.md
|
|
17
|
+
* node create_handoff.js # auto-generates slug from timestamp
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
const fs = require('node:fs');
|
|
21
|
+
const path = require('node:path');
|
|
22
|
+
const { execSync } = require('node:child_process');
|
|
23
|
+
|
|
24
|
+
function _die(msg) {
|
|
25
|
+
process.stderr.write(`${msg}\n`);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function runCmd(cmd, cwd) {
|
|
30
|
+
try {
|
|
31
|
+
return { ok: true, out: execSync(cmd, { cwd, timeout: 10_000, encoding: 'utf-8' }).trim() };
|
|
32
|
+
} catch {
|
|
33
|
+
return { ok: false, out: '' };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function getGitInfo(projectPath) {
|
|
38
|
+
const info = {
|
|
39
|
+
isGitRepo: false,
|
|
40
|
+
branch: null,
|
|
41
|
+
recentCommits: [],
|
|
42
|
+
modifiedFiles: [],
|
|
43
|
+
stagedFiles: [],
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
if (!runCmd('git rev-parse --git-dir', projectPath).ok) return info;
|
|
47
|
+
info.isGitRepo = true;
|
|
48
|
+
|
|
49
|
+
const { ok: bOk, out: branch } = runCmd('git branch --show-current', projectPath);
|
|
50
|
+
if (bOk && branch) info.branch = branch;
|
|
51
|
+
|
|
52
|
+
const { ok: lOk, out: log } = runCmd('git log --oneline -5 --no-decorate', projectPath);
|
|
53
|
+
if (lOk && log) info.recentCommits = log.split('\n');
|
|
54
|
+
|
|
55
|
+
const { ok: mOk, out: modified } = runCmd('git diff --name-only', projectPath);
|
|
56
|
+
if (mOk && modified) info.modifiedFiles = modified.split('\n');
|
|
57
|
+
|
|
58
|
+
const { ok: sOk, out: staged } = runCmd('git diff --name-only --cached', projectPath);
|
|
59
|
+
if (sOk && staged) info.stagedFiles = staged.split('\n');
|
|
60
|
+
|
|
61
|
+
return info;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function findPreviousHandoffs(projectPath) {
|
|
65
|
+
const dir = path.join(projectPath, '.handoffs');
|
|
66
|
+
if (!fs.existsSync(dir)) return [];
|
|
67
|
+
|
|
68
|
+
const handoffs = [];
|
|
69
|
+
for (const name of fs.readdirSync(dir)) {
|
|
70
|
+
if (!name.endsWith('.md')) continue;
|
|
71
|
+
const fp = path.join(dir, name);
|
|
72
|
+
|
|
73
|
+
let title = name;
|
|
74
|
+
try {
|
|
75
|
+
const content = fs.readFileSync(fp, 'utf-8');
|
|
76
|
+
const m = content.match(/^#\s+(?:Handoff:\s*)?(.+)$/m);
|
|
77
|
+
if (m) title = m[1].trim();
|
|
78
|
+
} catch {
|
|
79
|
+
/* ignore */
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
let date = null;
|
|
83
|
+
const dm = name.match(/^(\d{4}-\d{2}-\d{2})-(\d{6})/);
|
|
84
|
+
if (dm) {
|
|
85
|
+
try {
|
|
86
|
+
date = new Date(`${dm[1]}T${dm[2].slice(0, 2)}:${dm[2].slice(2, 4)}:${dm[2].slice(4, 6)}`);
|
|
87
|
+
} catch {
|
|
88
|
+
/* ignore */
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
handoffs.push({ filename: name, path: fp, title, date });
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
handoffs.sort((a, b) => (b.date || 0) - (a.date || 0));
|
|
96
|
+
return handoffs;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function getPreviousHandoffInfo(projectPath, continuesFrom) {
|
|
100
|
+
const handoffs = findPreviousHandoffs(projectPath);
|
|
101
|
+
|
|
102
|
+
if (continuesFrom) {
|
|
103
|
+
const found = handoffs.find((h) => h.filename.includes(continuesFrom));
|
|
104
|
+
return found
|
|
105
|
+
? { exists: true, filename: found.filename, title: found.title }
|
|
106
|
+
: { exists: false, filename: continuesFrom, title: 'Not found' };
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (handoffs.length > 0) {
|
|
110
|
+
return {
|
|
111
|
+
exists: true,
|
|
112
|
+
filename: handoffs[0].filename,
|
|
113
|
+
title: handoffs[0].title,
|
|
114
|
+
suggested: true,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return { exists: false };
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function sanitizeSlug(slug) {
|
|
122
|
+
return slug
|
|
123
|
+
.toLowerCase()
|
|
124
|
+
.replace(/[\s_]/g, '-')
|
|
125
|
+
.replace(/[^a-z0-9-]/g, '');
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function generateHandoff(projectPath, slug, continuesFrom) {
|
|
129
|
+
const now = new Date();
|
|
130
|
+
const timestamp = now.toISOString().replace('T', ' ').slice(0, 19);
|
|
131
|
+
const fileTs = `${now.toISOString().slice(0, 10)}-${String(now.getHours()).padStart(2, '0')}${String(now.getMinutes()).padStart(2, '0')}${String(now.getSeconds()).padStart(2, '0')}`;
|
|
132
|
+
|
|
133
|
+
if (!slug) slug = 'handoff';
|
|
134
|
+
slug = sanitizeSlug(slug);
|
|
135
|
+
const filename = `${fileTs}-${slug}.md`;
|
|
136
|
+
|
|
137
|
+
const handoffsDir = path.join(projectPath, '.handoffs');
|
|
138
|
+
fs.mkdirSync(handoffsDir, { recursive: true });
|
|
139
|
+
const filepath = path.join(handoffsDir, filename);
|
|
140
|
+
|
|
141
|
+
const git = getGitInfo(projectPath);
|
|
142
|
+
const prev = getPreviousHandoffInfo(projectPath, continuesFrom);
|
|
143
|
+
|
|
144
|
+
const branchLine = git.branch || '[not a git repo or detached HEAD]';
|
|
145
|
+
|
|
146
|
+
const commitsSection =
|
|
147
|
+
git.recentCommits.length > 0
|
|
148
|
+
? git.recentCommits.map((c) => ` - ${c}`).join('\n')
|
|
149
|
+
: ' - [no recent commits or not a git repo]';
|
|
150
|
+
|
|
151
|
+
const allModified = [...new Set([...git.modifiedFiles, ...git.stagedFiles])];
|
|
152
|
+
let modifiedSection;
|
|
153
|
+
if (allModified.length > 0) {
|
|
154
|
+
modifiedSection = allModified
|
|
155
|
+
.slice(0, 10)
|
|
156
|
+
.map((f) => `| ${f} | [describe changes] | [why changed] |`)
|
|
157
|
+
.join('\n');
|
|
158
|
+
if (allModified.length > 10)
|
|
159
|
+
modifiedSection += `\n| ... and ${allModified.length - 10} more files | | |`;
|
|
160
|
+
} else {
|
|
161
|
+
modifiedSection = '| [no modified files detected] | | |';
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
let chainSection;
|
|
165
|
+
if (prev.exists) {
|
|
166
|
+
chainSection = `## Handoff Chain
|
|
167
|
+
|
|
168
|
+
- **Continues from**: [${prev.filename}](./${prev.filename})
|
|
169
|
+
- Previous title: ${prev.title || 'Unknown'}
|
|
170
|
+
- **Supersedes**: [list any older handoffs this replaces, or "None"]
|
|
171
|
+
|
|
172
|
+
> Review the previous handoff for full context before filling this one.`;
|
|
173
|
+
} else {
|
|
174
|
+
chainSection = `## Handoff Chain
|
|
175
|
+
|
|
176
|
+
- **Continues from**: None (fresh start)
|
|
177
|
+
- **Supersedes**: None
|
|
178
|
+
|
|
179
|
+
> This is the first handoff for this task.`;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const content = `# Handoff: [TASK_TITLE - replace this]
|
|
183
|
+
|
|
184
|
+
## Session Metadata
|
|
185
|
+
- Created: ${timestamp}
|
|
186
|
+
- Project: ${projectPath}
|
|
187
|
+
- Branch: ${branchLine}
|
|
188
|
+
- Session duration: [estimate how long you worked]
|
|
189
|
+
|
|
190
|
+
### Recent Commits (for context)
|
|
191
|
+
${commitsSection}
|
|
192
|
+
|
|
193
|
+
${chainSection}
|
|
194
|
+
|
|
195
|
+
## Current State Summary
|
|
196
|
+
|
|
197
|
+
[TODO: Write one paragraph describing what was being worked on, current status, and where things left off]
|
|
198
|
+
|
|
199
|
+
## Codebase Understanding
|
|
200
|
+
|
|
201
|
+
### Architecture Overview
|
|
202
|
+
|
|
203
|
+
[TODO: Document key architectural insights discovered during this session]
|
|
204
|
+
|
|
205
|
+
### Critical Files
|
|
206
|
+
|
|
207
|
+
| File | Purpose | Relevance |
|
|
208
|
+
|------|---------|-----------|
|
|
209
|
+
| [TODO: Add critical files] | | |
|
|
210
|
+
|
|
211
|
+
### Key Patterns Discovered
|
|
212
|
+
|
|
213
|
+
[TODO: Document important patterns, conventions, or idioms found in this codebase]
|
|
214
|
+
|
|
215
|
+
## Work Completed
|
|
216
|
+
|
|
217
|
+
### Tasks Finished
|
|
218
|
+
|
|
219
|
+
- [ ] [TODO: List completed tasks]
|
|
220
|
+
|
|
221
|
+
### Files Modified
|
|
222
|
+
|
|
223
|
+
| File | Changes | Rationale |
|
|
224
|
+
|------|---------|-----------|
|
|
225
|
+
${modifiedSection}
|
|
226
|
+
|
|
227
|
+
### Decisions Made
|
|
228
|
+
|
|
229
|
+
| Decision | Options Considered | Rationale |
|
|
230
|
+
|----------|-------------------|-----------|
|
|
231
|
+
| [TODO: Document key decisions] | | |
|
|
232
|
+
|
|
233
|
+
## Pending Work
|
|
234
|
+
|
|
235
|
+
### Immediate Next Steps
|
|
236
|
+
|
|
237
|
+
1. [TODO: Most critical next action]
|
|
238
|
+
2. [TODO: Second priority]
|
|
239
|
+
3. [TODO: Third priority]
|
|
240
|
+
|
|
241
|
+
### Blockers/Open Questions
|
|
242
|
+
|
|
243
|
+
- [ ] [TODO: List blockers or open questions]
|
|
244
|
+
|
|
245
|
+
### Deferred Items
|
|
246
|
+
|
|
247
|
+
- [TODO: Items deferred and why]
|
|
248
|
+
|
|
249
|
+
## Context for Resuming Agent
|
|
250
|
+
|
|
251
|
+
### Important Context
|
|
252
|
+
|
|
253
|
+
[TODO: Critical information the next agent MUST know]
|
|
254
|
+
|
|
255
|
+
### Assumptions Made
|
|
256
|
+
|
|
257
|
+
[TODO: List assumptions that might not be obvious]
|
|
258
|
+
|
|
259
|
+
### Potential Gotchas
|
|
260
|
+
|
|
261
|
+
[TODO: Things that could trip up the next agent]
|
|
262
|
+
|
|
263
|
+
## Environment State
|
|
264
|
+
|
|
265
|
+
[TODO: Required env vars, running processes, DB state]
|
|
266
|
+
|
|
267
|
+
## Related Resources
|
|
268
|
+
|
|
269
|
+
[TODO: Links to docs, PRs, issues, Slack threads]
|
|
270
|
+
`;
|
|
271
|
+
|
|
272
|
+
fs.writeFileSync(filepath, content, 'utf-8');
|
|
273
|
+
return { filepath, filename };
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// --- Main ---
|
|
277
|
+
const args = process.argv.slice(2);
|
|
278
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
279
|
+
console.log('Usage: node create_handoff.js [task-slug] [--continues-from <previous>]');
|
|
280
|
+
console.log(' node create_handoff.js "implementing-auth"');
|
|
281
|
+
console.log(' node create_handoff.js "auth-part-2" --continues-from 2024-01-15-auth.md');
|
|
282
|
+
process.exit(0);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
let slug = null;
|
|
286
|
+
let continuesFrom = null;
|
|
287
|
+
for (let i = 0; i < args.length; i++) {
|
|
288
|
+
if (args[i] === '--continues-from' && i + 1 < args.length) {
|
|
289
|
+
continuesFrom = args[++i];
|
|
290
|
+
} else if (!args[i].startsWith('-')) {
|
|
291
|
+
slug = args[i];
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const cwd = process.cwd();
|
|
296
|
+
const { filepath } = generateHandoff(cwd, slug, continuesFrom);
|
|
297
|
+
console.log(`Created handoff: ${filepath}`);
|
|
298
|
+
console.log(`\nNext: Open the file and fill in all [TODO: ...] sections.`);
|
|
299
|
+
console.log(`Then validate: node scripts/validate_handoff.js ${filepath}`);
|