@aicgen/aicgen 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/workflows/sdlc.md +133 -0
- package/dist/index.js +274 -5
- package/package.json +1 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# SDLC Workflows
|
|
2
|
+
|
|
3
|
+
## /spec [name]
|
|
4
|
+
Capture the full specification for a feature or task before any code is written.
|
|
5
|
+
|
|
6
|
+
**Steps:**
|
|
7
|
+
1. Ask for a feature name if not provided as an argument
|
|
8
|
+
2. Ask the user to describe: goal, user stories, acceptance criteria, constraints, and what is explicitly out of scope
|
|
9
|
+
3. Create `docs/specs/` directory if it does not exist
|
|
10
|
+
4. Save the gathered information to `docs/specs/{name}.md` using the template below
|
|
11
|
+
5. Confirm the file was saved and prompt the user to run `/research`
|
|
12
|
+
|
|
13
|
+
**Output template (`docs/specs/{name}.md`):**
|
|
14
|
+
```markdown
|
|
15
|
+
# Spec: {name}
|
|
16
|
+
|
|
17
|
+
## Goal
|
|
18
|
+
{goal}
|
|
19
|
+
|
|
20
|
+
## User Stories
|
|
21
|
+
{user stories}
|
|
22
|
+
|
|
23
|
+
## Acceptance Criteria
|
|
24
|
+
{acceptance criteria}
|
|
25
|
+
|
|
26
|
+
## Constraints
|
|
27
|
+
{constraints}
|
|
28
|
+
|
|
29
|
+
## Out of Scope
|
|
30
|
+
{out of scope}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## /research
|
|
36
|
+
Analyze the active spec with internal codebase scanning and external web research.
|
|
37
|
+
|
|
38
|
+
**Pre-condition:** An active spec must exist in `docs/specs/` — if none is found, tell the user to run `/spec` first and stop.
|
|
39
|
+
|
|
40
|
+
**Steps:**
|
|
41
|
+
1. Read the most recently modified spec from `docs/specs/`
|
|
42
|
+
2. **Internal scan:** Search the codebase for related code, existing patterns, similar implementations, dependencies, and potential conflicts relevant to the spec
|
|
43
|
+
3. **Infrastructure prompt:** Ask the user:
|
|
44
|
+
> "Does this feature require infrastructure decisions?"
|
|
45
|
+
> - Cost-optimised / serverless (pay-per-use: Cloud Run, Cloud Functions, AWS Lambda, Fargate, etc.)
|
|
46
|
+
> - Fixed / dedicated (predictable load: Kubernetes, EC2, GKE, dedicated VMs, etc.)
|
|
47
|
+
> - No infrastructure involved
|
|
48
|
+
4. **Web research:** Search for architecture patterns, best practices, reference implementations, and cost comparisons relevant to the spec. Bias results toward the chosen infrastructure model if one was selected.
|
|
49
|
+
5. Surface: recommended approaches, trade-offs, cost implications, and links to reference material
|
|
50
|
+
6. Suggest any improvements or clarifications to the spec based on findings
|
|
51
|
+
7. Append a `## Research Findings` section to the active spec file containing: internal findings, web research summary, infrastructure recommendation (if applicable), and suggested spec improvements
|
|
52
|
+
8. Prompt the user to run `/plan`
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## /plan
|
|
57
|
+
Produce a phased, checkpoint-driven implementation plan based on the spec and research findings.
|
|
58
|
+
|
|
59
|
+
**Pre-condition:** An active spec with a `## Research Findings` section must exist — if research has not been run, warn the user and ask them to confirm they want to skip it before proceeding.
|
|
60
|
+
|
|
61
|
+
**Steps:**
|
|
62
|
+
1. Read the active spec (including research findings) from `docs/specs/`
|
|
63
|
+
2. Analyse the codebase to understand existing structure, patterns, and conventions
|
|
64
|
+
3. Break the implementation into phases — each phase must be independently verifiable
|
|
65
|
+
4. For each phase, list: files to create or modify, key decisions, and how to verify it is complete
|
|
66
|
+
5. Identify risks and propose mitigations
|
|
67
|
+
6. Create `docs/plans/` directory if it does not exist
|
|
68
|
+
7. Save the plan to `docs/plans/{spec-name}.md`
|
|
69
|
+
8. Confirm the file was saved and prompt the user to run `/build`
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## /build [phase]
|
|
74
|
+
Execute the next (or a specified) phase of the current implementation plan.
|
|
75
|
+
|
|
76
|
+
**Pre-condition:** An active plan must exist in `docs/plans/` — if none is found, tell the user to run `/plan` first and stop.
|
|
77
|
+
|
|
78
|
+
**Steps:**
|
|
79
|
+
1. Read the active plan from `docs/plans/`
|
|
80
|
+
2. Determine the next incomplete phase (or the phase specified by the argument)
|
|
81
|
+
3. Announce which phase is being executed and what it covers
|
|
82
|
+
4. Implement the phase step by step, following existing codebase patterns and conventions
|
|
83
|
+
5. After completing the phase, summarise what was changed and what was created
|
|
84
|
+
6. Mark the phase as complete in the plan file
|
|
85
|
+
7. Run any tests relevant to the completed phase and report results
|
|
86
|
+
8. Pause and ask: "Phase {n} complete. Continue to phase {n+1}?" before proceeding
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## /check
|
|
91
|
+
Verify the current implementation against the active spec — tests, code review, and regression check.
|
|
92
|
+
|
|
93
|
+
**Steps:**
|
|
94
|
+
1. Read the active spec from `docs/specs/` and the active plan from `docs/plans/`
|
|
95
|
+
2. Run the full test suite and report results
|
|
96
|
+
3. Review all changed files against the spec's acceptance criteria — flag any gaps
|
|
97
|
+
4. Check for regressions by reviewing changed files for unintended side effects
|
|
98
|
+
5. Produce a structured report:
|
|
99
|
+
- ✅ Acceptance criteria met
|
|
100
|
+
- ❌ Acceptance criteria not met (with details)
|
|
101
|
+
- ⚠️ Potential regressions (with details)
|
|
102
|
+
- 📋 Suggested fixes
|
|
103
|
+
6. If all criteria are met and no regressions are found, prompt the user to run `/ship`
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## /ship
|
|
108
|
+
Pre-flight wrap-up — verify everything is ready, then draft a PR description.
|
|
109
|
+
|
|
110
|
+
**Steps:**
|
|
111
|
+
1. Run the full test suite — stop and report if any tests fail
|
|
112
|
+
2. Read the active spec and plan
|
|
113
|
+
3. Verify that `docs/specs/{name}.md` and `docs/plans/{name}.md` are up to date
|
|
114
|
+
4. Check for uncommitted changes and list them
|
|
115
|
+
5. Draft a PR description referencing the spec and plan:
|
|
116
|
+
```
|
|
117
|
+
## Summary
|
|
118
|
+
{goal from spec}
|
|
119
|
+
|
|
120
|
+
## Changes
|
|
121
|
+
{summary of phases completed}
|
|
122
|
+
|
|
123
|
+
## Spec
|
|
124
|
+
docs/specs/{name}.md
|
|
125
|
+
|
|
126
|
+
## Plan
|
|
127
|
+
docs/plans/{name}.md
|
|
128
|
+
|
|
129
|
+
## Test plan
|
|
130
|
+
{acceptance criteria from spec as a checklist}
|
|
131
|
+
```
|
|
132
|
+
6. Present the PR description to the user for review
|
|
133
|
+
7. Ask: "Ready to commit and push?" — if yes, stage all changes and create a commit with a conventional commit message
|
package/dist/index.js
CHANGED
|
@@ -66052,6 +66052,140 @@ const validateUser = (data: unknown) => {
|
|
|
66052
66052
|
\`\`\`
|
|
66053
66053
|
`,
|
|
66054
66054
|
"workflows/README.md": "# SDLC Workflows\n\naicgen injects a structured 6-command SDLC workflow into every generated assistant configuration. These commands guide the AI assistant through a repeatable, artifact-driven development lifecycle.\n\n## The Flow\n\n```\n/spec → /research → /plan → /build → /check → /ship\n```\n\n| Step | Command | Output artifact |\n|------|---------|----------------|\n| 1 | [`/spec [name]`](sdlc/spec.md) | `docs/specs/{name}.md` |\n| 2 | [`/research`](sdlc/research.md) | Appends `## Research Findings` to spec |\n| 3 | [`/plan`](sdlc/plan.md) | `docs/plans/{name}.md` |\n| 4 | [`/build [phase?]`](sdlc/build.md) | Code changes |\n| 5 | [`/check`](sdlc/check.md) | Inline verification report |\n| 6 | [`/ship`](sdlc/ship.md) | PR description draft |\n\n## Commands\n\n- [/spec](sdlc/spec.md) — Capture feature requirements before writing any code\n- [/research](sdlc/research.md) — Codebase scan + web research + infrastructure preference\n- [/plan](sdlc/plan.md) — Phased, checkpoint-driven implementation plan\n- [/build](sdlc/build.md) — Execute plan phase by phase with review checkpoints\n- [/check](sdlc/check.md) — Verify implementation against spec and run tests\n- [/ship](sdlc/ship.md) — Pre-flight checks and PR description draft\n\n## Output directory\n\nAll spec and plan artifacts are saved to the `docs/` directory in the user's project. This directory is created automatically if it does not exist.\n\n```\ndocs/\n├── specs/\n│ └── {feature-name}.md\n└── plans/\n └── {feature-name}.md\n```\n\n## Guard rails\n\n| Command | Pre-condition |\n|---------|--------------|\n| `/research` | Active spec in `docs/specs/` — prompts `/spec` if missing |\n| `/plan` | Active spec with `## Research Findings` — warns if research was skipped |\n| `/build` | Active plan in `docs/plans/` — prompts `/plan` if missing |\n\n## Source\n\nCommand definitions are maintained in [`aicgen/data/workflows/sdlc.md`](https://github.com/aicgen/aicgen/blob/main/data/workflows/sdlc.md) and injected into every generated config at `aicgen init` time.\n",
|
|
66055
|
+
"workflows/sdlc.md": `# SDLC Workflows
|
|
66056
|
+
|
|
66057
|
+
## /spec [name]
|
|
66058
|
+
Capture the full specification for a feature or task before any code is written.
|
|
66059
|
+
|
|
66060
|
+
**Steps:**
|
|
66061
|
+
1. Ask for a feature name if not provided as an argument
|
|
66062
|
+
2. Ask the user to describe: goal, user stories, acceptance criteria, constraints, and what is explicitly out of scope
|
|
66063
|
+
3. Create \`docs/specs/\` directory if it does not exist
|
|
66064
|
+
4. Save the gathered information to \`docs/specs/{name}.md\` using the template below
|
|
66065
|
+
5. Confirm the file was saved and prompt the user to run \`/research\`
|
|
66066
|
+
|
|
66067
|
+
**Output template (\`docs/specs/{name}.md\`):**
|
|
66068
|
+
\`\`\`markdown
|
|
66069
|
+
# Spec: {name}
|
|
66070
|
+
|
|
66071
|
+
## Goal
|
|
66072
|
+
{goal}
|
|
66073
|
+
|
|
66074
|
+
## User Stories
|
|
66075
|
+
{user stories}
|
|
66076
|
+
|
|
66077
|
+
## Acceptance Criteria
|
|
66078
|
+
{acceptance criteria}
|
|
66079
|
+
|
|
66080
|
+
## Constraints
|
|
66081
|
+
{constraints}
|
|
66082
|
+
|
|
66083
|
+
## Out of Scope
|
|
66084
|
+
{out of scope}
|
|
66085
|
+
\`\`\`
|
|
66086
|
+
|
|
66087
|
+
---
|
|
66088
|
+
|
|
66089
|
+
## /research
|
|
66090
|
+
Analyze the active spec with internal codebase scanning and external web research.
|
|
66091
|
+
|
|
66092
|
+
**Pre-condition:** An active spec must exist in \`docs/specs/\` — if none is found, tell the user to run \`/spec\` first and stop.
|
|
66093
|
+
|
|
66094
|
+
**Steps:**
|
|
66095
|
+
1. Read the most recently modified spec from \`docs/specs/\`
|
|
66096
|
+
2. **Internal scan:** Search the codebase for related code, existing patterns, similar implementations, dependencies, and potential conflicts relevant to the spec
|
|
66097
|
+
3. **Infrastructure prompt:** Ask the user:
|
|
66098
|
+
> "Does this feature require infrastructure decisions?"
|
|
66099
|
+
> - Cost-optimised / serverless (pay-per-use: Cloud Run, Cloud Functions, AWS Lambda, Fargate, etc.)
|
|
66100
|
+
> - Fixed / dedicated (predictable load: Kubernetes, EC2, GKE, dedicated VMs, etc.)
|
|
66101
|
+
> - No infrastructure involved
|
|
66102
|
+
4. **Web research:** Search for architecture patterns, best practices, reference implementations, and cost comparisons relevant to the spec. Bias results toward the chosen infrastructure model if one was selected.
|
|
66103
|
+
5. Surface: recommended approaches, trade-offs, cost implications, and links to reference material
|
|
66104
|
+
6. Suggest any improvements or clarifications to the spec based on findings
|
|
66105
|
+
7. Append a \`## Research Findings\` section to the active spec file containing: internal findings, web research summary, infrastructure recommendation (if applicable), and suggested spec improvements
|
|
66106
|
+
8. Prompt the user to run \`/plan\`
|
|
66107
|
+
|
|
66108
|
+
---
|
|
66109
|
+
|
|
66110
|
+
## /plan
|
|
66111
|
+
Produce a phased, checkpoint-driven implementation plan based on the spec and research findings.
|
|
66112
|
+
|
|
66113
|
+
**Pre-condition:** An active spec with a \`## Research Findings\` section must exist — if research has not been run, warn the user and ask them to confirm they want to skip it before proceeding.
|
|
66114
|
+
|
|
66115
|
+
**Steps:**
|
|
66116
|
+
1. Read the active spec (including research findings) from \`docs/specs/\`
|
|
66117
|
+
2. Analyse the codebase to understand existing structure, patterns, and conventions
|
|
66118
|
+
3. Break the implementation into phases — each phase must be independently verifiable
|
|
66119
|
+
4. For each phase, list: files to create or modify, key decisions, and how to verify it is complete
|
|
66120
|
+
5. Identify risks and propose mitigations
|
|
66121
|
+
6. Create \`docs/plans/\` directory if it does not exist
|
|
66122
|
+
7. Save the plan to \`docs/plans/{spec-name}.md\`
|
|
66123
|
+
8. Confirm the file was saved and prompt the user to run \`/build\`
|
|
66124
|
+
|
|
66125
|
+
---
|
|
66126
|
+
|
|
66127
|
+
## /build [phase]
|
|
66128
|
+
Execute the next (or a specified) phase of the current implementation plan.
|
|
66129
|
+
|
|
66130
|
+
**Pre-condition:** An active plan must exist in \`docs/plans/\` — if none is found, tell the user to run \`/plan\` first and stop.
|
|
66131
|
+
|
|
66132
|
+
**Steps:**
|
|
66133
|
+
1. Read the active plan from \`docs/plans/\`
|
|
66134
|
+
2. Determine the next incomplete phase (or the phase specified by the argument)
|
|
66135
|
+
3. Announce which phase is being executed and what it covers
|
|
66136
|
+
4. Implement the phase step by step, following existing codebase patterns and conventions
|
|
66137
|
+
5. After completing the phase, summarise what was changed and what was created
|
|
66138
|
+
6. Mark the phase as complete in the plan file
|
|
66139
|
+
7. Run any tests relevant to the completed phase and report results
|
|
66140
|
+
8. Pause and ask: "Phase {n} complete. Continue to phase {n+1}?" before proceeding
|
|
66141
|
+
|
|
66142
|
+
---
|
|
66143
|
+
|
|
66144
|
+
## /check
|
|
66145
|
+
Verify the current implementation against the active spec — tests, code review, and regression check.
|
|
66146
|
+
|
|
66147
|
+
**Steps:**
|
|
66148
|
+
1. Read the active spec from \`docs/specs/\` and the active plan from \`docs/plans/\`
|
|
66149
|
+
2. Run the full test suite and report results
|
|
66150
|
+
3. Review all changed files against the spec's acceptance criteria — flag any gaps
|
|
66151
|
+
4. Check for regressions by reviewing changed files for unintended side effects
|
|
66152
|
+
5. Produce a structured report:
|
|
66153
|
+
- ✅ Acceptance criteria met
|
|
66154
|
+
- ❌ Acceptance criteria not met (with details)
|
|
66155
|
+
- ⚠️ Potential regressions (with details)
|
|
66156
|
+
- \uD83D\uDCCB Suggested fixes
|
|
66157
|
+
6. If all criteria are met and no regressions are found, prompt the user to run \`/ship\`
|
|
66158
|
+
|
|
66159
|
+
---
|
|
66160
|
+
|
|
66161
|
+
## /ship
|
|
66162
|
+
Pre-flight wrap-up — verify everything is ready, then draft a PR description.
|
|
66163
|
+
|
|
66164
|
+
**Steps:**
|
|
66165
|
+
1. Run the full test suite — stop and report if any tests fail
|
|
66166
|
+
2. Read the active spec and plan
|
|
66167
|
+
3. Verify that \`docs/specs/{name}.md\` and \`docs/plans/{name}.md\` are up to date
|
|
66168
|
+
4. Check for uncommitted changes and list them
|
|
66169
|
+
5. Draft a PR description referencing the spec and plan:
|
|
66170
|
+
\`\`\`
|
|
66171
|
+
## Summary
|
|
66172
|
+
{goal from spec}
|
|
66173
|
+
|
|
66174
|
+
## Changes
|
|
66175
|
+
{summary of phases completed}
|
|
66176
|
+
|
|
66177
|
+
## Spec
|
|
66178
|
+
docs/specs/{name}.md
|
|
66179
|
+
|
|
66180
|
+
## Plan
|
|
66181
|
+
docs/plans/{name}.md
|
|
66182
|
+
|
|
66183
|
+
## Test plan
|
|
66184
|
+
{acceptance criteria from spec as a checklist}
|
|
66185
|
+
\`\`\`
|
|
66186
|
+
6. Present the PR description to the user for review
|
|
66187
|
+
7. Ask: "Ready to commit and push?" — if yes, stage all changes and create a commit with a conventional commit message
|
|
66188
|
+
`,
|
|
66055
66189
|
"workflows/sdlc/plan.md": `# /plan
|
|
66056
66190
|
|
|
66057
66191
|
**Purpose:** Produce a phased, checkpoint-driven implementation plan based on the spec and research findings.
|
|
@@ -66355,6 +66489,140 @@ If all criteria are met and no regressions: run [\`/ship\`](ship.md).
|
|
|
66355
66489
|
`
|
|
66356
66490
|
}
|
|
66357
66491
|
};
|
|
66492
|
+
var EMBEDDED_SDLC_CONTENT = `# SDLC Workflows
|
|
66493
|
+
|
|
66494
|
+
## /spec [name]
|
|
66495
|
+
Capture the full specification for a feature or task before any code is written.
|
|
66496
|
+
|
|
66497
|
+
**Steps:**
|
|
66498
|
+
1. Ask for a feature name if not provided as an argument
|
|
66499
|
+
2. Ask the user to describe: goal, user stories, acceptance criteria, constraints, and what is explicitly out of scope
|
|
66500
|
+
3. Create \`docs/specs/\` directory if it does not exist
|
|
66501
|
+
4. Save the gathered information to \`docs/specs/{name}.md\` using the template below
|
|
66502
|
+
5. Confirm the file was saved and prompt the user to run \`/research\`
|
|
66503
|
+
|
|
66504
|
+
**Output template (\`docs/specs/{name}.md\`):**
|
|
66505
|
+
\`\`\`markdown
|
|
66506
|
+
# Spec: {name}
|
|
66507
|
+
|
|
66508
|
+
## Goal
|
|
66509
|
+
{goal}
|
|
66510
|
+
|
|
66511
|
+
## User Stories
|
|
66512
|
+
{user stories}
|
|
66513
|
+
|
|
66514
|
+
## Acceptance Criteria
|
|
66515
|
+
{acceptance criteria}
|
|
66516
|
+
|
|
66517
|
+
## Constraints
|
|
66518
|
+
{constraints}
|
|
66519
|
+
|
|
66520
|
+
## Out of Scope
|
|
66521
|
+
{out of scope}
|
|
66522
|
+
\`\`\`
|
|
66523
|
+
|
|
66524
|
+
---
|
|
66525
|
+
|
|
66526
|
+
## /research
|
|
66527
|
+
Analyze the active spec with internal codebase scanning and external web research.
|
|
66528
|
+
|
|
66529
|
+
**Pre-condition:** An active spec must exist in \`docs/specs/\` — if none is found, tell the user to run \`/spec\` first and stop.
|
|
66530
|
+
|
|
66531
|
+
**Steps:**
|
|
66532
|
+
1. Read the most recently modified spec from \`docs/specs/\`
|
|
66533
|
+
2. **Internal scan:** Search the codebase for related code, existing patterns, similar implementations, dependencies, and potential conflicts relevant to the spec
|
|
66534
|
+
3. **Infrastructure prompt:** Ask the user:
|
|
66535
|
+
> "Does this feature require infrastructure decisions?"
|
|
66536
|
+
> - Cost-optimised / serverless (pay-per-use: Cloud Run, Cloud Functions, AWS Lambda, Fargate, etc.)
|
|
66537
|
+
> - Fixed / dedicated (predictable load: Kubernetes, EC2, GKE, dedicated VMs, etc.)
|
|
66538
|
+
> - No infrastructure involved
|
|
66539
|
+
4. **Web research:** Search for architecture patterns, best practices, reference implementations, and cost comparisons relevant to the spec. Bias results toward the chosen infrastructure model if one was selected.
|
|
66540
|
+
5. Surface: recommended approaches, trade-offs, cost implications, and links to reference material
|
|
66541
|
+
6. Suggest any improvements or clarifications to the spec based on findings
|
|
66542
|
+
7. Append a \`## Research Findings\` section to the active spec file containing: internal findings, web research summary, infrastructure recommendation (if applicable), and suggested spec improvements
|
|
66543
|
+
8. Prompt the user to run \`/plan\`
|
|
66544
|
+
|
|
66545
|
+
---
|
|
66546
|
+
|
|
66547
|
+
## /plan
|
|
66548
|
+
Produce a phased, checkpoint-driven implementation plan based on the spec and research findings.
|
|
66549
|
+
|
|
66550
|
+
**Pre-condition:** An active spec with a \`## Research Findings\` section must exist — if research has not been run, warn the user and ask them to confirm they want to skip it before proceeding.
|
|
66551
|
+
|
|
66552
|
+
**Steps:**
|
|
66553
|
+
1. Read the active spec (including research findings) from \`docs/specs/\`
|
|
66554
|
+
2. Analyse the codebase to understand existing structure, patterns, and conventions
|
|
66555
|
+
3. Break the implementation into phases — each phase must be independently verifiable
|
|
66556
|
+
4. For each phase, list: files to create or modify, key decisions, and how to verify it is complete
|
|
66557
|
+
5. Identify risks and propose mitigations
|
|
66558
|
+
6. Create \`docs/plans/\` directory if it does not exist
|
|
66559
|
+
7. Save the plan to \`docs/plans/{spec-name}.md\`
|
|
66560
|
+
8. Confirm the file was saved and prompt the user to run \`/build\`
|
|
66561
|
+
|
|
66562
|
+
---
|
|
66563
|
+
|
|
66564
|
+
## /build [phase]
|
|
66565
|
+
Execute the next (or a specified) phase of the current implementation plan.
|
|
66566
|
+
|
|
66567
|
+
**Pre-condition:** An active plan must exist in \`docs/plans/\` — if none is found, tell the user to run \`/plan\` first and stop.
|
|
66568
|
+
|
|
66569
|
+
**Steps:**
|
|
66570
|
+
1. Read the active plan from \`docs/plans/\`
|
|
66571
|
+
2. Determine the next incomplete phase (or the phase specified by the argument)
|
|
66572
|
+
3. Announce which phase is being executed and what it covers
|
|
66573
|
+
4. Implement the phase step by step, following existing codebase patterns and conventions
|
|
66574
|
+
5. After completing the phase, summarise what was changed and what was created
|
|
66575
|
+
6. Mark the phase as complete in the plan file
|
|
66576
|
+
7. Run any tests relevant to the completed phase and report results
|
|
66577
|
+
8. Pause and ask: "Phase {n} complete. Continue to phase {n+1}?" before proceeding
|
|
66578
|
+
|
|
66579
|
+
---
|
|
66580
|
+
|
|
66581
|
+
## /check
|
|
66582
|
+
Verify the current implementation against the active spec — tests, code review, and regression check.
|
|
66583
|
+
|
|
66584
|
+
**Steps:**
|
|
66585
|
+
1. Read the active spec from \`docs/specs/\` and the active plan from \`docs/plans/\`
|
|
66586
|
+
2. Run the full test suite and report results
|
|
66587
|
+
3. Review all changed files against the spec's acceptance criteria — flag any gaps
|
|
66588
|
+
4. Check for regressions by reviewing changed files for unintended side effects
|
|
66589
|
+
5. Produce a structured report:
|
|
66590
|
+
- ✅ Acceptance criteria met
|
|
66591
|
+
- ❌ Acceptance criteria not met (with details)
|
|
66592
|
+
- ⚠️ Potential regressions (with details)
|
|
66593
|
+
- \uD83D\uDCCB Suggested fixes
|
|
66594
|
+
6. If all criteria are met and no regressions are found, prompt the user to run \`/ship\`
|
|
66595
|
+
|
|
66596
|
+
---
|
|
66597
|
+
|
|
66598
|
+
## /ship
|
|
66599
|
+
Pre-flight wrap-up — verify everything is ready, then draft a PR description.
|
|
66600
|
+
|
|
66601
|
+
**Steps:**
|
|
66602
|
+
1. Run the full test suite — stop and report if any tests fail
|
|
66603
|
+
2. Read the active spec and plan
|
|
66604
|
+
3. Verify that \`docs/specs/{name}.md\` and \`docs/plans/{name}.md\` are up to date
|
|
66605
|
+
4. Check for uncommitted changes and list them
|
|
66606
|
+
5. Draft a PR description referencing the spec and plan:
|
|
66607
|
+
\`\`\`
|
|
66608
|
+
## Summary
|
|
66609
|
+
{goal from spec}
|
|
66610
|
+
|
|
66611
|
+
## Changes
|
|
66612
|
+
{summary of phases completed}
|
|
66613
|
+
|
|
66614
|
+
## Spec
|
|
66615
|
+
docs/specs/{name}.md
|
|
66616
|
+
|
|
66617
|
+
## Plan
|
|
66618
|
+
docs/plans/{name}.md
|
|
66619
|
+
|
|
66620
|
+
## Test plan
|
|
66621
|
+
{acceptance criteria from spec as a checklist}
|
|
66622
|
+
\`\`\`
|
|
66623
|
+
6. Present the PR description to the user for review
|
|
66624
|
+
7. Ask: "Ready to commit and push?" — if yes, stage all changes and create a commit with a conventional commit message
|
|
66625
|
+
`;
|
|
66358
66626
|
|
|
66359
66627
|
// src/services/data-source.ts
|
|
66360
66628
|
class EmbeddedDataSource {
|
|
@@ -67348,7 +67616,6 @@ class SubAgentGenerator {
|
|
|
67348
67616
|
// src/services/workflow-injector.ts
|
|
67349
67617
|
import { readFile as readFile3 } from "fs/promises";
|
|
67350
67618
|
import { join as join4 } from "path";
|
|
67351
|
-
|
|
67352
67619
|
class WorkflowInjector {
|
|
67353
67620
|
commands;
|
|
67354
67621
|
constructor(commands) {
|
|
@@ -67358,13 +67625,15 @@ class WorkflowInjector {
|
|
|
67358
67625
|
return new WorkflowInjector(WorkflowInjector.parse(sdlcContent));
|
|
67359
67626
|
}
|
|
67360
67627
|
static async create(dataDir) {
|
|
67361
|
-
|
|
67362
|
-
|
|
67628
|
+
if (!dataDir) {
|
|
67629
|
+
return WorkflowInjector.fromContent(EMBEDDED_SDLC_CONTENT);
|
|
67630
|
+
}
|
|
67631
|
+
const sdlcPath = join4(dataDir, "data/workflows/sdlc.md");
|
|
67363
67632
|
try {
|
|
67364
67633
|
const content = await readFile3(sdlcPath, "utf-8");
|
|
67365
67634
|
return WorkflowInjector.fromContent(content);
|
|
67366
|
-
} catch
|
|
67367
|
-
|
|
67635
|
+
} catch {
|
|
67636
|
+
return WorkflowInjector.fromContent(EMBEDDED_SDLC_CONTENT);
|
|
67368
67637
|
}
|
|
67369
67638
|
}
|
|
67370
67639
|
static parse(content) {
|