@gluecharm-lab/easyspecs-cli 0.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.
Files changed (66) hide show
  1. package/dist/main.cjs +19663 -0
  2. package/dist/main.cjs.map +7 -0
  3. package/package.json +27 -0
  4. package/resources/opencode-agents/MERMAID.md +20 -0
  5. package/resources/opencode-agents/README.md +67 -0
  6. package/resources/opencode-agents/agent-ace-curator.md +31 -0
  7. package/resources/opencode-agents/agent-ace-reflector.md +16 -0
  8. package/resources/opencode-agents/agent-ace-trace-recorder.md +33 -0
  9. package/resources/opencode-agents/agent-add-reference-architecture-md.md +22 -0
  10. package/resources/opencode-agents/agent-add-reference-project-md.md +21 -0
  11. package/resources/opencode-agents/agent-classify-unreferenced-file.md +61 -0
  12. package/resources/opencode-agents/agent-list-data-model.md +243 -0
  13. package/resources/opencode-agents/agent-list-entity-fields.md +191 -0
  14. package/resources/opencode-agents/agent-list-experiences.md +252 -0
  15. package/resources/opencode-agents/agent-list-features.md +218 -0
  16. package/resources/opencode-agents/agent-list-scenarios.md +179 -0
  17. package/resources/opencode-agents/agent-list-services.md +208 -0
  18. package/resources/opencode-agents/agent-list-tech-stack.md +176 -0
  19. package/resources/opencode-agents/agent-list-use-cases.md +179 -0
  20. package/resources/opencode-agents/agent-md-architecture.md +139 -0
  21. package/resources/opencode-agents/agent-md-docs-project.md +172 -0
  22. package/resources/opencode-agents/agent-md-entity-detail.md +86 -0
  23. package/resources/opencode-agents/agent-md-feature-detail.md +95 -0
  24. package/resources/opencode-agents/agent-md-field-detail.md +80 -0
  25. package/resources/opencode-agents/agent-md-interaction-detail.md +84 -0
  26. package/resources/opencode-agents/agent-md-method-detail.md +86 -0
  27. package/resources/opencode-agents/agent-md-relationship-detail.md +80 -0
  28. package/resources/opencode-agents/agent-md-scenario-detail.md +92 -0
  29. package/resources/opencode-agents/agent-md-service-detail.md +88 -0
  30. package/resources/opencode-agents/agent-md-tool-detail.md +82 -0
  31. package/resources/opencode-agents/agent-md-use-case-detail.md +165 -0
  32. package/resources/opencode-agents/agent-md-view-detail.md +117 -0
  33. package/resources/opencode-agents/agent-reference-coverage-execution-report.md +28 -0
  34. package/resources/opencode-agents/agent-repo-surface-scan.md +136 -0
  35. package/resources/opencode-agents/agent-resolve-open-question.md +42 -0
  36. package/resources/opencode-agents/agent-review-data-model-list.md +26 -0
  37. package/resources/opencode-agents/agent-review-entity-fields-list.md +26 -0
  38. package/resources/opencode-agents/agent-review-experiences-list.md +72 -0
  39. package/resources/opencode-agents/agent-review-features-list.md +52 -0
  40. package/resources/opencode-agents/agent-review-scenarios-list.md +28 -0
  41. package/resources/opencode-agents/agent-review-services-list.md +26 -0
  42. package/resources/opencode-agents/agent-review-tech-stack-list.md +26 -0
  43. package/resources/opencode-agents/agent-review-use-cases-list.md +28 -0
  44. package/resources/opencode-agents/agent-triage-unreferenced-coordination.md +35 -0
  45. package/resources/schemas/ace/ace-agent-overlay.schema.json +29 -0
  46. package/resources/schemas/ace/ace-curator-delta.schema.json +51 -0
  47. package/resources/schemas/ace/ace-generator-trace.schema.json +134 -0
  48. package/resources/schemas/ace/ace-playbook.schema.json +36 -0
  49. package/resources/schemas/ace/ace-reflector-lessons.schema.json +77 -0
  50. package/resources/schemas/context-lists/coordination-duplicates-report.schema.json +97 -0
  51. package/resources/schemas/context-lists/coverage-reference-validation.schema.json +125 -0
  52. package/resources/schemas/context-lists/data-model-list.schema.json +157 -0
  53. package/resources/schemas/context-lists/entity-fields-list.schema.json +104 -0
  54. package/resources/schemas/context-lists/experiences-list.schema.json +132 -0
  55. package/resources/schemas/context-lists/features-list.schema.json +109 -0
  56. package/resources/schemas/context-lists/repo-surface-scan.schema.json +150 -0
  57. package/resources/schemas/context-lists/scenarios-list.schema.json +107 -0
  58. package/resources/schemas/context-lists/services-list.schema.json +132 -0
  59. package/resources/schemas/context-lists/tech-stack-list.schema.json +108 -0
  60. package/resources/schemas/context-lists/use-cases-list.schema.json +108 -0
  61. package/resources/schemas/context-lists/zero-reference-classifier-record.schema.json +61 -0
  62. package/resources/schemas/context-lists/zero-reference-routing.schema.json +98 -0
  63. package/resources/schemas/context-lists/zero-reference-triage-record.schema.json +57 -0
  64. package/resources/schemas/context-lists/zero-reference-triage.schema.json +69 -0
  65. package/resources/schemas/index-application-context.schema.json +202 -0
  66. package/resources/schemas/srs-impact.schema.json +187 -0
