@plainconceptsplatform/agent-harness 2.6.0 → 2.7.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
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.
|
|
3
|
+
description: Write a detailed, repo-aware user story from a feature idea or need, then wrap it in the repository's issue form and append a structured implementation plan. Loads the @user-story skill for Mike Cohn format + Gherkin acceptance criteria, analyzes the codebase for concrete context, and produces a development-ready story with a plan. 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
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,24 +10,69 @@ Write a user story grounded in this repository. `@user-story` owns the format an
|
|
|
10
10
|
|
|
11
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
12
|
|
|
13
|
+
The caller may pass exploration findings from a prior `/plan-explore` session. Treat them as the primary source for the codebase inventory; read files only to fill gaps the findings do not cover.
|
|
14
|
+
|
|
13
15
|
<!-- PC-OPTIMIZATION-MEMORY-START -->
|
|
14
16
|
<!-- PC-OPTIMIZATION-MEMORY-END -->
|
|
15
17
|
|
|
16
18
|
## Rules
|
|
17
19
|
|
|
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.
|
|
20
|
+
- 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 (with its issue form and plan), and one question.
|
|
19
21
|
- 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
22
|
- Never show the user a story that fails the `@user-story` checks. Fix it first.
|
|
21
23
|
- Every `Given`, `When` and `Then` names something real, and every `Then` is testable: a file, endpoint, model or field somebody can point at.
|
|
24
|
+
- Never read outside this repository root. The entire inventory and plan must come from files inside this repo.
|
|
25
|
+
- Adhere to `${{ env.REPO_RULES }}` and repository documentation (AGENTS.md, ARCHITECTURE.md, DESIGN.md, existing patterns) before finalizing the story.
|
|
26
|
+
- Reserve the very top of the body — above the form's first heading — for machine-readable lines that later workflow steps add (split markers, estimate lines). Never place story or plan content there; the workflow reads those lines regardless of the form's shape.
|
|
22
27
|
|
|
23
28
|
## Flow
|
|
24
29
|
|
|
25
30
|
1. Load `@user-story`.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
|
|
32
|
+
2. **Coverage gate.** List every work unit from the input. For each, confirm it has exploration findings concrete enough to write an acceptance scenario: the files it touches, the models or endpoints it changes, the constraints it must respect. If any work unit is missing findings, go back and explore it now by reading the codebase. Do not draft the story until every work unit is covered. This skill's own requirement is coverage: several work units become one story that covers all of them, with at least one acceptance scenario per unit.
|
|
33
|
+
|
|
34
|
+
3. 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.
|
|
35
|
+
|
|
36
|
+
4. Draft the story against that inventory. Each work unit gets at least one acceptance scenario. Pull two or three edge cases from what the code does today: a violated constraint, an empty or half-migrated state, a permission boundary.
|
|
37
|
+
|
|
38
|
+
5. Apply repository documentation and established conventions. Read AGENTS.md, ARCHITECTURE.md, DESIGN.md and any existing patterns that govern the area being changed. Adjust the story to respect them.
|
|
39
|
+
|
|
40
|
+
6. Load `@humanizer` and run it over the prose. It cleans prose, not structure: paths, component names and Gherkin stay exact.
|
|
41
|
+
|
|
42
|
+
7. 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.
|
|
43
|
+
|
|
44
|
+
8. **Issue form: discover, select, fill.**
|
|
45
|
+
|
|
46
|
+
*Discover:* List the YAML and Markdown forms under `.github/ISSUE_TEMPLATE/`, plus a legacy `.github/issue_template.md` or a root `template.yml`. `config.yml` there only declares contact links, which are not forms: ignore it.
|
|
47
|
+
|
|
48
|
+
*Select:* When a form filters by labels and the issue carries one of those labels, that form wins. Otherwise use the repository's default form. When the repository has no form at all, keep the free-form story shape from step 4: there is nothing to wrap around.
|
|
49
|
+
|
|
50
|
+
*Fill:* Draw every field's content from your exploration findings. Required fields always get real content; optional fields only when you genuinely have something for them. The story narrative lands in the field that asks for it — proposal, description, or what-happened, depending on the form. The Given/When/Then scenarios go into the form's acceptance-criteria field when it has one; otherwise they stay a section of their own. The Mermaid diagram goes where it reads best inside the filled form.
|
|
51
|
+
|
|
52
|
+
9. **Plan section.** Using the codebase investigation from step 3, produce a structured implementation plan that goes after the story inside the issue form body. Format it as follows:
|
|
53
|
+
|
|
54
|
+
Start with a one-line scope summary, then a context paragraph describing what areas the plan touches, how many changes it breaks into, and whether the changes are independent.
|
|
55
|
+
|
|
56
|
+
Then break the feature into numbered changes. Each change:
|
|
57
|
+
|
|
58
|
+
- **Title** — what the change does.
|
|
59
|
+
- **Problem** — what is wrong or what needs to change and why. Name the file, method, or endpoint.
|
|
60
|
+
- **Fix** — bullet steps describing the implementation approach. Each step names a concrete file, method, or field.
|
|
61
|
+
- **Affected files** — a bullet list of paths with a short note on what changes in each.
|
|
62
|
+
|
|
63
|
+
After all changes, add a summary table:
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
| Change | Files | Layer |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| 1. <title> | <file list> | <Backend | Frontend | Fullstack | Infra | Tests> |
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Then list exclusions — what is explicitly out of scope and why.
|
|
72
|
+
|
|
73
|
+
Do not write any files. The plan is part of the story output, read-only. It tells the implementer what to touch and why, so they can start without re-investigating.
|
|
74
|
+
|
|
75
|
+
10. Show the story with the issue form wrapping, the plan, and the artefacts it is grounded in, then ask what is next. If the plan has an open clarification — a wording choice, a missing constraint, an unknown API — ask it before the contracts question.
|
|
31
76
|
|
|
32
77
|
## Contracts
|
|
33
78
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plainconceptsplatform/agent-harness",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Installs the Plain Concepts Platform Harness into any codebase, and keeps it up to date. Wires OpenCode, OpenSpec, codegraph, and agentmemory into a multi-agent workflow that runs on native parallel subagents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"opencode",
|