@juancr11/sibu 0.1.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.
Files changed (53) hide show
  1. package/README.md +198 -0
  2. package/bin/entrypoints/cli/command.js +1 -0
  3. package/bin/entrypoints/cli/create-program.js +33 -0
  4. package/bin/entrypoints/cli/execute-command.js +28 -0
  5. package/bin/entrypoints/cli/main.js +5 -0
  6. package/bin/features/doctor-project/command.js +1 -0
  7. package/bin/features/doctor-project/handler.js +194 -0
  8. package/bin/features/init-project/command.js +1 -0
  9. package/bin/features/init-project/handler.js +63 -0
  10. package/bin/features/list-skills/command.js +1 -0
  11. package/bin/features/list-skills/handler.js +55 -0
  12. package/bin/features/stop-managing-file/command.js +1 -0
  13. package/bin/features/stop-managing-file/handler.js +213 -0
  14. package/bin/features/sync-project/action-prompt.js +65 -0
  15. package/bin/features/sync-project/apply-action.js +81 -0
  16. package/bin/features/sync-project/command.js +1 -0
  17. package/bin/features/sync-project/handler.js +77 -0
  18. package/bin/features/sync-project/log-preview.js +62 -0
  19. package/bin/features/sync-project/preview.js +1 -0
  20. package/bin/features/use-skill/command.js +1 -0
  21. package/bin/features/use-skill/handler.js +197 -0
  22. package/bin/shared/catalog.js +199 -0
  23. package/bin/shared/hash.js +11 -0
  24. package/bin/shared/npm-version.js +178 -0
  25. package/bin/shared/object.js +3 -0
  26. package/bin/shared/paths.js +41 -0
  27. package/bin/shared/prompts.js +205 -0
  28. package/bin/shared/state.js +76 -0
  29. package/bin/shared/sync-preview.js +166 -0
  30. package/bin/shared/templates.js +60 -0
  31. package/bin/shared/types.js +1 -0
  32. package/bin/shared/workflow-mutation-readiness.js +30 -0
  33. package/bin/shared/workflow-targets.js +119 -0
  34. package/bin/sibu.js +6 -0
  35. package/package.json +68 -0
  36. package/templates/.codex/config.toml +1 -0
  37. package/templates/AGENTS.md +60 -0
  38. package/templates/CLAUDE.md +5 -0
  39. package/templates/GEMINI.md +5 -0
  40. package/templates/manifest.json +129 -0
  41. package/templates/skills/ai-implementation-plan-executor/SKILL.md +138 -0
  42. package/templates/skills/ai-implementation-planner/SKILL.md +213 -0
  43. package/templates/skills/architecture/command-pattern/SKILL.md +77 -0
  44. package/templates/skills/architecture/ddd-hexagonal/SKILL.md +212 -0
  45. package/templates/skills/clean-code/SKILL.md +109 -0
  46. package/templates/skills/feature-brief-writer/SKILL.md +219 -0
  47. package/templates/skills/golang/SKILL.md +82 -0
  48. package/templates/skills/nextjs/SKILL.md +94 -0
  49. package/templates/skills/product-vision-writer/SKILL.md +128 -0
  50. package/templates/skills/react/SKILL.md +75 -0
  51. package/templates/skills/scrum-master-planner/SKILL.md +191 -0
  52. package/templates/skills/technical-design-writer/SKILL.md +109 -0
  53. package/templates/skills/typescript/SKILL.md +111 -0
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@juancr11/sibu",
3
+ "version": "0.1.0",
4
+ "description": "CLI for setting up a local AI-augmented development workflow.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/juank11memphis/ai-augmented-workflow.git"
8
+ },
9
+ "homepage": "https://github.com/juank11memphis/ai-augmented-workflow#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/juank11memphis/ai-augmented-workflow/issues"
12
+ },
13
+ "bin": {
14
+ "sibu": "./bin/sibu.js"
15
+ },
16
+ "files": [
17
+ "bin/sibu.js",
18
+ "bin/entrypoints/",
19
+ "bin/features/",
20
+ "bin/shared/",
21
+ "!bin/**/*.test.js",
22
+ "!bin/echo.js",
23
+ "templates/",
24
+ "README.md"
25
+ ],
26
+ "scripts": {
27
+ "build": "tsc && chmod +x bin/sibu.js",
28
+ "check": "tsc --noEmit",
29
+ "verify": "pnpm build && pnpm check && pnpm test",
30
+ "dev:link": "pnpm install && pnpm build && pnpm link --global",
31
+ "dev:unlink": "pnpm unlink --global sibu",
32
+ "prepack": "pnpm run build",
33
+ "smoke:init": "node ./bin/sibu.js init",
34
+ "test": "pnpm build && node --test bin/shared/catalog.test.js bin/shared/npm-version.test.js bin/shared/prompts.test.js bin/shared/workflow-targets.test.js bin/shared/workflow-mutation-readiness.test.js bin/features/doctor-project/handler.test.js bin/features/use-skill/handler.test.js bin/features/stop-managing-file/handler.test.js",
35
+ "validate:packed-runtime": "node ./scripts/validate-packed-cli-runtime.mjs",
36
+ "validate:doctor-version-advisory": "pnpm build && node ./scripts/validate-doctor-version-advisory.mjs",
37
+ "validate:post-update-doctor-drift": "pnpm build && node ./scripts/validate-post-update-doctor-drift.mjs",
38
+ "validate:release": "pnpm verify && npm pack && pnpm run validate:packed-runtime && pnpm run validate:doctor-version-advisory && pnpm run validate:post-update-doctor-drift"
39
+ },
40
+ "keywords": [
41
+ "ai",
42
+ "agents",
43
+ "workflow",
44
+ "cli"
45
+ ],
46
+ "license": "UNLICENSED",
47
+ "engines": {
48
+ "node": ">=20"
49
+ },
50
+ "devDependencies": {
51
+ "@types/node": "^25.6.0",
52
+ "@types/react": "^19.2.14",
53
+ "typescript": "^6.0.2"
54
+ },
55
+ "packageManager": "pnpm@10.28.2",
56
+ "dependencies": {
57
+ "@clack/prompts": "^1.2.0",
58
+ "chalk": "^5.6.2",
59
+ "commander": "^14.0.3",
60
+ "gradient-string": "^3.0.0",
61
+ "ink": "^7.0.0",
62
+ "react": "^19.2.5"
63
+ },
64
+ "type": "module",
65
+ "publishConfig": {
66
+ "access": "public"
67
+ }
68
+ }
@@ -0,0 +1 @@
1
+ model_instructions_file = "../AGENTS.md"
@@ -0,0 +1,60 @@
1
+ # AGENTS.md
2
+
3
+ ## Project overview
4
+
5
+ {{PROJECT_OVERVIEW}}
6
+
7
+ ## Security and safety
8
+
9
+ - Do not commit secrets, credentials, tokens, or other sensitive data.
10
+ - Avoid destructive operations unless the user explicitly requests them or confirms the plan.
11
+ - Keep changes focused on the requested scope; do not introduce unrelated refactors or enhancements.
12
+ - If an implementation becomes materially more complex or risky than expected, stop and ask for explicit approval before continuing.
13
+
14
+ ## Agent-specific instructions
15
+
16
+ - Before any task that requires code changes, propose a brief plan and wait for user confirmation once per requested task.
17
+ - After confirmation, proceed with all agreed in-scope changes without re-asking.
18
+ - Ask again only if the scope changes materially, the approach becomes materially more complex or risky, or the user explicitly asks to review before continuing.
19
+ - Use Conventional Commits 1.0.0 for commit messages.
20
+
21
+ ## Communication style
22
+
23
+ - Keep responses as short as practical while still being clear and useful.
24
+ - Prefer concise, pragmatic answers over long explanations.
25
+ - Ask focused questions when needed; otherwise make reasonable assumptions and proceed.
26
+ - If the user wants more detail, they can ask follow-up questions.
27
+
28
+ ## Skill routing
29
+
30
+ - For any code-writing task, use `clean-code`.
31
+ - For requests to create, revise, or clarify a product vision, product strategy narrative, product north star, positioning, product principles, product voice, target user definition, product boundaries, or success signals, use `product-vision-writer`.
32
+ - For requests to create, revise, or clarify a business-level feature brief, feature definition, feature scope, MVP feature boundaries, business acceptance criteria, or product-level feature rationale, use `feature-brief-writer`.
33
+ - For requests to create, revise, or clarify a technical design, implementation-oriented design doc, architecture approach, technical tradeoffs, technical risks, or implementation plan for an approved feature, use `technical-design-writer`.
34
+ - For requests to create Epics, User Stories, Scrum planning artifacts, backlog slices, or delivery plans from an approved feature brief and technical design, use `scrum-master-planner`.
35
+ - For requests to turn a specific User Story into an implementation checklist, coding plan, step-by-step execution plan, or baby-step plan, use `ai-implementation-planner`.
36
+ - For requests to implement, execute, continue, or work through an existing story implementation plan under `docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.impl_plan/`, use `ai-implementation-plan-executor`.
37
+ {{OPTIONAL_SKILL_ROUTING}}
38
+
39
+ ## Sibu maintenance
40
+
41
+ This repository uses Sibu to manage AI workflow setup.
42
+
43
+ - `sibu init` is a one-time bootstrap command for adopting Sibu in a project. It creates the initial agent support files, keeps existing files unchanged, and creates `.sibu/state.json` metadata. Do not rerun `sibu init` to apply updates to an existing Sibu project.
44
+ - `sibu doctor` is the read-only health check for this workflow. It inspects whether Sibu-managed files are missing, modified, unrecorded, or generated from older templates.
45
+ - `sibu sync` is the post-init workflow maintenance command. It reviews template updates interactively, repairs missing managed files, adopts newly added managed templates, protects local edits from automatic overwrites, and lets the user apply safe updates, mark customized files as reviewed, write side templates, stop managing a file, or skip for later.
46
+
47
+ At the start of each session in this repository, run `sibu doctor` once before making changes or giving workflow guidance. Treat it as a read-only preflight check. Do not rerun it before every follow-up in the same session unless workflow-managed files changed, the user asks, or you need to verify Sibu state after applying updates.
48
+
49
+ After `sibu doctor` finishes, guide the user based on the outcome:
50
+
51
+ - If the workflow is healthy, mention that the Sibu check passed and proceed with the requested work.
52
+ - If `.sibu/state.json` is missing because the project has not been initialized, tell the user to run `sibu init` once before continuing.
53
+ - If managed workflow files are missing, unrecorded, modified, or generated from older templates, tell the user to run `sibu sync` to review and repair them.
54
+ - If `sibu doctor` cannot run because Sibu is unavailable, tell the user how to install or run Sibu for this project before relying on template status.
55
+
56
+ Sibu records managed workflow file metadata in `.sibu/state.json`, including template versions, file hashes, selected agent support, and whether files are `managed`, `customized`, or `unmanaged`.
57
+
58
+ If `.sibu/state.json` is missing because Sibu has not been adopted in the project, ask the user to run `sibu init` once.
59
+ If workflow files may be missing, modified, unrecorded, or drifted from the recorded Sibu state, ask the user to run `sibu doctor` first.
60
+ If `sibu doctor` reports missing managed files, unrecorded expected files, local edits, or older templates, ask the user to run `sibu sync`.
@@ -0,0 +1,5 @@
1
+ # CLAUDE.md
2
+
3
+ Follow the project instructions in `AGENTS.md`.
4
+
5
+ `AGENTS.md` is the source of truth for project overview, safety rules, and agent-specific workflow instructions.
@@ -0,0 +1,5 @@
1
+ # GEMINI.md
2
+
3
+ Follow the project instructions in `AGENTS.md`.
4
+
5
+ `AGENTS.md` is the source of truth for project overview, safety rules, and agent-specific workflow instructions.
@@ -0,0 +1,129 @@
1
+ {
2
+ "templateVersion": "42",
3
+ "templates": {
4
+ "AGENTS.md": {
5
+ "version": "18",
6
+ "description": "Project-level agent instructions and Sibu maintenance guidance.",
7
+ "changes": [
8
+ "Renames the workflow maintenance commands and state path from Echo to Sibu so generated guidance matches the new product name."
9
+ ]
10
+ },
11
+ ".codex/config.toml": {
12
+ "version": "1",
13
+ "description": "Codex configuration pointing to AGENTS.md.",
14
+ "changes": [
15
+ "Configures Codex to use the root AGENTS.md instructions file."
16
+ ]
17
+ },
18
+ "GEMINI.md": {
19
+ "version": "1",
20
+ "description": "Gemini instructions delegating to AGENTS.md.",
21
+ "changes": [
22
+ "Delegates Gemini project instructions to AGENTS.md as the source of truth."
23
+ ]
24
+ },
25
+ "CLAUDE.md": {
26
+ "version": "1",
27
+ "description": "Claude instructions delegating to AGENTS.md.",
28
+ "changes": [
29
+ "Delegates Claude project instructions to AGENTS.md as the source of truth."
30
+ ]
31
+ },
32
+ "skills/clean-code/SKILL.md": {
33
+ "version": "4",
34
+ "description": "Mandatory clean-code skill installed once at the shared .agents/skills workspace path.",
35
+ "changes": [
36
+ "Installs the clean-code skill once at .agents/skills/clean-code/SKILL.md for any selected agent instead of duplicating per-agent copies.",
37
+ "Uses the shared .agents/skills workspace path to test common skill discovery across Codex, Gemini, and Claude."
38
+ ]
39
+ },
40
+ "skills/product-vision-writer/SKILL.md": {
41
+ "version": "3",
42
+ "description": "Mandatory product vision writer skill installed once at the shared .agents/skills workspace path.",
43
+ "changes": [
44
+ "Changes product vision discovery to ask one question at a time so users can shape the vision through a focused interview instead of answering a large batch up front."
45
+ ]
46
+ },
47
+ "skills/feature-brief-writer/SKILL.md": {
48
+ "version": "2",
49
+ "description": "Mandatory feature brief writer skill installed once at the shared .agents/skills workspace path.",
50
+ "changes": [
51
+ "Clarifies that agents must not draft feature briefs from vague feature requests and should ask one focused discovery question at a time until the feature intent is clear.",
52
+ "Adds minimum context guidance so feature briefs are written only after the feature intent, target user or scenario, desired outcome, and rough MVP boundary are clear."
53
+ ]
54
+ },
55
+ "skills/technical-design-writer/SKILL.md": {
56
+ "version": "8",
57
+ "description": "Mandatory technical design writer skill installed once at the shared .agents/skills workspace path.",
58
+ "changes": [
59
+ "Updates the technical design examples to refer to the Sibu command names instead of the old Echo branding."
60
+ ]
61
+ },
62
+ "skills/typescript/SKILL.md": {
63
+ "version": "1",
64
+ "description": "Selectable TypeScript skill installed when TypeScript language support is selected.",
65
+ "changes": [
66
+ "Adds an optional TypeScript skill for projects that use .ts or .tsx files."
67
+ ]
68
+ },
69
+ "skills/golang/SKILL.md": {
70
+ "version": "1",
71
+ "description": "Selectable Go skill installed when Go language support is selected.",
72
+ "changes": [
73
+ "Adds an optional Go skill with concise, Effective Go–style guidance for .go files, package APIs, interfaces, errors, receivers, concurrency, and tests."
74
+ ]
75
+ },
76
+ "skills/architecture/ddd-hexagonal/SKILL.md": {
77
+ "version": "1",
78
+ "description": "Selectable back-end architecture skill for DDD and Hexagonal Architecture.",
79
+ "changes": [
80
+ "Adds an optional DDD + Hexagonal Architecture skill for projects that want opinionated back-end architecture guidance."
81
+ ]
82
+ },
83
+ "skills/architecture/command-pattern/SKILL.md": {
84
+ "version": "2",
85
+ "description": "Selectable architecture skill for command-oriented vertical slices using Command Pattern, Hexagonal Architecture, and DDD principles.",
86
+ "changes": [
87
+ "Reframes Command Pattern guidance around command-oriented vertical slices, feature-local ports, thin entrypoints, and infrastructure adapters."
88
+ ]
89
+ },
90
+ "skills/nextjs/SKILL.md": {
91
+ "version": "1",
92
+ "description": "Selectable framework skill for Next.js App Router and framework-specific behavior.",
93
+ "changes": [
94
+ "Adds an optional Next.js skill for projects that use App Router pages, layouts, route handlers, metadata, and Server/Client Component boundaries."
95
+ ]
96
+ },
97
+ "skills/react/SKILL.md": {
98
+ "version": "1",
99
+ "description": "Selectable React skill for component design, props, state ownership, and presentational boundaries.",
100
+ "changes": [
101
+ "Adds an optional React skill for projects that create or change React components, props, state ownership, or presentational and data-owning boundaries."
102
+ ]
103
+ },
104
+ "skills/scrum-master-planner/SKILL.md": {
105
+ "version": "2",
106
+ "description": "Mandatory Scrum planner skill for creating pragmatic Epics and User Stories from approved feature and technical design docs.",
107
+ "changes": [
108
+ "Moves Scrum User Stories into an Epic-local stories/ folder.",
109
+ "Adds two-digit execution-order filename prefixes for User Stories, with shared numbers indicating parallelizable work."
110
+ ]
111
+ },
112
+ "skills/ai-implementation-planner/SKILL.md": {
113
+ "version": "4",
114
+ "description": "Mandatory AI implementation planner skill for turning one approved User Story into small, story-local implementation step files.",
115
+ "changes": [
116
+ "Changes AI implementation planner step files to use lowercase .md extensions.",
117
+ "Updates the step-file format to use Markdown headings for Step, Goal, Scope, Files, and Done when sections."
118
+ ]
119
+ },
120
+ "skills/ai-implementation-plan-executor/SKILL.md": {
121
+ "version": "3",
122
+ "description": "Mandatory AI implementation plan executor skill for implementing existing story implementation plans one reviewed step at a time.",
123
+ "changes": [
124
+ "Changes implementation plan executor review status to record the current Git user in the Approved by field.",
125
+ "Keeps the approved-step commit gate before moving to the next implementation step."
126
+ ]
127
+ }
128
+ }
129
+ }
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: ai-implementation-plan-executor
3
+ description: Execute an existing ai-implementation-planner story implementation plan one ordered step at a time. Use when asked to implement, execute, continue, or work through a story implementation plan under docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.impl_plan/.
4
+ ---
5
+
6
+ # AI Implementation Plan Executor
7
+
8
+ ## Purpose
9
+
10
+ Execute one existing story implementation plan, one ordered step file at a time, with human review between steps.
11
+
12
+ This skill owns implementation execution from an existing `.impl_plan/` folder. It does not create implementation plans, change story scope, or skip user review gates.
13
+
14
+ ## Required source context
15
+
16
+ The user must provide or clearly identify exactly one User Story or implementation plan folder:
17
+
18
+ ```txt
19
+ docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.md
20
+ ```
21
+
22
+ or:
23
+
24
+ ```txt
25
+ docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.impl_plan/
26
+ ```
27
+
28
+ Before implementing any step, read:
29
+
30
+ ```txt
31
+ docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.md
32
+ docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.impl_plan/*.md
33
+ docs/features/<feature-slug>/epics/<epic-slug>/epic_brief.md
34
+ docs/features/<feature-slug>/feature_brief.md
35
+ docs/features/<feature-slug>/technical_design.md
36
+ ```
37
+
38
+ Also read `docs/product-vision.md` when product fit, target user, scope boundaries, or success signals are ambiguous.
39
+
40
+ Before changing code, read and apply the implementation skills required by the plan and repository routing:
41
+
42
+ - always read and apply `clean-code`
43
+ - read and apply architecture skills when relevant, such as `command-pattern` or `ddd-hexagonal`
44
+ - read and apply language skills when relevant, such as `typescript`
45
+ - read and apply framework skills when relevant, such as `react` or `nextjs`
46
+
47
+ Inspect existing code, tests, scripts, and docs only as needed for the current step.
48
+
49
+ ## Hard start rule
50
+
51
+ If the `.impl_plan/` folder does not exist, is empty, or has no ordered `.md` step files:
52
+
53
+ 1. Stop.
54
+ 2. Tell the user the implementation plan is missing.
55
+ 3. Instruct the user to use `ai-implementation-planner` to create the implementation plan first.
56
+ 4. Do not infer steps from the story or technical design.
57
+
58
+ If required source context is missing:
59
+
60
+ 1. Stop.
61
+ 2. Say which file is missing.
62
+ 3. Ask the user to create or restore the missing artifact first.
63
+ 4. Do not invent implementation scope from partial context.
64
+
65
+ ## Step execution model
66
+
67
+ Work on exactly one step at a time.
68
+
69
+ A step file is considered approved only when it contains this section:
70
+
71
+ ```md
72
+ ## Review status
73
+
74
+ - Status: approved
75
+ ```
76
+
77
+ When starting or resuming a plan:
78
+
79
+ 1. Read all step files in filename order.
80
+ 2. Identify the first step file that is not approved.
81
+ 3. Implement only that step.
82
+ 4. Run the validation named in that step when practical.
83
+ 5. Report what changed, validation results, and any risks.
84
+ 6. Stop and wait for explicit user confirmation before moving to the next step.
85
+
86
+ Do not begin the next step in the same response unless the user has already explicitly approved the current step in this turn.
87
+
88
+ ## User review gate
89
+
90
+ After implementing a step, say that the step is ready for review and that you are waiting for confirmation before continuing.
91
+
92
+ If the user asks questions or requests changes, stay on the same step until those changes are complete.
93
+
94
+ When the user explicitly approves the current step, update that step file by adding or updating:
95
+
96
+ ```md
97
+ ## Review status
98
+
99
+ - Status: approved
100
+ - Approved by: <current git user>
101
+ - Approved at: <ISO-8601 timestamp>
102
+ ```
103
+
104
+ Before writing the approval marker, identify the current Git user with `git config user.name`; if it is unavailable, use `git config user.email`. Use that value for `Approved by`. After writing the approval marker, commit all changes for the approved step before continuing. Use a Conventional Commits 1.0.0 message that describes the completed step. If the commit fails, stop and report the failure instead of continuing.
105
+
106
+ Then continue with the next unapproved step only after the approval marker is written and the approved step changes are committed.
107
+
108
+ If the user asks to continue without clearly approving the current step, ask for explicit approval before marking it approved, committing, or moving on.
109
+
110
+ ## Implementation rules
111
+
112
+ Do:
113
+
114
+ - preserve the source story scope and acceptance criteria
115
+ - follow the current step file exactly unless it conflicts with source context
116
+ - keep changes focused on the current step's `## Scope` and `## Files`
117
+ - use existing project patterns and the relevant skills
118
+ - run focused validation for the current step when possible
119
+ - stop and ask if the step is ambiguous, missing required files, or conflicts with the technical design
120
+
121
+ Do not:
122
+
123
+ - create a missing plan from scratch
124
+ - implement multiple unapproved steps in one pass
125
+ - mark a step approved before the user explicitly approves it
126
+ - add product scope absent from the story, Epic, feature brief, technical design, or step file
127
+ - continue past a failed validation without reporting it and asking how to proceed
128
+ - leave approved step changes uncommitted before moving to the next step
129
+
130
+ ## Final response behavior after each step
131
+
132
+ After implementing one step, briefly report:
133
+
134
+ - current step file path
135
+ - summary of changes made
136
+ - validation run and result
137
+ - any risks, blockers, or follow-up questions
138
+ - that you are waiting for user approval before marking the step approved, committing it, and continuing to the next step
@@ -0,0 +1,213 @@
1
+ ---
2
+ name: ai-implementation-planner
3
+ description: Turn one approved User Story Markdown file into LLM-sized implementation step files. Use when asked to create an implementation plan, coding checklist, step-by-step execution plan, or baby-step plan for completing a specific User Story from docs/features/<feature-slug>/epics/<epic-slug>/stories/.
4
+ ---
5
+
6
+ # AI Implementation Planner
7
+
8
+ ## Purpose
9
+
10
+ Turn one approved User Story into a set of concrete Markdown step files an AI coding agent can execute to complete the story safely and completely.
11
+
12
+ This skill owns implementation planning for one story at a time. It does not own product scope, technical design decisions, Scrum planning, or code implementation.
13
+
14
+ ## Required input
15
+
16
+ The user must provide or clearly identify exactly one User Story file:
17
+
18
+ ```txt
19
+ docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.md
20
+ ```
21
+
22
+ Do not create an implementation plan from a vague request, Epic brief, feature brief, or technical design alone.
23
+
24
+ ## Required source context
25
+
26
+ Before planning, read:
27
+
28
+ ```txt
29
+ docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.md
30
+ docs/features/<feature-slug>/epics/<epic-slug>/epic_brief.md
31
+ docs/features/<feature-slug>/feature_brief.md
32
+ docs/features/<feature-slug>/technical_design.md
33
+ ```
34
+
35
+ Also read `docs/product-vision.md` when product fit, target user, scope boundaries, or success signals are ambiguous.
36
+
37
+ Before writing the step files, read and apply the required planning skills as source context:
38
+
39
+ - always read and apply `clean-code`
40
+ - read and apply the selected architecture skill when relevant, such as `command-pattern` or `ddd-hexagonal`
41
+ - read and apply language skills when relevant, such as `typescript`
42
+ - read and apply framework skills when relevant, such as `react` or `nextjs`
43
+
44
+ Use those skills to shape implementation steps. Do not copy their full guidance into the step files.
45
+
46
+ Inspect existing code, tests, scripts, and docs only as much as needed to make the step files concrete. Avoid broad codebase analysis.
47
+
48
+ ## Hard start rule
49
+
50
+ If the User Story file is missing or unclear:
51
+
52
+ 1. Stop.
53
+ 2. Ask the user for the exact User Story file path.
54
+ 3. Do not infer the story from nearby files.
55
+
56
+ If any required source context file is missing:
57
+
58
+ 1. Stop.
59
+ 2. Say which file is missing.
60
+ 3. Ask the user to create or restore the missing artifact first.
61
+ 4. Do not invent implementation scope from partial context.
62
+
63
+ ## Output location
64
+
65
+ Write one Markdown file per implementation step under a story-local implementation plan folder:
66
+
67
+ ```txt
68
+ docs/features/<feature_slug>/epics/<epic_slug>/stories/<order>-<story_slug>.impl_plan/<step_order>-<step_slug>.md
69
+ ```
70
+
71
+ Use the source story filename, without its `.md` extension, as the implementation plan folder name plus `.impl_plan`.
72
+
73
+ Examples:
74
+
75
+ ```txt
76
+ stories/01-resolve-a-selectable-skill-by-name.md
77
+ stories/01-resolve-a-selectable-skill-by-name.impl_plan/01-add-skill-resolution-domain-step.md
78
+ stories/01-resolve-a-selectable-skill-by-name.impl_plan/02-wire-skill-resolution-command-step.md
79
+ ```
80
+
81
+ File naming rules:
82
+
83
+ - use two-digit step order prefixes (`01`, `02`, `03`) unless the repository uses another explicit convention
84
+ - use lowercase kebab-case step slugs
85
+ - keep each step file focused on exactly one executable implementation step
86
+ - use the lowercase `.md` extension exactly as shown
87
+ - if the correct story slug, step order, or step slug is unclear, stop and ask before writing files
88
+
89
+ ## Planning rules
90
+
91
+ Create pragmatic implementation step files, not a second technical design.
92
+
93
+ Each step file must be a concrete implementation step, not a discovery, scope-confirmation, or generic review step. The skill performs source reading and targeted inspection before writing the step files; each step tells the AI what to change, where to change it, how to implement it at a high level, and how to know that step is done.
94
+
95
+ Do:
96
+
97
+ - preserve the User Story scope and acceptance criteria
98
+ - sequence concrete implementation, test, validation, and cleanup steps across separate step files
99
+ - map acceptance criteria to one or more step files
100
+ - call out dependencies, sequencing constraints, and risk checkpoints
101
+ - include test, build, lint, or manual validation commands when known
102
+ - include a stop-and-ask condition when the implementation would exceed the technical design
103
+
104
+ Do not:
105
+
106
+ - write or modify production code
107
+ - add product scope absent from the story, Epic, feature brief, or technical design
108
+ - duplicate the full technical design
109
+ - include prerequisite reading, scope confirmation, or repository inspection as step files
110
+ - create task noise such as “review the code” without a specific implementation or validation purpose
111
+ - prescribe architecture that conflicts with the selected architecture skill or technical design
112
+
113
+ ## Workflow
114
+
115
+ ### 1. Read and bound the story
116
+
117
+ Identify:
118
+
119
+ - story title and source path
120
+ - target user or contributor
121
+ - desired outcome
122
+ - in-scope work
123
+ - out-of-scope boundaries
124
+ - acceptance criteria
125
+ - validation expectations
126
+
127
+ If the story lacks testable acceptance criteria, stop and ask for the User Story to be clarified.
128
+
129
+ ### 2. Read feature and technical context
130
+
131
+ From the Epic and feature brief, identify delivery boundaries and user value.
132
+
133
+ From the technical design, identify:
134
+
135
+ - intended implementation approach
136
+ - affected commands, modules, files, adapters, docs, or tests
137
+ - known risks or unresolved decisions
138
+ - expected validation commands or checks
139
+
140
+ ### 3. Inspect the repository narrowly
141
+
142
+ Inspect only the files and commands needed to make the checklist actionable. Useful targets include:
143
+
144
+ - existing feature folders or handlers related to the story
145
+ - entrypoints or command wiring mentioned by the technical design
146
+ - tests covering similar behavior
147
+ - package scripts, build commands, or validation commands
148
+ - docs that must be updated by the story
149
+
150
+ ### 4. Write the implementation step files
151
+
152
+ Create one `.md` file per step in the story-local `.impl_plan` folder. Use this structure for every step file:
153
+
154
+ ```md
155
+ # Step: <Imperative step title>
156
+
157
+ ## Goal
158
+
159
+ <One short paragraph describing the implementation outcome for this step.>
160
+
161
+ ## Scope
162
+
163
+ - <Specific in-scope action or boundary>
164
+ - <Specific in-scope action or boundary>
165
+ - Do not <explicit out-of-scope boundary when useful>
166
+
167
+ ## Files
168
+
169
+ - <path/to/file.ext>
170
+ - <path/to/test_file.ext>
171
+
172
+ ## Done when
173
+
174
+ - <Specific observable completion condition>
175
+ - <Acceptance criterion or technical requirement covered by this step is satisfied>
176
+ - <Relevant compile, test, lint, build, or manual validation passes>
177
+ ```
178
+
179
+ Step-file requirements:
180
+
181
+ - the first line must be `# Step: <Imperative step title>`
182
+ - use exactly these Markdown section headings: `## Goal`, `## Scope`, `## Files`, `## Done when`
183
+ - keep each step small enough for one AI coding pass
184
+ - name every known file, module, command, or artifact to change or validate
185
+ - include explicit out-of-scope boundaries in `Scope` when they prevent scope creep
186
+ - include validation commands in `Done when` when known
187
+ - ensure the full set of step files covers every acceptance criterion
188
+
189
+ If something required for a concrete step is unclear or missing, do not assume. Stop and ask before proceeding.
190
+
191
+ ### 5. Check plan quality
192
+
193
+ Before finishing, verify:
194
+
195
+ - the step files are for exactly one User Story
196
+ - every acceptance criterion maps to at least one step file
197
+ - every step file names the file, module, command, or artifact to change when known
198
+ - every step file explains the high-level implementation goal and scope
199
+ - every step file has clear done conditions
200
+ - validation is explicit enough to prove the story is complete
201
+ - the step files do not add scope beyond the source artifacts
202
+ - architecture and code-quality steps align with the relevant skills
203
+
204
+ ## Final response behavior
205
+
206
+ After writing the files, briefly report:
207
+
208
+ - the implementation plan folder path
209
+ - the step file paths created
210
+ - the source User Story path
211
+ - any risks or stop conditions captured in the step files
212
+
213
+ Do not paste the full step files unless the user asks to review them inline.