@@ -0,0 +1,72 @@
1
+ ---
2
+ description: SRS-34 — semantic normalization of experiences-list.json after listExperiences; XP/BH codes; JSON only; .gluecharm/context; repo-grounded views (no invented UIs).
3
+ mode: primary
4
+ ---
5
+
6
+ # Agent: Experiences list — semantic review (coordination JSON)
7
+
8
+ | Field | Value |
9
+ | ----- | ----- |
10
+ | **AGENT_ID** | `ctx-review-experiences-list` |
11
+ | **Display name** | Experiences list — semantic review |
12
+ | **Output** | `<worktree>/.gluecharm/context/experiences-list.json` (overwrite) |
13
+
14
+ ## Responsibility
15
+
16
+ **`.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.
17
+
18
+ Read the existing **experiences-list.json** (schema-valid from **listExperiences**). Rewrite as canonical: merge duplicate views/interactions, remove false XP/BH rows, fix split/merge; each **view** and **interaction** **must** have **`sourceReferences`** with **`minItems: 1`** (add evidence or **drop** the row). Keep stable **XP-*** / **BH-*** codes. Append **revisionLog** if the schema supports it.
19
+
20
+ **Critical:** A **view** is any **user-facing surface** the product exposes for interaction—not only full graphical windows. Treat **command-line usage** (subcommands, REPLs, prompts, stdin/stdout flows) and **terminal UIs** (TUI) as first-class views when the repo implements them. **Do not assume** the project is a web app or a single-page stack.
21
+
22
+ ## Reasoning workflow (mandatory order)
23
+
24
+ Work through these steps **explicitly** (brief notes in your own trace are fine; the **deliverable** remains the JSON file only). Skipping classification and jumping to “pages/routes” causes **hallucinated views**.
25
+
26
+ ### 1. Classify UI paradigm(s) for this repository
27
+
28
+ Before naming views, infer from **evidence under `{{WORKTREE_ROOT}}`** (build files, entrypoints, frameworks, docs—not guesses):
29
+
30
+ - **Web** (browser): SPAs, SSR, static sites, server-rendered HTML.
31
+ - **Desktop GUI**: native or cross-platform windowing (e.g. Electron, Qt, WPF, WinForms, **Embarcadero Delphi/VCL/FMX**, etc.).
32
+ - **CLI / terminal**: binaries, scripts, `argparse`/cobra/clap-style CLIs, interactive prompts.
33
+ - **TUI**: ncurses, bubbletea, textual, etc.
34
+ - **Hybrid**: e.g. desktop shell + embedded webview, or CLI + optional GUI.
35
+ - **Library / headless**: if there is **no** end-user UI in this repo, reflect that honestly—do not invent screens; align list rows with what actually exists (API-only packages may have **no** XP views, or only “usage via API/docs” if the schema allows).
36
+
37
+ If multiple paradigms apply, **list each** and later assign views to the correct paradigm.
38
+
39
+ ### 2. Map “where views live” to the stack (non-linear)
40
+
41
+ Do **not** use a single template (e.g. “always Vue routes”). For each paradigm you identified, decide **which artifacts constitute a distinct user interface**:
42
+
43
+ | Paradigm | Typical grounding (examples—verify in repo) |
44
+ | -------- | -------------------------------------------- |
45
+ | Web | Route tables, page components, app shells, server templates |
46
+ | Desktop (generic) | Windows/forms/scenes, XAML, storyboards, main window entry |
47
+ | **Delphi (Object Pascal)** | **Forms**: paired **`.dfm`** (layout) **+** **`.pas`** units (behavior); projects **`.dproj` / `.dpr`**; frames and datamodules may compose multiple surfaces—one **logical** form/dialog can be one view or split per user task per list rules |
48
+ | CLI | Main entry, command dispatchers, help text, config flags, subcommand modules |
49
+ | TUI | Screen definitions, keymaps, panel layouts |
50
+ | Extension / IDE | `package.json` contributions, webview panels, commands |
51
+
52
+ **Delphi note:** Discovery is **not** linear like “one folder = one page.” Follow **project file → units → forms**: a `.dfm` names a form class; the matching `.pas` holds code. Count **user-openable** forms/dialogs/wizards the product actually ships, not every internal data module unless the user interacts with it as a surface.
53
+
54
+ ### 3. Ground every retained or new view row
55
+
56
+ For each experience/view row you keep or add:
57
+
58
+ - There must be **at least one** plausible **source reference** (path to implementation: form unit, route file, CLI module, etc.) **or** explicit evidence that the prior list row was already correct—**never** invent routes, forms, or “screens” with no file/project backing.
59
+ - If **listExperiences** proposed a view you cannot verify, **remove or merge** it into a verified sibling; do not leave placeholder views to satisfy a mental model of “what a normal app has.”
60
+ - Prefer **fewer, accurate** views over **many, speculative** ones.
61
+
62
+ ### 4. Normalize (original duty)
63
+
64
+ Merge duplicates, fix XP/BH codes and slits, preserve valid **sourceReferences**, append **revisionLog** when supported.
65
+
66
+ ## Task (for `{{LIST_TASK_DESCRIPTION}}`)
67
+
68
+ Execute the **reasoning workflow**, then normalize per **Responsibility**. Output one JSON at **`{{OUTPUT_FILE_ABSOLUTE}}`** validating against **`{{LIST_SCHEMA_REF}}`**.
69
+
70
+ ## OpenCode wiring
71
+
72
+ Use **`{{LIST_SCHEMA_REF}}`**, **`{{WORKTREE_ROOT}}`**, **`{{OUTPUT_FILE_ABSOLUTE}}`**, **`{{OUTPUT_BASENAME}}`**.
@@ -0,0 +1,52 @@
1
+ ---
2
+ description: SRS-27 — semantic normalization of features-list.json after listFeatures; duplicates, splits, featureKind (product/infrastructure/testing); JSON only; .gluecharm/context.
3
+ mode: primary
4
+ ---
5
+
6
+ # Agent: Features list — semantic review (coordination JSON)
7
+
8
+ | Field | Value |
9
+ | ----- | ----- |
10
+ | **AGENT_ID** | `ctx-review-features-list` |
11
+ | **Display name** | Features list — semantic review |
12
+ | **SRS-27** | Gate before feature-detail markdown and `listRepoSurface` fan-out |
13
+ | **Output** | `<worktree>/.gluecharm/context/features-list.json` (overwrite) |
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
+ **Read** the **existing** `features-list.json` (already schema-valid from **listFeatures**). **Rewrite** it as the **single canonical** list downstream agents will use. You **do not** re-discover the repo from scratch; you **normalize** semantics:
21
+
22
+ 1. **Duplicates** — Merge rows that describe the **same** capability (different wording/codes). Keep **one** canonical row; **drop** the duplicate codes. Prefer keeping the **lower** `FE-<nn>` when ties are arbitrary. **Append** `revisionLog` explaining merges.
23
+ 2. **False features** — Remove rows that are not a coherent capability (hallucinated fragments, sentence splits, vague stubs with no defensible scope). **revisionLog** each removal.
24
+ 3. **Split** — If one row bundles **two or more independent** capabilities, split into separate rows. Assign **new** `FE-<nn>` codes using the **next** unused integers (max existing + 1, +2, …). Update `slug`/`name`/`description` accordingly. **revisionLog** splits. (Independent journeys that would each deserve their own use case are a strong split signal—**one UC per feature** is **unlikely** for non-trivial capabilities.)
25
+ 4. **Merge** — If multiple rows are really **one** capability, merge into one row (stable code policy: keep the **canonical** code, usually the best evidence anchor).
26
+ 5. **Testing vs product** — If **“test login”** (or similar) duplicates **“login”**, **merge** into the product feature and describe test hooks in `description`, **or** keep one row with `featureKind`: `testing` **only** when it is a **pure** harness with **no** user-facing counterpart. Do **not** leave two product rows for the same capability.
27
+ 6. **Infrastructure** — Rows that are primarily **ops/deployment/platform** (not a user story) **must** set `featureKind`: `infrastructure`. Ordinary capabilities use `featureKind`: `product` or omit (treated as product).
28
+ 7. **featureKind** — Every surviving row **should** explicitly set **`product`**, **`infrastructure`**, or **`testing`** (schema enum). Omit only when clearly product-equivalent.
29
+ 8. **`sourceReferences`** — Every surviving feature row **must** have **`minItems: 1`** valid evidence; add from manifests/code if missing. Drop or fix entries that violate schema (no directories, no `.gluecharm/` paths, no `.opencode/` paths, no README basenames).
30
+ 9. **`revisionLog`** — **Append** at least one entry for this review pass (`summary` required; `at` ISO-8601 optional). **Never delete** prior `revisionLog` entries.
31
+
32
+ ## Stable codes
33
+
34
+ - When **merging** duplicates: keep **one** `FE-*` code (prefer the row with stronger evidence).
35
+ - When **splitting**: add **new** codes only; do **not** renumber unrelated existing rows.
36
+ - **`slug`** must remain kebab-case and match `^FE-<nn>-<slug>.md` detail file convention.
37
+
38
+ ## Task (for `{{LIST_TASK_DESCRIPTION}}`)
39
+
40
+ Execute the normalization above. Output **one** JSON file at **`{{OUTPUT_FILE_ABSOLUTE}}`** that **fully validates** against **`{{LIST_SCHEMA_REF}}`**. Do **not** output markdown.
41
+
42
+ ## JSON Schema
43
+
44
+ Use the same bundled schema as **listFeatures** (`features-list.schema.json`), including optional **`featureKind`**: `product` | `infrastructure` | `testing`.
45
+
46
+ ## Barriers
47
+
48
+ - Downstream orchestration runs **only** after this file passes EasySpecs validation (schema + forbidden `sourceReferences` paths).
49
+
50
+ ## OpenCode wiring
51
+
52
+ Supply **`{{LIST_SCHEMA_REF}}`**, **`{{WORKTREE_ROOT}}`**, **`{{OUTPUT_FILE_ABSOLUTE}}`**, **`{{OUTPUT_BASENAME}}`**. Do **not** write `index-application-context.json`.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: SRS-34 — semantic normalization of per–use-case scenarios list JSON after listScenarios; SC codes; JSON only; .gluecharm/context.
3
+ mode: primary
4
+ ---
5
+
6
+ # Agent: Scenarios list — semantic review (coordination JSON)
7
+
8
+ | Field | Value |
9
+ | ----- | ----- |
10
+ | **AGENT_ID** | `ctx-review-scenarios-list` |
11
+ | **Display name** | Scenarios list — semantic review |
12
+ | **Output** | `<worktree>/.gluecharm/context/FE-*_UC-*-scenarios-list.json` (overwrite) |
13
+
14
+ ## Responsibility
15
+
16
+ **`.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.
17
+
18
+ Read the scenarios list for the scoped feature/use case. Merge duplicates, remove false scenarios; each surviving row **must** have **`sourceReferences`** with **`minItems: 1`**. Stable **SC-*** codes; **featureCode** and **useCaseCode** in JSON must match scope.
19
+
20
+ **Cardinality:** After normalization, **one** remaining scenario is **suspicious** for a non-trivial use case—re-check that error paths, permission denials, boundary data, and alternate success paths were not folded into one overly broad SC. If the use case is genuinely a single path with no variants, note that in **`revisionLog`**; otherwise add or split scenarios.
21
+
22
+ ## Task
23
+
24
+ Valid JSON at **`{{OUTPUT_FILE_ABSOLUTE}}`** per **`{{LIST_SCHEMA_REF}}`**.
25
+
26
+ ## OpenCode wiring
27
+
28
+ **`{{LIST_SCHEMA_REF}}`**, **`{{WORKTREE_ROOT}}`**, **`{{OUTPUT_FILE_ABSOLUTE}}`**, **`{{OUTPUT_BASENAME}}`**.
@@ -0,0 +1,26 @@
1
+ ---
2
+ description: SRS-34 — semantic normalization of services-list.json after listServices; SV/ME codes; JSON only; .gluecharm/context.
3
+ mode: primary
4
+ ---
5
+
6
+ # Agent: Services list — semantic review (coordination JSON)
7
+
8
+ | Field | Value |
9
+ | ----- | ----- |
10
+ | **AGENT_ID** | `ctx-review-services-list` |
11
+ | **Display name** | Services list — semantic review |
12
+ | **Output** | `<worktree>/.gluecharm/context/services-list.json` (overwrite) |
13
+
14
+ ## Responsibility
15
+
16
+ **`.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.
17
+
18
+ Read **services-list.json** from **listServices**. Normalize: merge duplicate services/methods, remove false SV/ME rows, fix granularity; each **service** and **method** row **must** have **`sourceReferences`** with **`minItems: 1`**. Stable **SV-*** / **ME-*** codes. **revisionLog** if supported.
19
+
20
+ ## Task
21
+
22
+ Output valid JSON at **`{{OUTPUT_FILE_ABSOLUTE}}`** per **`{{LIST_SCHEMA_REF}}`**.
23
+
24
+ ## OpenCode wiring
25
+
26
+ **`{{LIST_SCHEMA_REF}}`**, **`{{WORKTREE_ROOT}}`**, **`{{OUTPUT_FILE_ABSOLUTE}}`**, **`{{OUTPUT_BASENAME}}`**.
@@ -0,0 +1,26 @@
1
+ ---
2
+ description: SRS-34 — semantic normalization of tech-stack-list.json after listTechStack; TS codes; JSON only; .gluecharm/context.
3
+ mode: primary
4
+ ---
5
+
6
+ # Agent: Tech stack list — semantic review (coordination JSON)
7
+
8
+ | Field | Value |
9
+ | ----- | ----- |
10
+ | **AGENT_ID** | `ctx-review-tech-stack-list` |
11
+ | **Display name** | Tech stack list — semantic review |
12
+ | **Output** | `<worktree>/.gluecharm/context/tech-stack-list.json` (overwrite) |
13
+
14
+ ## Responsibility
15
+
16
+ **`.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.
17
+
18
+ Read **tech-stack-list.json**. Normalize tool rows: duplicates, false tools; stable **TS-*** codes and slugs. **Every** surviving tool **must** keep valid **`sourceReferences`** with **`minItems: 1`** (schema-required). **Drop** tools you cannot ground with at least one allowed file+line span, or **add** evidence from manifests/configs before writing — empty/missing **`sourceReferences`** fails validation.
19
+
20
+ ## Task
21
+
22
+ Valid JSON at **`{{OUTPUT_FILE_ABSOLUTE}}`** per **`{{LIST_SCHEMA_REF}}`**.
23
+
24
+ ## OpenCode wiring
25
+
26
+ **`{{LIST_SCHEMA_REF}}`**, **`{{WORKTREE_ROOT}}`**, **`{{OUTPUT_FILE_ABSOLUTE}}`**, **`{{OUTPUT_BASENAME}}`**.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: SRS-34 — semantic normalization of per-feature use-cases list JSON after listUseCases; UC codes; JSON only; .gluecharm/context.
3
+ mode: primary
4
+ ---
5
+
6
+ # Agent: Use cases list — semantic review (coordination JSON)
7
+
8
+ | Field | Value |
9
+ | ----- | ----- |
10
+ | **AGENT_ID** | `ctx-review-use-cases-list` |
11
+ | **Display name** | Use cases list — semantic review |
12
+ | **Output** | `<worktree>/.gluecharm/context/FE-*-use-cases-list.json` (overwrite) |
13
+
14
+ ## Responsibility
15
+
16
+ **`.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.
17
+
18
+ Read the use-cases list for the scoped feature. Merge duplicate UCs, remove false use cases, fix split/merge; each surviving row **must** keep **`sourceReferences`** with **`minItems: 1`** (add evidence or **drop** the row). Stable **UC-*** codes matching **featureCode** in JSON.
19
+
20
+ **Cardinality:** After normalization, **one** remaining UC is **suspicious** for a non-trivial feature—re-check that distinct goals or entry paths were not over-merged. If the feature truly has a single linear journey, note that in **`revisionLog`**; otherwise split or add UCs so the list reflects multiple meaningful journeys.
21
+
22
+ ## Task
23
+
24
+ Valid JSON at **`{{OUTPUT_FILE_ABSOLUTE}}`** per **`{{LIST_SCHEMA_REF}}`**.
25
+
26
+ ## OpenCode wiring
27
+
28
+ **`{{LIST_SCHEMA_REF}}`**, **`{{WORKTREE_ROOT}}`**, **`{{OUTPUT_FILE_ABSOLUTE}}`**, **`{{OUTPUT_BASENAME}}`**.
@@ -0,0 +1,35 @@
1
+ ---
2
+ description: SRS-30 — triage one unreferenced file against a coordination list (feature, experience, service, or data_model); emit zero-reference-triage-record JSON at the path in the EasySpecs prompt.
3
+ mode: primary
4
+ ---
5
+
6
+ # Agent: Triage unreferenced file (coordination list)
7
+
8
+ | Field | Value |
9
+ | ----- | ----- |
10
+ | **AGENT_ID** | `ctx-triage-unreferenced-coordination` |
11
+ | **Display name** | Triage unreferenced file — coordination |
12
+ | **SRS-30** | Stage 2 — new row vs enrich existing for **features** / **experiences** / **services** / **data model** lists |
13
+ | **Output** | Absolute path in the EasySpecs prompt (**triage staging JSON**) |
14
+ | **Pattern** | Single JSON object |
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
+ The EasySpecs prompt names the **target file**, the **coordinationScope** (`feature` | `experience` | `service` | `data_model`), and which **list JSON** to read (`features-list.json`, `experiences-list.json`, `services-list.json`, or `data-model-list.json`).
21
+
22
+ Decide:
23
+
24
+ - **new_item** — add a new row (**proposedSummary** required; optional **proposedCode** with correct prefix: FE-/XP-/SV-/DM-, **proposedSlug** kebab-case).
25
+ - **enrich_existing** — add **sourceReferences** evidence to an existing row; **targetItemRef** = that row’s **code** string.
26
+ - **defer** / **no_action** — no list change.
27
+
28
+ ## Rules
29
+
30
+ 1. Read the indicated list file under `.gluecharm/context/` before deciding.
31
+ 2. Write **only** valid JSON to the **Output** path — no markdown fences in the file body.
32
+ 3. Conform to **`zero-reference-triage-record.schema.json`**.
33
+ 4. **coordinationScope** in JSON must **exactly** match the value requested in the prompt (`feature`, `experience`, `service`, or `data_model`).
34
+ 5. **targetItemRef** must be a JSON **string** when **enrich_existing**; omit or omit null for other decisions.
35
+ 6. **evidenceNotes** must be a JSON **array of strings** (use `[]` if none).
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://easyspecs.local/schemas/ace/ace-agent-overlay.schema.json",
4
+ "title": "ACE per-agent overlay",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["aceOverlayVersion", "agentStem"],
8
+ "properties": {
9
+ "aceOverlayVersion": { "type": "string", "const": "1.0.0-draft" },
10
+ "agentStem": { "type": "string", "minLength": 1 },
11
+ "instructionAppend": {
12
+ "type": "string",
13
+ "description": "Markdown or plain text appended to agent instructions after materialize"
14
+ },
15
+ "systemPromptSuffix": { "type": "string" },
16
+ "negativeConstraints": {
17
+ "type": "array",
18
+ "items": { "type": "string" }
19
+ },
20
+ "emphasisBullets": {
21
+ "type": "array",
22
+ "items": { "type": "string" }
23
+ },
24
+ "metadata": {
25
+ "type": "object",
26
+ "additionalProperties": true
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://easyspecs.local/schemas/ace/ace-curator-delta.schema.json",
4
+ "title": "ACE CuratorAgent delta",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["aceSchemaVersion", "agentStem", "sourceLessons", "operations"],
8
+ "properties": {
9
+ "aceSchemaVersion": { "type": "string", "const": "1.0.0-draft" },
10
+ "agentStem": { "type": "string", "minLength": 1 },
11
+ "sourceLessons": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": ["relativePath"],
15
+ "properties": {
16
+ "relativePath": { "type": "string" }
17
+ }
18
+ },
19
+ "operations": {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": ["opId", "op", "target", "rationale", "sourceLessonIds"],
25
+ "properties": {
26
+ "opId": { "type": "string", "minLength": 1 },
27
+ "op": { "type": "string", "enum": ["append", "merge", "prune"] },
28
+ "target": {
29
+ "type": "string",
30
+ "enum": ["learning", "overlay"]
31
+ },
32
+ "ruleId": { "type": "string" },
33
+ "payload": {
34
+ "type": "object",
35
+ "additionalProperties": true
36
+ },
37
+ "rationale": { "type": "string", "minLength": 1 },
38
+ "sourceLessonIds": {
39
+ "type": "array",
40
+ "minItems": 1,
41
+ "items": { "type": "string" }
42
+ }
43
+ }
44
+ }
45
+ },
46
+ "overlayPatch": {
47
+ "type": "object",
48
+ "additionalProperties": true
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,134 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://easyspecs.local/schemas/ace/ace-generator-trace.schema.json",
4
+ "title": "ACE trace record (same OpenCode session as primary)",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "$defs": {
8
+ "aceTraceDecision": {
9
+ "type": "object",
10
+ "additionalProperties": false,
11
+ "required": ["decisionId", "topic", "choice", "rationale"],
12
+ "properties": {
13
+ "decisionId": { "type": "string", "minLength": 1 },
14
+ "topic": { "type": "string" },
15
+ "choice": { "type": "string" },
16
+ "rationale": { "type": "string" },
17
+ "alternativesConsidered": { "type": "array", "items": { "type": "string" } }
18
+ }
19
+ }
20
+ },
21
+ "required": [
22
+ "aceSchemaVersion",
23
+ "sessionMeta",
24
+ "primaryArtefact",
25
+ "reasoningSteps",
26
+ "failuresAndRetries",
27
+ "evidenceIndex"
28
+ ],
29
+ "properties": {
30
+ "aceSchemaVersion": { "type": "string", "const": "1.0.0-draft" },
31
+ "sessionMeta": {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": ["runId", "agentStem", "startedAt", "openCodeSessionId"],
35
+ "properties": {
36
+ "runId": { "type": "string", "minLength": 1 },
37
+ "agentStem": { "type": "string", "minLength": 1 },
38
+ "startedAt": { "type": "string", "format": "date-time" },
39
+ "openCodeSessionId": {
40
+ "type": "string",
41
+ "minLength": 1,
42
+ "description": "Must equal OpenCode session ID used with opencode run -s"
43
+ },
44
+ "sessionTitle": { "type": "string" },
45
+ "modelId": { "type": "string" }
46
+ }
47
+ },
48
+ "primaryArtefact": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": ["relativePath", "artefactKind"],
52
+ "properties": {
53
+ "relativePath": {
54
+ "type": "string",
55
+ "description": "Path under .gluecharm/context/"
56
+ },
57
+ "artefactKind": {
58
+ "type": "string",
59
+ "enum": [
60
+ "coordination-md",
61
+ "coordination-list-json",
62
+ "detail-md",
63
+ "repo-surface-json",
64
+ "zero-ref-json",
65
+ "report-json",
66
+ "other"
67
+ ]
68
+ },
69
+ "basename": { "type": "string" }
70
+ }
71
+ },
72
+ "reasoningSteps": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": ["stepId", "phase", "summary"],
78
+ "properties": {
79
+ "stepId": { "type": "string", "minLength": 1 },
80
+ "phase": {
81
+ "type": "string",
82
+ "enum": ["explore", "hypothesis", "draft", "validate", "repair", "finalize"]
83
+ },
84
+ "summary": { "type": "string", "minLength": 1 },
85
+ "toolsUsed": { "type": "array", "items": { "type": "string" } },
86
+ "backtracked": { "type": "boolean" },
87
+ "decisions": {
88
+ "type": "array",
89
+ "description": "Non-obvious choices taken during this step only (omit or use [] if none).",
90
+ "items": { "$ref": "#/$defs/aceTraceDecision" }
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "failuresAndRetries": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": ["failureId", "description"],
101
+ "properties": {
102
+ "failureId": { "type": "string" },
103
+ "description": { "type": "string" },
104
+ "resolution": { "type": "string" }
105
+ }
106
+ }
107
+ },
108
+ "evidenceIndex": {
109
+ "type": "array",
110
+ "items": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": ["path", "role"],
114
+ "properties": {
115
+ "path": { "type": "string" },
116
+ "role": { "type": "string" },
117
+ "symbols": { "type": "array", "items": { "type": "string" } }
118
+ }
119
+ }
120
+ },
121
+ "playbookHooks": {
122
+ "type": "array",
123
+ "items": {
124
+ "type": "object",
125
+ "additionalProperties": false,
126
+ "required": ["ruleRef", "effect"],
127
+ "properties": {
128
+ "ruleRef": { "type": "string" },
129
+ "effect": { "type": "string", "enum": ["applied", "violated", "absent"] }
130
+ }
131
+ }
132
+ }
133
+ }
134
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://easyspecs.local/schemas/ace/ace-playbook.schema.json",
4
+ "title": "ACE per-agent playbook (durable learning JSON)",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["acePlaybookVersion", "agentStem", "rules"],
8
+ "properties": {
9
+ "acePlaybookVersion": { "type": "string", "const": "1.0.0-draft" },
10
+ "agentStem": { "type": "string", "minLength": 1 },
11
+ "rules": {
12
+ "type": "array",
13
+ "description": "Ordered rules; render order for prompt injection is extension-defined",
14
+ "items": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["ruleId", "statement"],
18
+ "properties": {
19
+ "ruleId": { "type": "string", "minLength": 1 },
20
+ "statement": { "type": "string", "minLength": 1 },
21
+ "priority": { "type": "integer" },
22
+ "tags": { "type": "array", "items": { "type": "string" } },
23
+ "sourceRunIds": {
24
+ "type": "array",
25
+ "items": { "type": "string" },
26
+ "description": "Optional provenance from Curator applier"
27
+ }
28
+ }
29
+ }
30
+ },
31
+ "metadata": {
32
+ "type": "object",
33
+ "additionalProperties": true
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://easyspecs.local/schemas/ace/ace-reflector-lessons.schema.json",
4
+ "title": "ACE ReflectorAgent lessons",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["aceSchemaVersion", "sourceTrace", "lessons"],
8
+ "properties": {
9
+ "aceSchemaVersion": { "type": "string", "const": "1.0.0-draft" },
10
+ "sourceTrace": {
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": ["relativePath", "sessionRunId"],
14
+ "properties": {
15
+ "relativePath": {
16
+ "type": "string",
17
+ "description": "Path to trace JSON under .gluecharm/context/learnings/"
18
+ },
19
+ "sessionRunId": { "type": "string" }
20
+ }
21
+ },
22
+ "lessons": {
23
+ "type": "array",
24
+ "minItems": 0,
25
+ "items": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": [
29
+ "lessonId",
30
+ "category",
31
+ "statement",
32
+ "confidence",
33
+ "transferability",
34
+ "evidenceRefs"
35
+ ],
36
+ "properties": {
37
+ "lessonId": { "type": "string", "minLength": 1 },
38
+ "category": {
39
+ "type": "string",
40
+ "enum": [
41
+ "failureCorrection",
42
+ "nonObviousDecision",
43
+ "confirmedPattern",
44
+ "noise"
45
+ ]
46
+ },
47
+ "statement": { "type": "string", "minLength": 1 },
48
+ "confidence": {
49
+ "type": "string",
50
+ "enum": ["high", "medium", "low"]
51
+ },
52
+ "transferability": {
53
+ "type": "string",
54
+ "enum": ["repo-specific", "pattern-likely"]
55
+ },
56
+ "evidenceRefs": {
57
+ "type": "array",
58
+ "minItems": 1,
59
+ "items": {
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "required": ["kind", "ref"],
63
+ "properties": {
64
+ "kind": {
65
+ "type": "string",
66
+ "enum": ["reasoningStep", "decision", "failure"]
67
+ },
68
+ "ref": { "type": "string" }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ },
75
+ "summaryForHumans": { "type": "string" }
76
+ }
77
+ }