@specship/specship-darwin-arm64 0.28.0 → 0.30.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/bin/specship +1 -1
- package/lib/dist/.claude-plugin/plugin.json +15 -3
- package/lib/dist/activation/cheatsheet.d.ts +10 -7
- package/lib/dist/activation/cheatsheet.d.ts.map +1 -1
- package/lib/dist/activation/cheatsheet.js +21 -5
- package/lib/dist/activation/cheatsheet.js.map +1 -1
- package/lib/dist/activation/hook-output.d.ts +75 -2
- package/lib/dist/activation/hook-output.d.ts.map +1 -1
- package/lib/dist/activation/hook-output.js +114 -3
- package/lib/dist/activation/hook-output.js.map +1 -1
- package/lib/dist/activation/search-intercept.d.ts +20 -7
- package/lib/dist/activation/search-intercept.d.ts.map +1 -1
- package/lib/dist/activation/search-intercept.js +27 -5
- package/lib/dist/activation/search-intercept.js.map +1 -1
- package/lib/dist/activation/steering.d.ts +7 -4
- package/lib/dist/activation/steering.d.ts.map +1 -1
- package/lib/dist/activation/steering.js +10 -8
- package/lib/dist/activation/steering.js.map +1 -1
- package/lib/dist/agents/detect.d.ts +32 -0
- package/lib/dist/agents/detect.d.ts.map +1 -0
- package/lib/dist/agents/detect.js +54 -0
- package/lib/dist/agents/detect.js.map +1 -0
- package/lib/dist/agents/recent-project.d.ts +18 -0
- package/lib/dist/agents/recent-project.d.ts.map +1 -0
- package/lib/dist/agents/recent-project.js +92 -0
- package/lib/dist/agents/recent-project.js.map +1 -0
- package/lib/dist/analytics/canonical-tools.d.ts +23 -0
- package/lib/dist/analytics/canonical-tools.d.ts.map +1 -0
- package/lib/dist/analytics/canonical-tools.js +36 -0
- package/lib/dist/analytics/canonical-tools.js.map +1 -0
- package/lib/dist/analytics/canonical-tools.json +16 -0
- package/lib/dist/analytics/specship-impact.d.ts +3 -2
- package/lib/dist/analytics/specship-impact.d.ts.map +1 -1
- package/lib/dist/analytics/specship-impact.js +6 -4
- package/lib/dist/analytics/specship-impact.js.map +1 -1
- package/lib/dist/bin/specship.js +252 -170
- package/lib/dist/bin/specship.js.map +1 -1
- package/lib/dist/bin/uninstall.js +2 -2
- package/lib/dist/bin/uninstall.js.map +1 -1
- package/lib/dist/claudemd/audit.d.ts +12 -3
- package/lib/dist/claudemd/audit.d.ts.map +1 -1
- package/lib/dist/claudemd/audit.js +65 -22
- package/lib/dist/claudemd/audit.js.map +1 -1
- package/lib/dist/commands/specship/spec.md +16 -1
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +18 -4
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/schema.sql +8 -0
- package/lib/dist/db/spec-queries.d.ts +13 -1
- package/lib/dist/db/spec-queries.d.ts.map +1 -1
- package/lib/dist/db/spec-queries.js +21 -0
- package/lib/dist/db/spec-queries.js.map +1 -1
- package/lib/dist/design-md/check.d.ts +51 -0
- package/lib/dist/design-md/check.d.ts.map +1 -0
- package/lib/dist/design-md/check.js +335 -0
- package/lib/dist/design-md/check.js.map +1 -0
- package/lib/dist/design-md/css.d.ts +40 -0
- package/lib/dist/design-md/css.d.ts.map +1 -0
- package/lib/dist/design-md/css.js +224 -0
- package/lib/dist/design-md/css.js.map +1 -0
- package/lib/dist/design-md/extract.d.ts +84 -0
- package/lib/dist/design-md/extract.d.ts.map +1 -0
- package/lib/dist/design-md/extract.js +595 -0
- package/lib/dist/design-md/extract.js.map +1 -0
- package/lib/dist/design-md/maintain.d.ts +45 -0
- package/lib/dist/design-md/maintain.d.ts.map +1 -0
- package/lib/dist/design-md/maintain.js +127 -0
- package/lib/dist/design-md/maintain.js.map +1 -0
- package/lib/dist/design-md/render.d.ts +28 -0
- package/lib/dist/design-md/render.d.ts.map +1 -0
- package/lib/dist/design-md/render.js +178 -0
- package/lib/dist/design-md/render.js.map +1 -0
- package/lib/dist/design-md/upkeep.d.ts +48 -0
- package/lib/dist/design-md/upkeep.d.ts.map +1 -0
- package/lib/dist/design-md/upkeep.js +169 -0
- package/lib/dist/design-md/upkeep.js.map +1 -0
- package/lib/dist/design-md/verify.d.ts +65 -0
- package/lib/dist/design-md/verify.d.ts.map +1 -0
- package/lib/dist/design-md/verify.js +311 -0
- package/lib/dist/design-md/verify.js.map +1 -0
- package/lib/dist/enforce/changed-files.d.ts +7 -0
- package/lib/dist/enforce/changed-files.d.ts.map +1 -1
- package/lib/dist/enforce/changed-files.js +17 -0
- package/lib/dist/enforce/changed-files.js.map +1 -1
- package/lib/dist/enforce/enforce.d.ts +35 -1
- package/lib/dist/enforce/enforce.d.ts.map +1 -1
- package/lib/dist/enforce/enforce.js +66 -2
- package/lib/dist/enforce/enforce.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +50 -4
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +105 -13
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/parse-warnings.d.ts +16 -0
- package/lib/dist/extraction/parse-warnings.d.ts.map +1 -0
- package/lib/dist/extraction/parse-warnings.js +30 -0
- package/lib/dist/extraction/parse-warnings.js.map +1 -0
- package/lib/dist/extraction/tree-sitter.d.ts +27 -0
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +168 -1
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/health/smoke-check.js +1 -1
- package/lib/dist/health/smoke-check.js.map +1 -1
- package/lib/dist/hooks/hooks.json +16 -1
- package/lib/dist/index.d.ts +63 -3
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +235 -9
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/agent-record.d.ts +80 -0
- package/lib/dist/installer/agent-record.d.ts.map +1 -0
- package/lib/dist/installer/agent-record.js +351 -0
- package/lib/dist/installer/agent-record.js.map +1 -0
- package/lib/dist/installer/auto-migrate.d.ts +56 -0
- package/lib/dist/installer/auto-migrate.d.ts.map +1 -0
- package/lib/dist/installer/auto-migrate.js +328 -0
- package/lib/dist/installer/auto-migrate.js.map +1 -0
- package/lib/dist/installer/index.d.ts +37 -8
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +156 -46
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/install-defaults.d.ts +4 -3
- package/lib/dist/installer/install-defaults.d.ts.map +1 -1
- package/lib/dist/installer/install-defaults.js +6 -5
- package/lib/dist/installer/install-defaults.js.map +1 -1
- package/lib/dist/installer/{config-writer.d.ts → targets/claude-config-writer.d.ts} +1 -1
- package/lib/dist/installer/targets/claude-config-writer.d.ts.map +1 -0
- package/lib/dist/installer/{config-writer.js → targets/claude-config-writer.js} +7 -6
- package/lib/dist/installer/targets/claude-config-writer.js.map +1 -0
- package/lib/dist/installer/targets/claude-projects.d.ts +9 -0
- package/lib/dist/installer/targets/claude-projects.d.ts.map +1 -0
- package/lib/dist/installer/targets/claude-projects.js +151 -0
- package/lib/dist/installer/targets/claude-projects.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts +29 -2
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +44 -20
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/feature-parity.d.ts +28 -0
- package/lib/dist/installer/targets/feature-parity.d.ts.map +1 -0
- package/lib/dist/installer/targets/feature-parity.js +32 -0
- package/lib/dist/installer/targets/feature-parity.js.map +1 -0
- package/lib/dist/installer/{gemini-commands.d.ts → targets/gemini-commands.d.ts} +7 -3
- package/lib/dist/installer/targets/gemini-commands.d.ts.map +1 -0
- package/lib/dist/installer/{gemini-commands.js → targets/gemini-commands.js} +37 -9
- package/lib/dist/installer/targets/gemini-commands.js.map +1 -0
- package/lib/dist/installer/targets/gemini-projects.d.ts +11 -0
- package/lib/dist/installer/targets/gemini-projects.d.ts.map +1 -0
- package/lib/dist/installer/targets/gemini-projects.js +84 -0
- package/lib/dist/installer/targets/gemini-projects.js.map +1 -0
- package/lib/dist/installer/targets/gemini.d.ts +94 -8
- package/lib/dist/installer/targets/gemini.d.ts.map +1 -1
- package/lib/dist/installer/targets/gemini.js +392 -33
- package/lib/dist/installer/targets/gemini.js.map +1 -1
- package/lib/dist/installer/targets/registry.d.ts +8 -1
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +14 -5
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +44 -1
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +130 -3
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +23 -1
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/jira/auto-publish.d.ts +22 -2
- package/lib/dist/jira/auto-publish.d.ts.map +1 -1
- package/lib/dist/jira/auto-publish.js +54 -9
- package/lib/dist/jira/auto-publish.js.map +1 -1
- package/lib/dist/jira/board-first.d.ts +15 -2
- package/lib/dist/jira/board-first.d.ts.map +1 -1
- package/lib/dist/jira/board-first.js +16 -0
- package/lib/dist/jira/board-first.js.map +1 -1
- package/lib/dist/jira/ci-publish.d.ts +72 -0
- package/lib/dist/jira/ci-publish.d.ts.map +1 -0
- package/lib/dist/jira/ci-publish.js +162 -0
- package/lib/dist/jira/ci-publish.js.map +1 -0
- package/lib/dist/jira/publish.d.ts +23 -0
- package/lib/dist/jira/publish.d.ts.map +1 -1
- package/lib/dist/jira/publish.js +0 -0
- package/lib/dist/jira/publish.js.map +1 -1
- package/lib/dist/jira/regression-pack.d.ts.map +1 -1
- package/lib/dist/jira/regression-pack.js +7 -1
- package/lib/dist/jira/regression-pack.js.map +1 -1
- package/lib/dist/jira/repo-config.d.ts.map +1 -1
- package/lib/dist/jira/repo-config.js +8 -0
- package/lib/dist/jira/repo-config.js.map +1 -1
- package/lib/dist/jira/types.d.ts +8 -0
- package/lib/dist/jira/types.d.ts.map +1 -1
- package/lib/dist/jira/types.js.map +1 -1
- package/lib/dist/knowledge/enforce.d.ts.map +1 -1
- package/lib/dist/knowledge/enforce.js +6 -1
- package/lib/dist/knowledge/enforce.js.map +1 -1
- package/lib/dist/mcp/jira-tools.d.ts +5 -0
- package/lib/dist/mcp/jira-tools.d.ts.map +1 -1
- package/lib/dist/mcp/jira-tools.js +59 -4
- package/lib/dist/mcp/jira-tools.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +2 -1
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +16 -10
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +69 -20
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +11 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +43 -1
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +8 -0
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/reflect/apply.d.ts +2 -2
- package/lib/dist/reflect/apply.d.ts.map +1 -1
- package/lib/dist/reflect/apply.js +6 -5
- package/lib/dist/reflect/apply.js.map +1 -1
- package/lib/dist/reflect/miner.d.ts.map +1 -1
- package/lib/dist/reflect/miner.js +28 -15
- package/lib/dist/reflect/miner.js.map +1 -1
- package/lib/dist/reflect/session-outcomes.d.ts.map +1 -1
- package/lib/dist/reflect/session-outcomes.js +8 -3
- package/lib/dist/reflect/session-outcomes.js.map +1 -1
- package/lib/dist/reflect/targets.d.ts.map +1 -1
- package/lib/dist/reflect/targets.js +25 -5
- package/lib/dist/reflect/targets.js.map +1 -1
- package/lib/dist/reflect/types.d.ts +7 -0
- package/lib/dist/reflect/types.d.ts.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.d.ts +14 -2
- package/lib/dist/resolution/spec-link-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.js +13 -3
- package/lib/dist/resolution/spec-link-resolver.js.map +1 -1
- package/lib/dist/server/canonical-tools.js +50 -0
- package/lib/dist/server/cli.js +2 -2
- package/lib/dist/server/host-profiles.js +39 -0
- package/lib/dist/server/ingest/index.js +2 -1
- package/lib/dist/server/ingest/ingestor.js +195 -76
- package/lib/dist/server/ingest/project-paths.js +8 -2
- package/lib/dist/server/ingest/recorded-projects.js +43 -0
- package/lib/dist/server/ingest/specship-classify.js +7 -2
- package/lib/dist/server/ingest/transcripts/claude-jsonl.js +54 -0
- package/lib/dist/server/ingest/transcripts/claude.js +64 -0
- package/lib/dist/server/ingest/transcripts/gemini.js +469 -0
- package/lib/dist/server/ingest/transcripts/index.js +14 -0
- package/lib/dist/server/ingest/{parser.js → transcripts/shared.js} +3 -49
- package/lib/dist/server/ingest/transcripts/types.js +4 -0
- package/lib/dist/server/ingest/watcher.js +31 -30
- package/lib/dist/server/routes/claude.js +27 -10
- package/lib/dist/server/routes/graph.js +64 -3
- package/lib/dist/server/routes/mcp.js +57 -15
- package/lib/dist/server/routes/memory.js +54 -35
- package/lib/dist/server/routes/projects.js +78 -7
- package/lib/dist/server/routes/spec.js +125 -0
- package/lib/dist/server/server.js +8 -2
- package/lib/dist/skills/design-md/SKILL.md +172 -0
- package/lib/dist/skills/design-md/references/authored-sections.md +90 -0
- package/lib/dist/skills/design-md/references/sources.md +71 -0
- package/lib/dist/skills/spec-author/SKILL.md +1 -1
- package/lib/dist/skills/spec-author/references/gap-questions.md +1 -1
- package/lib/dist/spec-lint/lint.d.ts +26 -1
- package/lib/dist/spec-lint/lint.d.ts.map +1 -1
- package/lib/dist/spec-lint/lint.js +96 -7
- package/lib/dist/spec-lint/lint.js.map +1 -1
- package/lib/dist/spec-quality/postcheck.d.ts +7 -1
- package/lib/dist/spec-quality/postcheck.d.ts.map +1 -1
- package/lib/dist/spec-quality/postcheck.js +31 -0
- package/lib/dist/spec-quality/postcheck.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +48 -0
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +109 -0
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/ui/assets/bricolage-latin-C23fTOVi.woff2 +0 -0
- package/lib/dist/ui/assets/bricolage-latin-ext-B82pxkPf.woff2 +0 -0
- package/lib/dist/ui/assets/index-54vorjyq.css +1 -0
- package/lib/dist/ui/assets/index-BZQonCVb.js +52 -0
- package/lib/dist/ui/assets/space-grotesk-latin-DPT1xrvW.woff2 +0 -0
- package/lib/dist/ui/assets/space-grotesk-latin-ext-wJGaI8U0.woff2 +0 -0
- package/lib/dist/ui/index.html +2 -2
- package/lib/dist/update/updater.d.ts +6 -0
- package/lib/dist/update/updater.d.ts.map +1 -1
- package/lib/dist/update/updater.js +13 -1
- package/lib/dist/update/updater.js.map +1 -1
- package/lib/dist/workflows/agents/claude.d.ts +9 -0
- package/lib/dist/workflows/agents/claude.d.ts.map +1 -1
- package/lib/dist/workflows/agents/claude.js +22 -3
- package/lib/dist/workflows/agents/claude.js.map +1 -1
- package/lib/dist/workflows/agents/gemini-version.d.ts +18 -0
- package/lib/dist/workflows/agents/gemini-version.d.ts.map +1 -0
- package/lib/dist/workflows/agents/gemini-version.js +81 -0
- package/lib/dist/workflows/agents/gemini-version.js.map +1 -0
- package/lib/dist/workflows/agents/gemini.d.ts +1 -1
- package/lib/dist/workflows/agents/gemini.d.ts.map +1 -1
- package/lib/dist/workflows/agents/gemini.js +12 -2
- package/lib/dist/workflows/agents/gemini.js.map +1 -1
- package/lib/dist/workflows/agents/index.d.ts +2 -0
- package/lib/dist/workflows/agents/index.d.ts.map +1 -1
- package/lib/dist/workflows/agents/index.js +5 -0
- package/lib/dist/workflows/agents/index.js.map +1 -1
- package/lib/dist/workflows/agents/types.d.ts +13 -0
- package/lib/dist/workflows/agents/types.d.ts.map +1 -1
- package/lib/dist/workflows/agents/types.js.map +1 -1
- package/lib/dist/workflows/condition-evaluator.d.ts +8 -0
- package/lib/dist/workflows/condition-evaluator.d.ts.map +1 -1
- package/lib/dist/workflows/condition-evaluator.js +7 -0
- package/lib/dist/workflows/condition-evaluator.js.map +1 -1
- package/lib/dist/workflows/defaults/claude-design-implement.yaml +44 -15
- package/lib/dist/workflows/defaults/spec-author.yaml +9 -9
- package/lib/dist/workflows/defaults/spec-fix.yaml +8 -8
- package/lib/dist/workflows/defaults/spec-implement.yaml +54 -23
- package/lib/dist/workflows/defaults/spec-relink.yaml +5 -5
- package/lib/dist/workflows/defaults/spec-verify.yaml +3 -3
- package/lib/dist/workflows/executor.d.ts +7 -0
- package/lib/dist/workflows/executor.d.ts.map +1 -1
- package/lib/dist/workflows/executor.js +22 -5
- package/lib/dist/workflows/executor.js.map +1 -1
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +3 -2
- package/package.json +1 -1
- package/lib/dist/installer/config-writer.d.ts.map +0 -1
- package/lib/dist/installer/config-writer.js.map +0 -1
- package/lib/dist/installer/gemini-commands.d.ts.map +0 -1
- package/lib/dist/installer/gemini-commands.js.map +0 -1
- package/lib/dist/ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/lib/dist/ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/lib/dist/ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/lib/dist/ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/lib/dist/ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/lib/dist/ui/assets/index-BzuUWUAE.js +0 -50
- package/lib/dist/ui/assets/index-ezwX2EfG.css +0 -1
|
@@ -53,7 +53,9 @@ systemPromptAppend: |
|
|
|
53
53
|
|
|
54
54
|
The fidelity principle: never paraphrase or summarise design content
|
|
55
55
|
when capturing it. The snapshot HTML and tokens.css are the
|
|
56
|
-
zero-loss reference layer
|
|
56
|
+
zero-loss reference layer, and design.md states every value from them
|
|
57
|
+
verbatim in a fixed layout (written by `specship design extract`, never
|
|
58
|
+
transcribed by hand); the spec captures contract only (behaviour,
|
|
57
59
|
accessibility, responsive, interaction states, data shape).
|
|
58
60
|
|
|
59
61
|
There are two import shapes — exactly one source input is non-empty:
|
|
@@ -73,11 +75,12 @@ nodes:
|
|
|
73
75
|
allowed_tools:
|
|
74
76
|
- Read
|
|
75
77
|
- Write
|
|
78
|
+
- Edit
|
|
76
79
|
- Bash
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
80
|
+
- specship_explore
|
|
81
|
+
- specship_search
|
|
82
|
+
- designer_snapshot
|
|
83
|
+
- designer_handoff
|
|
81
84
|
prompt: |
|
|
82
85
|
File label: $INPUT.FILE_LABEL
|
|
83
86
|
Slug: $INPUT.SLUG
|
|
@@ -128,7 +131,7 @@ nodes:
|
|
|
128
131
|
── BRANCH B — Source URL is set (live fetch) ──
|
|
129
132
|
|
|
130
133
|
B1. Fetch the design content from $INPUT.CONNECTOR_URL. Try in order:
|
|
131
|
-
a. The `designer` MCP — `
|
|
134
|
+
a. The `designer` MCP — its `designer_snapshot` tool
|
|
132
135
|
(reads the real rendered HTML over CDP from inside the
|
|
133
136
|
cross-origin preview iframe). This is the only path that
|
|
134
137
|
reliably returns the real design for a claude.ai/design URL.
|
|
@@ -160,7 +163,29 @@ nodes:
|
|
|
160
163
|
|
|
161
164
|
── BOTH BRANCHES ──
|
|
162
165
|
|
|
163
|
-
4.
|
|
166
|
+
4. Write the pixel-exact design reference (DESIGNMD-DOC). The values
|
|
167
|
+
come from the extractor, never from you:
|
|
168
|
+
|
|
169
|
+
specship design extract specs/$INPUT.SLUG/snapshot.html \
|
|
170
|
+
--out specs/$INPUT.SLUG/design.md --title "$INPUT.FILE_LABEL"
|
|
171
|
+
|
|
172
|
+
(If design.md already exists from an earlier import, use
|
|
173
|
+
`--update specs/$INPUT.SLUG/design.md` instead of `--out`.)
|
|
174
|
+
If the generated block reports a "Missing linked stylesheet",
|
|
175
|
+
copy that file next to the snapshot and re-run with `--update`.
|
|
176
|
+
Then fill design.md's authored sections — Screens & layout,
|
|
177
|
+
Components & states, Interactions & motion, Responsive behaviour,
|
|
178
|
+
Assets — following the design-md skill
|
|
179
|
+
($AGENT_SKILLS_DIR/design-md/SKILL.md and its
|
|
180
|
+
references/authored-sections.md): every value copied verbatim
|
|
181
|
+
from the generated block with its selector, every styled state
|
|
182
|
+
listed, no approximate wording. Run
|
|
183
|
+
|
|
184
|
+
specship design check specs/$INPUT.SLUG/design.md
|
|
185
|
+
|
|
186
|
+
and fix findings until it passes.
|
|
187
|
+
|
|
188
|
+
5. Extract CSS custom properties + literal token-like values
|
|
164
189
|
(colors, spacing, font sizes, radii, transitions) from the
|
|
165
190
|
snapshot to `specs/$INPUT.SLUG/tokens.css`. Use
|
|
166
191
|
`specship_explore` first to find the project's existing token
|
|
@@ -175,6 +200,7 @@ nodes:
|
|
|
175
200
|
- Any visible interaction or state cues in the CSS (`:hover`,
|
|
176
201
|
`:focus`, `:disabled`, `[aria-*]` selectors) the spec
|
|
177
202
|
author should be aware of.
|
|
203
|
+
- Whether `specship design check` passes on design.md.
|
|
178
204
|
- For Branch A: note that source.md carries the verbatim decision
|
|
179
205
|
record — the draft step should mine it for stated behaviour.
|
|
180
206
|
|
|
@@ -184,18 +210,19 @@ nodes:
|
|
|
184
210
|
output_type: spec_markdown
|
|
185
211
|
allowed_tools:
|
|
186
212
|
- Read
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
213
|
+
- specship_explore
|
|
214
|
+
- specship_search
|
|
215
|
+
- specship_node
|
|
216
|
+
- specship_spec
|
|
191
217
|
prompt: |
|
|
192
|
-
Use the spec-author skill (
|
|
218
|
+
Use the spec-author skill ($AGENT_SKILLS_DIR/spec-author/SKILL.md
|
|
193
219
|
and its references/) to draft a SpecShip-compatible spec for the
|
|
194
220
|
Claude Design import. Inputs available on disk:
|
|
195
221
|
|
|
196
222
|
- specs/$INPUT.SLUG/snapshot.html (visual + structural source)
|
|
197
223
|
- specs/$INPUT.SLUG/tokens.css (design tokens)
|
|
198
224
|
- specs/$INPUT.SLUG/source.md (audit record)
|
|
225
|
+
- specs/$INPUT.SLUG/design.md (pixel-exact design reference)
|
|
199
226
|
|
|
200
227
|
Spec scope: $INPUT.FILE_LABEL component(s).
|
|
201
228
|
Optional inputs: owner=$INPUT.OWNER priority=$INPUT.PRIORITY
|
|
@@ -236,6 +263,7 @@ nodes:
|
|
|
236
263
|
source: specs/<SLUG>/source.md
|
|
237
264
|
snapshot: specs/<SLUG>/snapshot.html
|
|
238
265
|
tokens: specs/<SLUG>/tokens.css
|
|
266
|
+
design: specs/<SLUG>/design.md
|
|
239
267
|
---
|
|
240
268
|
```
|
|
241
269
|
|
|
@@ -322,14 +350,15 @@ nodes:
|
|
|
322
350
|
1. The path of the spec file: `specs/$INPUT.SLUG.md`.
|
|
323
351
|
2. The full list of REQ IDs the spec defines, one per line.
|
|
324
352
|
3. The reference files the implementation phase should read:
|
|
353
|
+
- specs/$INPUT.SLUG/design.md (read first: every value verbatim)
|
|
325
354
|
- specs/$INPUT.SLUG/snapshot.html
|
|
326
355
|
- specs/$INPUT.SLUG/tokens.css
|
|
327
356
|
- specs/$INPUT.SLUG/source.md
|
|
328
357
|
4. The exact next command:
|
|
329
358
|
/specship:spec implement <first REQ ID>
|
|
330
|
-
5. A one-line reminder that the implementation step
|
|
331
|
-
|
|
332
|
-
|
|
359
|
+
5. A one-line reminder that the implementation step builds the UI
|
|
360
|
+
from design.md (values verbatim) — the spec covers contract
|
|
361
|
+
only.
|
|
333
362
|
|
|
334
363
|
Keep the message ≤200 words. The user is about to switch from
|
|
335
364
|
this workflow to the implement workflow; this is the bridge.
|
|
@@ -35,9 +35,9 @@ nodes:
|
|
|
35
35
|
kind: prompt
|
|
36
36
|
output_type: code_grounding
|
|
37
37
|
allowed_tools:
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
38
|
+
- specship_explore
|
|
39
|
+
- specship_search
|
|
40
|
+
- specship_files
|
|
41
41
|
- Read
|
|
42
42
|
prompt: |
|
|
43
43
|
Feature: $INPUT.DESCRIPTION
|
|
@@ -64,9 +64,9 @@ nodes:
|
|
|
64
64
|
depends_on: [ground]
|
|
65
65
|
output_type: spec_draft
|
|
66
66
|
allowed_tools:
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
67
|
+
- specship_spec
|
|
68
|
+
- specship_explore
|
|
69
|
+
- specship_node
|
|
70
70
|
- Read
|
|
71
71
|
prompt: |
|
|
72
72
|
Feature: $INPUT.DESCRIPTION
|
|
@@ -146,9 +146,9 @@ nodes:
|
|
|
146
146
|
depends_on: [incorporate]
|
|
147
147
|
output_type: review_findings
|
|
148
148
|
allowed_tools:
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
149
|
+
- specship_explore
|
|
150
|
+
- specship_node
|
|
151
|
+
- specship_search
|
|
152
152
|
- Read
|
|
153
153
|
prompt: |
|
|
154
154
|
Run the spec-author skill's `references/review-checklist.md` against
|
|
@@ -24,9 +24,9 @@ nodes:
|
|
|
24
24
|
kind: prompt
|
|
25
25
|
output_type: diagnosis
|
|
26
26
|
allowed_tools:
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
27
|
+
- specship_spec
|
|
28
|
+
- specship_node
|
|
29
|
+
- specship_explore
|
|
30
30
|
- Read
|
|
31
31
|
prompt: |
|
|
32
32
|
Spec ID: $INPUT.SPEC_ID
|
|
@@ -60,8 +60,8 @@ nodes:
|
|
|
60
60
|
- Edit
|
|
61
61
|
- Write
|
|
62
62
|
- Bash
|
|
63
|
-
-
|
|
64
|
-
-
|
|
63
|
+
- specship_node
|
|
64
|
+
- specship_spec
|
|
65
65
|
prompt: |
|
|
66
66
|
Apply the fix proposed in the diagnosis. Follow any guidance from
|
|
67
67
|
the reviewer.
|
|
@@ -162,9 +162,9 @@ nodes:
|
|
|
162
162
|
depends_on: [approve_links]
|
|
163
163
|
output_type: link_summary
|
|
164
164
|
allowed_tools:
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
165
|
+
- specship_spec
|
|
166
|
+
- specship_link_assert
|
|
167
|
+
- specship_link_verify
|
|
168
168
|
prompt: |
|
|
169
169
|
The reviewer has approved updating link state for $INPUT.SPEC_ID.
|
|
170
170
|
|
|
@@ -18,6 +18,22 @@ systemPromptAppend: |
|
|
|
18
18
|
`path:Symbol` bullet under the requirement's `implementations:` block in
|
|
19
19
|
its spec file — links in the spec file survive any reindex.
|
|
20
20
|
|
|
21
|
+
Design-backed specs (REQ-DESIGNMD-006): if the spec file's frontmatter
|
|
22
|
+
carries a `design:` key, read that design.md before ANY UI edit and build
|
|
23
|
+
from it — every color, size, spacing, radius, shadow, font and duration
|
|
24
|
+
verbatim from its Generated reference, every state under Components &
|
|
25
|
+
states, every breakpoint under Responsive behaviour. Never round or
|
|
26
|
+
substitute a "close" value; reuse a project token only when its value is
|
|
27
|
+
exactly equal. Anything design.md doesn't state is a question, not a guess.
|
|
28
|
+
Keep it current (REQ-DESIGNMD-007): when your change alters the UI — a new
|
|
29
|
+
or changed component, state, layout, token or copy — update that design.md
|
|
30
|
+
in the same change: revise the authored sections that describe what moved,
|
|
31
|
+
add a dated Change log line naming $INPUT.SPEC_ID, and when the design
|
|
32
|
+
source itself changed run `specship design extract <sources> --update
|
|
33
|
+
<design.md>`. Then run `specship design check <design.md>`. The postcheck
|
|
34
|
+
fails a UI change whose design.md has no new Change log entry, and fails a
|
|
35
|
+
design.md that no longer passes the check.
|
|
36
|
+
|
|
21
37
|
JIRA-backed specs (REQ-JIRAPUB-004): if the spec file's frontmatter
|
|
22
38
|
carries a `jira_issue:` key, EVERY git commit message you write for this
|
|
23
39
|
work MUST be prefixed with that key ("PROJ-123: ..."), so JIRA's
|
|
@@ -29,8 +45,8 @@ nodes:
|
|
|
29
45
|
kind: prompt
|
|
30
46
|
output_type: spec_summary
|
|
31
47
|
allowed_tools:
|
|
32
|
-
-
|
|
33
|
-
-
|
|
48
|
+
- specship_spec
|
|
49
|
+
- specship_explore
|
|
34
50
|
prompt: |
|
|
35
51
|
Spec ID: $INPUT.SPEC_ID
|
|
36
52
|
|
|
@@ -68,9 +84,9 @@ nodes:
|
|
|
68
84
|
depends_on: [fetch_spec, readiness]
|
|
69
85
|
output_type: plan
|
|
70
86
|
allowed_tools:
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
87
|
+
- specship_explore
|
|
88
|
+
- specship_node
|
|
89
|
+
- specship_spec
|
|
74
90
|
- Read
|
|
75
91
|
prompt: |
|
|
76
92
|
Based on this spec summary, write a concrete implementation plan:
|
|
@@ -189,9 +205,9 @@ nodes:
|
|
|
189
205
|
- Edit
|
|
190
206
|
- Write
|
|
191
207
|
- Bash
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
208
|
+
- specship_explore
|
|
209
|
+
- specship_node
|
|
210
|
+
- specship_spec
|
|
195
211
|
prompt: |
|
|
196
212
|
Implement the approved plan. Follow it closely.
|
|
197
213
|
|
|
@@ -285,8 +301,8 @@ nodes:
|
|
|
285
301
|
- Edit
|
|
286
302
|
- Write
|
|
287
303
|
- Bash
|
|
288
|
-
-
|
|
289
|
-
-
|
|
304
|
+
- specship_explore
|
|
305
|
+
- specship_node
|
|
290
306
|
prompt: |
|
|
291
307
|
Lint / typecheck result for the code you just wrote:
|
|
292
308
|
|
|
@@ -377,7 +393,7 @@ nodes:
|
|
|
377
393
|
- Edit
|
|
378
394
|
- Write
|
|
379
395
|
- Bash
|
|
380
|
-
-
|
|
396
|
+
- specship_spec
|
|
381
397
|
prompt: |
|
|
382
398
|
Mechanical post-implement check for $INPUT.SPEC_ID:
|
|
383
399
|
|
|
@@ -467,12 +483,25 @@ nodes:
|
|
|
467
483
|
# REQ-AUTHG-004.A1 — the full diff, from git, into a run artifact. The
|
|
468
484
|
# human gate and the adversarial reviewer read THIS; the implement node's
|
|
469
485
|
# prose about what it believes it changed is not the change.
|
|
486
|
+
# REQ-WFINTEG-002 — diff against the commit the run started from (the
|
|
487
|
+
# readiness step records it), not HEAD: the implement step may commit,
|
|
488
|
+
# and a diff against HEAD would then be empty.
|
|
470
489
|
# `git add -A -N` registers new files as intent-to-add so untracked work
|
|
471
|
-
# appears in
|
|
490
|
+
# appears in the diff without staging any content.
|
|
491
|
+
BASE=$(cat "$(git rev-parse --git-dir 2>/dev/null)/specship-run-base" 2>/dev/null)
|
|
492
|
+
if [ -z "$BASE" ] || ! git cat-file -e "$BASE^{commit}" 2>/dev/null; then
|
|
493
|
+
echo "HALT_CAUSE=the run's base commit was not recorded — cannot show the change this run made"
|
|
494
|
+
exit 1
|
|
495
|
+
fi
|
|
472
496
|
git add -A -N >/dev/null 2>&1 || true
|
|
497
|
+
DIFF=$(git --no-pager diff "$BASE" | head -c 400000)
|
|
498
|
+
if [ -z "$DIFF" ] && [ -n "$(git status --porcelain --untracked-files=all 2>/dev/null | grep '^??')" ]; then
|
|
499
|
+
echo "HALT_CAUSE=the diff is empty but the worktree has files git did not include — refusing to review an empty change"
|
|
500
|
+
exit 1
|
|
501
|
+
fi
|
|
502
|
+
echo "DIFF_BASE=$BASE"
|
|
473
503
|
echo "DIFF_BEGIN"
|
|
474
|
-
|
|
475
|
-
echo
|
|
504
|
+
printf '%s\n' "$DIFF"
|
|
476
505
|
echo "DIFF_END"
|
|
477
506
|
|
|
478
507
|
- id: diff_stat
|
|
@@ -484,8 +513,10 @@ nodes:
|
|
|
484
513
|
# insertions/deletions counted by git. Its own small node so the approval
|
|
485
514
|
# message carries the summary while the full diff stays in the `diff`
|
|
486
515
|
# artifact.
|
|
516
|
+
# Same base as `diff` (REQ-WFINTEG-002), so the stat counts the whole run.
|
|
517
|
+
BASE=$(cat "$(git rev-parse --git-dir 2>/dev/null)/specship-run-base" 2>/dev/null)
|
|
487
518
|
echo "DIFF_STAT_BEGIN"
|
|
488
|
-
git --no-pager diff HEAD --stat
|
|
519
|
+
git --no-pager diff "${BASE:-HEAD}" --stat
|
|
489
520
|
echo "DIFF_STAT_END"
|
|
490
521
|
|
|
491
522
|
- id: verify
|
|
@@ -573,7 +604,7 @@ nodes:
|
|
|
573
604
|
allowed_tools:
|
|
574
605
|
- Read
|
|
575
606
|
- Edit
|
|
576
|
-
-
|
|
607
|
+
- specship_spec
|
|
577
608
|
prompt: |
|
|
578
609
|
Record spec→code links for the changes made in the implement step —
|
|
579
610
|
durably, in the spec file (REQ-PIPETRUST-006). Do NOT call
|
|
@@ -652,10 +683,10 @@ nodes:
|
|
|
652
683
|
allowed_tools:
|
|
653
684
|
- Read
|
|
654
685
|
- Grep
|
|
655
|
-
-
|
|
656
|
-
-
|
|
657
|
-
-
|
|
658
|
-
-
|
|
686
|
+
- specship_spec
|
|
687
|
+
- specship_explore
|
|
688
|
+
- specship_node
|
|
689
|
+
- specship_search
|
|
659
690
|
prompt: |
|
|
660
691
|
Adversarial review (REQ-AUTHG-005.A3). You are NOT the implementer — your
|
|
661
692
|
job is to find what the implementation missed. This node is read-only:
|
|
@@ -698,7 +729,7 @@ nodes:
|
|
|
698
729
|
- Read
|
|
699
730
|
- Write
|
|
700
731
|
- Bash
|
|
701
|
-
-
|
|
732
|
+
- specship_spec
|
|
702
733
|
prompt: |
|
|
703
734
|
Try to BREAK the change for $INPUT.SPEC_ID (REQ-THRU-008). You are not
|
|
704
735
|
the implementer. For EACH acceptance criterion write at least one small
|
|
@@ -742,8 +773,8 @@ nodes:
|
|
|
742
773
|
allowed_tools:
|
|
743
774
|
- Read
|
|
744
775
|
- Write
|
|
745
|
-
-
|
|
746
|
-
-
|
|
776
|
+
- specship_spec
|
|
777
|
+
- specship_explore
|
|
747
778
|
prompt: |
|
|
748
779
|
Propose knowledge this change relied on, for a HUMAN to confirm
|
|
749
780
|
(REQ-KNOW-004). Domain knowledge is human-confirmed, never
|
|
@@ -21,7 +21,7 @@ nodes:
|
|
|
21
21
|
kind: prompt
|
|
22
22
|
output_type: orphan_summary
|
|
23
23
|
allowed_tools:
|
|
24
|
-
-
|
|
24
|
+
- specship_spec
|
|
25
25
|
prompt: |
|
|
26
26
|
Spec ID: $INPUT.SPEC_ID
|
|
27
27
|
|
|
@@ -34,9 +34,9 @@ nodes:
|
|
|
34
34
|
depends_on: [present_orphan]
|
|
35
35
|
output_type: candidates
|
|
36
36
|
allowed_tools:
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
37
|
+
- specship_search
|
|
38
|
+
- specship_explore
|
|
39
|
+
- specship_node
|
|
40
40
|
prompt: |
|
|
41
41
|
The orphan(s):
|
|
42
42
|
$present_orphan.output
|
|
@@ -67,7 +67,7 @@ nodes:
|
|
|
67
67
|
depends_on: [approve_relink]
|
|
68
68
|
output_type: link_summary
|
|
69
69
|
allowed_tools:
|
|
70
|
-
-
|
|
70
|
+
- specship_link_assert
|
|
71
71
|
prompt: |
|
|
72
72
|
The reviewer chose candidate #$approve_relink.output for spec
|
|
73
73
|
$INPUT.SPEC_ID.
|
|
@@ -68,9 +68,9 @@ nodes:
|
|
|
68
68
|
output_type: link_summary
|
|
69
69
|
trigger_rule: all_done
|
|
70
70
|
allowed_tools:
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
71
|
+
- specship_drifted
|
|
72
|
+
- specship_spec
|
|
73
|
+
- specship_link_verify
|
|
74
74
|
prompt: |
|
|
75
75
|
Test run completed. Output (truncated):
|
|
76
76
|
|
|
@@ -156,4 +156,11 @@ export declare function topoSort(nodes: DagNode[]): string[];
|
|
|
156
156
|
* they are not re-run. Pure — returns a new metadata object.
|
|
157
157
|
*/
|
|
158
158
|
export declare function resetFailedNodes(workflow: WorkflowDefinition, metadata: unknown): Record<string, unknown>;
|
|
159
|
+
/**
|
|
160
|
+
* Host-profile variables every step can reference (REQ-AGENTSWITCH-001), so a
|
|
161
|
+
* bundled workflow names the run's agent's paths instead of one host's:
|
|
162
|
+
* `$AGENT_SKILLS_DIR` is the agent's user skills directory. Caller-supplied
|
|
163
|
+
* variables win.
|
|
164
|
+
*/
|
|
165
|
+
export declare function withAgentVariables(variables: Record<string, string> | undefined, agentId: string | undefined): Record<string, string>;
|
|
159
166
|
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/workflows/executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,EACL,kBAAkB,EAClB,OAAO,EAOR,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,WAAW,EACX,iBAAiB,EAGlB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,OAAO,EACL,UAAU,EAIX,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/workflows/executor.ts"],"names":[],"mappings":"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"}
|
|
@@ -52,6 +52,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
52
52
|
exports.WorkflowExecutor = void 0;
|
|
53
53
|
exports.topoSort = topoSort;
|
|
54
54
|
exports.resetFailedNodes = resetFailedNodes;
|
|
55
|
+
exports.withAgentVariables = withAgentVariables;
|
|
55
56
|
const fs = __importStar(require("fs"));
|
|
56
57
|
const path = __importStar(require("path"));
|
|
57
58
|
const os = __importStar(require("os"));
|
|
@@ -66,6 +67,7 @@ const script_1 = require("./runners/script");
|
|
|
66
67
|
const approval_1 = require("./runners/approval");
|
|
67
68
|
const cancel_1 = require("./runners/cancel");
|
|
68
69
|
const agents_1 = require("./agents");
|
|
70
|
+
const hook_output_1 = require("../activation/hook-output");
|
|
69
71
|
class WorkflowExecutor {
|
|
70
72
|
specQueries;
|
|
71
73
|
worktrees;
|
|
@@ -223,6 +225,7 @@ class WorkflowExecutor {
|
|
|
223
225
|
const wasRejected = existing.status === 'rejected';
|
|
224
226
|
if (wasRejected) {
|
|
225
227
|
const meta = refreshed.metadata ?? {};
|
|
228
|
+
const revOpts = { ...opts, variables: withAgentVariables(opts.variables, runAgent(meta)) };
|
|
226
229
|
const rejection = meta.rejection;
|
|
227
230
|
const gate = rejection ? workflow.nodes.find((n) => n.id === rejection.nodeId) : undefined;
|
|
228
231
|
const onReject = gate?.kind === 'approval' ? gate.on_reject : undefined;
|
|
@@ -261,7 +264,7 @@ class WorkflowExecutor {
|
|
|
261
264
|
// Resolve $nodeId.output refs in the on_reject prompt against the
|
|
262
265
|
// run's accumulated outputs, same as any other node; workflow-level
|
|
263
266
|
// model/systemPromptAppend apply too (REQ-AUDFIX-005.A2).
|
|
264
|
-
const revise = this.resolveNodeRefs(rawRevise, outputs, opts.inputs,
|
|
267
|
+
const revise = this.resolveNodeRefs(rawRevise, outputs, opts.inputs, revOpts.variables, workflow);
|
|
265
268
|
this.event(runId, 'step_started', { stepId: reviseId, kind: 'prompt', revision: true });
|
|
266
269
|
const runner = this.runners.get('prompt');
|
|
267
270
|
result = runner
|
|
@@ -271,7 +274,7 @@ class WorkflowExecutor {
|
|
|
271
274
|
logsDir,
|
|
272
275
|
runId,
|
|
273
276
|
inputs: opts.inputs,
|
|
274
|
-
variables:
|
|
277
|
+
variables: revOpts.variables,
|
|
275
278
|
outputs,
|
|
276
279
|
verbose: opts.verbose,
|
|
277
280
|
agent: runAgent(meta),
|
|
@@ -455,6 +458,7 @@ class WorkflowExecutor {
|
|
|
455
458
|
const order = topoSort(workflow.nodes);
|
|
456
459
|
const nodeById = new Map(workflow.nodes.map((n) => [n.id, n]));
|
|
457
460
|
const meta = run.metadata ?? {};
|
|
461
|
+
opts = { ...opts, variables: withAgentVariables(opts.variables, runAgent(meta)) };
|
|
458
462
|
const nodeStates = new Map(Object.entries(meta.nodeStates ?? {}));
|
|
459
463
|
const outputs = new Map(Object.entries(meta.outputs ?? {}));
|
|
460
464
|
// Initialize states for nodes the resume didn't already cover.
|
|
@@ -482,7 +486,7 @@ class WorkflowExecutor {
|
|
|
482
486
|
}
|
|
483
487
|
// Check when: condition.
|
|
484
488
|
if (node.when !== undefined) {
|
|
485
|
-
const ctx = this.makeSubstitutionContext(outputs, opts.inputs, opts.variables);
|
|
489
|
+
const ctx = this.makeSubstitutionContext(outputs, opts.inputs, opts.variables, workflow);
|
|
486
490
|
const passes = (0, condition_evaluator_1.evaluateCondition)(node.when, ctx);
|
|
487
491
|
if (!passes) {
|
|
488
492
|
nodeStates.set(nodeId, 'skipped');
|
|
@@ -640,7 +644,7 @@ class WorkflowExecutor {
|
|
|
640
644
|
* is the workflow value followed by the node value, joined by a blank line.
|
|
641
645
|
*/
|
|
642
646
|
resolveNodeRefs(node, outputs, inputs, variables, workflow) {
|
|
643
|
-
const ctx = this.makeSubstitutionContext(outputs, inputs, variables);
|
|
647
|
+
const ctx = this.makeSubstitutionContext(outputs, inputs, variables, workflow);
|
|
644
648
|
switch (node.kind) {
|
|
645
649
|
case 'prompt': {
|
|
646
650
|
const p = node;
|
|
@@ -686,12 +690,15 @@ class WorkflowExecutor {
|
|
|
686
690
|
}
|
|
687
691
|
}
|
|
688
692
|
}
|
|
689
|
-
makeSubstitutionContext(outputs, inputs, variables) {
|
|
693
|
+
makeSubstitutionContext(outputs, inputs, variables, workflow) {
|
|
690
694
|
return {
|
|
691
695
|
outputs,
|
|
692
696
|
inputs: inputs ?? {},
|
|
693
697
|
variables: variables ?? {},
|
|
694
698
|
spillDir: os.tmpdir(),
|
|
699
|
+
// The workflow's step ids, so shell text like `$i.md` is not taken for
|
|
700
|
+
// a step reference (REQ-WFINTEG-001).
|
|
701
|
+
...(workflow?.nodes ? { nodeIds: new Set(workflow.nodes.map((n) => n.id)) } : {}),
|
|
695
702
|
};
|
|
696
703
|
}
|
|
697
704
|
/**
|
|
@@ -910,6 +917,16 @@ function sanitizeFilename(s) {
|
|
|
910
917
|
function sleep(ms) {
|
|
911
918
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
912
919
|
}
|
|
920
|
+
/**
|
|
921
|
+
* Host-profile variables every step can reference (REQ-AGENTSWITCH-001), so a
|
|
922
|
+
* bundled workflow names the run's agent's paths instead of one host's:
|
|
923
|
+
* `$AGENT_SKILLS_DIR` is the agent's user skills directory. Caller-supplied
|
|
924
|
+
* variables win.
|
|
925
|
+
*/
|
|
926
|
+
function withAgentVariables(variables, agentId) {
|
|
927
|
+
const traits = (0, hook_output_1.hostTraitsFor)(agentId ?? agents_1.DEFAULT_WORKFLOW_AGENT);
|
|
928
|
+
return { AGENT_SKILLS_DIR: `~/${traits.configDir}/skills`, ...(variables ?? {}) };
|
|
929
|
+
}
|
|
913
930
|
/** The agent stored with a run; undefined for runs created before agents were recorded (→ default). */
|
|
914
931
|
function runAgent(meta) {
|
|
915
932
|
const a = meta[agents_1.RUN_AGENT_KEY];
|