@leocm/flowcraft 0.0.0-stage → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +846 -3
- package/bin/cli.js +102 -0
- package/flowcraft.yaml +30 -0
- package/install.sh +24 -0
- package/lib/args.js +34 -0
- package/lib/config.js +20 -0
- package/lib/copy.js +131 -0
- package/lib/fix.js +110 -0
- package/lib/fsutil.js +104 -0
- package/lib/global.js +229 -0
- package/lib/init.js +43 -0
- package/lib/runtime.js +84 -0
- package/lib/version.js +55 -0
- package/lib/wizard.js +125 -0
- package/package.json +31 -4
- package/presets/backend.yaml +20 -0
- package/presets/default.yaml +15 -0
- package/presets/frontend.yaml +20 -0
- package/presets/quick-fix.yaml +15 -0
- package/setup/.claude/commands/P0.5.md +1 -0
- package/setup/.claude/commands/P0.md +1 -0
- package/setup/.claude/commands/P1.md +1 -0
- package/setup/.claude/commands/P2.md +1 -0
- package/setup/.claude/commands/P3.md +1 -0
- package/setup/.claude/commands/P4.md +1 -0
- package/setup/.claude/commands/P5.md +1 -0
- package/setup/.claude/commands/code-analysis-init.md +1 -0
- package/setup/.claude/commands/code-analysis-rebuild.md +1 -0
- package/setup/.claude/commands/code-analysis-show-memory.md +1 -0
- package/setup/.claude/commands/code-analysis-update.md +1 -0
- package/setup/.claude/hooks/check-phase-advancement.py +180 -0
- package/setup/.claude/hooks/check-phase-test.py +152 -0
- package/setup/.claude/hooks/check-phase-write.py +232 -0
- package/setup/.claude/hooks/dispatch.py +64 -0
- package/setup/.claude/hooks/file-suggestion.py +45 -0
- package/setup/.claude/hooks/flowcraft_env.py +99 -0
- package/setup/.claude/hooks/log_session.py +91 -0
- package/setup/.claude/hooks/permission-request.py +125 -0
- package/setup/.claude/hooks/post-tool-failure.py +34 -0
- package/setup/.claude/hooks/pre-compact.py +64 -0
- package/setup/.claude/hooks/review-runner.py +844 -0
- package/setup/.claude/hooks/session-end.py +182 -0
- package/setup/.claude/hooks/session-start.py +188 -0
- package/setup/.claude/hooks/settings.json +0 -0
- package/setup/.claude/hooks/setup-keys.py +280 -0
- package/setup/.claude/hooks/statusline.py +61 -0
- package/setup/.claude/hooks/stop-check.py +169 -0
- package/setup/.claude/hooks/subagent-start.py +48 -0
- package/setup/.claude/hooks/subagent-stop.py +61 -0
- package/setup/.claude/hooks/task-completed.py +55 -0
- package/setup/.claude/hooks/task_manager.py +592 -0
- package/setup/.claude/hooks/user-prompt-submit.py +85 -0
- package/setup/.claude/project-state.md +109 -0
- package/setup/.claude/settings.json +237 -0
- package/setup/.claude/settings.local.json +13 -0
- package/setup/.claude/skills/P5report/SKILL.md +77 -0
- package/setup/.claude/skills/Pstatus/SKILL.md +68 -0
- package/setup/.claude/skills/archive/SKILL.md +196 -0
- package/setup/.claude/skills/brainstorming/SKILL.md +155 -0
- package/setup/.claude/skills/brainstorming/scripts/frame-template.html +213 -0
- package/setup/.claude/skills/brainstorming/scripts/helper.js +167 -0
- package/setup/.claude/skills/brainstorming/scripts/server.cjs +723 -0
- package/setup/.claude/skills/brainstorming/scripts/start-server.py +245 -0
- package/setup/.claude/skills/brainstorming/scripts/stop-server.py +178 -0
- package/setup/.claude/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/setup/.claude/skills/brainstorming/visual-companion.md +298 -0
- package/setup/.claude/skills/checkpoint/SKILL.md +42 -0
- package/setup/.claude/skills/chrome-integration/SKILL.md +67 -0
- package/setup/.claude/skills/code-analysis/SKILL.md +1243 -0
- package/setup/.claude/skills/code-review/SKILL.md +265 -0
- package/setup/.claude/skills/cross-review/SKILL.md +41 -0
- package/setup/.claude/skills/executing-plans/SKILL.md +64 -0
- package/setup/.claude/skills/git-prep/SKILL.md +50 -0
- package/setup/.claude/skills/gitnexus/gitnexus-cli/SKILL.md +67 -0
- package/setup/.claude/skills/gitnexus/gitnexus-debugging/SKILL.md +89 -0
- package/setup/.claude/skills/gitnexus/gitnexus-exploring/SKILL.md +78 -0
- package/setup/.claude/skills/gitnexus/gitnexus-guide/SKILL.md +66 -0
- package/setup/.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md +97 -0
- package/setup/.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md +121 -0
- package/setup/.claude/skills/graphify/SKILL.md +49 -0
- package/setup/.claude/skills/openspec-apply-change/SKILL.md +185 -0
- package/setup/.claude/skills/openspec-archive-change/SKILL.md +182 -0
- package/setup/.claude/skills/openspec-bulk-archive-change/SKILL.md +339 -0
- package/setup/.claude/skills/openspec-continue-change/SKILL.md +118 -0
- package/setup/.claude/skills/openspec-explore/SKILL.md +311 -0
- package/setup/.claude/skills/openspec-ff-change/SKILL.md +113 -0
- package/setup/.claude/skills/openspec-new-change/SKILL.md +77 -0
- package/setup/.claude/skills/openspec-onboard/SKILL.md +573 -0
- package/setup/.claude/skills/openspec-propose/SKILL.md +149 -0
- package/setup/.claude/skills/openspec-sync-specs/SKILL.md +262 -0
- package/setup/.claude/skills/openspec-update-change/SKILL.md +91 -0
- package/setup/.claude/skills/openspec-verify-change/SKILL.md +175 -0
- package/setup/.claude/skills/oss-version-check/SKILL.md +71 -0
- package/setup/.claude/skills/oss-version-check/check_oss_version.py +205 -0
- package/setup/.claude/skills/phase/SKILL.md +63 -0
- package/setup/.claude/skills/playwright/SKILL.md +86 -0
- package/setup/.claude/skills/playwright-cli/SKILL.md +420 -0
- package/setup/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
- package/setup/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/setup/.claude/skills/playwright-cli/references/references/element-attributes.md +23 -0
- package/setup/.claude/skills/playwright-cli/references/references/playwright-tests.md +39 -0
- package/setup/.claude/skills/playwright-cli/references/references/request-mocking.md +87 -0
- package/setup/.claude/skills/playwright-cli/references/references/running-code.md +241 -0
- package/setup/.claude/skills/playwright-cli/references/references/session-management.md +225 -0
- package/setup/.claude/skills/playwright-cli/references/references/storage-state.md +275 -0
- package/setup/.claude/skills/playwright-cli/references/references/test-generation.md +433 -0
- package/setup/.claude/skills/playwright-cli/references/references/tracing.md +139 -0
- package/setup/.claude/skills/playwright-cli/references/references/video-recording.md +143 -0
- package/setup/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
- package/setup/.claude/skills/playwright-cli/references/running-code.md +241 -0
- package/setup/.claude/skills/playwright-cli/references/session-management.md +225 -0
- package/setup/.claude/skills/playwright-cli/references/storage-state.md +275 -0
- package/setup/.claude/skills/playwright-cli/references/test-generation.md +433 -0
- package/setup/.claude/skills/playwright-cli/references/tracing.md +139 -0
- package/setup/.claude/skills/playwright-cli/references/video-recording.md +143 -0
- package/setup/.claude/skills/review/SKILL.md +98 -0
- package/setup/.claude/skills/review-tools/SKILL.md +76 -0
- package/setup/.claude/skills/subagent-driven-development/SKILL.md +94 -0
- package/setup/.claude/skills/task/SKILL.md +26 -0
- package/setup/.claude/skills/test-driven-development/SKILL.md +320 -0
- package/setup/.claude/skills/test-driven-development/writing-good-tests.md +198 -0
- package/setup/.claude/skills/ui-ux-pro-max/SKILL.md +377 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/setup/.claude/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/setup/.claude/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/setup/.claude/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/setup/.claude/skills/ui-ux-standards/SKILL.md +154 -0
- package/setup/.claude/skills/verification-before-completion/SKILL.md +120 -0
- package/setup/.claude/skills/wiki-read/SKILL.md +190 -0
- package/setup/.claude/skills/writing-plans/SKILL.md +168 -0
- package/setup/.claude/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/setup/.claude/tasks/.last-session +1 -0
- package/setup/.codex/.agents/skills/P5report/SKILL.md +77 -0
- package/setup/.codex/.agents/skills/Pstatus/SKILL.md +30 -0
- package/setup/.codex/.agents/skills/archive/SKILL.md +196 -0
- package/setup/.codex/.agents/skills/brainstorming/SKILL.md +155 -0
- package/setup/.codex/.agents/skills/brainstorming/scripts/frame-template.html +213 -0
- package/setup/.codex/.agents/skills/brainstorming/scripts/helper.js +167 -0
- package/setup/.codex/.agents/skills/brainstorming/scripts/server.cjs +723 -0
- package/setup/.codex/.agents/skills/brainstorming/scripts/start-server.py +245 -0
- package/setup/.codex/.agents/skills/brainstorming/scripts/stop-server.py +178 -0
- package/setup/.codex/.agents/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/setup/.codex/.agents/skills/brainstorming/visual-companion.md +298 -0
- package/setup/.codex/.agents/skills/checkpoint/SKILL.md +42 -0
- package/setup/.codex/.agents/skills/chrome-integration/SKILL.md +67 -0
- package/setup/.codex/.agents/skills/code-analysis/SKILL.md +1243 -0
- package/setup/.codex/.agents/skills/code-review/SKILL.md +265 -0
- package/setup/.codex/.agents/skills/cross-review/SKILL.md +42 -0
- package/setup/.codex/.agents/skills/executing-plans/SKILL.md +64 -0
- package/setup/.codex/.agents/skills/git-prep/SKILL.md +50 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-cli/SKILL.md +67 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-debugging/SKILL.md +89 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-exploring/SKILL.md +78 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-guide/SKILL.md +66 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-impact-analysis/SKILL.md +97 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-refactoring/SKILL.md +121 -0
- package/setup/.codex/.agents/skills/graphify/SKILL.md +49 -0
- package/setup/.codex/.agents/skills/openspec-apply-change/SKILL.md +185 -0
- package/setup/.codex/.agents/skills/openspec-archive-change/SKILL.md +182 -0
- package/setup/.codex/.agents/skills/openspec-bulk-archive-change/SKILL.md +339 -0
- package/setup/.codex/.agents/skills/openspec-continue-change/SKILL.md +118 -0
- package/setup/.codex/.agents/skills/openspec-explore/SKILL.md +311 -0
- package/setup/.codex/.agents/skills/openspec-ff-change/SKILL.md +113 -0
- package/setup/.codex/.agents/skills/openspec-new-change/SKILL.md +77 -0
- package/setup/.codex/.agents/skills/openspec-onboard/SKILL.md +573 -0
- package/setup/.codex/.agents/skills/openspec-propose/SKILL.md +149 -0
- package/setup/.codex/.agents/skills/openspec-sync-specs/SKILL.md +262 -0
- package/setup/.codex/.agents/skills/openspec-update-change/SKILL.md +91 -0
- package/setup/.codex/.agents/skills/openspec-verify-change/SKILL.md +175 -0
- package/setup/.codex/.agents/skills/oss-version-check/SKILL.md +71 -0
- package/setup/.codex/.agents/skills/oss-version-check/check_oss_version.py +205 -0
- package/setup/.codex/.agents/skills/phase/SKILL.md +63 -0
- package/setup/.codex/.agents/skills/playwright/SKILL.md +86 -0
- package/setup/.codex/.agents/skills/playwright-cli/SKILL.md +420 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/element-attributes.md +23 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/element-attributes.md +23 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/playwright-tests.md +39 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/request-mocking.md +87 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/running-code.md +241 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/session-management.md +225 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/storage-state.md +275 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/test-generation.md +433 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/tracing.md +139 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/video-recording.md +143 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/request-mocking.md +87 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/running-code.md +241 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/session-management.md +225 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/storage-state.md +275 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/test-generation.md +433 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/tracing.md +139 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/video-recording.md +143 -0
- package/setup/.codex/.agents/skills/review/SKILL.md +98 -0
- package/setup/.codex/.agents/skills/review-tools/SKILL.md +76 -0
- package/setup/.codex/.agents/skills/subagent-driven-development/SKILL.md +94 -0
- package/setup/.codex/.agents/skills/task/SKILL.md +27 -0
- package/setup/.codex/.agents/skills/test-driven-development/SKILL.md +320 -0
- package/setup/.codex/.agents/skills/test-driven-development/writing-good-tests.md +198 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/SKILL.md +377 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/setup/.codex/.agents/skills/ui-ux-standards/SKILL.md +154 -0
- package/setup/.codex/.agents/skills/verification-before-completion/SKILL.md +120 -0
- package/setup/.codex/.agents/skills/wiki-read/SKILL.md +190 -0
- package/setup/.codex/.agents/skills/writing-plans/SKILL.md +168 -0
- package/setup/.codex/.agents/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/setup/.codex/config.toml +10 -0
- package/setup/.codex/hooks/log_session.py +85 -0
- package/setup/.codex/hooks/review-runner.py +844 -0
- package/setup/.codex/hooks/sdlc-codex-hook.cjs +1020 -0
- package/setup/.codex/hooks/setup-keys.py +280 -0
- package/setup/.codex/hooks.json +121 -0
- package/setup/.codex/model-catalog.json +154 -0
- package/setup/.codex/project-state.md +103 -0
- package/setup/AGENTS.md +722 -0
- package/setup/CLAUDE.md +717 -0
- package/setup/install.sh +24 -0
- package/setup/tests/test_decision_timeout.py +241 -0
- package/setup/tests/test_hook_guards.py +341 -0
- package/setup/tests/test_sdlc_bootstrap.py +167 -0
- package/setup/tests/test_task_manager.py +148 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-explore
|
|
3
|
+
description: Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
|
|
4
|
+
allowed-tools: Bash(openspec:*)
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Requires openspec CLI.
|
|
7
|
+
metadata:
|
|
8
|
+
author: openspec
|
|
9
|
+
version: "1.0"
|
|
10
|
+
---
|
|
11
|
+
> **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
|
|
12
|
+
|
|
13
|
+
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
|
|
14
|
+
|
|
15
|
+
**IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing. For a new change, scaffold it first as described below.
|
|
16
|
+
|
|
17
|
+
**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
|
|
18
|
+
|
|
19
|
+
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## The Stance
|
|
24
|
+
|
|
25
|
+
- **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
|
|
26
|
+
- **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
|
|
27
|
+
- **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
|
|
28
|
+
- **Adaptive** - Follow interesting threads, pivot when new information emerges
|
|
29
|
+
- **Patient** - Don't rush to conclusions, let the shape of the problem emerge
|
|
30
|
+
- **Grounded** - Explore the actual codebase when relevant, don't just theorize
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
> **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
|
|
34
|
+
|
|
35
|
+
## What You Might Do
|
|
36
|
+
|
|
37
|
+
Depending on what the user brings, you might:
|
|
38
|
+
|
|
39
|
+
**Explore the problem space**
|
|
40
|
+
- Ask clarifying questions that emerge from what they said
|
|
41
|
+
- Challenge assumptions
|
|
42
|
+
- Reframe the problem
|
|
43
|
+
- Find analogies
|
|
44
|
+
|
|
45
|
+
**Investigate the codebase**
|
|
46
|
+
- Map existing architecture relevant to the discussion
|
|
47
|
+
- Find integration points
|
|
48
|
+
- Identify patterns already in use
|
|
49
|
+
- Surface hidden complexity
|
|
50
|
+
|
|
51
|
+
**Compare options**
|
|
52
|
+
- Brainstorm multiple approaches
|
|
53
|
+
- Build comparison tables
|
|
54
|
+
- Sketch tradeoffs
|
|
55
|
+
- Recommend a path (if asked)
|
|
56
|
+
|
|
57
|
+
**Visualize**
|
|
58
|
+
```
|
|
59
|
+
┌─────────────────────────────────────────┐
|
|
60
|
+
│ Use ASCII diagrams liberally │
|
|
61
|
+
├─────────────────────────────────────────┤
|
|
62
|
+
│ │
|
|
63
|
+
│ ┌────────┐ ┌────────┐ │
|
|
64
|
+
│ │ State │────────▶│ State │ │
|
|
65
|
+
│ │ A │ │ B │ │
|
|
66
|
+
│ └────────┘ └────────┘ │
|
|
67
|
+
│ │
|
|
68
|
+
│ System diagrams, state machines, │
|
|
69
|
+
│ data flows, architecture sketches, │
|
|
70
|
+
│ dependency graphs, comparison tables │
|
|
71
|
+
│ │
|
|
72
|
+
└─────────────────────────────────────────┘
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Surface risks and unknowns**
|
|
76
|
+
- Identify what could go wrong
|
|
77
|
+
- Find gaps in understanding
|
|
78
|
+
- Suggest spikes or investigations
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## OpenSpec Awareness
|
|
83
|
+
|
|
84
|
+
You have full context of the OpenSpec system. Use it naturally, don't force it.
|
|
85
|
+
|
|
86
|
+
### Check for context
|
|
87
|
+
|
|
88
|
+
At the start, quickly check what exists:
|
|
89
|
+
```bash
|
|
90
|
+
openspec list --json
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
This tells you:
|
|
94
|
+
- If there are active changes
|
|
95
|
+
- Their names, schemas, and status
|
|
96
|
+
- What the user might be working on
|
|
97
|
+
|
|
98
|
+
Then read the project's own context from the resolved root - `<root.path>/openspec/config.yaml` (or `config.yml`). Use the `root.path` returned above, and skip this if neither file exists:
|
|
99
|
+
- `context`: project background - tech stack, conventions, constraints
|
|
100
|
+
- `rules`: keyed by artifact id - the entries for an artifact apply only when you write that artifact
|
|
101
|
+
|
|
102
|
+
Ground your thinking in these. They are constraints for you to follow, not content to reproduce: do NOT copy them into the conversation or into any artifact you create.
|
|
103
|
+
|
|
104
|
+
### When no change exists
|
|
105
|
+
|
|
106
|
+
Think freely. When insights crystallize, you might offer:
|
|
107
|
+
|
|
108
|
+
- "This feels solid enough to start a change. Want me to create a proposal?"
|
|
109
|
+
- Or keep exploring - no pressure to formalize
|
|
110
|
+
|
|
111
|
+
If the user asks you to capture the exploration as a new change, transition seamlessly into the requested capture:
|
|
112
|
+
|
|
113
|
+
1. Run `openspec new change "<name>"` (with `--store <id>` when applicable) before creating any artifacts. Never create a new change directory under `openspec/changes/` by hand; the CLI scaffold creates required metadata such as `.openspec.yaml`. Keep the selected `--store <id>` on every applicable follow-up `status` and `instructions` command.
|
|
114
|
+
2. Run `openspec status --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store), then process the requested artifacts in dependency order. For each requested artifact that is `ready`, run `openspec instructions "<artifact-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store). Before creating a requested artifact, evaluate any condition in its own `instruction` against the explored change; record a deliberate skip instead when the condition does not apply. If a requested artifact is blocked by a direct prerequisite the user did not request, run `openspec instructions "<prerequisite-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) for that prerequisite whether it is `ready` or `blocked`. If its own `instruction` states a condition, evaluate that condition against the explored change and record a deliberate skip only when the condition does not apply. If the condition applies, or the prerequisite is not conditional, treat it as a normal prerequisite and ask before expanding the capture. Do not create an unrequested prerequisite unless the user approves.
|
|
115
|
+
3. Follow the returned `template` and `instruction` fields. Read completed dependency files listed in `dependencies`, and apply `context` and `rules` as constraints without copying them into the artifact. If the instruction delegates creation to a specific skill or command, invoke it; otherwise write the artifact to `resolvedOutputPath`, using the instruction to choose a concrete path when it is a glob. Verify that the selected concrete output exists.
|
|
116
|
+
4. After creating each artifact, re-run `openspec status --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) and continue until every requested artifact is `done`, `skipped`, or was deliberately skipped because its own `instruction` stated a condition that did not apply. Tell the user about a deliberate conditional skip, remember it, and do not reconsider it. Dependencies are enablers, not gates: if a requested artifact is still `blocked` only because you deliberately skipped a conditional prerequisite, run `openspec instructions "<artifact-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) despite the blocked status, then create it using step 3 only when those recorded conditional skips are its sole missing dependencies. If a requested artifact is blocked by a prerequisite the user did not ask to capture and cannot be conditionally skipped, explain that dependency and ask before expanding the capture.
|
|
117
|
+
|
|
118
|
+
Capture the artifact(s) the user requested without asking them to invoke another workflow command. If they asked only to start a change, stop after scaffolding and show its status.
|
|
119
|
+
|
|
120
|
+
### When a change exists
|
|
121
|
+
|
|
122
|
+
If the user mentions a change or you detect one is relevant:
|
|
123
|
+
|
|
124
|
+
1. **Resolve and read existing artifacts for context**
|
|
125
|
+
- Run `openspec status --change "<name>" --json`.
|
|
126
|
+
- Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
|
|
127
|
+
- Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
|
|
128
|
+
|
|
129
|
+
2. **Reference them naturally in conversation**
|
|
130
|
+
- "Your design mentions using Redis, but we just realized SQLite fits better..."
|
|
131
|
+
- "The proposal scopes this to premium users, but we're now thinking everyone..."
|
|
132
|
+
|
|
133
|
+
3. **Offer to capture when decisions are made**
|
|
134
|
+
|
|
135
|
+
`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve an existing capability's full path and follow the project's established organization for new capabilities.
|
|
136
|
+
|
|
137
|
+
| Insight Type | Where to Capture |
|
|
138
|
+
|----------------------------|-------------------------------------|
|
|
139
|
+
| New requirement discovered | `specs/<capability-path>/spec.md` |
|
|
140
|
+
| Requirement changed | `specs/<capability-path>/spec.md` |
|
|
141
|
+
| Design decision made | `design.md` |
|
|
142
|
+
| Scope changed | `proposal.md` |
|
|
143
|
+
| New work identified | `tasks.md` |
|
|
144
|
+
| Assumption invalidated | Relevant artifact |
|
|
145
|
+
|
|
146
|
+
Example offers:
|
|
147
|
+
- "That's a design decision. Capture it in design.md?"
|
|
148
|
+
- "This is a new requirement. Add it to specs?"
|
|
149
|
+
- "This changes scope. Update the proposal?"
|
|
150
|
+
|
|
151
|
+
4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
> **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
|
|
155
|
+
|
|
156
|
+
## What You Don't Have To Do
|
|
157
|
+
|
|
158
|
+
- Follow a script
|
|
159
|
+
- Ask the same questions every time
|
|
160
|
+
- Produce a specific artifact
|
|
161
|
+
- Reach a conclusion
|
|
162
|
+
- Stay on topic if a tangent is valuable
|
|
163
|
+
- Be brief (this is thinking time)
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Handling Different Entry Points
|
|
168
|
+
|
|
169
|
+
**User brings a vague idea:**
|
|
170
|
+
```
|
|
171
|
+
User: I'm thinking about adding real-time collaboration
|
|
172
|
+
|
|
173
|
+
You: Real-time collab is a big space. Let me think about this...
|
|
174
|
+
|
|
175
|
+
COLLABORATION SPECTRUM
|
|
176
|
+
════════════════════════════════════════════
|
|
177
|
+
|
|
178
|
+
Awareness Coordination Sync
|
|
179
|
+
│ │ │
|
|
180
|
+
▼ ▼ ▼
|
|
181
|
+
┌────────┐ ┌────────┐ ┌────────┐
|
|
182
|
+
│Presence│ │Cursors │ │ CRDT │
|
|
183
|
+
│ "3 │ │ Multi │ │Conflict│
|
|
184
|
+
│online" │ │ select │ │ free │
|
|
185
|
+
└────────┘ └────────┘ └────────┘
|
|
186
|
+
│ │ │
|
|
187
|
+
trivial moderate complex
|
|
188
|
+
|
|
189
|
+
Where's your head at?
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**User brings a specific problem:**
|
|
193
|
+
```
|
|
194
|
+
User: The auth system is a mess
|
|
195
|
+
|
|
196
|
+
You: [reads codebase]
|
|
197
|
+
|
|
198
|
+
┌─────────────────────────────────────────────┐
|
|
199
|
+
│ CURRENT AUTH FLOW │
|
|
200
|
+
└─────────────────────────────────────────────┘
|
|
201
|
+
│
|
|
202
|
+
┌─────────────┼─────────────┐
|
|
203
|
+
▼ ▼ ▼
|
|
204
|
+
┌─────────┐ ┌─────────┐ ┌─────────┐
|
|
205
|
+
│ Google │ │ GitHub │ │ Email │
|
|
206
|
+
│ OAuth │ │ OAuth │ │ Magic │
|
|
207
|
+
└────┬────┘ └────┬────┘ └────┬────┘
|
|
208
|
+
│ │ │
|
|
209
|
+
└─────────────┼─────────────┘
|
|
210
|
+
▼
|
|
211
|
+
┌───────────┐
|
|
212
|
+
│ Session │
|
|
213
|
+
└─────┬─────┘
|
|
214
|
+
│
|
|
215
|
+
▼
|
|
216
|
+
┌───────────┐
|
|
217
|
+
│ Perms │
|
|
218
|
+
└───────────┘
|
|
219
|
+
|
|
220
|
+
I see three tangles. Which one's burning?
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**User is stuck mid-implementation:**
|
|
224
|
+
```
|
|
225
|
+
User: /openspec-explore add-auth-system
|
|
226
|
+
The OAuth integration is more complex than expected
|
|
227
|
+
|
|
228
|
+
You: [reads change artifacts]
|
|
229
|
+
|
|
230
|
+
You're on task 4: "Implement OAuth flow"
|
|
231
|
+
|
|
232
|
+
Let me trace what's involved...
|
|
233
|
+
|
|
234
|
+
[draws diagram, explores options, suggests paths]
|
|
235
|
+
|
|
236
|
+
Want to update the design to reflect this?
|
|
237
|
+
Or add a spike task to investigate?
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**User wants to compare options:**
|
|
241
|
+
```
|
|
242
|
+
User: Should we use Postgres or SQLite?
|
|
243
|
+
|
|
244
|
+
You: Generic answer is boring. What's the context?
|
|
245
|
+
|
|
246
|
+
User: A CLI tool that tracks local dev environments
|
|
247
|
+
|
|
248
|
+
You: That changes everything.
|
|
249
|
+
|
|
250
|
+
┌─────────────────────────────────────────────────┐
|
|
251
|
+
│ CLI TOOL DATA STORAGE │
|
|
252
|
+
└─────────────────────────────────────────────────┘
|
|
253
|
+
|
|
254
|
+
Key constraints:
|
|
255
|
+
• No daemon running
|
|
256
|
+
• Must work offline
|
|
257
|
+
• Single user
|
|
258
|
+
|
|
259
|
+
SQLite Postgres
|
|
260
|
+
Deployment embedded ✓ needs server ✗
|
|
261
|
+
Offline yes ✓ no ✗
|
|
262
|
+
Single file yes ✓ no ✗
|
|
263
|
+
|
|
264
|
+
SQLite. Not even close.
|
|
265
|
+
|
|
266
|
+
Unless... is there a sync component?
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
> **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
|
|
271
|
+
|
|
272
|
+
## Ending Discovery
|
|
273
|
+
|
|
274
|
+
There's no required ending. Discovery might:
|
|
275
|
+
|
|
276
|
+
- **Flow into a proposal**: "Ready to start? I can create a change proposal."
|
|
277
|
+
- **Result in artifact updates**: "Updated design.md with these decisions"
|
|
278
|
+
- **Just provide clarity**: User has what they need, moves on
|
|
279
|
+
- **Continue later**: "We can pick this up anytime"
|
|
280
|
+
|
|
281
|
+
When it feels like things are crystallizing, you might summarize:
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
## What We Figured Out
|
|
285
|
+
|
|
286
|
+
**The problem**: [crystallized understanding]
|
|
287
|
+
|
|
288
|
+
**The approach**: [if one emerged]
|
|
289
|
+
|
|
290
|
+
**Open questions**: [if any remain]
|
|
291
|
+
|
|
292
|
+
**Next steps** (if ready):
|
|
293
|
+
- Create a change proposal
|
|
294
|
+
- Keep exploring: just keep talking
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
But this summary is optional. Sometimes the thinking IS the value.
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## Guardrails
|
|
302
|
+
|
|
303
|
+
- **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
|
|
304
|
+
- **Don't fake understanding** - If something is unclear, dig deeper
|
|
305
|
+
- **Don't rush** - Discovery is thinking time, not task time
|
|
306
|
+
- **Don't force structure** - Let patterns emerge naturally
|
|
307
|
+
- **Don't auto-capture** - Offer to save insights, don't just do it
|
|
308
|
+
- **Don't manually scaffold changes** - Never create a new change directory under `openspec/changes/` by hand. Always use `openspec new change "<name>"` (with `--store <id>` when applicable) so required metadata such as `.openspec.yaml` is created before writing artifacts.
|
|
309
|
+
- **Do visualize** - A good diagram is worth many paragraphs
|
|
310
|
+
- **Do explore the codebase** - Ground discussions in reality
|
|
311
|
+
- **Do question assumptions** - Including the user's and your own
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-ff-change
|
|
3
|
+
description: Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.
|
|
4
|
+
allowed-tools: Bash(openspec:*)
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Requires openspec CLI.
|
|
7
|
+
metadata:
|
|
8
|
+
author: openspec
|
|
9
|
+
version: "1.0"
|
|
10
|
+
---
|
|
11
|
+
> **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
|
|
12
|
+
|
|
13
|
+
Fast-forward through artifact creation - generate everything needed to start implementation in one go.
|
|
14
|
+
|
|
15
|
+
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
16
|
+
|
|
17
|
+
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
18
|
+
|
|
19
|
+
**Steps**
|
|
20
|
+
|
|
21
|
+
1. **If no clear input provided, ask what they want to build**
|
|
22
|
+
|
|
23
|
+
Ask the user (open-ended, no preset options):
|
|
24
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
25
|
+
|
|
26
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
|
|
27
|
+
|
|
28
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
29
|
+
|
|
30
|
+
2. **Create the change directory**
|
|
31
|
+
```bash
|
|
32
|
+
openspec new change "<name>"
|
|
33
|
+
```
|
|
34
|
+
This creates a scaffolded change in the planning home resolved by the CLI.
|
|
35
|
+
|
|
36
|
+
3. **Get the artifact build order**
|
|
37
|
+
```bash
|
|
38
|
+
openspec status --change "<name>" --json
|
|
39
|
+
```
|
|
40
|
+
Parse the JSON to get:
|
|
41
|
+
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
|
|
42
|
+
- `artifacts`: list of all artifacts, each with its `status` and its `requires` edges (the artifact IDs it directly depends on)
|
|
43
|
+
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
|
|
44
|
+
|
|
45
|
+
4. **Create every artifact in the required set**
|
|
46
|
+
|
|
47
|
+
Use a todo list to track progress through the artifacts.
|
|
48
|
+
|
|
49
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
50
|
+
|
|
51
|
+
a. **For each artifact that is `ready` (dependencies satisfied)**:
|
|
52
|
+
- Get instructions:
|
|
53
|
+
```bash
|
|
54
|
+
openspec instructions <artifact-id> --change "<name>" --json
|
|
55
|
+
```
|
|
56
|
+
- The instructions JSON includes:
|
|
57
|
+
- `context`: Project background (constraints for you - do NOT include in output)
|
|
58
|
+
- `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
59
|
+
- `template`: The structure to use for your output file
|
|
60
|
+
- `instruction`: Schema-specific guidance for this artifact type
|
|
61
|
+
- `skipped`/`warning`: present when the change declares skip_specs and this artifact must NOT be created - stop and pick another artifact
|
|
62
|
+
- `resolvedOutputPath`: Resolved path or pattern to write the artifact
|
|
63
|
+
- `dependencies`: Completed artifacts to read for context
|
|
64
|
+
- Read any completed dependency files for context - always re-read them from disk, even if you saw them earlier in the conversation (the user may have edited them)
|
|
65
|
+
- If the `instruction` field delegates creation to a specific skill or command, invoke it to produce the artifact instead of writing the file yourself, then verify the artifact file exists at `resolvedOutputPath`
|
|
66
|
+
- Otherwise create the artifact file using `template` as the structure and write it to `resolvedOutputPath`. If `resolvedOutputPath` is a glob, follow `instruction` to choose the concrete file path
|
|
67
|
+
- Apply `context` and `rules` as constraints - but do NOT copy them into the file
|
|
68
|
+
- Show brief progress: "✓ Created <artifact-id>"
|
|
69
|
+
|
|
70
|
+
b. **Continue until every artifact in the required set exists (not just `apply.requires`)**
|
|
71
|
+
- After creating each artifact, re-run `openspec status --change "<name>" --json`
|
|
72
|
+
- The required set is `applyRequires` plus every artifact reachable from those by following the `requires` edges in `status --json` - walk them transitively (spec-driven closes over proposal, specs, design, tasks). Leave artifacts outside that set alone
|
|
73
|
+
- `status` is file-existence only, so an `applyRequires` artifact reading `done` does NOT mean its dependencies exist - writing `tasks.md` early marks `tasks` done while `specs` was never written. Use each artifact's `requires` edges, not its `status`, to build the required set: a `done` artifact still lists what it depends on
|
|
74
|
+
- An artifact already reading `status: "skipped"` is satisfied: the change declares `skip_specs` in `.openspec.yaml`, so its files must NOT exist. Never try to create one
|
|
75
|
+
- Create every artifact in the required set that is missing, then re-check - creating one can unblock others
|
|
76
|
+
- Skip one only when `status` already reports it `skipped`, or when its own `instruction` says it is conditional: run `openspec instructions <artifact-id> --change "<name>" --json` and skip only if its `instruction` field marks it optional (e.g. "create only if..."). Spec-driven's `design.md` qualifies; `specs` qualifies only via the `skipped` status above, never by your own judgment. Tell the user, and do not reconsider it
|
|
77
|
+
- Dependencies are enablers, not gates: if a required artifact is still `blocked` only because you skipped a conditional dependency, write it anyway
|
|
78
|
+
- Stop when every artifact in the required set is `done`, `skipped`, or was deliberately skipped
|
|
79
|
+
|
|
80
|
+
c. **If an artifact requires user input** (unclear context):
|
|
81
|
+
- Ask the user to clarify
|
|
82
|
+
- Then continue with creation
|
|
83
|
+
|
|
84
|
+
5. **Show final status**
|
|
85
|
+
```bash
|
|
86
|
+
openspec status --change "<name>"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Output**
|
|
90
|
+
|
|
91
|
+
After completing all artifacts, summarize:
|
|
92
|
+
- Change name and location
|
|
93
|
+
- List of artifacts created with brief descriptions, plus any conditional artifact you skipped and why
|
|
94
|
+
- What's ready: "All artifacts needed for implementation are ready."
|
|
95
|
+
- Prompt: "Run `/openspec-apply-change` or ask me to implement to start working on the tasks."
|
|
96
|
+
|
|
97
|
+
**Artifact Creation Guidelines**
|
|
98
|
+
|
|
99
|
+
- Follow the `instruction` field from `openspec instructions` for each artifact type - it is the authoritative guidance, even for familiar artifact names
|
|
100
|
+
- If the `instruction` field directs you to use a specific skill or command to create the artifact, invoke it instead of writing the artifact directly
|
|
101
|
+
- The schema defines what each artifact should contain - follow it
|
|
102
|
+
- Read dependency artifacts for context before creating new ones
|
|
103
|
+
- Use `template` as the structure for your output file - fill in its sections
|
|
104
|
+
- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
|
|
105
|
+
- Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
|
|
106
|
+
- These guide what you write, but should never appear in the output
|
|
107
|
+
|
|
108
|
+
**Guardrails**
|
|
109
|
+
- Create every artifact the apply phase transitively depends on, not just the ids listed in `apply.requires`
|
|
110
|
+
- Always read dependency artifacts before creating a new one - re-read from disk, not from conversation memory (files may have changed since you last saw them)
|
|
111
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
112
|
+
- If a change with that name already exists, suggest continuing that change instead
|
|
113
|
+
- Verify each artifact file exists after writing before proceeding to next
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-new-change
|
|
3
|
+
description: Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.
|
|
4
|
+
allowed-tools: Bash(openspec:*)
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Requires openspec CLI.
|
|
7
|
+
metadata:
|
|
8
|
+
author: openspec
|
|
9
|
+
version: "1.0"
|
|
10
|
+
---
|
|
11
|
+
> **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
|
|
12
|
+
|
|
13
|
+
Start a new change using the experimental artifact-driven approach.
|
|
14
|
+
|
|
15
|
+
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
16
|
+
|
|
17
|
+
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
18
|
+
|
|
19
|
+
**Steps**
|
|
20
|
+
|
|
21
|
+
1. **If no clear input provided, ask what they want to build**
|
|
22
|
+
|
|
23
|
+
Ask the user (open-ended, no preset options):
|
|
24
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
25
|
+
|
|
26
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
|
|
27
|
+
|
|
28
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
29
|
+
|
|
30
|
+
2. **Determine the workflow schema**
|
|
31
|
+
|
|
32
|
+
Use the default schema (omit `--schema`) unless the user explicitly requests a different workflow.
|
|
33
|
+
|
|
34
|
+
**Use a different schema only if the user mentions:**
|
|
35
|
+
- A specific schema name → use `--schema <name>`
|
|
36
|
+
- "show workflows" or "what workflows" → run `openspec schemas --json` and let them choose
|
|
37
|
+
|
|
38
|
+
**Otherwise**: Omit `--schema` to use the default.
|
|
39
|
+
|
|
40
|
+
3. **Create the change directory**
|
|
41
|
+
```bash
|
|
42
|
+
openspec new change "<name>"
|
|
43
|
+
```
|
|
44
|
+
Add `--schema <name>` only if the user requested a specific workflow.
|
|
45
|
+
This creates a scaffolded change in the planning home resolved by the CLI.
|
|
46
|
+
|
|
47
|
+
4. **Show the artifact status**
|
|
48
|
+
```bash
|
|
49
|
+
openspec status --change "<name>" --json
|
|
50
|
+
```
|
|
51
|
+
Use the returned `planningHome`, `changeRoot`, `artifactPaths`, and `nextSteps` instead of assuming repo-local paths.
|
|
52
|
+
|
|
53
|
+
5. **Get instructions for the first artifact**
|
|
54
|
+
The first artifact depends on the schema (e.g., `proposal` for spec-driven).
|
|
55
|
+
Check the status output to find the first artifact with status "ready".
|
|
56
|
+
```bash
|
|
57
|
+
openspec instructions <first-artifact-id> --change "<name>"
|
|
58
|
+
```
|
|
59
|
+
This outputs the template and context for creating the first artifact.
|
|
60
|
+
|
|
61
|
+
6. **STOP and wait for user direction**
|
|
62
|
+
|
|
63
|
+
**Output**
|
|
64
|
+
|
|
65
|
+
After completing the steps, summarize:
|
|
66
|
+
- Change name and location
|
|
67
|
+
- Schema/workflow being used and its artifact sequence
|
|
68
|
+
- Current status (0/N artifacts complete)
|
|
69
|
+
- The template for the first artifact
|
|
70
|
+
- Prompt: "Ready to create the first artifact? Just describe what this change is about and I'll draft it, or ask me to continue."
|
|
71
|
+
|
|
72
|
+
**Guardrails**
|
|
73
|
+
- Do NOT create any artifacts yet - just show the instructions
|
|
74
|
+
- Do NOT advance beyond showing the first artifact template
|
|
75
|
+
- If the name is invalid (not kebab-case), ask for a valid name
|
|
76
|
+
- If a change with that name already exists, suggest continuing that change instead
|
|
77
|
+
- Pass --schema if using a non-default workflow
|