@plainconceptsplatform/agent-harness 2.4.1 → 2.5.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 +435 -437
- package/cli/fragments/archive/az.md +97 -95
- package/cli/fragments/archive/gh.md +96 -94
- package/cli/fragments/archive/gl.md +96 -94
- package/cli/fragments/archive/none.md +75 -73
- package/cli/fragments/guardrails/codegraph.md +5 -7
- package/cli/fragments/guardrails/humanizer.md +4 -4
- package/cli/fragments/guardrails/memory.md +4 -4
- package/cli/fragments/guardrails/rtk.md +3 -3
- package/cli/fragments/guardrails/simple-english.md +4 -4
- package/cli/fragments/ops-backlog/az.md +1 -1
- package/cli/fragments/ops-backlog/gh.md +1 -1
- package/cli/fragments/ops-backlog/jira.md +1 -1
- package/cli/fragments/ops-evidence/az.md +44 -41
- package/cli/fragments/ops-evidence/gh.md +54 -53
- package/cli/fragments/ops-evidence/jira.md +42 -38
- package/cli/fragments/ops-review/az.md +1 -1
- package/cli/fragments/ops-review/gh.md +1 -1
- package/cli/fragments/ops-review/gl.md +1 -1
- package/cli/fragments/ops-ship/az.md +81 -80
- package/cli/fragments/ops-ship/gh.md +68 -68
- package/cli/fragments/ops-ship/gl.md +85 -85
- package/cli/presets/agents-content.json +34 -53
- package/cli/steps/copy/agents.js +18 -17
- package/cli/steps/copy/opencode-json.js +5 -1
- package/cli/steps/copy/skills.js +98 -5
- package/cli/steps/optimization/patch-guardrails.js +5 -3
- package/cli/utils/copy.js +8 -3
- package/cli/utils/update-manifest.js +28 -2
- package/harness/.agents/skills/pc-guardrails-generic/SKILL.md +47 -68
- package/harness/.agents/skills/pc-make-architecture/SKILL.md +31 -51
- package/harness/.agents/skills/pc-make-design/SKILL.md +45 -68
- package/harness/.agents/skills/pc-make-engineer/SKILL.md +59 -219
- package/harness/.agents/skills/pc-make-engineer/signal-mapping.md +53 -68
- package/harness/.agents/skills/pc-make-engineer/template.md +42 -80
- package/harness/.agents/skills/pc-make-evidence-scaffold/SKILL.md +18 -18
- package/harness/.agents/skills/pc-make-evidence-scaffold/evidence-contract.md +29 -29
- package/harness/.agents/skills/pc-make-guardrails/SKILL.md +43 -74
- package/harness/.agents/skills/pc-make-guardrails/category-reference.md +10 -5
- package/harness/.agents/skills/pc-make-merge-risk-assess/category-reference.md +26 -7
- package/harness/.agents/skills/pc-make-user-model/SKILL.md +56 -66
- package/harness/.agents/skills/pc-ops-evidence/SKILL.md +133 -127
- package/harness/.agents/skills/pc-plan-apply/SKILL.md +14 -5
- package/harness/.agents/skills/pc-plan-apply/simple-mode.md +21 -21
- package/harness/.agents/skills/pc-plan-archive/SKILL.md +66 -66
- package/harness/.agents/skills/pc-plan-explore/SKILL.md +19 -2
- package/harness/.agents/skills/pc-plan-goal/SKILL.md +7 -5
- package/harness/.agents/skills/pc-plan-goal/output-mode.md +1 -0
- package/harness/.agents/skills/pc-plan-goal/output.md +71 -65
- package/harness/.agents/skills/pc-plan-propose/SKILL.md +1 -1
- package/harness/.agents/skills/pc-plan-quick/SKILL.md +46 -62
- package/harness/.agents/skills/pc-plan-story/SKILL.md +48 -149
- package/harness/.agents/skills/pc-repo-help/SKILL.md +89 -91
- package/harness/.agents/skills/pc-repo-initialize/SKILL.md +112 -130
- package/harness/.agents/skills/pc-repo-onboard/SKILL.md +32 -87
- package/harness/.agents/skills/pc-repo-verify/SKILL.md +2 -0
- package/harness/.agents/skills/pc-userstory-az/SKILL.md +71 -157
- package/harness/.agents/skills/pc-userstory-browser/SKILL.md +50 -122
- package/harness/.agents/skills/pc-userstory-gh/SKILL.md +63 -120
- package/harness/.agents/skills/pc-userstory-jira/SKILL.md +74 -131
- package/harness/.opencode/commands/init.md +5 -5
- package/harness/.opencode/commands/make-architecture.md +5 -5
- package/harness/.opencode/commands/make-design.md +5 -5
- package/harness/.opencode/commands/make-engineer.md +5 -5
- package/harness/.opencode/commands/make-evidence-scaffold.md +5 -5
- package/harness/.opencode/commands/make-guardrails.md +5 -5
- package/harness/.opencode/commands/make-user-model.md +5 -5
- package/harness/.opencode/commands/plan-apply.md +9 -9
- package/harness/.opencode/commands/plan-goal.md +5 -5
- package/harness/.opencode/commands/plan-quick.md +5 -5
- package/harness/.opencode/commands/plan-story.md +9 -9
- package/harness/.opencode/commands/repo-audit.md +5 -5
- package/harness/.opencode/commands/repo-initialize.md +5 -5
- package/harness/.opencode/commands/repo-onboard.md +5 -5
- package/harness/.opencode/commands/repo-verify.md +5 -5
- package/harness/.opencode/plugins/pc-subagent-monitor.js +82 -2
- package/harness/.opencode/plugins/pc-subagent-tiers.js +9 -6
- package/harness/.opencode/plugins/pc-system-reminders.js +312 -3
- package/harness/AGENTS.md +49 -71
- package/harness/opencode.jsonc +1 -1
- package/package.json +1 -1
|
@@ -1,65 +1,71 @@
|
|
|
1
|
-
# Output procedure
|
|
2
|
-
|
|
3
|
-
Before output, require `verify`, `archive`, a clean working tree, no active change directory, and an archive directory for `{change-id}`.
|
|
4
|
-
|
|
5
|
-
## Restore stash
|
|
6
|
-
|
|
7
|
-
If the goal created `goal-wip`, restore it after the mode-specific operation. When restoration conflicts, leave the stash intact, report its `git stash list` reference, and do not drop user work.
|
|
8
|
-
|
|
9
|
-
## Default mode
|
|
10
|
-
|
|
11
|
-
Synchronize the default branch, merge, delete the feature branch, then restore the stash:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
git switch "$DEFAULT_BRANCH"
|
|
15
|
-
|
|
16
|
-
if git remote get-url origin >/dev/null 2>&1; then
|
|
17
|
-
git pull origin "$DEFAULT_BRANCH"
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
git merge --no-ff "$BRANCH" -m "goal: {title} ({change-id})"
|
|
21
|
-
git branch -d "$BRANCH"
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
If the merge conflicts, abort it and use the failure policy. Do not push the default branch.
|
|
25
|
-
|
|
26
|
-
## Push mode
|
|
27
|
-
|
|
28
|
-
Push the feature branch:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
git push -u origin "$BRANCH"
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Restore the stash and leave the branch available.
|
|
35
|
-
|
|
36
|
-
## PR mode
|
|
37
|
-
|
|
38
|
-
Push the feature branch, then load `pc-ops-ship` to create a PR into `$DEFAULT_BRANCH`. Supply title, change id, functional summary, delivered acceptance criteria, task count, verification result, archive path, and commits. Do not merge the PR.
|
|
39
|
-
|
|
40
|
-
Restore the stash.
|
|
41
|
-
|
|
42
|
-
##
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
1
|
+
# Output procedure
|
|
2
|
+
|
|
3
|
+
Before output, require `verify`, `archive`, a clean working tree, no active change directory, and an archive directory for `{change-id}`.
|
|
4
|
+
|
|
5
|
+
## Restore stash
|
|
6
|
+
|
|
7
|
+
If the goal created `goal-wip`, restore it after the mode-specific operation. When restoration conflicts, leave the stash intact, report its `git stash list` reference, and do not drop user work.
|
|
8
|
+
|
|
9
|
+
## Default mode
|
|
10
|
+
|
|
11
|
+
Synchronize the default branch, merge, delete the feature branch, then restore the stash:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git switch "$DEFAULT_BRANCH"
|
|
15
|
+
|
|
16
|
+
if git remote get-url origin >/dev/null 2>&1; then
|
|
17
|
+
git pull origin "$DEFAULT_BRANCH"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
git merge --no-ff "$BRANCH" -m "goal: {title} ({change-id})"
|
|
21
|
+
git branch -d "$BRANCH"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If the merge conflicts, abort it and use the failure policy. Do not push the default branch.
|
|
25
|
+
|
|
26
|
+
## Push mode
|
|
27
|
+
|
|
28
|
+
Push the feature branch:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git push -u origin "$BRANCH"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Restore the stash and leave the branch available.
|
|
35
|
+
|
|
36
|
+
## PR mode
|
|
37
|
+
|
|
38
|
+
Push the feature branch, then load `pc-ops-ship` to create a PR into `$DEFAULT_BRANCH`. Supply title, change id, functional summary, delivered acceptance criteria, task count, verification result, archive path, and commits. Do not merge the PR.
|
|
39
|
+
|
|
40
|
+
Restore the stash.
|
|
41
|
+
|
|
42
|
+
## Branch mode
|
|
43
|
+
|
|
44
|
+
Leave `$BRANCH` in place with its commits. Merge nothing, push nothing, delete nothing.
|
|
45
|
+
|
|
46
|
+
Restore the stash.
|
|
47
|
+
|
|
48
|
+
## Final report
|
|
49
|
+
|
|
50
|
+
Print:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
Goal: {title}
|
|
54
|
+
Change ID: {change-id}
|
|
55
|
+
Scope classification: focused | standard | complex
|
|
56
|
+
Functional outcome: {one-sentence result}
|
|
57
|
+
Branch: {branch}
|
|
58
|
+
Tasks: {completed}/{total}
|
|
59
|
+
Acceptance criteria: {passed}/{total}
|
|
60
|
+
Commits: {proposal, apply, archive}
|
|
61
|
+
Verification: passed | failed
|
|
62
|
+
Archived: yes | no
|
|
63
|
+
Archive path: {path or none}
|
|
64
|
+
Output mode: default | push | pr | branch
|
|
65
|
+
Final state: merged locally | pushed branch | PR URL | branch preserved | branch preserved after failure
|
|
66
|
+
Stash restoration: not needed | restored | preserved after conflict
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## External gate
|
|
70
|
+
|
|
71
|
+
An unattended caller must verify `openspec list --json` is empty and run the project's lint and typecheck commands before any later git operation.
|
|
@@ -6,7 +6,7 @@ license: MIT
|
|
|
6
6
|
|
|
7
7
|
# Plan Propose
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Never write a file before the Step 3 checkpoint resolves to `yes`: build the whole plan in context, and let it hit disk in Step 4. A proposal written before its confirmation is a proposal the user cannot decline.
|
|
10
10
|
|
|
11
11
|
## Input
|
|
12
12
|
|
|
@@ -1,62 +1,46 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pc-plan-quick
|
|
3
|
-
description: Quick plan: analyze the codebase and create a task checklist using the Todo pane. No files, no OpenSpec. Invoked by the /plan-quick command.
|
|
4
|
-
license: MIT
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
{
|
|
48
|
-
"questions": [
|
|
49
|
-
{
|
|
50
|
-
"header": "What next",
|
|
51
|
-
"question": "What next?",
|
|
52
|
-
"options": [
|
|
53
|
-
{ "label": "/plan-apply", "description": "Implement these tasks now (creates a feature branch and works through them)." },
|
|
54
|
-
{ "label": "/plan-propose", "description": "Turn this into a full OpenSpec proposal with agent assignments." },
|
|
55
|
-
{ "label": "Start on specific tasks", "description": "Tell me which tasks to start on." }
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Do not create any files. Do not run `/plan-apply` or `/plan-propose` automatically. The only output is the Todo pane checklist.
|
|
1
|
+
---
|
|
2
|
+
name: pc-plan-quick
|
|
3
|
+
description: "Quick plan: analyze the codebase and create a task checklist using the Todo pane. No files, no OpenSpec. Invoked by the /plan-quick command."
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Lightweight planning for a change that is already clear: read the codebase, write the task list to the Todo pane, stop. Use `/plan-explore` then `/plan-propose` instead when the idea is half-formed, the alternatives need thinking through, or the result should outlive the session.
|
|
8
|
+
|
|
9
|
+
## Rules
|
|
10
|
+
|
|
11
|
+
- Never write, edit, or create a file. The only artefacts are Todo items and one question, so there is nothing to review afterwards and nothing to undo.
|
|
12
|
+
- Never start the work, and never invoke `/plan-apply` or `/plan-propose` on the user's behalf. The question at the end is where they choose.
|
|
13
|
+
|
|
14
|
+
## Contracts
|
|
15
|
+
|
|
16
|
+
One Todo item per task, in dependency order, each one action naming the files it touches:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"todos": [
|
|
21
|
+
{ "content": "Add Project model to src/types.ts", "status": "pending", "priority": "high" },
|
|
22
|
+
{ "content": "Add projectId field to LoopOptions in src/types.ts", "status": "pending", "priority": "high" },
|
|
23
|
+
{ "content": "Create Project RPC endpoints in src/rpc/project/", "status": "pending", "priority": "medium" },
|
|
24
|
+
{ "content": "Build Accept page UI in src/board/components/CreateForm.tsx", "status": "pending", "priority": "medium" },
|
|
25
|
+
{ "content": "Run typecheck and fix errors", "status": "pending", "priority": "low" }
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Then ask:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"questions": [
|
|
35
|
+
{
|
|
36
|
+
"header": "What next",
|
|
37
|
+
"question": "What next?",
|
|
38
|
+
"options": [
|
|
39
|
+
{ "label": "/plan-apply", "description": "Implement these tasks now (creates a feature branch and works through them)." },
|
|
40
|
+
{ "label": "/plan-propose", "description": "Turn this into a full OpenSpec proposal with agent assignments." },
|
|
41
|
+
{ "label": "Start on specific tasks", "description": "Tell me which tasks to start on." }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
```
|
|
@@ -1,149 +1,48 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pc-plan-story
|
|
3
|
-
description: Write a detailed, repo-aware user story from a feature idea or need. Loads the @user-story skill for Mike Cohn format + Gherkin acceptance criteria, analyzes the codebase for concrete context, and produces a development-ready story. Use when the user wants to write a user story, create a story from a feature idea, or turn a need into a structured story with acceptance criteria. Invoked by the /plan-story command.
|
|
4
|
-
license: MIT
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Write a user story grounded in
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Write the story using the user-story skill's format. Ground every field in the codebase analysis from Step 2:
|
|
50
|
-
|
|
51
|
-
### Use Case
|
|
52
|
-
|
|
53
|
-
- **As a** [specific persona derived from auth/roles/user models in the repo — never "user"]
|
|
54
|
-
- **I want to** [action that maps to a concrete code change — reference the component, endpoint, or model involved]
|
|
55
|
-
- **so that** [real outcome tied to business logic or UX flow found in the codebase]
|
|
56
|
-
|
|
57
|
-
### Acceptance Criteria (Gherkin)
|
|
58
|
-
|
|
59
|
-
Write scenarios with preconditions grounded in the actual codebase state:
|
|
60
|
-
|
|
61
|
-
- **Scenario:** [brief description]
|
|
62
|
-
- **Given:** [precondition referencing real state — e.g. "the user is authenticated via the JWT middleware in src/auth/middleware.ts"]
|
|
63
|
-
- **and Given:** [additional preconditions — existing data models, current UI state, config values]
|
|
64
|
-
- **When:** [trigger that maps to a concrete user action on a real component or endpoint]
|
|
65
|
-
- **Then:** [testable outcome referencing actual system behavior — e.g. "the response from POST /api/projects includes the new projectId field defined in src/types/Project.ts"]
|
|
66
|
-
|
|
67
|
-
### Edge Cases
|
|
68
|
-
|
|
69
|
-
List 2-3 edge cases derived from what the code currently does:
|
|
70
|
-
|
|
71
|
-
- What happens when [existing validation/constraint] is violated?
|
|
72
|
-
- What if [existing data state] is empty/null/migration-incomplete?
|
|
73
|
-
- What about [existing role/permission boundary]?
|
|
74
|
-
|
|
75
|
-
### Summary
|
|
76
|
-
|
|
77
|
-
Write a one-line value-focused summary (not a feature title).
|
|
78
|
-
|
|
79
|
-
## Step 4: Humanize
|
|
80
|
-
|
|
81
|
-
Load the `@humanizer` skill and run it on the drafted story text from Step 3. AI-generated stories tend to:
|
|
82
|
-
|
|
83
|
-
- Overuse em dashes and rule-of-three lists
|
|
84
|
-
- Use promotional language ("seamless", "powerful", "comprehensive")
|
|
85
|
-
- Use passive voice and negative parallelisms
|
|
86
|
-
- Stack vague attributions
|
|
87
|
-
- Inflate symbolism in the summary line
|
|
88
|
-
|
|
89
|
-
Apply the humanizer's audit → fix loop to all prose in the story: the summary, the use case, the scenario descriptions, and the edge case notes. Preserve all technical details, file paths, component names, and Gherkin structure — the humanizer cleans prose, not structure or accuracy.
|
|
90
|
-
|
|
91
|
-
## Step 5: Diagram (when the story has a flow)
|
|
92
|
-
|
|
93
|
-
If the story involves a user journey, state transition, or component interaction that benefits from visualization, produce a Mermaid diagram. Keep it minimal: the happy path only, no exhaustive enumeration of every branch.
|
|
94
|
-
|
|
95
|
-
When to draw:
|
|
96
|
-
- Multi-step flows (login → action → confirmation)
|
|
97
|
-
- State transitions (status changes on a work item, order state machine)
|
|
98
|
-
- Component interactions (frontend → API → service → DB)
|
|
99
|
-
|
|
100
|
-
When to skip:
|
|
101
|
-
- Simple CRUD on a single resource
|
|
102
|
-
- Stories with a single step and no preconditions beyond auth
|
|
103
|
-
|
|
104
|
-
If the input included an exploration diagram, extend it with the story's new flow rather than redrawing from scratch.
|
|
105
|
-
|
|
106
|
-
## Step 6: Validate
|
|
107
|
-
|
|
108
|
-
Run every quality check from the user-story skill:
|
|
109
|
-
|
|
110
|
-
- No generic "As a user" — the persona must be specific and grounded in repo context
|
|
111
|
-
- "So that" must express real motivation, not restate "I want to"
|
|
112
|
-
- Single When / single Then per scenario — if multiple, note that the story should split
|
|
113
|
-
- Thens must be testable and measurable — reference real system behavior, not vague improvements
|
|
114
|
-
- No technical tasks disguised as user stories (if there's no user outcome, say so)
|
|
115
|
-
|
|
116
|
-
If any check fails, fix the story and re-validate. Do not show a story to the user that fails validation.
|
|
117
|
-
|
|
118
|
-
## Step 7: Present the story
|
|
119
|
-
|
|
120
|
-
Display the complete user story to the user:
|
|
121
|
-
|
|
122
|
-
- Summary
|
|
123
|
-
- Use Case (As a / I want to / so that)
|
|
124
|
-
- Acceptance Criteria (all scenarios with full Given/When/Then)
|
|
125
|
-
- Edge Cases
|
|
126
|
-
- Diagram (if produced in Step 5)
|
|
127
|
-
- Codebase artifacts the story is grounded in (file paths, component names, types)
|
|
128
|
-
|
|
129
|
-
## Step 8: Ask what's next
|
|
130
|
-
|
|
131
|
-
Call the `question` tool:
|
|
132
|
-
|
|
133
|
-
```json
|
|
134
|
-
{
|
|
135
|
-
"questions": [
|
|
136
|
-
{
|
|
137
|
-
"header": "What next",
|
|
138
|
-
"question": "What next?",
|
|
139
|
-
"options": [
|
|
140
|
-
{ "label": "/plan-propose", "description": "Turn this user story into a full OpenSpec proposal with design, specs, and tasks." },
|
|
141
|
-
{ "label": "/plan-quick", "description": "Create a lightweight task checklist from this story." },
|
|
142
|
-
{ "label": "Refine the story", "description": "Iterate on the story with feedback." }
|
|
143
|
-
]
|
|
144
|
-
}
|
|
145
|
-
]
|
|
146
|
-
}
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
Do not create any files. Do not run `/plan-propose` or `/plan-quick` automatically. The only output is the user story.
|
|
1
|
+
---
|
|
2
|
+
name: pc-plan-story
|
|
3
|
+
description: Write a detailed, repo-aware user story from a feature idea or need. Loads the @user-story skill for Mike Cohn format + Gherkin acceptance criteria, analyzes the codebase for concrete context, and produces a development-ready story. Use when the user wants to write a user story, create a story from a feature idea, or turn a need into a structured story with acceptance criteria. Invoked by the /plan-story command.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Write a user story grounded in this repository. `@user-story` owns the format and the quality bar; `@humanizer` owns the prose. What this skill adds is the grounding: the personas, paths, models and components come out of the codebase, not out of a template.
|
|
8
|
+
|
|
9
|
+
## Input
|
|
10
|
+
|
|
11
|
+
A feature description, need, or rough idea, possibly with exploration findings and diagrams to align the scope with. If `$ARGUMENTS` is empty, ask what the user wants to capture.
|
|
12
|
+
|
|
13
|
+
<!-- PC-OPTIMIZATION-MEMORY-START -->
|
|
14
|
+
<!-- PC-OPTIMIZATION-MEMORY-END -->
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- Never write, edit, or create a file, and never start the work or invoke `/plan-propose` or `/plan-quick`. The only artefacts are the story and one question.
|
|
19
|
+
- Never write `As a user`. The persona comes from the repo's own roles: auth middleware, route guards, user models. A story that could have been written without opening the repo is not worth reviewing.
|
|
20
|
+
- Never show the user a story that fails the `@user-story` checks. Fix it first.
|
|
21
|
+
- Every `Given`, `When` and `Then` names something real, and every `Then` is testable: a file, endpoint, model or field somebody can point at.
|
|
22
|
+
|
|
23
|
+
## Flow
|
|
24
|
+
|
|
25
|
+
1. Load `@user-story`.
|
|
26
|
+
2. Read the codebase for what the feature touches: who the users are (auth, roles, user models, guards), what exists now (components, endpoints, models, types), where the change lands (paths, module boundaries), and what rules already govern it (validation, existing flows). Incorporate any exploration findings, including their out-of-scope decisions.
|
|
27
|
+
3. Draft the story against that inventory, with two or three edge cases taken from what the code does today: a violated constraint, an empty or half-migrated state, a permission boundary.
|
|
28
|
+
4. Load `@humanizer` and run it over the prose. It cleans prose, not structure: paths, component names and Gherkin stay exact.
|
|
29
|
+
5. Add a Mermaid diagram only for a multi-step flow, a state transition, or a component interaction, and only the happy path. A single-resource CRUD story does not need one. If the input carried an exploration diagram, extend it rather than redrawing.
|
|
30
|
+
6. Show the story with the artefacts it is grounded in, then ask what is next.
|
|
31
|
+
|
|
32
|
+
## Contracts
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"questions": [
|
|
37
|
+
{
|
|
38
|
+
"header": "What next",
|
|
39
|
+
"question": "What next?",
|
|
40
|
+
"options": [
|
|
41
|
+
{ "label": "/plan-propose", "description": "Turn this user story into a full OpenSpec proposal with design, specs, and tasks." },
|
|
42
|
+
{ "label": "/plan-quick", "description": "Create a lightweight task checklist from this story." },
|
|
43
|
+
{ "label": "Refine the story", "description": "Iterate on the story with feedback." }
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
```
|