@ai-content-space/loopx 0.2.3 → 0.2.7
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 +106 -10
- package/README.zh-CN.md +106 -10
- package/docs/loopx/design/finish/345/255/246/344/271/240/345/256/241/350/256/241/351/234/200/346/261/202/350/256/276/350/256/241/346/226/207/346/241/243.md +707 -0
- package/docs/loopx/memory/2026-06-09-stale-archive-hook-guidance.md +15 -0
- package/docs/loopx/memory/README.md +25 -0
- package/docs/loopx/plans/2026-06-08-finish-audit-change-window.md +933 -0
- package/docs/loopx/plans/2026-06-08-finish-learning-audit.md +410 -0
- package/docs/loopx/plans/2026-06-09-cli-onboarding-install-surface.md +1277 -0
- package/docs/loopx/specs/installation.md +33 -0
- package/package.json +18 -2
- package/plugins/loopx/.codex-plugin/plugin.json +1 -1
- package/plugins/loopx/skills/clarify/SKILL.md +1 -1
- package/plugins/loopx/skills/debug/SKILL.md +1 -1
- package/plugins/loopx/skills/doc-readability/SKILL.md +222 -0
- package/plugins/loopx/skills/doc-readability/references/prd.md +269 -0
- package/plugins/loopx/skills/exec/SKILL.md +11 -1
- package/plugins/loopx/skills/final-review/SKILL.md +1 -1
- package/plugins/loopx/skills/finish/SKILL.md +39 -7
- package/plugins/loopx/skills/fix-review/SKILL.md +1 -1
- package/plugins/loopx/skills/go-style/SKILL.md +1 -1
- package/plugins/loopx/skills/kratos/SKILL.md +1 -1
- package/plugins/loopx/skills/plan/SKILL.md +1 -1
- package/plugins/loopx/skills/refactor-plan/SKILL.md +1 -1
- package/plugins/loopx/skills/review/SKILL.md +1 -1
- package/plugins/loopx/skills/spec/SKILL.md +1 -1
- package/plugins/loopx/skills/subagent-exec/SKILL.md +13 -1
- package/plugins/loopx/skills/tdd/SKILL.md +1 -1
- package/plugins/loopx/skills/verify/SKILL.md +1 -1
- package/scripts/claude-workflow-hook.mjs +50 -1
- package/scripts/codex-workflow-hook.mjs +33 -12
- package/scripts/install-skills.mjs +58 -3
- package/scripts/verify-skills.mjs +83 -7
- package/skills/RESOLVER.md +3 -1
- package/skills/clarify/SKILL.md +1 -1
- package/skills/debug/SKILL.md +1 -1
- package/skills/doc-readability/SKILL.md +222 -0
- package/skills/doc-readability/references/prd.md +269 -0
- package/skills/exec/SKILL.md +11 -1
- package/skills/final-review/SKILL.md +1 -1
- package/skills/finish/SKILL.md +39 -7
- package/skills/fix-review/SKILL.md +1 -1
- package/skills/go-style/SKILL.md +1 -1
- package/skills/kratos/SKILL.md +1 -1
- package/skills/plan/SKILL.md +1 -1
- package/skills/refactor-plan/SKILL.md +1 -1
- package/skills/review/SKILL.md +1 -1
- package/skills/spec/SKILL.md +1 -1
- package/skills/subagent-exec/SKILL.md +13 -1
- package/skills/tdd/SKILL.md +1 -1
- package/skills/verify/SKILL.md +1 -1
- package/src/cli.mjs +473 -86
- package/src/finish-runtime.mjs +1184 -0
- package/src/install-discovery.mjs +38 -0
- package/src/next-skill.mjs +8 -10
- package/src/workflow.mjs +19 -26
- package/skills/deepsearch/SKILL.md +0 -38
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Installation And CLI Onboarding Spec
|
|
2
|
+
|
|
3
|
+
This file records stable loopx product-surface rules for first-use CLI output, installer behavior, hook guidance, and packaged skill scope.
|
|
4
|
+
|
|
5
|
+
## Human And JSON Output
|
|
6
|
+
|
|
7
|
+
- `loopx --help` must start with a short quickstart path: install skills, init, clarify, status.
|
|
8
|
+
- `loopx init`, `loopx doctor`, and `loopx install-skills` default to concise human output.
|
|
9
|
+
- Full runtime payloads require explicit `--json`.
|
|
10
|
+
- Commands in `--json` mode must not print interactive prompt text into stdout.
|
|
11
|
+
|
|
12
|
+
## Archive Compatibility
|
|
13
|
+
|
|
14
|
+
- `archive` is hidden compatibility, not part of the public v1 product flow.
|
|
15
|
+
- Default help, README public command lists, next-step helpers, and workflow hooks must not recommend `loopx archive` or `$archive`.
|
|
16
|
+
- If old persisted runtime state contains archive recommendations, hooks must replace them:
|
|
17
|
+
- done/archive/completed state -> `$finish`
|
|
18
|
+
- approved review state -> `loopx approve <slug> --from review --to done`
|
|
19
|
+
|
|
20
|
+
## Installer Behavior
|
|
21
|
+
|
|
22
|
+
- `loopx install-skills --dry-run` is read-only. It must not write skills, hooks, lock files, settings, or template hashes.
|
|
23
|
+
- All-target dry-run summaries must render the follow-up command as `loopx install-skills --target all --yes`.
|
|
24
|
+
- `--dir` is valid only with a single target. `--target all --dir <path>` must fail before writing files.
|
|
25
|
+
- `loopx install-skills` must exit nonzero whenever its final payload has `ok: false`, in both human and JSON modes.
|
|
26
|
+
- Postinstall opt-outs are `LOOPX_SKIP_POSTINSTALL=1` and `LOOPX_POSTINSTALL=0`.
|
|
27
|
+
- Postinstall opt-out with `--json` must preserve JSON stdout.
|
|
28
|
+
|
|
29
|
+
## Published Skill Surface
|
|
30
|
+
|
|
31
|
+
- The package root `skills/` surface is exactly `skills/RESOLVER.md` plus the directories in `LOOPX_BUNDLED_SKILLS`.
|
|
32
|
+
- Auxiliary root skill sources must not be published by explicit or broad `package.json.files` entries.
|
|
33
|
+
- `scripts/verify-skills.mjs` and the package governance tests are the release gates for this surface.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-content-space/loopx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.7",
|
|
5
5
|
"description": "Skill-first workflow suite for agentic coding assistants",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -30,7 +30,23 @@
|
|
|
30
30
|
"scripts/codex-workflow-hook.mjs",
|
|
31
31
|
"assets/logo.svg",
|
|
32
32
|
"src/",
|
|
33
|
-
"skills/",
|
|
33
|
+
"skills/RESOLVER.md",
|
|
34
|
+
"skills/clarify/",
|
|
35
|
+
"skills/debug/",
|
|
36
|
+
"skills/doc-readability/",
|
|
37
|
+
"skills/exec/",
|
|
38
|
+
"skills/final-review/",
|
|
39
|
+
"skills/finish/",
|
|
40
|
+
"skills/fix-review/",
|
|
41
|
+
"skills/go-style/",
|
|
42
|
+
"skills/kratos/",
|
|
43
|
+
"skills/plan/",
|
|
44
|
+
"skills/refactor-plan/",
|
|
45
|
+
"skills/review/",
|
|
46
|
+
"skills/spec/",
|
|
47
|
+
"skills/subagent-exec/",
|
|
48
|
+
"skills/tdd/",
|
|
49
|
+
"skills/verify/",
|
|
34
50
|
"templates/",
|
|
35
51
|
"plugins/loopx/",
|
|
36
52
|
"!plugins/loopx/scripts/plugin-install.test.mjs"
|
|
@@ -3,7 +3,7 @@ name: clarify
|
|
|
3
3
|
description: "Grills ambiguous loopx work until material questions are answered, then routes to spec or plan using a design gate. Not for clear implementation tasks, approved specs, or code changes."
|
|
4
4
|
when_to_use: "clarify, requirements, ambiguous request, unclear scope, non-goals, decision boundaries, acceptance criteria, 需求澄清, 范围不清"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.7"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# loopx Clarify
|
|
@@ -3,7 +3,7 @@ name: debug
|
|
|
3
3
|
description: "Finds root cause for bugs, failing tests, build failures, regressions, and unexpected behavior before fixes. Not for new feature planning or routine code review."
|
|
4
4
|
when_to_use: "debug, bug, test failure, build failure, regression, unexpected behavior, root cause, 报错, 失败, 回归, 排查"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.7"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Systematic Debugging
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: doc-readability
|
|
3
|
+
description: "Use when evaluating, rewriting, or editing documents for human readability, unclear viewpoints, AI-like prose, bloated specs, PRDs, requirements docs, meeting notes, strategy docs, or internal knowledge-base articles. Not for code review, implementation planning, or file-format conversion."
|
|
4
|
+
when_to_use: "document readability, PRD assessment, requirements gaps, AI-like prose, unclear viewpoint, rewrite docs, editing docs, 文档可读性, 去AI味, 需求文档评估"
|
|
5
|
+
metadata:
|
|
6
|
+
version: "0.2.7"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Doc Readability
|
|
10
|
+
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
Readable documents help a specific reader make a decision, execute work, or verify a claim with minimal reconstruction. Do not confuse readability with shortness or smooth prose. Preserve factual meaning, domain vocabulary, and useful specificity while removing noise.
|
|
14
|
+
|
|
15
|
+
## First Move
|
|
16
|
+
|
|
17
|
+
Read the actual document before judging it. If the document is a URL, cloud doc, wiki page, local file, PDF, or exported artifact, fetch or read the content with the appropriate available tool. If only an excerpt is provided, state that the assessment is based on the excerpt.
|
|
18
|
+
|
|
19
|
+
Start by inferring:
|
|
20
|
+
|
|
21
|
+
| Question | Why it matters |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Who is the reader? | Reviewers, engineers, operators, executives, and future maintainers need different structures. |
|
|
24
|
+
| What job must the document do? | PRDs, engineering specs, SOPs, decision memos, and general notes have different standards. |
|
|
25
|
+
| What is the main claim? | If the claim is hard to state in one sentence, the document likely has a structure problem. |
|
|
26
|
+
| What action should follow? | Readability is poor when the reader cannot tell what to do next. |
|
|
27
|
+
|
|
28
|
+
If these are clear from the request and document, use them to make a recommendation. The document type still needs user confirmation unless the user explicitly asks for a quick assessment or says to use judgment.
|
|
29
|
+
|
|
30
|
+
## Setup Flow
|
|
31
|
+
|
|
32
|
+
User choices override inference. Support explicit inputs such as:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
Document type: engineering spec
|
|
36
|
+
Reader: engineering reviewers
|
|
37
|
+
Mode: assessment only
|
|
38
|
+
Strictness: review-ready
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Do not turn setup into a form. Use this order:
|
|
42
|
+
|
|
43
|
+
1. Confirm document type first. If the user has not explicitly specified document type, ask Step 1 before evaluating. Do not proceed based only on inference.
|
|
44
|
+
2. If the document appears to mix multiple types, ask which lens should be primary. Do not silently choose the primary type.
|
|
45
|
+
3. After document type is chosen, read enough of the document to judge its actual condition: title, headings, first screen, conclusion, and key sections. For long documents, sample the main path and high-risk sections.
|
|
46
|
+
4. Only after reading the document may the agent recommend an action mode. Do not recommend assessment-only, targeted suggestions, or rewrite before reading the document.
|
|
47
|
+
5. Recommendations must be dynamic, based on the user request, chosen document type, document content, headings, visible structure, and previous user choices.
|
|
48
|
+
6. Do not hard-code a default recommendation in the skill.
|
|
49
|
+
7. If the user says "quick assessment", "use your judgment", "don't ask", or equivalent, proceed with inference and state assumptions.
|
|
50
|
+
|
|
51
|
+
Ask setup questions sequentially:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
I want to confirm the document type. Based on the title and headings, I would treat this as "...", because ...
|
|
55
|
+
|
|
56
|
+
Which document type should I use?
|
|
57
|
+
1. Engineering spec / interface contract / rules document
|
|
58
|
+
2. Requirements document / PRD
|
|
59
|
+
3. Engineering design document
|
|
60
|
+
4. SOP / operating procedure
|
|
61
|
+
5. Decision memo
|
|
62
|
+
6. Research / analysis document
|
|
63
|
+
7. Meeting notes / discussion record
|
|
64
|
+
8. Postmortem / RCA
|
|
65
|
+
9. Project plan / roadmap
|
|
66
|
+
10. General note / knowledge-base article
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
After the user chooses the type, read the document. Then decide whether action mode needs confirmation:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
I have read the document's main path. Given the chosen type and the document's actual condition, I recommend "...", because ...
|
|
73
|
+
|
|
74
|
+
How should I handle it?
|
|
75
|
+
1. Assessment only
|
|
76
|
+
2. Assessment plus targeted improvement suggestions
|
|
77
|
+
3. Assessment, then rewrite only if there are blocking issues
|
|
78
|
+
4. Rewrite directly
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Ask strictness only when it would change the result:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
Strictness will affect this assessment. I recommend "...", because ...
|
|
85
|
+
|
|
86
|
+
Which strictness should I use?
|
|
87
|
+
1. Usable for internal handoff
|
|
88
|
+
2. Review-ready
|
|
89
|
+
3. Publication-ready
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
If strictness is not worth asking, choose a sensible default and state it briefly.
|
|
93
|
+
|
|
94
|
+
When the confirmed document type is `Requirements document / PRD`, read `references/prd.md` before assessment or rewrite. Use it to check requirement completeness and testability, not just prose clarity.
|
|
95
|
+
|
|
96
|
+
## Document Types
|
|
97
|
+
|
|
98
|
+
Use the document type to set the evaluation bar.
|
|
99
|
+
|
|
100
|
+
| Type | Readability standard |
|
|
101
|
+
|---|---|
|
|
102
|
+
| Requirements / PRD | Reader can identify problem, users, goals, non-goals, scope, workflows, requirements, acceptance criteria, priorities, and open questions. Also read `references/prd.md` for PRD-specific completeness checks. |
|
|
103
|
+
| Engineering design | Reader can identify context, proposed design, key decisions, rejected alternatives, contracts, data flow, failure modes, rollout, and boundaries. |
|
|
104
|
+
| Engineering spec / interface contract / rules document | Reader can identify the first-screen conclusion, main decision path, canonical rules, field/status definitions, and where details live. Long tables, enum lists, field contracts, state tables, and long sections are acceptable when they are locatable and support implementation. Judge clarity of path and lookup, not shortness. |
|
|
105
|
+
| SOP / operating procedure | Reader can identify trigger, owner, prerequisites, step order, checks, exceptions, and escalation path. |
|
|
106
|
+
| Decision memo | Reader can identify recommendation, rationale, tradeoffs, risks, decision owner, and next action. |
|
|
107
|
+
| Research / analysis | Reader can identify question, method, evidence, conclusion, confidence, limitations, and implications. |
|
|
108
|
+
| Meeting notes / discussion record | Reader can identify decisions, unresolved questions, owners, due dates, and context needed later. |
|
|
109
|
+
| Postmortem / RCA | Reader can identify impact, timeline, root cause, contributing factors, fixes, owners, and prevention checks. |
|
|
110
|
+
| Project plan / roadmap | Reader can identify objective, milestones, dependencies, owners, risks, dates, and decision points. |
|
|
111
|
+
| General note / knowledge-base article | Reader can identify topic, takeaway, section map, and why each section exists. |
|
|
112
|
+
|
|
113
|
+
If a document mixes types, name the primary and secondary type. Judge the primary reading path first; suggest moving secondary material to an appendix or companion doc only when it interferes with the main job.
|
|
114
|
+
|
|
115
|
+
## Diagnostic Rubric
|
|
116
|
+
|
|
117
|
+
Evaluate across these dimensions:
|
|
118
|
+
|
|
119
|
+
| Dimension | Good | Poor |
|
|
120
|
+
|---|---|---|
|
|
121
|
+
| Viewpoint | The document makes defensible claims and repeats them consistently. | It lists related facts without choosing what matters. |
|
|
122
|
+
| Reader path | The reader can predict where conclusions, rules, examples, and details live. | Background, rules, fields, cases, and tasks are mixed together. |
|
|
123
|
+
| Information hierarchy | Important decisions appear first; details support them. | Long tables and sections force the reader to synthesize conclusions manually. |
|
|
124
|
+
| Actionability | Owners, timing, inputs, outputs, states, and exceptions are concrete. | Sentences say "support", "process", "handle", or "optimize" without operational meaning. |
|
|
125
|
+
| Density | Each paragraph changes what the reader knows or can do. | Repeated sentence frames and generic transitions create drag. |
|
|
126
|
+
| Boundary clarity | Scope, non-goals, risks, blockers, and "not automatic" rules are explicit. | Boundaries are scattered, softened, or buried after implementation detail. |
|
|
127
|
+
| Human voice | The prose shows judgment, tradeoffs, and emphasis. | The prose is neutral, padded, symmetric, and unwilling to choose. |
|
|
128
|
+
|
|
129
|
+
Lead with a practical verdict in the user's language: `Readable`, `Partly readable`, or `Hard to read`.
|
|
130
|
+
|
|
131
|
+
Separate findings by severity:
|
|
132
|
+
|
|
133
|
+
| Severity | Meaning |
|
|
134
|
+
|---|---|
|
|
135
|
+
| Blocking | The target reader cannot understand the conclusion, decision path, required action, or authoritative rule. This usually requires restructuring or rewriting. |
|
|
136
|
+
| Important | The document is usable, but readers will waste time or may implement inconsistently. Recommend focused changes. |
|
|
137
|
+
| Optional | The document can be improved, but the issue does not block review or execution. Do not present optional polish as readability failure. |
|
|
138
|
+
|
|
139
|
+
For an already rewritten or structured document, use this severity split instead of listing every possible flaw as a main obstacle.
|
|
140
|
+
|
|
141
|
+
## AI-Like Smells
|
|
142
|
+
|
|
143
|
+
Treat these as signals to tighten or restructure:
|
|
144
|
+
|
|
145
|
+
- Broad openings like "This document is used to..." without a decision.
|
|
146
|
+
- Repeated section patterns that say the same thing for every case.
|
|
147
|
+
- Tables whose cells are long paragraphs.
|
|
148
|
+
- Grammatically parallel bullets that are not intellectually prioritized.
|
|
149
|
+
- Generic terms like `support`, `process`, `optimize`, `capability`, `workflow`, `closed loop`, `improve`, `ensure`.
|
|
150
|
+
- Every section ending with "notes" that restate prior content.
|
|
151
|
+
- Long chains of "need to / can / generate / receive / process" without owner, timing, or output.
|
|
152
|
+
- Balanced summaries that avoid saying "do this", "do not do this", or "this is the rule".
|
|
153
|
+
|
|
154
|
+
Do not remove domain terms merely because they are technical. Remove vagueness, not expertise.
|
|
155
|
+
|
|
156
|
+
## Rewrite Strategy
|
|
157
|
+
|
|
158
|
+
Choose structure by document job:
|
|
159
|
+
|
|
160
|
+
| Job | Preferred shape |
|
|
161
|
+
|---|---|
|
|
162
|
+
| Requirements / PRD | Problem -> users -> goals/non-goals -> scope -> workflows -> requirements -> acceptance criteria -> open questions |
|
|
163
|
+
| Engineering design | Context -> decision -> architecture -> alternatives -> contracts -> data flow -> failure modes -> rollout |
|
|
164
|
+
| Engineering spec / contract / rules | Conclusion -> hard rules -> decision path -> canonical definitions -> field/status contracts -> examples -> appendix |
|
|
165
|
+
| SOP | Trigger -> owner -> prerequisites -> steps -> checks -> exceptions -> escalation |
|
|
166
|
+
| Decision memo | Verdict -> decisions -> tradeoffs -> risks -> next action -> appendix |
|
|
167
|
+
| Research / analysis | Question -> method -> evidence -> findings -> confidence -> limitations -> implications |
|
|
168
|
+
| Meeting notes | Context -> decisions -> action items -> open questions -> reference notes |
|
|
169
|
+
| Postmortem / RCA | Impact -> timeline -> root cause -> contributing factors -> fixes -> prevention |
|
|
170
|
+
| General note / KB | Orientation -> key takeaway -> section map -> details |
|
|
171
|
+
|
|
172
|
+
For long documents, do not polish in place first. Extract the spine:
|
|
173
|
+
|
|
174
|
+
1. One-sentence main claim.
|
|
175
|
+
2. Three to seven decisions or rules.
|
|
176
|
+
3. Who owns each action.
|
|
177
|
+
4. Which details belong in appendix/reference.
|
|
178
|
+
5. Which repeated sections can share one template.
|
|
179
|
+
|
|
180
|
+
Then rewrite only within the user-approved action mode.
|
|
181
|
+
|
|
182
|
+
## Output Rules
|
|
183
|
+
|
|
184
|
+
Match the user's requested mode. Use natural headings in the user's language. Do not expose rigid labels like `Main claim I extracted`, `Main reading obstacles`, or `Rewritten version` unless the user asks for a machine-readable template.
|
|
185
|
+
|
|
186
|
+
For assessment, cover:
|
|
187
|
+
|
|
188
|
+
- Chosen or inferred setup.
|
|
189
|
+
- Readability verdict.
|
|
190
|
+
- Core viewpoint extracted from the document.
|
|
191
|
+
- Blocking issues, important improvements, and optional polish.
|
|
192
|
+
- Whether rewrite is recommended.
|
|
193
|
+
|
|
194
|
+
Rewrite control:
|
|
195
|
+
|
|
196
|
+
- If mode is `assessment only`, do not output a rewritten version. State whether rewrite is recommended.
|
|
197
|
+
- If mode is `assessment plus targeted suggestions`, provide focused changes, not a full rewrite.
|
|
198
|
+
- If mode is `rewrite only if blocking`, provide a rewritten version only when blocking issues exist.
|
|
199
|
+
- If mode is `rewrite directly`, rewrite directly with a short diagnosis first.
|
|
200
|
+
- For long documents, rewrite the most important section first unless the user explicitly asks for the full document.
|
|
201
|
+
|
|
202
|
+
## Editing Rules
|
|
203
|
+
|
|
204
|
+
- Lead with conclusions and rules before explanation.
|
|
205
|
+
- Prefer prose over a table when table cells become paragraphs.
|
|
206
|
+
- Split source-of-truth rules from implementation details.
|
|
207
|
+
- Make negative rules explicit: "do not auto-post cash", "do not rewrite historical trades", "do not send Plan before confirmation".
|
|
208
|
+
- Replace repeated prose with one shared rule plus event-specific exceptions.
|
|
209
|
+
- Keep strong domain nouns, exact dates, fields, statuses, and enumerations.
|
|
210
|
+
- Preserve real uncertainty, but name what is unknown and who resolves it.
|
|
211
|
+
- Remove performative transitions unless they add structure.
|
|
212
|
+
- Do not make formal documents chatty. Human writing means judgment and economy, not casual tone.
|
|
213
|
+
|
|
214
|
+
## Final Check
|
|
215
|
+
|
|
216
|
+
Before claiming the document is improved, verify:
|
|
217
|
+
|
|
218
|
+
- The main claim is visible in the first screen or first section.
|
|
219
|
+
- A new reader can state the next action after reading the conclusion.
|
|
220
|
+
- Repeated content has been collapsed or justified.
|
|
221
|
+
- Boundaries and non-goals are not buried.
|
|
222
|
+
- Any removed text was redundant, not a lost requirement.
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
# PRD Readability and Completeness
|
|
2
|
+
|
|
3
|
+
Use this reference only when the confirmed document type is `Requirements document / PRD`, or when the user explicitly asks to evaluate a document as a PRD.
|
|
4
|
+
|
|
5
|
+
## Core Standard
|
|
6
|
+
|
|
7
|
+
A PRD is readable only if it lets reviewers decide whether the product should be built and lets designers, engineers, QA, operations, and stakeholders understand what must be delivered. For PRDs, readability includes requirement completeness, not just prose clarity.
|
|
8
|
+
|
|
9
|
+
## Required Checks
|
|
10
|
+
|
|
11
|
+
Check the PRD across these areas:
|
|
12
|
+
|
|
13
|
+
| Area | What must be clear |
|
|
14
|
+
|---|---|
|
|
15
|
+
| Problem | What problem exists, who has it, why it matters now, and what current workaround or failure it replaces. |
|
|
16
|
+
| Goal | What outcome this release must achieve, and how success will be judged. |
|
|
17
|
+
| Non-goals | What is explicitly out of scope, deferred, or intentionally unsupported. |
|
|
18
|
+
| Users / roles | Which user roles exist, what each role can see or do, and which role owns each decision or operation. |
|
|
19
|
+
| Scope and priority | What is MVP / phase-one / required, what is optional, and what is future work. |
|
|
20
|
+
| Workflow | Trigger, preconditions, main path, branch paths, exception paths, and terminal states. |
|
|
21
|
+
| Functional requirements | Inputs, outputs, state changes, permissions, validation, dependencies, and failure handling. |
|
|
22
|
+
| Business rules | Who evaluates the rule, using which fields, at what time, and what happens when the rule fails. |
|
|
23
|
+
| Page / operation behavior | Entry point, displayed fields, action buttons, enable/disable conditions, submit validation, success/failure feedback, and audit logs. |
|
|
24
|
+
| Data / integration | Source systems, target systems, required fields, idempotency, versioning, retries, and consistency expectations. |
|
|
25
|
+
| Acceptance criteria | Testable Given/When/Then-style outcomes or equivalent concrete verification criteria. |
|
|
26
|
+
| Open questions | Unknowns, decision owners, deadlines, and whether they block delivery. |
|
|
27
|
+
|
|
28
|
+
## Detail Gap Patterns
|
|
29
|
+
|
|
30
|
+
Flag these as PRD detail gaps, even if the prose is readable:
|
|
31
|
+
|
|
32
|
+
- A feature says `support`, `process`, `identify`, `generate`, `sync`, `notify`, `confirm`, or `handle`, but does not define input, output, owner, timing, or terminal state.
|
|
33
|
+
- A workflow lists stages but omits trigger, precondition, branch conditions, exception handling, or completion criteria.
|
|
34
|
+
- A status is named but its transitions, allowed actions, owner, or exit condition are missing.
|
|
35
|
+
- A page lists fields but omits action behavior, button availability, validation, empty states, errors, permissions, or logs.
|
|
36
|
+
- A rule describes intent but not the exact field, calculation, priority, source of truth, or conflict handling.
|
|
37
|
+
- A Plan / task / event is generated, but the recipient, payload, idempotency, retry, cancellation, and failure handling are unclear.
|
|
38
|
+
- A dependency is mentioned but its contract, SLA, missing-data behavior, or fallback is undefined.
|
|
39
|
+
- A requirement cannot be tested because it lacks concrete examples or acceptance criteria.
|
|
40
|
+
|
|
41
|
+
## Ambiguity Probes
|
|
42
|
+
|
|
43
|
+
Use these probes to expose unclear requirements. Do not ask all of them to the user; use them to inspect the document and report the gaps that matter.
|
|
44
|
+
|
|
45
|
+
### Feature Scope
|
|
46
|
+
|
|
47
|
+
- What exactly does `support X` include and exclude?
|
|
48
|
+
- What is the minimum acceptable behavior for phase one?
|
|
49
|
+
- Is this automatic, manual, or semi-automatic?
|
|
50
|
+
- Who can trigger it, and from where?
|
|
51
|
+
- What happens if the user starts but does not finish?
|
|
52
|
+
- What behavior is intentionally not supported?
|
|
53
|
+
- What is the smallest shippable version of the feature?
|
|
54
|
+
- Which users, accounts, markets, regions, products, channels, or data types are included?
|
|
55
|
+
- Which cases are explicitly excluded even if they look similar?
|
|
56
|
+
- Does "support" mean display only, calculate, persist, send, execute, reconcile, notify, or audit?
|
|
57
|
+
- Does the requirement apply to historical data, only new data, or both?
|
|
58
|
+
- Is there a migration, backfill, or cleanup requirement?
|
|
59
|
+
|
|
60
|
+
### Actors and Ownership
|
|
61
|
+
|
|
62
|
+
- Which role owns each decision, confirmation, correction, and exception?
|
|
63
|
+
- Which actions are system actions, user actions, operator actions, or downstream-system actions?
|
|
64
|
+
- Who is allowed to override system output?
|
|
65
|
+
- Who reviews or approves high-risk actions?
|
|
66
|
+
- Who is notified when something is blocked, failed, revised, or completed?
|
|
67
|
+
- Who owns manual follow-up when automation cannot continue?
|
|
68
|
+
|
|
69
|
+
### Workflow and State
|
|
70
|
+
|
|
71
|
+
- What triggers the workflow?
|
|
72
|
+
- What preconditions must be true?
|
|
73
|
+
- What is the happy path?
|
|
74
|
+
- What branches exist and what condition selects each branch?
|
|
75
|
+
- What are the terminal states?
|
|
76
|
+
- Which states allow edit, retry, cancel, ignore, approve, reject, archive, or rollback?
|
|
77
|
+
- Who owns each state transition?
|
|
78
|
+
- What happens when two events, tasks, or users act on the same object concurrently?
|
|
79
|
+
- What is the first state after creation?
|
|
80
|
+
- What is the difference between draft, pending, confirmed, sent, failed, completed, archived, ignored, or cancelled?
|
|
81
|
+
- Which transitions are automatic and which require user action?
|
|
82
|
+
- Are any transitions irreversible?
|
|
83
|
+
- What events reopen or revise a completed item?
|
|
84
|
+
- What stale states require timeout handling or escalation?
|
|
85
|
+
- What should the system do if a workflow is interrupted mid-step?
|
|
86
|
+
|
|
87
|
+
### Timing and Snapshot
|
|
88
|
+
|
|
89
|
+
- Which date or time controls eligibility, calculation, display, execution, and notification?
|
|
90
|
+
- Is the date in user timezone, market timezone, system timezone, or source-system timezone?
|
|
91
|
+
- What snapshot is used for positions, balances, orders, customers, permissions, or source data?
|
|
92
|
+
- Can the snapshot be regenerated? If yes, does it replace or version prior results?
|
|
93
|
+
- What happens if source data arrives late, is revised, or is cancelled?
|
|
94
|
+
- What is the cutoff time for each action?
|
|
95
|
+
- What is allowed before cutoff, after cutoff, and after execution?
|
|
96
|
+
|
|
97
|
+
### Data and Rules
|
|
98
|
+
|
|
99
|
+
- What is the source of truth for each important field?
|
|
100
|
+
- Which field is required, optional, calculated, derived, or manually entered?
|
|
101
|
+
- What is the rule priority when multiple rules match?
|
|
102
|
+
- What happens when source systems disagree?
|
|
103
|
+
- What happens when required data is missing, stale, duplicated, revised, or cancelled?
|
|
104
|
+
- Are historical values preserved when current effective values change?
|
|
105
|
+
- Is there versioning, and which version is current?
|
|
106
|
+
- What is the unique key for deduplication?
|
|
107
|
+
- Which fields are immutable after creation?
|
|
108
|
+
- Which fields can be manually corrected, and how are original/system/manual/effective values preserved?
|
|
109
|
+
- What validation prevents invalid combinations?
|
|
110
|
+
- What precision, rounding, currency, unit, or formatting rule applies?
|
|
111
|
+
- What happens when two rules produce different outputs?
|
|
112
|
+
- What is the conflict priority between source data, manual confirmation, downstream return, and recalculation?
|
|
113
|
+
- Is the rule evaluated per user, per account, per task, per event, per order, or per item?
|
|
114
|
+
|
|
115
|
+
### Page and Operation Behavior
|
|
116
|
+
|
|
117
|
+
- Where is the entry point?
|
|
118
|
+
- What fields are visible by default, and what is hidden behind details?
|
|
119
|
+
- Which actions are available in each status?
|
|
120
|
+
- What disables an action button?
|
|
121
|
+
- What validation runs before submit?
|
|
122
|
+
- What confirmation, warning, or preview is shown before an irreversible operation?
|
|
123
|
+
- What success, failure, partial-success, retry, and timeout feedback does the user see?
|
|
124
|
+
- What audit log is written?
|
|
125
|
+
- What filters, sorting, grouping, search, export, or bulk actions are required?
|
|
126
|
+
- What empty, loading, error, no-permission, and no-data states are shown?
|
|
127
|
+
- What fields are editable, read-only, calculated, or drill-down only?
|
|
128
|
+
- What happens when a user edits data that has already changed in the background?
|
|
129
|
+
- What is the behavior for batch selection, partial selection, and disabled rows?
|
|
130
|
+
- What is the exact result of save, submit, approve, reject, retry, ignore, archive, cancel, rollback, or resend?
|
|
131
|
+
- Does the user need a preview of generated output before sending?
|
|
132
|
+
|
|
133
|
+
### Integration and Execution
|
|
134
|
+
|
|
135
|
+
- Who receives generated tasks, events, Plans, notifications, or files?
|
|
136
|
+
- What payload is sent?
|
|
137
|
+
- What idempotency key or duplicate-prevention rule exists?
|
|
138
|
+
- What is retryable and what requires manual intervention?
|
|
139
|
+
- What happens on partial success?
|
|
140
|
+
- What happens if the downstream system accepts the request but later reports failure?
|
|
141
|
+
- What cancellation, correction, reversal, or compensation path exists?
|
|
142
|
+
- Is execution synchronous, asynchronous, scheduled, or manual?
|
|
143
|
+
- What acknowledgement does the upstream system need?
|
|
144
|
+
- What return payload is expected?
|
|
145
|
+
- What retry policy applies: count, interval, backoff, manual retry, or no retry?
|
|
146
|
+
- What makes a request idempotent?
|
|
147
|
+
- How are duplicate sends, duplicate callbacks, or out-of-order callbacks handled?
|
|
148
|
+
- What monitoring, alerting, or reconciliation is required?
|
|
149
|
+
- What should happen when integration is unavailable but users continue operating?
|
|
150
|
+
|
|
151
|
+
### Permissions and Risk
|
|
152
|
+
|
|
153
|
+
- Who can view, create, edit, approve, send, retry, cancel, or archive?
|
|
154
|
+
- Which operations require dual review or elevated permission?
|
|
155
|
+
- What is the blast radius of a wrong operation?
|
|
156
|
+
- What guardrails prevent sending incomplete, stale, or unconfirmed data?
|
|
157
|
+
- What must be recoverable from logs?
|
|
158
|
+
- Which fields or actions are sensitive?
|
|
159
|
+
- Which roles can see customer-level, account-level, financial, or operational details?
|
|
160
|
+
- Is approval required before customer-facing or financially impactful actions?
|
|
161
|
+
- What is the rollback or compensation path for wrong execution?
|
|
162
|
+
- What operational dashboard or report proves the feature is healthy?
|
|
163
|
+
- What audit evidence must be retained for compliance or customer support?
|
|
164
|
+
|
|
165
|
+
### Notifications and External Visibility
|
|
166
|
+
|
|
167
|
+
- Who receives notifications: internal operators, downstream teams, customers, support, or all?
|
|
168
|
+
- What triggers notification creation?
|
|
169
|
+
- What template, channel, language, and timing are required?
|
|
170
|
+
- What fields are shown to customers versus internal users?
|
|
171
|
+
- What happens if notification delivery fails?
|
|
172
|
+
- Can notifications be resent, corrected, suppressed, or cancelled?
|
|
173
|
+
- What customer support or audit view is needed after notification?
|
|
174
|
+
|
|
175
|
+
## Acceptance Criteria Patterns
|
|
176
|
+
|
|
177
|
+
When a requirement is vague, propose a testable acceptance shape. Use domain language from the document.
|
|
178
|
+
|
|
179
|
+
```text
|
|
180
|
+
Given [precondition / status / role / data]
|
|
181
|
+
When [user action / system trigger / external event]
|
|
182
|
+
Then [observable result / state change / generated output]
|
|
183
|
+
And [audit / notification / error / retry behavior]
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Include acceptance coverage for:
|
|
187
|
+
|
|
188
|
+
- Happy path.
|
|
189
|
+
- Missing or invalid input.
|
|
190
|
+
- Permission denied.
|
|
191
|
+
- Duplicate submission or duplicate event.
|
|
192
|
+
- External dependency failure.
|
|
193
|
+
- Partial success.
|
|
194
|
+
- Revised or cancelled source data.
|
|
195
|
+
- No impacted users / empty result.
|
|
196
|
+
- Manual override.
|
|
197
|
+
- Audit and traceability.
|
|
198
|
+
|
|
199
|
+
For page requirements, check:
|
|
200
|
+
|
|
201
|
+
```text
|
|
202
|
+
Given [task status and user role]
|
|
203
|
+
When [page opens or action is clicked]
|
|
204
|
+
Then [fields/actions visible]
|
|
205
|
+
And [disabled/enabled conditions]
|
|
206
|
+
And [validation / feedback / log behavior]
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
For rules, check:
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
Given [source data and priority conditions]
|
|
213
|
+
When [rule evaluation runs]
|
|
214
|
+
Then [selected result]
|
|
215
|
+
And [fallback or conflict result]
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## PRD Severity
|
|
219
|
+
|
|
220
|
+
Use this severity model in addition to the main skill's severity model:
|
|
221
|
+
|
|
222
|
+
| Severity | Meaning |
|
|
223
|
+
|---|---|
|
|
224
|
+
| Blocking requirement gap | A builder or reviewer cannot know what to implement, test, approve, or operate. |
|
|
225
|
+
| Important requirement gap | The requirement is implementable only with assumptions; different readers may implement it differently. |
|
|
226
|
+
| Optional refinement | The requirement is understandable, but examples, wording, or organization could reduce review effort. |
|
|
227
|
+
|
|
228
|
+
Do not label every missing detail as blocking. A missing detail is blocking only if implementation, testing, or review would require guessing.
|
|
229
|
+
|
|
230
|
+
## PRD Output Requirement
|
|
231
|
+
|
|
232
|
+
When assessing a PRD, include a section for requirement detail gaps. Use natural headings in the user's language. Cover:
|
|
233
|
+
|
|
234
|
+
- The gap.
|
|
235
|
+
- Why it affects delivery or review.
|
|
236
|
+
- What question must be answered or what detail must be added.
|
|
237
|
+
- A suggested acceptance or clarification shape when useful.
|
|
238
|
+
|
|
239
|
+
Example shape:
|
|
240
|
+
|
|
241
|
+
```text
|
|
242
|
+
Requirement detail gaps:
|
|
243
|
+
- [Gap]: ...
|
|
244
|
+
Impact: ...
|
|
245
|
+
Need to clarify: ...
|
|
246
|
+
Suggested acceptance shape: ...
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## Rewrite Guidance for PRDs
|
|
250
|
+
|
|
251
|
+
When rewriting a PRD, prefer this structure:
|
|
252
|
+
|
|
253
|
+
```text
|
|
254
|
+
1. Summary
|
|
255
|
+
2. Background / problem
|
|
256
|
+
3. Goals and non-goals
|
|
257
|
+
4. Users and roles
|
|
258
|
+
5. Scope and priorities
|
|
259
|
+
6. Core workflows
|
|
260
|
+
7. Functional requirements
|
|
261
|
+
8. Rules and edge cases
|
|
262
|
+
9. Page / operation requirements
|
|
263
|
+
10. Data and integration requirements
|
|
264
|
+
11. Acceptance criteria
|
|
265
|
+
12. Open questions
|
|
266
|
+
13. Appendix
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Keep implementation contracts in the PRD only when they are needed for product review. Move exhaustive field tables, enum lists, API payloads, and state-machine details to appendices or companion engineering specs when they interrupt the product decision path.
|
|
@@ -3,7 +3,7 @@ name: exec
|
|
|
3
3
|
description: "Executes a written loopx implementation plan sequentially with review checkpoints. Not for unclear plans, missing requirements, or subagent-first execution."
|
|
4
4
|
when_to_use: "written implementation plan, inline execution, sequential plan execution, review checkpoints, no subagent lane"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.7"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Exec
|
|
@@ -24,6 +24,16 @@ Load plan, review critically, execute all tasks, report when complete.
|
|
|
24
24
|
3. If concerns: Raise them with your human partner before starting
|
|
25
25
|
4. If no concerns: create update_plan and proceed
|
|
26
26
|
|
|
27
|
+
### Step 1.5: Record Finish Baseline
|
|
28
|
+
|
|
29
|
+
Before editing files or running the first task, run:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
loopx finish-start <slug> --source <plan-path>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Use the plan filename slug when no workflow slug is available. This preserves the starting `HEAD` for finish learning/spec audit after the execution commits code.
|
|
36
|
+
|
|
27
37
|
### Step 2: Execute Tasks
|
|
28
38
|
|
|
29
39
|
For each task:
|
|
@@ -3,7 +3,7 @@ name: final-review
|
|
|
3
3
|
description: "Performs whole-feature review after implementation and staged task review. Not for per-task review, unresolved scope, implementation, or pure documentation polish."
|
|
4
4
|
when_to_use: "final-review, final code review, whole feature review, integration review, pre-finish review, after subagent-exec, runtime risk review, 最终评审"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.7"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Final Review
|