@v11g/agents-rock 1.0.1 → 1.0.3
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 +58 -14
- package/package.json +7 -3
- package/plugins/business-analyst/.claude-plugin/plugin.json +9 -0
- package/plugins/business-analyst/skills/business-analyst/README.md +20 -0
- package/plugins/business-analyst/skills/business-analyst/SKILL.md +69 -0
- package/plugins/business-analyst/skills/business-analyst/references/ai-extension.md +37 -0
- package/plugins/business-analyst/skills/business-analyst/references/frameworks.md +53 -0
- package/plugins/business-analyst/skills/business-analyst/references/interview.md +89 -0
- package/plugins/business-analyst/skills/business-analyst/references/review.md +25 -0
- package/plugins/business-analyst/skills/business-analyst/references/writing.md +102 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/checks.mjs +166 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/schema.mjs +78 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/checks.test.mjs +188 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/e2e.test.mjs +17 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-fail.json +205 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-pass.json +59 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-pass.md +63 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/schema.test.mjs +41 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/validate.mjs +20 -0
- package/plugins/solution-architect/skills/analyze-requirements/README.md +1 -1
- package/plugins/solution-architect/skills/estimate/SKILL.md +13 -5
- package/plugins/solution-architect/skills/estimate/assets/estimate-template-agentic.html +917 -0
- package/plugins/solution-architect/skills/estimate/assets/estimate-template.html +430 -13
- package/plugins/solution-architect/skills/estimate/references/agentic-estimation.md +148 -0
- package/plugins/solution-architect/skills/estimate/references/ai-multipliers.md +10 -0
- package/plugins/solution-architect/skills/estimate/references/interview.md +20 -1
- package/plugins/solution-architect/skills/estimate/references/task-shapes.md +173 -0
- package/plugins/solution-architect/skills/estimate/references/writing.md +31 -0
- package/plugins/solution-architect/skills/estimate/scripts/compute.mjs +5 -1
- package/plugins/solution-architect/skills/estimate/scripts/lib/agentic-checks.mjs +65 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/baselines.mjs +107 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/checks.mjs +16 -7
- package/plugins/solution-architect/skills/estimate/scripts/lib/inline.mjs +14 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/measurements.mjs +59 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/redact.mjs +28 -5
- package/plugins/solution-architect/skills/estimate/scripts/lib/rollup.mjs +53 -22
- package/plugins/solution-architect/skills/estimate/scripts/lib/schema.mjs +52 -7
- package/plugins/solution-architect/skills/estimate/scripts/render.mjs +14 -3
- package/plugins/solution-architect/skills/estimate/scripts/test/baselines.test.mjs +120 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/browser.test.mjs +69 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/compute.test.mjs +44 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/e2e.test.mjs +28 -1
- package/plugins/solution-architect/skills/estimate/scripts/test/fixtures/agentic-estimation-fail.md +55 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/fixtures/agentic-estimation-pass.md +54 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/fixtures/agentic-inputs.json +45 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/fixtures/measurements.jsonl +20 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/measurements.test.mjs +54 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/references.test.mjs +25 -1
- package/plugins/solution-architect/skills/estimate/scripts/test/render.test.mjs +48 -1
- package/plugins/solution-architect/skills/estimate/scripts/test/schema.test.mjs +59 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/validate.test.mjs +37 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/xlsx-export.test.mjs +168 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/zip.mjs +41 -0
- package/plugins/solution-architect/skills/new-lead/SKILL.md +15 -10
- package/src/cli/agents.mjs +10 -10
- package/src/cli/args.mjs +22 -3
- package/src/cli/flow.mjs +85 -0
- package/src/cli/install.mjs +7 -8
- package/src/cli/main.mjs +30 -72
- package/src/cli/prompts.mjs +84 -0
- package/src/cli/report.mjs +26 -0
- package/src/cli/scope.mjs +34 -0
- package/src/cli/targets.mjs +45 -0
- package/src/cli/uninstall.mjs +9 -10
- package/src/cli/picker.mjs +0 -78
package/README.md
CHANGED
|
@@ -5,10 +5,10 @@ A Claude Code plugin marketplace.
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
/plugin marketplace add git@github.com:
|
|
8
|
+
/plugin marketplace add git@github.com:v11g/agents-rock.git
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
(HTTPS equivalent: `https://github.com/
|
|
11
|
+
(HTTPS equivalent: `https://github.com/v11g/agents-rock.git`)
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
/plugin install <plugin>@agents-rock
|
|
@@ -20,24 +20,68 @@ Replace `<plugin>` with any plugin from the table below, e.g.
|
|
|
20
20
|
### Install via npx (Claude Code + Codex)
|
|
21
21
|
|
|
22
22
|
```
|
|
23
|
-
npx @v11g/agents-rock
|
|
24
|
-
npx @v11g/agents-rock -p <plugin> -a claude
|
|
25
|
-
npx @v11g/agents-rock -p <plugin> -a codex
|
|
26
|
-
npx @v11g/agents-rock -p <plugin> -a claude -a codex # both agents
|
|
27
|
-
npx @v11g/agents-rock uninstall -p <plugin>
|
|
23
|
+
npx @v11g/agents-rock # interactive: pick plugins, agents, scope
|
|
24
|
+
npx @v11g/agents-rock -p <plugin> -a claude --project # this project, Claude Code
|
|
25
|
+
npx @v11g/agents-rock -p <plugin> -a codex --global # your home dir, Codex
|
|
26
|
+
npx @v11g/agents-rock -p <plugin> -a claude -a codex -g # both agents, home dir
|
|
27
|
+
npx @v11g/agents-rock uninstall -p <plugin> --project # remove from this project, all agents
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
`-p <plugin>` installs
|
|
30
|
+
`-p <plugin>` installs every skill that plugin ships.
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
Run with no options and you get prompts for plugins, agents, and scope, then a
|
|
33
|
+
summary to confirm before anything is written. Nothing is written until you
|
|
34
|
+
confirm.
|
|
35
|
+
|
|
36
|
+
#### Scope
|
|
37
|
+
|
|
38
|
+
| Flag | Where skills land | Good for |
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| `--project` | the detected project root | skills committed alongside one repo |
|
|
41
|
+
| `--global` / `-g` | your home directory | skills you want in every project |
|
|
42
|
+
|
|
43
|
+
`--project` walks up from the current directory looking for `.git`, then for
|
|
44
|
+
`package.json`, `pyproject.toml`, `go.mod`, or `Cargo.toml`. When the root it
|
|
45
|
+
finds is not the directory you are standing in, it shows you both and asks which
|
|
46
|
+
to use — so running the installer from `packages/web/src` does not quietly
|
|
47
|
+
create a skills directory there. Use `--dir <path>` to name the directory
|
|
48
|
+
yourself and skip detection.
|
|
49
|
+
|
|
50
|
+
`--global` honors `CLAUDE_CONFIG_DIR` and `CODEX_HOME` if you have relocated
|
|
51
|
+
either agent's config.
|
|
52
|
+
|
|
53
|
+
#### Layout
|
|
54
|
+
|
|
55
|
+
Both scopes use the same shape — one canonical copy, symlinked per agent:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
project scope user scope
|
|
59
|
+
<root>/.agents/skills/<skill> ~/.agents/skills/<skill> canonical copy
|
|
60
|
+
<root>/.claude/skills/<skill> -> ~/.claude/skills/<skill> symlink
|
|
61
|
+
<root>/.codex/skills/<skill> -> ~/.codex/skills/<skill> symlink
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Editing the canonical copy updates every agent. On systems that refuse symlinks
|
|
65
|
+
the installer falls back to a junction, then to a plain copy, and warns that
|
|
66
|
+
updates will no longer propagate.
|
|
67
|
+
|
|
68
|
+
#### Other flags
|
|
69
|
+
|
|
70
|
+
| Flag | Effect |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| `-y`, `--yes` | Skip confirmations; assumes `--project` |
|
|
73
|
+
| `-f`, `--force` | Overwrite or remove collisions |
|
|
74
|
+
| `-h`, `--help` | Full flag list |
|
|
75
|
+
|
|
76
|
+
Flags let the installer run unattended. Without a terminal it never guesses:
|
|
77
|
+
missing `--plugin`, `--agent`, or a scope flag is an error naming the flag,
|
|
78
|
+
rather than a hang.
|
|
35
79
|
|
|
36
80
|
## Plugins
|
|
37
81
|
|
|
38
|
-
| Plugin | Description
|
|
39
|
-
| -------------------- |
|
|
40
|
-
| `solution-architect` | Solution-architecture toolkit: interview-driven architecture documentation with interactive diagrams and provenance-tagged facts, AI-aware project estimation, and client-ready proposals.
|
|
82
|
+
| Plugin | Description | Version |
|
|
83
|
+
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
84
|
+
| `solution-architect` | Solution-architecture toolkit: interview-driven architecture documentation with interactive diagrams and provenance-tagged facts, AI-aware project estimation, and client-ready proposals. | 1.0.0 |
|
|
41
85
|
| `lmk` | Terminal-native visual explainer: explains the current topic with cheap diagrams (flowcharts, sequences, timelines, tables) rendered directly in the terminal via a bundled Mermaid renderer. | 0.1.0 |
|
|
42
86
|
|
|
43
87
|
## Skills
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v11g/agents-rock",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -22,7 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "https://github.com/
|
|
25
|
+
"url": "https://github.com/v11g/agents-rock.git"
|
|
26
26
|
},
|
|
27
|
-
"license": "MIT"
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@clack/prompts": "^1.7.0",
|
|
30
|
+
"picocolors": "^1.1.1"
|
|
31
|
+
}
|
|
28
32
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "business-analyst",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Business-analysis toolkit: interview-driven requirements discovery that turns raw client input into a validated, traceable requirements package ready for solution architecture.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Truong Vu",
|
|
7
|
+
"email": "vukhanhtruong@gmail.com"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# business-analyst
|
|
2
|
+
|
|
3
|
+
Requirements discovery for pre-sales leads. Feed it raw client input —
|
|
4
|
+
emails, meeting notes, transcripts, briefs — and it interviews you to fill
|
|
5
|
+
the gaps, then writes a validated requirements package:
|
|
6
|
+
|
|
7
|
+
- `requirements.md` — discovery brief, process analysis, requirements,
|
|
8
|
+
acceptance scenarios, readiness report (five parts, one file)
|
|
9
|
+
- `requirements.json` — machine-readable handoff with stable IDs
|
|
10
|
+
|
|
11
|
+
Designed to run before the solution-architect plugin's chain
|
|
12
|
+
(`analyze-requirements` → `estimate` → `proposal`); its `new-lead`
|
|
13
|
+
orchestrator offers this skill as step 0 when installed. Also works
|
|
14
|
+
standalone: `/business-analyst` in any project directory.
|
|
15
|
+
|
|
16
|
+
The package is gated by `scripts/validate.mjs`: schema, ID traceability,
|
|
17
|
+
label discipline, an ambiguity lint on requirement text, readiness math,
|
|
18
|
+
and md↔json consistency.
|
|
19
|
+
|
|
20
|
+
Requires Node ≥ 20. No npm dependencies.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: business-analyst
|
|
3
|
+
description: Interview-driven requirements discovery — turn raw client input (emails, notes, transcripts, briefs) into a validated, traceable requirements package before solution architecture. Use when the user asks to analyze client requirements, run discovery on a lead, clarify a vague request, build a BA requirements package, or prepare requirements for architecture and estimation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# business-analyst
|
|
7
|
+
|
|
8
|
+
Turn incomplete client input into two artifacts in the lead directory:
|
|
9
|
+
`requirements.md` (five parts, human-readable) and `requirements.json`
|
|
10
|
+
(machine handoff for analyze-requirements, estimate, and proposal).
|
|
11
|
+
|
|
12
|
+
## Hard rules
|
|
13
|
+
|
|
14
|
+
1. Never invent requirements — every material fact carries a label
|
|
15
|
+
(`confirmed` | `assumed` | `recommended`) and a source. A
|
|
16
|
+
recommendation never renders as a confirmed requirement.
|
|
17
|
+
2. Problem before solution — no technology recommendations, no
|
|
18
|
+
architecture. This skill stops at WHAT; HOW belongs to
|
|
19
|
+
analyze-requirements and later skills.
|
|
20
|
+
3. Unknowns render as open questions, never silently filled. Distinguish
|
|
21
|
+
unknown (client doesn't know) from undecided (client must choose).
|
|
22
|
+
4. Never block on unanswered questions — write the package with an honest
|
|
23
|
+
status and readiness; a re-run refines it, never restarts the interview.
|
|
24
|
+
5. Every requirement carries a stable ID and traceability links;
|
|
25
|
+
`node scripts/validate.mjs` must exit 0 before the package is final.
|
|
26
|
+
6. The human reviews requirements.md before status may become
|
|
27
|
+
`READY_FOR_ARCHITECTURE`.
|
|
28
|
+
|
|
29
|
+
## Flow
|
|
30
|
+
|
|
31
|
+
1. **Detect evidence**: input documents? an existing `requirements.json`
|
|
32
|
+
(re-run — see Re-run)? greenfield or existing system? State findings;
|
|
33
|
+
the user can override.
|
|
34
|
+
2. **Depth**: ask QUICK / STANDARD / DEEP first
|
|
35
|
+
(`references/interview.md` §6).
|
|
36
|
+
3. **Extract**: pull every known goal, actor, process, rule, constraint,
|
|
37
|
+
integration, and assumption from ALL inputs before asking anything.
|
|
38
|
+
4. **Gap analysis**: extracted knowledge vs the nine layers
|
|
39
|
+
(`references/interview.md` §4) → prioritized P1/P2/P3 gap list.
|
|
40
|
+
5. **Select frameworks**: from `references/frameworks.md` — justify each
|
|
41
|
+
pick in one line; never apply all.
|
|
42
|
+
6. **Interview**: per `references/interview.md` — grouped, adaptive,
|
|
43
|
+
contradiction-challenging, example-hungry. Solution involves AI or
|
|
44
|
+
agents → also work through `references/ai-extension.md`.
|
|
45
|
+
7. **Write**: requirements.md + requirements.json per
|
|
46
|
+
`references/writing.md`.
|
|
47
|
+
8. **Validate**: `node scripts/validate.mjs --json <dir>/requirements.json
|
|
48
|
+
--md <dir>/requirements.md` — fix findings, re-run until clean.
|
|
49
|
+
9. **Fresh-eyes review**: dispatch a subagent per `references/review.md`;
|
|
50
|
+
apply findings, re-validate; one cycle max.
|
|
51
|
+
10. **Human review**: show Part 5 (readiness report); the human confirms
|
|
52
|
+
the status. Only they can promote it to `READY_FOR_ARCHITECTURE`.
|
|
53
|
+
|
|
54
|
+
## Re-run
|
|
55
|
+
|
|
56
|
+
`requirements.json` already exists → diff the new answers and material into
|
|
57
|
+
the registers (answer open questions, confirm assumptions, add findings),
|
|
58
|
+
keep every existing ID stable, recompute readiness, and advance the status.
|
|
59
|
+
Never restart the interview; ask only what is still open.
|
|
60
|
+
|
|
61
|
+
## Handoff
|
|
62
|
+
|
|
63
|
+
Downstream skills treat `requirements.json` as detected evidence — never a
|
|
64
|
+
prerequisite. FR/BR/ASM/Q ids are stable so architecture decisions and
|
|
65
|
+
estimates can cite them.
|
|
66
|
+
|
|
67
|
+
## Dependency
|
|
68
|
+
|
|
69
|
+
Node ≥ 20. Scripts are dependency-free.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# AI-specific investigation
|
|
2
|
+
|
|
3
|
+
Trigger: the solution involves AI, an agent, an LLM, a chatbot, ML
|
|
4
|
+
classification, or "automation with judgment". When triggered, work
|
|
5
|
+
through all six areas below and fill the json `ai` object (otherwise it
|
|
6
|
+
stays `null`).
|
|
7
|
+
|
|
8
|
+
## Areas
|
|
9
|
+
|
|
10
|
+
1. **Agent responsibility** — which decisions or actions does the AI
|
|
11
|
+
perform, exactly?
|
|
12
|
+
2. **Decision boundary** — for each responsibility: does the AI
|
|
13
|
+
*recommend*, *decide*, or *execute*? Push for one verb per action.
|
|
14
|
+
3. **Human-in-the-loop** — which actions require review, approval, or
|
|
15
|
+
escalation, and by whom (an ACT- id)?
|
|
16
|
+
4. **Tool access** — which systems may the agent read? Which may it write
|
|
17
|
+
or act on? Map each to an INT- entry.
|
|
18
|
+
5. **Failure handling** — expected behavior when confidence is low, input
|
|
19
|
+
is incomplete, a tool fails, results conflict, or policy blocks action.
|
|
20
|
+
6. **Evaluation requirements** — representative test cases, expected and
|
|
21
|
+
unacceptable behavior, quality metric, threshold. Ask for real sample
|
|
22
|
+
data ("can you provide 20 contracts with known-good answers?").
|
|
23
|
+
|
|
24
|
+
## json shape
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
"ai": {
|
|
28
|
+
"decisionBoundary": [{ "action": "flag risky clauses", "authority": "recommend" }],
|
|
29
|
+
"hitl": [{ "action": "contract approval", "gate": "lawyer review", "actor": "ACT-003" }],
|
|
30
|
+
"toolAccess": [{ "integration": "INT-002", "access": "read" }],
|
|
31
|
+
"failureHandling": [{ "condition": "low confidence", "behavior": "escalate to lawyer queue" }],
|
|
32
|
+
"evalRequirements": [{ "capability": "risky-clause detection", "dataset": "200 representative contracts", "metric": "recall on critical risks", "threshold": ">= 0.95" }]
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Guardrails ("the agent cannot approve contracts") are business rules —
|
|
37
|
+
file them as BR- entries and reference them from the affected FR.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Framework selection
|
|
2
|
+
|
|
3
|
+
Pick by symptom, never apply all. Justify each pick to the user in one
|
|
4
|
+
line. Two frameworks per engagement is typical; four is the ceiling.
|
|
5
|
+
|
|
6
|
+
| Symptom in the input | Framework |
|
|
7
|
+
| --- | --- |
|
|
8
|
+
| Request names a solution, problem unclear ("we need a chatbot") | 5 Whys |
|
|
9
|
+
| Manual workflow described; stated process may differ from reality | Contextual inquiry |
|
|
10
|
+
| Multiple actors, approvals, handoffs | Process mapping |
|
|
11
|
+
| Feature list with no link to outcomes | Impact mapping |
|
|
12
|
+
| Complex or ambiguous business rules, edge cases matter | Example mapping |
|
|
13
|
+
| Product scope / MVP boundary undefined | Story mapping |
|
|
14
|
+
| Behavior must be precise, rule-heavy | Specification by example |
|
|
15
|
+
| Requirements mature enough to test | Given / When / Then |
|
|
16
|
+
|
|
17
|
+
## 5 Whys
|
|
18
|
+
Ask "why" down from the stated solution until a business problem appears
|
|
19
|
+
(usually 3–5 levels). Produces: root problem, motivation, outcome.
|
|
20
|
+
Example: "We need a chatbot" → why → "support tickets take 2 days" → why →
|
|
21
|
+
"tier-1 answers are manual" → root problem: repetitive tier-1 load.
|
|
22
|
+
|
|
23
|
+
## Contextual inquiry
|
|
24
|
+
Ask the client to walk through a recent real case, step by step, naming
|
|
25
|
+
systems and people. Produces: the actual process, workarounds, hidden
|
|
26
|
+
steps, pain points. Trigger phrase: "Walk me through the last time…"
|
|
27
|
+
|
|
28
|
+
## Process mapping
|
|
29
|
+
Draw the as-is flow (actors, decisions, handoffs) as a mermaid flowchart;
|
|
30
|
+
confirm; then draw to-be. Produces: WF- entries, decision points,
|
|
31
|
+
exceptions.
|
|
32
|
+
|
|
33
|
+
## Impact mapping
|
|
34
|
+
WHY (business goal) → WHO (actors) → HOW (behavior change) → WHAT
|
|
35
|
+
(capability). A feature that maps to no WHY becomes an open question, not
|
|
36
|
+
a requirement.
|
|
37
|
+
|
|
38
|
+
## Example mapping
|
|
39
|
+
Per story: rules (blue), examples per rule (green), questions (red).
|
|
40
|
+
Every complex BR- gets at least one example inside and one outside the
|
|
41
|
+
boundary — these become SC- entries.
|
|
42
|
+
|
|
43
|
+
## Story mapping
|
|
44
|
+
Activities across the top, tasks below, slice releases horizontally.
|
|
45
|
+
Produces: capabilities, journey order, MVP line → scope in/future.
|
|
46
|
+
|
|
47
|
+
## Specification by example
|
|
48
|
+
Turn each agreed rule into concrete input → expected-output rows
|
|
49
|
+
(the Part 4 tables). Disagreement over a row = an undiscovered rule.
|
|
50
|
+
|
|
51
|
+
## Given / When / Then
|
|
52
|
+
Final form for acceptance: `Given <state> When <event> Then <outcome>`.
|
|
53
|
+
Use once requirements are stable; earlier it hardens guesses.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Clarification interview
|
|
2
|
+
|
|
3
|
+
Behave like an experienced BA interviewer: extract everything from the
|
|
4
|
+
inputs first, then ask only about holes, highest impact first.
|
|
5
|
+
|
|
6
|
+
## §1 Question priority
|
|
7
|
+
|
|
8
|
+
- **P1 — blocking**: scope or architecture cannot reasonably proceed
|
|
9
|
+
without the answer. Mark `architectureBlocker: true` when the answer
|
|
10
|
+
changes system boundaries, integrations, decision authority, or data
|
|
11
|
+
ownership.
|
|
12
|
+
- **P2 — high impact**: could materially change scope, complexity, or cost.
|
|
13
|
+
- **P3 — detail**: safely deferred; record in the register, don't ask now.
|
|
14
|
+
|
|
15
|
+
Triage rule: ask P1s first, in groups of at most 4 related questions per
|
|
16
|
+
message. Never move to P2 while an easy-to-answer P1 is open.
|
|
17
|
+
|
|
18
|
+
## §2 Question rules
|
|
19
|
+
|
|
20
|
+
1. Never ask what the inputs already answer.
|
|
21
|
+
2. Ground every question in what the client said: "You mentioned approved
|
|
22
|
+
contracts are stored in SharePoint. Does the new system need to A. read
|
|
23
|
+
from it, B. write back, C. both, D. neither?" — offer concrete options
|
|
24
|
+
where possible.
|
|
25
|
+
3. Explain why a question matters when the answer is expensive to get.
|
|
26
|
+
4. Adapt: each round of answers reprioritizes the remaining gaps.
|
|
27
|
+
5. Prefer a real example over an abstract description: "walk me through
|
|
28
|
+
the last time this happened" beats "how does this normally work".
|
|
29
|
+
6. Challenge vague words (see the banned list in writing.md): "how fast is
|
|
30
|
+
fast — what is acceptable in seconds?"
|
|
31
|
+
7. Distinguish **unknown** (client doesn't know yet — record the question)
|
|
32
|
+
from **undecided** (client must choose — present the options and the
|
|
33
|
+
consequence of each).
|
|
34
|
+
8. Contradictions are surfaced, never resolved silently (§5).
|
|
35
|
+
|
|
36
|
+
## §3 Sequencing shapes
|
|
37
|
+
|
|
38
|
+
- **Funnel** (broad → narrow): default for vague inputs ("we need a
|
|
39
|
+
chatbot"). Start at business problem, narrow to workflows, rules, edge
|
|
40
|
+
cases.
|
|
41
|
+
- **Pyramid** (narrow → broad): for detailed-but-suspect inputs (a feature
|
|
42
|
+
list with no why). Start from a concrete feature, climb to the goal it
|
|
43
|
+
serves — features that climb to no goal become open questions.
|
|
44
|
+
- **Diamond** (narrow → broad → narrow): for existing-system work. Start
|
|
45
|
+
from the pain point, widen to the surrounding process, narrow back to
|
|
46
|
+
the change.
|
|
47
|
+
|
|
48
|
+
## §4 The nine layers
|
|
49
|
+
|
|
50
|
+
Work through these progressively; the depth mode decides how far.
|
|
51
|
+
|
|
52
|
+
1. **Business context** — why now, cost of doing nothing, desired outcome,
|
|
53
|
+
success metric. Ask: "What business result should improve, and how will
|
|
54
|
+
you measure it?"
|
|
55
|
+
2. **Stakeholders and actors** — users, deciders, approvers, external and
|
|
56
|
+
system actors. Per actor: goal, decisions, information needed, pain.
|
|
57
|
+
3. **Current state (as-is)** — trigger, steps, decisions, handoffs,
|
|
58
|
+
systems, manual work, exceptions, workarounds. Always request a recent
|
|
59
|
+
real example.
|
|
60
|
+
4. **Business rules** — explicit and implied. Per rule: statement, source,
|
|
61
|
+
two concrete examples (one inside, one outside the boundary).
|
|
62
|
+
5. **Scenarios** — happy path, alternatives, edge cases, errors, missing
|
|
63
|
+
information, cancellation, human intervention.
|
|
64
|
+
6. **Future state** — pain point → desired change → required capability.
|
|
65
|
+
Capabilities, not implementations.
|
|
66
|
+
7. **Functional requirements** — convert validated capabilities into FRs
|
|
67
|
+
with traces (goal, workflow, rules) and acceptance scenarios.
|
|
68
|
+
8. **NFRs** — investigate only relevant areas (security, privacy,
|
|
69
|
+
performance, availability, auditability, compliance, retention,
|
|
70
|
+
localization, device support). Never run the full list mechanically.
|
|
71
|
+
9. **Integrations and data** — systems, direction (read/write/both),
|
|
72
|
+
identity, then per entity: source of truth, ownership, volume,
|
|
73
|
+
sensitivity, retention, synchronization.
|
|
74
|
+
|
|
75
|
+
## §5 Contradiction protocol
|
|
76
|
+
|
|
77
|
+
When two statements conflict: record a `CONFLICT-` entry quoting both
|
|
78
|
+
statements with their sources, present it to the user verbatim, and ask
|
|
79
|
+
which holds (or whether both do under different conditions). Never pick an
|
|
80
|
+
interpretation yourself. A conflict stays open until the client resolves
|
|
81
|
+
it; open conflicts block READY_FOR_ARCHITECTURE.
|
|
82
|
+
|
|
83
|
+
## §6 Depth modes
|
|
84
|
+
|
|
85
|
+
- **QUICK**: layers 1, 2, 6, 7 only; P1 questions only; one interview round.
|
|
86
|
+
- **STANDARD**: all layers; P1 + P2; iterate until P1s are answered or
|
|
87
|
+
explicitly parked.
|
|
88
|
+
- **DEEP**: all layers; P1–P3; example mapping on every complex rule;
|
|
89
|
+
scenario tables for every critical FR.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Fresh-eyes review
|
|
2
|
+
|
|
3
|
+
After validate.mjs passes, dispatch ONE subagent with fresh eyes over both
|
|
4
|
+
artifacts. Give it the two file paths and this checklist verbatim. Apply
|
|
5
|
+
its findings, re-run validate.mjs, and stop after one cycle — do not loop.
|
|
6
|
+
|
|
7
|
+
## Checklist
|
|
8
|
+
|
|
9
|
+
1. **Invented requirements**: is any `confirmed` item unsupported by a
|
|
10
|
+
quoted source? Downgrade to `assumed` or `recommended`.
|
|
11
|
+
2. **Hidden solutioning**: does any FR prescribe a technology or
|
|
12
|
+
architecture ("use SharePoint webhooks")? Rewrite as a capability.
|
|
13
|
+
3. **Vague requirements**: any FR that two reasonable readers would
|
|
14
|
+
implement differently? Flag with the two readings.
|
|
15
|
+
4. **Missed contradictions**: do any two statements (rules, scopes,
|
|
16
|
+
answers) conflict without a CONFLICT- entry?
|
|
17
|
+
5. **Unlabeled scope**: any capability discussed in Parts 1–2 that appears
|
|
18
|
+
in no FR and no scope list (out / future / unconfirmed)?
|
|
19
|
+
6. **Readiness honesty**: do the area scores overstate what Parts 1–4
|
|
20
|
+
actually contain? Name the section that contradicts the score.
|
|
21
|
+
7. **Traceability spot-check**: pick 3 FRs; do their traces point at
|
|
22
|
+
goals/workflows/rules that genuinely motivate them?
|
|
23
|
+
|
|
24
|
+
Report findings as a list: `<artifact>:<id or section> — <problem> — <fix>`.
|
|
25
|
+
No praise, no rewrites beyond the flagged items.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Writing the requirements package
|
|
2
|
+
|
|
3
|
+
Two artifacts, always together, in the lead directory:
|
|
4
|
+
|
|
5
|
+
- `requirements.md` — the human document. Five parts (below).
|
|
6
|
+
- `requirements.json` — the machine handoff downstream skills read.
|
|
7
|
+
|
|
8
|
+
The canonical json shape is `scripts/test/fixtures/requirements-pass.json` —
|
|
9
|
+
copy its structure exactly; the validator enforces it. `schemaVersion` is
|
|
10
|
+
`"1.0"`; bump only on a breaking shape change.
|
|
11
|
+
|
|
12
|
+
## ID conventions
|
|
13
|
+
|
|
14
|
+
| Prefix | Register | Prefix | Register |
|
|
15
|
+
| --- | --- | --- | --- |
|
|
16
|
+
| G- | goals (context.goals) | NFR- | non-functional requirements |
|
|
17
|
+
| ACT- | actors | INT- | integrations |
|
|
18
|
+
| WF- | workflows | DAT- | data entities |
|
|
19
|
+
| FR- | functional requirements | CON- | constraints (hard limits) |
|
|
20
|
+
| BR- | business rules | ASM- | assumptions (unverified beliefs) |
|
|
21
|
+
| SC- | scenarios | Q- | open questions |
|
|
22
|
+
| | | CONFLICT- | contradictions |
|
|
23
|
+
|
|
24
|
+
Three digits, zero-padded (`FR-001`). IDs are stable: never renumber on
|
|
25
|
+
re-run; retired items keep their id with a note rather than vanishing.
|
|
26
|
+
|
|
27
|
+
Constraint vs assumption: a constraint is a confirmed boundary ("must run in
|
|
28
|
+
the client's M365 tenant"); an assumption is an unverified belief ("managers
|
|
29
|
+
authenticate through Entra"). Never file one as the other.
|
|
30
|
+
|
|
31
|
+
## Label discipline
|
|
32
|
+
|
|
33
|
+
Every requirement, NFR, integration and data row carries
|
|
34
|
+
`label: confirmed | assumed | recommended` and (where the schema asks) a
|
|
35
|
+
`source`. Recommendations never render as confirmed requirements; a
|
|
36
|
+
`recommended` item in scope `in` must have an open question referencing it
|
|
37
|
+
(the validator enforces this).
|
|
38
|
+
|
|
39
|
+
## Ambiguous terms — banned in requirement text
|
|
40
|
+
|
|
41
|
+
fast, quick, easy, simple, user-friendly, intuitive, flexible, robust,
|
|
42
|
+
seamless, efficient, optimal, appropriate, various, etc, some, many,
|
|
43
|
+
several, as needed.
|
|
44
|
+
|
|
45
|
+
Replace with a measurable statement: not "the search must be fast" but
|
|
46
|
+
"search results return within 2 seconds for 10,000 records". This list is
|
|
47
|
+
mirrored in `scripts/lib/checks.mjs` (`AMBIGUOUS`) — change both together.
|
|
48
|
+
|
|
49
|
+
## requirements.md structure
|
|
50
|
+
|
|
51
|
+
Frontmatter (must match the json — the validator checks status and readiness):
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
---
|
|
55
|
+
lead: <lead-id>
|
|
56
|
+
status: <status enum>
|
|
57
|
+
depth: QUICK | STANDARD | DEEP
|
|
58
|
+
updated: YYYY-MM-DD
|
|
59
|
+
readiness: <overall number>
|
|
60
|
+
---
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- **Part 1 — Discovery Brief**: problem, goals table (id, goal, metric),
|
|
64
|
+
one benefit hypothesis per goal ("we believe *capability* will result in
|
|
65
|
+
*outcome*, measured by *metric*"), stakeholders (add a power-interest
|
|
66
|
+
table when more than 3 stakeholder groups), pain points, constraints.
|
|
67
|
+
- **Part 2 — Process & Domain**: as-is workflows (mermaid flowchart when a
|
|
68
|
+
workflow has more than one actor), decision points, business-rules table
|
|
69
|
+
with concrete examples, exceptions, to-be capabilities, glossary of
|
|
70
|
+
domain terms.
|
|
71
|
+
- **Part 3 — Requirements**: scope (out / future / unconfirmed — in-scope
|
|
72
|
+
is the FR table itself), actors and permissions, FR table (id, text,
|
|
73
|
+
label, scope), NFRs, data, integrations, dependencies.
|
|
74
|
+
- **Part 4 — Acceptance Scenarios**: per critical FR a given/when/then
|
|
75
|
+
table; input → expected tables for rule-heavy requirements.
|
|
76
|
+
- **Part 5 — Readiness Report**: readiness per area and overall, open
|
|
77
|
+
questions register, assumptions register, conflicts register,
|
|
78
|
+
architecture blockers. Registers live HERE only — other parts reference
|
|
79
|
+
ids (one home per fact).
|
|
80
|
+
|
|
81
|
+
Section headings must be exactly `## Part N — <title>` — the validator
|
|
82
|
+
matches on `## Part N`.
|
|
83
|
+
|
|
84
|
+
Depth scaling: QUICK writes Parts 1, 3 (slim) and 5 only; STANDARD all
|
|
85
|
+
five; DEEP all five plus example-mapping tables and full scenario coverage.
|
|
86
|
+
|
|
87
|
+
## Honest absences
|
|
88
|
+
|
|
89
|
+
An unknown renders as an honest absence — "Not provided — asked, awaiting
|
|
90
|
+
client", "Not applicable — <reason>" — never `[TODO]`, `TBD`, `XXX`, never
|
|
91
|
+
an invented value. The validator refuses placeholders.
|
|
92
|
+
|
|
93
|
+
## Readiness scoring
|
|
94
|
+
|
|
95
|
+
You judge each area score (0–100) and justify it in Part 5 prose. The
|
|
96
|
+
script recomputes `overall` as the rounded mean and refuses a mismatch.
|
|
97
|
+
Status rules the validator enforces:
|
|
98
|
+
|
|
99
|
+
- open question with `architectureBlocker: true` → status at most `ANALYZED`;
|
|
100
|
+
- `READY_FOR_ARCHITECTURE` requires no unconfirmed high-impact assumptions
|
|
101
|
+
and no open conflicts;
|
|
102
|
+
- every open architecture blocker appears in `readiness.blockers`.
|