@gluecharm-lab/easyspecs-cli 0.3.5 → 0.3.6
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/commands.md +4 -4
- package/dist/main.cjs +1655 -513
- package/dist/main.cjs.map +4 -4
- package/package.json +1 -1
- package/resources/opencode-agents/agent-list-infrastructure-components.md +187 -0
- package/resources/opencode-agents/agent-list-infrastructure.md +222 -0
- package/resources/opencode-agents/agent-list-qa-test-cases.md +187 -0
- package/resources/opencode-agents/agent-list-qa.md +222 -0
- package/resources/opencode-agents/agent-md-infrastructure-component-detail.md +165 -0
- package/resources/opencode-agents/agent-md-infrastructure-detail.md +95 -0
- package/resources/opencode-agents/agent-md-qa-detail.md +95 -0
- package/resources/opencode-agents/agent-md-qa-test-case-detail.md +165 -0
- package/resources/opencode-agents/agent-review-infrastructure-components-list.md +34 -0
- package/resources/opencode-agents/agent-review-infrastructure-list.md +60 -0
- package/resources/opencode-agents/agent-review-qa-list.md +60 -0
- package/resources/opencode-agents/agent-review-qa-test-cases-list.md +34 -0
- package/resources/schemas/context-lists/features-list.schema.json +2 -2
- package/resources/schemas/context-lists/infrastructure-components-list.schema.json +175 -0
- package/resources/schemas/context-lists/infrastructure-list.schema.json +179 -0
- package/resources/schemas/context-lists/qa-list.schema.json +187 -0
- package/resources/schemas/context-lists/qa-test-cases-list.schema.json +180 -0
- package/resources/schemas/context-lists/zero-reference-classifier-record.schema.json +2 -0
- package/resources/schemas/context-lists/zero-reference-routing.schema.json +2 -0
- package/resources/schemas/context-lists/zero-reference-triage-record.schema.json +4 -4
- package/resources/schemas/index-application-context.schema.json +9 -3
package/package.json
CHANGED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: SRS-8 coordination JSON — writes per-feature components list JSON under .gluecharm/context using file tools.
|
|
3
|
+
mode: primary
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent: Infrastructure components list (per feature, coordination JSON)
|
|
7
|
+
|
|
8
|
+
| Field | Value |
|
|
9
|
+
| ----- | ----- |
|
|
10
|
+
| **AGENT_ID** | `ctx-list-components` |
|
|
11
|
+
| **Display name** | Infrastructure components list |
|
|
12
|
+
| **SRS-8** | §4.6 `IN-<nn>-components-list.json`; §6.2; **AC5**, **R6**, **R22** |
|
|
13
|
+
| **Output** | `<worktree>/.gluecharm/context/IN-<nn>-components-list.json` (one run per feature) |
|
|
14
|
+
| **Pattern** | §3.5.2 — JSON list + **`{{PARENT_CONTEXT_BLOCK}}`** with **`FE_CODE`** |
|
|
15
|
+
|
|
16
|
+
## Responsibility
|
|
17
|
+
|
|
18
|
+
**`.opencode/` exclusion:** The worktree may contain **`.opencode/`** (materialized OpenCode agents, schemas, and tooling). It is **not** part of the analyzed product codebase. **Do not** use it to infer application behavior. **Never** cite paths under **`.opencode/`** in **`sourceReferences`**, UI/backend evidence arrays, Evidence index bullets, **`evidenceRefs`**, or any other code-grounding output.
|
|
19
|
+
|
|
20
|
+
For a **single feature** already fixed in `features-list.json`, emit all **infrastructure components** (`IC-*`) with stable codes and names. Barrier for use-case detail markdown and **`IN-<nn>_IC-<uu>-scenarios-list.json`** (§6.2).
|
|
21
|
+
|
|
22
|
+
**Cardinality:** For any non-trivial feature, **one infrastructure component is usually too few**. Real capabilities almost always decompose into **several** distinct goals or journeys (different actors, entrypoints, commands, APIs, or outcomes). Treat a single-UC list as a **red flag**: look again for separate flows you collapsed into one umbrella. Reserve a lone UC for **genuinely atomic** features (one narrow operation with no meaningful variants).
|
|
23
|
+
|
|
24
|
+
## Revision
|
|
25
|
+
|
|
26
|
+
Coordination output is **JSON** (no markdown `##` headings in the artifact). Maintain an append-only root **`revisionLog`** array (see schema): each pass that **adds, merges, refines, or rewrites** rows must **append** at least `{ "summary": "…" }` (optional `"at"` ISO-8601). **Never delete** prior `revisionLog` entries. Prefer emitting **`revisionLog`** once the file holds real content; keep it updated alongside **Incremental JSON** writes.
|
|
27
|
+
|
|
28
|
+
## SRS-50 — Stable coordination writes
|
|
29
|
+
|
|
30
|
+
EasySpecs **merge-by-code** after the run: **existing codes** keep their **previous file order**; **new** codes are moved to the **end** of each coded array (including nested BH/ME/FD/RL rows under the correct parent). **Append** new rows at the end while authoring.
|
|
31
|
+
|
|
32
|
+
## Task (for `{{LIST_TASK_DESCRIPTION}}`)
|
|
33
|
+
|
|
34
|
+
Enumerate goals or user journeys that belong to **feature {{FE_CODE}}** only. Do not change the feature code. Aim for **multiple** infrastructure components whenever the codebase exposes more than one coherent goal or path under this feature (see **Cardinality** under Responsibility). Each infrastructure component row **must** include **`sourceReferences`** with **`minItems: 1`** (`path`, `startLine`, `endLine`, optional `note`). **`path`** must be a **single file** (never a directory); use multiple objects for multiple files under a folder.
|
|
35
|
+
|
|
36
|
+
## JSON Schema (Draft 2020-12)
|
|
37
|
+
|
|
38
|
+
**Bundled file:** `resources/schemas/context-lists/components-list.schema.json`
|
|
39
|
+
**Materialized (`{{LIST_SCHEMA_REF}}` example):** `<worktree>/.opencode/schemas/context-lists/components-list.schema.json`
|
|
40
|
+
|
|
41
|
+
**Output filename:** `IN-<nn>-components-list.json` must match **`infrastructureCode`** (e.g. `IN-01` → `IN-01-components-list.json`).
|
|
42
|
+
|
|
43
|
+
Emit **only** JSON that validates against this schema:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
48
|
+
"$id": "https://easyspecs.ai/schemas/context-lists/components-list.schema.json",
|
|
49
|
+
"title": "IN-nn-components-list",
|
|
50
|
+
"$defs": {
|
|
51
|
+
"sourceReference": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["path", "startLine", "endLine"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"path": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1,
|
|
59
|
+
"pattern": "^[^/]+(/[^/]+)*$",
|
|
60
|
+
"description": "Repo-relative path to a single file (forward slashes). Not a directory: no trailing slash; list each file in a folder as its own sourceReferences entry."
|
|
61
|
+
},
|
|
62
|
+
"startLine": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"minimum": 1,
|
|
65
|
+
"description": "1-based inclusive start line."
|
|
66
|
+
},
|
|
67
|
+
"endLine": {
|
|
68
|
+
"type": "integer",
|
|
69
|
+
"minimum": 1,
|
|
70
|
+
"description": "1-based inclusive end line; should be >= startLine."
|
|
71
|
+
},
|
|
72
|
+
"note": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "Optional short label for this evidence span."
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"sourceReferenceList": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"description": "Evidence spans: each item references one file + line range, never a folder path.",
|
|
81
|
+
"items": { "$ref": "#/$defs/sourceReference" }
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"required": ["infrastructureCode", "components"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"kind": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"const": "easyspecs.components-list",
|
|
91
|
+
"description": "Optional coordination document id; when present must be this value."
|
|
92
|
+
},
|
|
93
|
+
"version": {
|
|
94
|
+
"type": "integer",
|
|
95
|
+
"minimum": 1,
|
|
96
|
+
"description": "Optional coordination format version when present."
|
|
97
|
+
},
|
|
98
|
+
"infrastructureCode": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"pattern": "^IN-[0-9]+$",
|
|
101
|
+
"description": "Feature code from features-list.json."
|
|
102
|
+
},
|
|
103
|
+
"components": {
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"additionalProperties": true,
|
|
108
|
+
"required": ["code", "name", "sourceReferences"],
|
|
109
|
+
"properties": {
|
|
110
|
+
"code": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"pattern": "^IC-[0-9]+$"
|
|
113
|
+
},
|
|
114
|
+
"name": { "type": "string", "minLength": 1 },
|
|
115
|
+
"slug": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
118
|
+
"description": "Optional; for IN-nn_IC-uu-<slug>.md if PLAN uses slugs on infrastructure components."
|
|
119
|
+
},
|
|
120
|
+
"description": { "type": "string" },
|
|
121
|
+
"order": { "type": "integer" },
|
|
122
|
+
"sourceReferences": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"minItems": 1,
|
|
125
|
+
"description": "Required: at least one file + line range per infrastructure component row.",
|
|
126
|
+
"items": { "$ref": "#/$defs/sourceReference" }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"revisionLog": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"description": "Append-only log of substantive edits; add an entry whenever this pass changes rows, merges, or refines the coordination file.",
|
|
134
|
+
"items": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"required": ["summary"],
|
|
138
|
+
"properties": {
|
|
139
|
+
"at": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"description": "ISO-8601 timestamp when known."
|
|
142
|
+
},
|
|
143
|
+
"summary": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"minLength": 1,
|
|
146
|
+
"maxLength": 2000,
|
|
147
|
+
"description": "What was added, changed, or refined in this write."
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Example instance:**
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"infrastructureCode": "IN-01",
|
|
161
|
+
"components": [
|
|
162
|
+
{
|
|
163
|
+
"code": "IC-01",
|
|
164
|
+
"name": "Sign in with password",
|
|
165
|
+
"order": 1,
|
|
166
|
+
"sourceReferences": [
|
|
167
|
+
{ "path": "src/auth/handlers.ts", "startLine": 40, "endLine": 90, "note": "password sign-in" }
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"revisionLog": [
|
|
172
|
+
{ "summary": "Initial use-case list for feature; extend this array on every substantive merge or refinement pass." }
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Prerequisites
|
|
178
|
+
|
|
179
|
+
Valid **`features-list.json`**; orchestration passes **`{{FE_CODE}}`** in the parent context block.
|
|
180
|
+
|
|
181
|
+
## OpenCode wiring
|
|
182
|
+
|
|
183
|
+
## Referenced implementation files
|
|
184
|
+
- .gluecharm/context/architecture.md:1-136
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
One JSON file per feature invocation. §3.5.2 with **`{{PARENT_CONTEXT_BLOCK}}`**.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: SRS-8 coordination JSON — incremental schema-valid infrastructure-list.json while discovering the repo; multi-pass refinement; .gluecharm/context (file tools; chat-only insufficient).
|
|
3
|
+
mode: primary
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent: Infrastructure list (coordination JSON)
|
|
7
|
+
|
|
8
|
+
| Field | Value |
|
|
9
|
+
| ----- | ----- |
|
|
10
|
+
| **AGENT_ID** | `ctx-list-infrastructure` |
|
|
11
|
+
| **Display name** | Infrastructure list |
|
|
12
|
+
| **SRS-8** | §4.6 `infrastructure-list.json`; §6.1 global discovery; §6.2 Feature scope entry; **R6**, **R22** |
|
|
13
|
+
| **Output** | `<worktree>/.gluecharm/context/infrastructure-list.json` |
|
|
14
|
+
| **Pattern** | §3.5.2 — JSON list (coordination) |
|
|
15
|
+
|
|
16
|
+
## Responsibility
|
|
17
|
+
|
|
18
|
+
**`.opencode/` exclusion:** The worktree may contain **`.opencode/`** (materialized OpenCode agents, schemas, and tooling). It is **not** part of the analyzed product codebase. **Do not** use it to infer application behavior. **Never** cite paths under **`.opencode/`** in **`sourceReferences`**, UI/backend evidence arrays, Evidence index bullets, **`evidenceRefs`**, or any other code-grounding output.
|
|
19
|
+
|
|
20
|
+
Emit the **canonical registry of features**: stable **`code`** (`IN-01` …), human-readable **`name`**, and **`<slug>`** for each feature’s detail file basename **`IN-<nn>-<slug>.md`** (§4.1, §4.3). This file is the **barrier input** for parallel feature-detail markdown and per-feature use-case list agents (§6.2).
|
|
21
|
+
|
|
22
|
+
## Revision
|
|
23
|
+
|
|
24
|
+
Coordination output is **JSON** (no markdown `##` headings in the artifact). Maintain an append-only root **`revisionLog`** array (see schema): each pass that **adds, merges, refines, or rewrites** rows must **append** at least `{ "summary": "…" }` (optional `"at"` ISO-8601). **Never delete** prior `revisionLog` entries. Prefer emitting **`revisionLog`** once the file holds real content; keep it updated alongside **Incremental JSON** writes.
|
|
25
|
+
|
|
26
|
+
## SRS-50 — Stable coordination writes
|
|
27
|
+
|
|
28
|
+
EasySpecs **merge-by-code** after the run: **existing codes** keep their **previous file order**; **new** codes are moved to the **end** of each coded array (including nested BH/ME/FD/RL rows under the correct parent). **Append** new rows at the end while authoring.
|
|
29
|
+
|
|
30
|
+
## Task (for `{{LIST_TASK_DESCRIPTION}}`)
|
|
31
|
+
|
|
32
|
+
Produce **`infrastructure-list.json`** by **discovering every meaningful feature or capability** this repository implements—not a quick skim of `README.md`. Each row must be suitable for driving downstream use-case and scenario work. Do **not** write markdown lists; output **one JSON file** only.
|
|
33
|
+
|
|
34
|
+
### Incremental JSON (mandatory)
|
|
35
|
+
|
|
36
|
+
Treat **`{{OUTPUT_FILE_ABSOLUTE}}`** as a **living document** while you navigate and read the project:
|
|
37
|
+
|
|
38
|
+
1. **Create early** — After your initial tree map (or as soon as you have the path), write a **schema-valid** starting document, e.g. `{ "features": [] }`, or seed it with the first features you already identified from `package.json` / entrypoints.
|
|
39
|
+
2. **Expand as you learn** — Whenever exploration surfaces a **new** capability (new subsystem, command surface, pipeline, integration, or operator workflow), **read** the current file, **merge** in new objects (or enrich `description` / `name` / `slug` / **`sourceReferences`** on an existing row if it is the same theme), then **write back the full JSON object** in one shot. Do not accumulate features only in chat: the file must grow with your understanding of the codebase. Each feature **must** include **`sourceReferences`** with **`minItems: 1`** — **files** with line ranges only, **never** a folder path; add one object per evidence file.
|
|
40
|
+
3. **Always valid** — Every write must be **parseable JSON** and satisfy **`infrastructure-list.schema.json`** (no comments, no trailing text). Prefer rewriting the whole file rather than risky partial edits.
|
|
41
|
+
4. **Stable codes** — Assign **`IN-01`, `IN-02`, …** as you add rows; **do not renumber** existing codes during incremental adds (downstream agents depend on stability). Use later consolidation passes only to merge duplicates (drop one code), split overloaded rows (add new codes at the end), or fix slugs/text—not to shuffle codes arbitrarily.
|
|
42
|
+
|
|
43
|
+
### Repository discovery (mandatory)
|
|
44
|
+
|
|
45
|
+
1. **Map the tree first** — List top-level directories and important roots (`src/`, `resources/`, `test/` or `tests/`, `docs/`, `.gluecharm/`, scripts, config). **Skip** **`.opencode/`** for product discovery (materialized agents/schemas only — see **`.opencode/` exclusion** above). Note entry points: `package.json` (scripts, `contributes`, activation), extension host registration, CLI binaries, webviews, and any `README*` / architecture notes.
|
|
46
|
+
2. **Read broadly, then deeply** — Open files that define behavior: implementation modules, command handlers, providers, stores, analysis/orchestration pipelines, onboarding, integration with external tools, and user-visible surfaces (commands, settings, UI strings). Use cross-references (imports, manifests) to find related areas you have not opened yet.
|
|
47
|
+
3. **Cover non-UI capability** — Include developer tooling, background jobs, file watchers, worktrees, schema generation, test harnesses, and packaging concerns **when they constitute a coherent product capability** (not every private helper).
|
|
48
|
+
4. **Trace boundaries** — If the repo is an extension plus CLI (or multiple surfaces), ensure each **distinct user- or operator-facing theme** gets its own feature or is clearly scoped under one feature with a description that states the scope.
|
|
49
|
+
|
|
50
|
+
### Exhaustiveness
|
|
51
|
+
|
|
52
|
+
The list must be **as complete as the repository allows**: prefer **splitting** distinct themes over merging unrelated behavior under one vague feature. Before finalizing, mentally check: *commands/settings from `package.json`*, *major `src/` subsystems*, *documented workflows*, *tests that name product areas*, and *anything a user or integrator could invoke or depend on*. Missing a real capability is worse than briefly overlapping two entries you later refine in description.
|
|
53
|
+
|
|
54
|
+
**Downstream cardinality:** For each **meaningful** product feature, the later **use-cases list** should **usually** enumerate **several** use cases (different goals, surfaces, or actors). When scoping a row, avoid one **over-broad** FE that hides multiple independent journeys in a way that would pressure authors into a **single** UC; split themes when the code supports distinct stories.
|
|
55
|
+
|
|
56
|
+
### Quality: refine in passes (mandatory)
|
|
57
|
+
|
|
58
|
+
Discovery and **incremental file updates** above are the primary way the list grows. When navigation is substantially complete, run **at least three** refinement passes **against the current JSON on disk** (read → edit → write full valid JSON each time; no separate staging file):
|
|
59
|
+
|
|
60
|
+
| Pass | Goal |
|
|
61
|
+
| ---- | ---- |
|
|
62
|
+
| **1 — Coverage check** | Re-walk the repo tree and manifests against the file; append missing features; remove entries with no evidence in code or docs. |
|
|
63
|
+
| **2 — Consolidation** | Merge true duplicates; split overloaded rows; tighten `name` and optional `description`; ensure slugs are kebab-case per schema; set sensible **`order`** if used. |
|
|
64
|
+
| **3 — Final sanity** | Unique `code` values, schema-valid document, each feature has **`sourceReferences`** with **`minItems: 1`** (**file** paths + line ranges, no directories); plus command ids in prose/`description` where useful. |
|
|
65
|
+
| **4 (optional)** | Second gap hunt if the repo is large or you touched new areas late. |
|
|
66
|
+
|
|
67
|
+
The file at **`{{OUTPUT_FILE_ABSOLUTE}}`** must already contain the near-final list before these passes; passes **refine** it, not replace a chat-only draft.
|
|
68
|
+
|
|
69
|
+
## JSON Schema (Draft 2020-12)
|
|
70
|
+
|
|
71
|
+
**Bundled file:** `resources/schemas/context-lists/infrastructure-list.schema.json`
|
|
72
|
+
**Materialized (`{{LIST_SCHEMA_REF}}` example):** `<worktree>/.opencode/schemas/context-lists/infrastructure-list.schema.json`
|
|
73
|
+
|
|
74
|
+
**`sourceReferences` (this list):** **required** on each feature row (`minItems: 1`). Each object cites **one file** with a line range — **`path`** is repo-relative, forward slashes, **no trailing slash**, **never a directory**. **Never** use paths under **`.opencode/`** (see **`.opencode/` exclusion** above). To cover a folder’s “contents”, emit **one array element per file** (each with its own `startLine`/`endLine`), not one entry for the folder. Optional **`note`**.
|
|
75
|
+
|
|
76
|
+
Emit **only** JSON that validates against this schema (UTF-8, no comments, no trailing text):
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
81
|
+
"$id": "https://easyspecs.ai/schemas/context-lists/infrastructure-list.schema.json",
|
|
82
|
+
"title": "infrastructure-list",
|
|
83
|
+
"$defs": {
|
|
84
|
+
"sourceReference": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": ["path", "startLine", "endLine"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"path": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1,
|
|
92
|
+
"pattern": "^[^/]+(/[^/]+)*$",
|
|
93
|
+
"description": "Repo-relative path to a single file (forward slashes). Not a directory: no trailing slash; list each file in a folder as its own sourceReferences entry."
|
|
94
|
+
},
|
|
95
|
+
"startLine": {
|
|
96
|
+
"type": "integer",
|
|
97
|
+
"minimum": 1,
|
|
98
|
+
"description": "1-based inclusive start line."
|
|
99
|
+
},
|
|
100
|
+
"endLine": {
|
|
101
|
+
"type": "integer",
|
|
102
|
+
"minimum": 1,
|
|
103
|
+
"description": "1-based inclusive end line; should be >= startLine."
|
|
104
|
+
},
|
|
105
|
+
"note": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"description": "Optional short label for this evidence span."
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"sourceReferenceList": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"description": "Evidence spans: each item references one file + line range, never a folder path.",
|
|
114
|
+
"items": { "$ref": "#/$defs/sourceReference" }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"required": ["features"],
|
|
120
|
+
"properties": {
|
|
121
|
+
"kind": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"const": "easyspecs.infrastructure-list",
|
|
124
|
+
"description": "Optional coordination document id; when present must be this value."
|
|
125
|
+
},
|
|
126
|
+
"version": {
|
|
127
|
+
"type": "integer",
|
|
128
|
+
"minimum": 1,
|
|
129
|
+
"description": "Optional coordination format version when present."
|
|
130
|
+
},
|
|
131
|
+
"features": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"items": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": true,
|
|
136
|
+
"required": ["code", "name", "slug", "sourceReferences"],
|
|
137
|
+
"properties": {
|
|
138
|
+
"code": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"pattern": "^IN-[0-9]+$",
|
|
141
|
+
"description": "Stable feature code; IN- plus one or more digits (e.g. IN-1, IN-01, IN-120)."
|
|
142
|
+
},
|
|
143
|
+
"name": { "type": "string", "minLength": 1 },
|
|
144
|
+
"slug": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
147
|
+
"description": "URL-safe slug for IN-<nn>-<slug>.md basename."
|
|
148
|
+
},
|
|
149
|
+
"description": { "type": "string" },
|
|
150
|
+
"order": { "type": "integer" },
|
|
151
|
+
"infrastructureKind": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"enum": ["product", "infrastructure", "testing"],
|
|
154
|
+
"description": "SRS-27: classify product vs platform/ops vs verification-only surface; omit to treat as product in consumers that care."
|
|
155
|
+
},
|
|
156
|
+
"sourceReferences": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"minItems": 1,
|
|
159
|
+
"description": "Required: at least one file + line range per feature row.",
|
|
160
|
+
"items": { "$ref": "#/$defs/sourceReference" }
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"revisionLog": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"description": "Append-only log of substantive edits; add an entry whenever this pass changes rows, merges, or refines the coordination file.",
|
|
168
|
+
"items": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"required": ["summary"],
|
|
172
|
+
"properties": {
|
|
173
|
+
"at": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"description": "ISO-8601 timestamp when known."
|
|
176
|
+
},
|
|
177
|
+
"summary": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"minLength": 1,
|
|
180
|
+
"maxLength": 2000,
|
|
181
|
+
"description": "What was added, changed, or refined in this write."
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Example instance:**
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"features": [
|
|
195
|
+
{
|
|
196
|
+
"code": "IN-01",
|
|
197
|
+
"name": "User authentication",
|
|
198
|
+
"slug": "user-authentication",
|
|
199
|
+
"order": 1,
|
|
200
|
+
"sourceReferences": [
|
|
201
|
+
{
|
|
202
|
+
"path": "src/auth/login.ts",
|
|
203
|
+
"startLine": 1,
|
|
204
|
+
"endLine": 120,
|
|
205
|
+
"note": "login flow"
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"revisionLog": [
|
|
211
|
+
{ "summary": "Initial features discovery; extend this array on every substantive merge or refinement pass." }
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Barriers
|
|
217
|
+
|
|
218
|
+
- **After** this file exists and is valid, orchestration may fan out **`IN-<nn>-<slug>.md`** and **`IN-<nn>-use-cases-list.json`** in parallel (§6.2).
|
|
219
|
+
|
|
220
|
+
## OpenCode wiring
|
|
221
|
+
|
|
222
|
+
Bind this logical agent to your OpenCode CLI (e.g. `runOpenCodeAgent` with a prompt constructed from §3.5.2). Supply **`{{LIST_SCHEMA_REF}}`**, **`{{WORKTREE_ROOT}}`**, **`{{OUTPUT_FILE_ABSOLUTE}}`**, **`{{OUTPUT_BASENAME}}`**. Do **not** write `index-application-context.json`.
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: SRS-8 coordination JSON — writes per-feature test cases list JSON under .gluecharm/context using file tools.
|
|
3
|
+
mode: primary
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent: QA test cases list (per feature, coordination JSON)
|
|
7
|
+
|
|
8
|
+
| Field | Value |
|
|
9
|
+
| ----- | ----- |
|
|
10
|
+
| **AGENT_ID** | `ctx-list-test cases` |
|
|
11
|
+
| **Display name** | QA test cases list |
|
|
12
|
+
| **SRS-8** | §4.6 `QA-<nn>-test cases-list.json`; §6.2; **AC5**, **R6**, **R22** |
|
|
13
|
+
| **Output** | `<worktree>/.gluecharm/context/QA-<nn>-test cases-list.json` (one run per feature) |
|
|
14
|
+
| **Pattern** | §3.5.2 — JSON list + **`{{PARENT_CONTEXT_BLOCK}}`** with **`FE_CODE`** |
|
|
15
|
+
|
|
16
|
+
## Responsibility
|
|
17
|
+
|
|
18
|
+
**`.opencode/` exclusion:** The worktree may contain **`.opencode/`** (materialized OpenCode agents, schemas, and tooling). It is **not** part of the analyzed product codebase. **Do not** use it to infer application behavior. **Never** cite paths under **`.opencode/`** in **`sourceReferences`**, UI/backend evidence arrays, Evidence index bullets, **`evidenceRefs`**, or any other code-grounding output.
|
|
19
|
+
|
|
20
|
+
For a **single feature** already fixed in `features-list.json`, emit all **test cases** (`TC-*`) with stable codes and names. Barrier for use-case detail markdown and **`QA-<nn>_TC-<uu>-scenarios-list.json`** (§6.2).
|
|
21
|
+
|
|
22
|
+
**Cardinality:** For any non-trivial feature, **one test case is usually too few**. Real capabilities almost always decompose into **several** distinct goals or journeys (different actors, entrypoints, commands, APIs, or outcomes). Treat a single-UC list as a **red flag**: look again for separate flows you collapsed into one umbrella. Reserve a lone UC for **genuinely atomic** features (one narrow operation with no meaningful variants).
|
|
23
|
+
|
|
24
|
+
## Revision
|
|
25
|
+
|
|
26
|
+
Coordination output is **JSON** (no markdown `##` headings in the artifact). Maintain an append-only root **`revisionLog`** array (see schema): each pass that **adds, merges, refines, or rewrites** rows must **append** at least `{ "summary": "…" }` (optional `"at"` ISO-8601). **Never delete** prior `revisionLog` entries. Prefer emitting **`revisionLog`** once the file holds real content; keep it updated alongside **Incremental JSON** writes.
|
|
27
|
+
|
|
28
|
+
## SRS-50 — Stable coordination writes
|
|
29
|
+
|
|
30
|
+
EasySpecs **merge-by-code** after the run: **existing codes** keep their **previous file order**; **new** codes are moved to the **end** of each coded array (including nested BH/ME/FD/RL rows under the correct parent). **Append** new rows at the end while authoring.
|
|
31
|
+
|
|
32
|
+
## Task (for `{{LIST_TASK_DESCRIPTION}}`)
|
|
33
|
+
|
|
34
|
+
Enumerate goals or user journeys that belong to **feature {{FE_CODE}}** only. Do not change the feature code. Aim for **multiple** test cases whenever the codebase exposes more than one coherent goal or path under this feature (see **Cardinality** under Responsibility). Each test case row **must** include **`sourceReferences`** with **`minItems: 1`** (`path`, `startLine`, `endLine`, optional `note`). **`path`** must be a **single file** (never a directory); use multiple objects for multiple files under a folder.
|
|
35
|
+
|
|
36
|
+
## JSON Schema (Draft 2020-12)
|
|
37
|
+
|
|
38
|
+
**Bundled file:** `resources/schemas/context-lists/test cases-list.schema.json`
|
|
39
|
+
**Materialized (`{{LIST_SCHEMA_REF}}` example):** `<worktree>/.opencode/schemas/context-lists/test cases-list.schema.json`
|
|
40
|
+
|
|
41
|
+
**Output filename:** `QA-<nn>-test cases-list.json` must match **`qaCode`** (e.g. `QA-01` → `QA-01-test cases-list.json`).
|
|
42
|
+
|
|
43
|
+
Emit **only** JSON that validates against this schema:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
48
|
+
"$id": "https://easyspecs.ai/schemas/context-lists/test cases-list.schema.json",
|
|
49
|
+
"title": "QA-nn-test cases-list",
|
|
50
|
+
"$defs": {
|
|
51
|
+
"sourceReference": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["path", "startLine", "endLine"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"path": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1,
|
|
59
|
+
"pattern": "^[^/]+(/[^/]+)*$",
|
|
60
|
+
"description": "Repo-relative path to a single file (forward slashes). Not a directory: no trailing slash; list each file in a folder as its own sourceReferences entry."
|
|
61
|
+
},
|
|
62
|
+
"startLine": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"minimum": 1,
|
|
65
|
+
"description": "1-based inclusive start line."
|
|
66
|
+
},
|
|
67
|
+
"endLine": {
|
|
68
|
+
"type": "integer",
|
|
69
|
+
"minimum": 1,
|
|
70
|
+
"description": "1-based inclusive end line; should be >= startLine."
|
|
71
|
+
},
|
|
72
|
+
"note": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "Optional short label for this evidence span."
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"sourceReferenceList": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"description": "Evidence spans: each item references one file + line range, never a folder path.",
|
|
81
|
+
"items": { "$ref": "#/$defs/sourceReference" }
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"required": ["qaCode", "testCases"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"kind": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"const": "easyspecs.test cases-list",
|
|
91
|
+
"description": "Optional coordination document id; when present must be this value."
|
|
92
|
+
},
|
|
93
|
+
"version": {
|
|
94
|
+
"type": "integer",
|
|
95
|
+
"minimum": 1,
|
|
96
|
+
"description": "Optional coordination format version when present."
|
|
97
|
+
},
|
|
98
|
+
"qaCode": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"pattern": "^QA-[0-9]+$",
|
|
101
|
+
"description": "Feature code from features-list.json."
|
|
102
|
+
},
|
|
103
|
+
"testCases": {
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"additionalProperties": true,
|
|
108
|
+
"required": ["code", "name", "sourceReferences"],
|
|
109
|
+
"properties": {
|
|
110
|
+
"code": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"pattern": "^TC-[0-9]+$"
|
|
113
|
+
},
|
|
114
|
+
"name": { "type": "string", "minLength": 1 },
|
|
115
|
+
"slug": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
118
|
+
"description": "Optional; for QA-nn_TC-uu-<slug>.md if PLAN uses slugs on test cases."
|
|
119
|
+
},
|
|
120
|
+
"description": { "type": "string" },
|
|
121
|
+
"order": { "type": "integer" },
|
|
122
|
+
"sourceReferences": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"minItems": 1,
|
|
125
|
+
"description": "Required: at least one file + line range per test case row.",
|
|
126
|
+
"items": { "$ref": "#/$defs/sourceReference" }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"revisionLog": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"description": "Append-only log of substantive edits; add an entry whenever this pass changes rows, merges, or refines the coordination file.",
|
|
134
|
+
"items": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"required": ["summary"],
|
|
138
|
+
"properties": {
|
|
139
|
+
"at": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"description": "ISO-8601 timestamp when known."
|
|
142
|
+
},
|
|
143
|
+
"summary": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"minLength": 1,
|
|
146
|
+
"maxLength": 2000,
|
|
147
|
+
"description": "What was added, changed, or refined in this write."
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Example instance:**
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"qaCode": "QA-01",
|
|
161
|
+
"testCases": [
|
|
162
|
+
{
|
|
163
|
+
"code": "TC-01",
|
|
164
|
+
"name": "Sign in with password",
|
|
165
|
+
"order": 1,
|
|
166
|
+
"sourceReferences": [
|
|
167
|
+
{ "path": "src/auth/handlers.ts", "startLine": 40, "endLine": 90, "note": "password sign-in" }
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"revisionLog": [
|
|
172
|
+
{ "summary": "Initial use-case list for feature; extend this array on every substantive merge or refinement pass." }
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Prerequisites
|
|
178
|
+
|
|
179
|
+
Valid **`features-list.json`**; orchestration passes **`{{FE_CODE}}`** in the parent context block.
|
|
180
|
+
|
|
181
|
+
## OpenCode wiring
|
|
182
|
+
|
|
183
|
+
## Referenced implementation files
|
|
184
|
+
- .gluecharm/context/architecture.md:1-136
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
One JSON file per feature invocation. §3.5.2 with **`{{PARENT_CONTEXT_BLOCK}}`**.
|