@sentropic/track 0.10.8 → 0.10.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"install-skills.d.ts","sourceRoot":"","sources":["../../src/cli/install-skills.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAkMvC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,GAAG,MAAM,CA8DlE"}
1
+ {"version":3,"file":"install-skills.d.ts","sourceRoot":"","sources":["../../src/cli/install-skills.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAkOvC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,GAAG,MAAM,CAoElE"}
@@ -17,8 +17,20 @@ import { DomainError } from '../model/item.js';
17
17
  // `dist/cli/install-skills.js` and `src/cli/install-skills.ts` both sit two dirs below the package
18
18
  // root, where `skills/` lives (shipped via package.json `files`). Same anchor `version.ts` uses.
19
19
  const SKILLS_DIR = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'skills');
20
- /** The ONE skill this installer deploys; the canonical source is `skills/present-decision/`. */
21
- const SKILL_NAME = 'present-decision';
20
+ /**
21
+ * Discover every skill in the bundle: each immediate sub-directory of `skills/` that carries a `SKILL.md`
22
+ * is one skill (its dir name is the skill name). The in-repo `skills/` dir is the SINGLE source of truth —
23
+ * adding a skill folder is the only thing needed to ship it; this installer follows the bundle, never a
24
+ * hardcoded list. Returned sorted for deterministic install order / output.
25
+ */
26
+ function discoverSkills() {
27
+ if (!existsSync(SKILLS_DIR))
28
+ throw new DomainError(`skills bundle missing at ${SKILLS_DIR}`);
29
+ return readdirSync(SKILLS_DIR, { withFileTypes: true })
30
+ .filter((e) => e.isDirectory() && existsSync(join(SKILLS_DIR, e.name, 'SKILL.md')))
31
+ .map((e) => e.name)
32
+ .sort();
33
+ }
22
34
  const HOSTS = ['claude', 'codex', 'gemini', 'agy'];
23
35
  const SCOPES = ['user', 'project'];
24
36
  /** Resolve the user's HOME — injectable via `$TRACK_INSTALL_HOME` so tests never touch the real `~`. */
@@ -98,14 +110,23 @@ function copySkillTree(srcDir, destDir, force, result) {
98
110
  }
99
111
  }
100
112
  const AGENTS_POINTER_HEADER = '## Skills';
101
- const AGENTS_POINTER_LINE = `- **present-decision**present human decisions at the level of the stakes. ` +
102
- `Entry: \`~/.codex/skills/present-decision/SKILL.md\`.`;
113
+ /** First sentence of a skill's description a bounded blurb for the AGENTS.md pointer line. */
114
+ function blurb(description) {
115
+ const firstSentence = description.split(/(?<=\.)\s/)[0] ?? description;
116
+ // Strip the leading "Use when …" framing so the pointer reads as a capability, not a trigger.
117
+ return firstSentence.replace(/^Use when\s+/i, '').replace(/\.$/, '');
118
+ }
119
+ /** The bounded pointer line for one skill under the repo's `## Skills` section. */
120
+ function agentsPointerLine(skill) {
121
+ return `- **${skill.name}** — ${blurb(skill.description)}. Entry: \`~/.codex/skills/${skill.name}/SKILL.md\`.`;
122
+ }
103
123
  /**
104
- * Add a BOUNDED pointer line to the repo's `AGENTS.md` (the canonical entry) under a "Skills"
105
- * section — only when AGENTS.md already exists (existing repo methods win; we never create the
106
- * entrypoint). Idempotent: if the pointer is already present, do nothing.
124
+ * Add a BOUNDED per-skill pointer line to the repo's `AGENTS.md` (the canonical entry) under one shared
125
+ * "Skills" section — only when AGENTS.md already exists (existing repo methods win; we never create the
126
+ * entrypoint). Idempotent per skill: the section header is added once; a skill whose `- **<name>**` line
127
+ * is already present is left alone, so installing N skills yields one section with N lines.
107
128
  */
108
- function addAgentsPointer(repoRoot, force, result) {
129
+ function addAgentsPointer(repoRoot, skill, force, result) {
109
130
  const agents = join(repoRoot, 'AGENTS.md');
110
131
  if (!existsSync(agents)) {
111
132
  if (force) {
@@ -118,12 +139,22 @@ function addAgentsPointer(repoRoot, force, result) {
118
139
  return;
119
140
  }
120
141
  const current = readFileSync(agents, 'utf8');
121
- if (current.includes('present-decision')) {
142
+ if (current.includes(`- **${skill.name}**`)) {
122
143
  result.unchanged.push(agents);
123
144
  return;
124
145
  }
125
- const sep = current.endsWith('\n') ? '\n' : '\n\n';
126
- writeFileSync(agents, `${current}${sep}${AGENTS_POINTER_HEADER}\n\n${AGENTS_POINTER_LINE}\n`, 'utf8');
146
+ const line = agentsPointerLine(skill);
147
+ let next;
148
+ if (current.includes(`${AGENTS_POINTER_HEADER}\n`)) {
149
+ // Append the new pointer right under the existing Skills section header (one blank line, then the
150
+ // pointer lines together) so installing N skills yields one tidy section, not blank-separated lines.
151
+ next = current.replace(`${AGENTS_POINTER_HEADER}\n\n`, `${AGENTS_POINTER_HEADER}\n\n${line}\n`);
152
+ }
153
+ else {
154
+ const sep = current.endsWith('\n') ? '\n' : '\n\n';
155
+ next = `${current}${sep}${AGENTS_POINTER_HEADER}\n\n${line}\n`;
156
+ }
157
+ writeFileSync(agents, next, 'utf8');
127
158
  result.written.push(agents);
128
159
  }
129
160
  /**
@@ -151,23 +182,24 @@ function ensureGeminiPointer(repoRoot, result) {
151
182
  }
152
183
  result.written.push(gemini);
153
184
  }
154
- /** Install the present-decision skill onto a single host. */
155
- function installOne(host, scope, force, repoRoot, result) {
156
- const srcDir = join(SKILLS_DIR, SKILL_NAME);
185
+ /** Install ONE named skill onto a single host. */
186
+ function installOne(skillName, host, scope, force, repoRoot, result) {
187
+ const srcDir = join(SKILLS_DIR, skillName);
157
188
  if (!existsSync(srcDir)) {
158
189
  throw new DomainError(`skills bundle missing at ${srcDir}`);
159
190
  }
160
191
  const base = scope === 'user' ? userHome() : repoRoot;
161
192
  if (host === 'claude' || host === 'codex') {
162
- const destDir = join(base, `.${host}`, 'skills', SKILL_NAME);
193
+ const destDir = join(base, `.${host}`, 'skills', skillName);
163
194
  copySkillTree(srcDir, destDir, force, result);
164
- if (host === 'codex' && scope === 'project')
165
- addAgentsPointer(repoRoot, force, result);
195
+ if (host === 'codex' && scope === 'project') {
196
+ addAgentsPointer(repoRoot, parseSkill(readFileSync(join(srcDir, 'SKILL.md'), 'utf8')), force, result);
197
+ }
166
198
  return;
167
199
  }
168
200
  // gemini + agy share ~/.gemini/commands/<name>.toml (agy imports the gemini command).
169
201
  const skill = parseSkill(readFileSync(join(srcDir, 'SKILL.md'), 'utf8'));
170
- const target = join(base, '.gemini', 'commands', `${SKILL_NAME}.toml`);
202
+ const target = join(base, '.gemini', 'commands', `${skillName}.toml`);
171
203
  writeGuarded(target, renderGeminiToml(skill), force, result);
172
204
  if (scope === 'project')
173
205
  ensureGeminiPointer(repoRoot, result);
@@ -217,8 +249,15 @@ export function cmdInstallSkills(args, io) {
217
249
  }
218
250
  const result = { written: [], skipped: [], unchanged: [] };
219
251
  try {
252
+ // Discover every skill in the bundle and install each onto every targeted host (source of truth =
253
+ // the in-repo `skills/` dir, never a hardcoded name).
254
+ const skills = discoverSkills();
255
+ if (skills.length === 0)
256
+ throw new DomainError(`no skills found under ${SKILLS_DIR}`);
220
257
  for (const host of targets) {
221
- installOne(host, resolvedScope, force, io.cwd, result);
258
+ for (const skillName of skills) {
259
+ installOne(skillName, host, resolvedScope, force, io.cwd, result);
260
+ }
222
261
  }
223
262
  }
224
263
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"install-skills.js","sourceRoot":"","sources":["../../src/cli/install-skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM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wBAAwB,MAAM,CAAC,SAAS,CAAC,MAAM,uBAAuB,CAAC,CAAA;IAC5G,CAAC;SAAM,CAAC;QACN,EAAE,CAAC,GAAG,CACJ,mBAAmB,MAAM,CAAC,OAAO,CAAC,MAAM,aAAa,MAAM,CAAC,OAAO,CAAC,MAAM,YAAY;YACpF,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,qBAAqB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,aAAa,KAAK,CAClG,CAAA;IACH,CAAC;IACD,sGAAsG;IACtG,OAAO,CAAC,CAAA;AACV,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentropic/track",
3
- "version": "0.10.8",
3
+ "version": "0.10.9",
4
4
  "description": "Typed product-backlog and spec/plan/UAT system of record for the sentropic ecosystem (record-only MVP).",
5
5
  "license": "MIT",
6
6
  "author": "Fabien Antoine",
@@ -0,0 +1,146 @@
1
+ ---
2
+ name: propose-workpackages
3
+ description: Use when a flat track backlog has grown past a handful of items and needs structuring into a small set of perennial workpackages (WPs) — durable themes by owning concern, not milestones — so a conductor can pilot %-by-WP. The skill reads the backlog, clusters by durable concern, and EMITS A PROPOSAL (the WP set + a per-item reparent plan) the human ratifies before anything is written. It never auto-restructures; for a consequential restructuring it composes present-decision. This is agent→human structuring of one repo's own backlog.
4
+ ---
5
+
6
+ # Propose Workpackages
7
+
8
+ Turn a **flat backlog** into a small set of **perennial workpackages** — durable themes keyed to an
9
+ **owning concern / artifact**, not to a milestone or a date. You **propose**; the human **ratifies**;
10
+ only then do you write. This skill automates what a conductor otherwise does by hand to keep a backlog
11
+ legible and pilotable by `%`-per-WP.
12
+
13
+ This skill is **tool-neutral**. Where it names a capability ("your code-search tool", "your modal-ask
14
+ tool", "your second-opinion agent"), use your host's equivalent — see **Per-agent mapping** at the end.
15
+ It works on **the repo it is invoked in**; it never imposes a global standard and never edits another
16
+ repo's rules.
17
+
18
+ ## Step 0 — Precondition (track present?)
19
+
20
+ If `.track/` is absent, do not structure anything: **recommend `track init`** and stop. Workpackages are
21
+ represented *in* track (a parent `Item` with `role:'workpackage'`, children via `parentId`); without a
22
+ store there is nothing to mark or roll up. If track is present, read the live state before proposing.
23
+
24
+ ## Step 1 — Read the flat backlog
25
+
26
+ Pull the backlog as data, not from memory. Use your code-search tool to ground every claim in the actual
27
+ items.
28
+
29
+ - **`track report --format json`** — the bucketed view: each row carries `id`, `title`, `kind`, `bucket`,
30
+ and (when set) `accountable`, `engagementRef`, `role`. WPs (`role:'workpackage'`) are excluded from the
31
+ flat buckets — an already-structured repo shows them under `track report --wp`.
32
+ - **`track query --format json`** (optionally `--role workpackage`) and **`track item show <id>`** for the
33
+ **existing hierarchy** — `parentId`, current parents, what is already a WP. Reparenting operates on `id`,
34
+ so resolve the real ids before proposing a plan.
35
+ - **`track report --wp`** when WPs already exist — the fait / à-faire %·WP / attendus view tells you what is
36
+ already structured and what is still homeless.
37
+
38
+ ## Step 2 — Cluster by DURABLE concern, NOT milestone
39
+
40
+ Group items by the **concern / owning artifact** each one serves — the thing that will still exist in a
41
+ year — not by the release it happens to land in.
42
+
43
+ - **Down-weight timeline prefixes.** `M\d`, `v\d`, `BR-\d`, `Lot`, sprint/wave names encode *when*, not
44
+ *what*. They are timeline, not theme. Map a milestone-tagged item to the **concern** it advances (e.g. a
45
+ "M5 wiring" item → the *record contract* concern), and ignore the prefix for clustering.
46
+ - **Preserve owner-level distinctions** (heuristic §5). Do not collapse items that have genuinely different
47
+ owners or sides of a seam: record-side vs render vs logic; a decision *referent* (e.g. D5 mockups, held as
48
+ record evidence) vs a render *contract* (e.g. M5, owned elsewhere). When two items look thematically close
49
+ but sit on opposite sides of an ownership seam, they belong to **different** WPs.
50
+
51
+ ## Step 3 — Shape 4–7 perennial workpackages
52
+
53
+ Aim for **4–7** WPs. Each is a **container of a durable concern**, written as **a one-line charter + an
54
+ explicit scope boundary** (what is NOT here, and where it lives instead — name the neighbouring WP).
55
+
56
+ Reject, and rework until none remain:
57
+ - **"misc" / "other" / "general"** — a catch-all means the taxonomy is incomplete, not that a bucket is
58
+ needed. Find the real concern.
59
+ - **single-ticket WPs** — one todo is not a perennial theme; fold it into the concern it serves.
60
+ - **milestone-only names** — "M5", "v2", "Lot 3" name a date, not a concern. Rename to the owning artifact.
61
+
62
+ A good WP reads like *"Record Integrity & Contract — the append-only log never lies … NOT the write
63
+ transports (→ Write Surfaces), NOT the render (→ Views)."* (Precedent: `docs/plan/workpackages-DESIGN.md`
64
+ §1; fleet gold shape `WP-N → Lot N.M → task` in `~/src/agent-stats/plan.md`.)
65
+
66
+ ## Step 4 — Assign each todo to EXACTLY ONE WP
67
+
68
+ Every todo lands in **one** WP, by its **primary** concern.
69
+
70
+ - **A homeless todo means the taxonomy is wrong** — surface it, never drop it. If an item fits no WP, the WP
71
+ set is missing a concern (or a boundary is mis-drawn). Fix the taxonomy and re-assign; a dropped item is a
72
+ silent loss of work.
73
+ - **Genuinely spans two WPs ⇒ SPLIT the item, never multi-home.** If a todo truly serves two concerns,
74
+ propose splitting it into two items (one per WP). An item belongs to one parent; multi-homing breaks the
75
+ `%`-rollup and the single-owner clarity. Splitting is part of the proposal, surfaced for ratification.
76
+
77
+ ## Step 5 — Self-audit the taxonomy (loop before proposing)
78
+
79
+ Run `assets/clustering-checklist.md`. Do not present a proposal until every item passes; if one fails, fix
80
+ the taxonomy and re-run — loop, don't ship. The load-bearing checks:
81
+
82
+ - **No homeless todos** — every backlog item is assigned, or its homelessness is surfaced as a taxonomy gap.
83
+ - **No "misc", no single-ticket WP, no milestone-only name.**
84
+ - **4–7 WPs**, each with a one-line charter and a scope boundary naming where the excluded work lives.
85
+ - **Owner seams preserved** — record vs render vs logic, referent vs contract, D5 ≠ M5 distinctions intact.
86
+ - **Splits, not multi-homes** — any cross-cutting item is proposed as a split, never assigned twice.
87
+ - **Concern, not timeline** — no WP is defined by a milestone/date prefix.
88
+
89
+ ## Step 6 — EMIT THE PROPOSAL (the human ratifies)
90
+
91
+ Build the proposal from `assets/proposal-template.md`. It has two parts:
92
+
93
+ 1. **The WP set** — for each WP: a `sourceKey` slug (non-positional, e.g. `wp:record-integrity`), title,
94
+ one-line charter, scope boundary.
95
+ 2. **The per-item reparent plan** — a table `item id · title · current parent · → target WP · note`, plus a
96
+ **splits** list and a **surfaced-homeless** list (if any). The plan is the exact set of writes Step 7
97
+ would apply.
98
+
99
+ Present **prose first** (the WP set + rationale, scannable), **then** one modal-ask to capture the decision
100
+ (*approve / revise WP set / defer*). **Never** present a bare option menu. For a **consequential
101
+ restructuring** — a large backlog, cross-owner items, or a backlog already structured one way — **compose
102
+ `present-decision`**: build its dossier (options = candidate WP cuts, with the strongest case for/against
103
+ each) and run its self-audit gate before asking. A first-time structuring of a small flat backlog can use
104
+ the lighter quick-ask path; when in doubt, escalate the path.
105
+
106
+ ## Step 7 — Apply ONLY on approval (never auto-write)
107
+
108
+ **Never write without the human's explicit OK.** On approval, apply the ratified plan via track:
109
+
110
+ - **Create each WP** as a parent item: `track item new --kind chore --role workpackage --title "<charter>"
111
+ --workspace <w>`. WP-ness comes from `role:'workpackage'` (shipped 0.10.0) — never from `kind`, from
112
+ having children, or from a `sourceKey` marker.
113
+ - **Reparent each todo**: `track item reparent <itemId> --parent <wpId>`. (A WP nests only under a WP; a
114
+ leaf may nest under a WP or a leaf.)
115
+ - **Apply any splits** as new items first, then reparent each half.
116
+ - **Verify with `track report --wp`** — the `%` is rolled up from leaf buckets (`done / active`, `0/0 ⇒
117
+ n/a`), never asserted by hand. This retires hand-maintained `%` tables.
118
+
119
+ If the human deferred or revised, do not write — fold the revisions into the WP set and re-present. Only
120
+ reversible prep (drafting the next proposal) may continue meanwhile.
121
+
122
+ ## DON'T
123
+
124
+ - **Auto-restructure without ratification** — the proposal is the deliverable; the writes wait for OK.
125
+ (The exact mistake this skill exists to prevent.)
126
+ - **Cluster by milestone / date** — `M\d`/`v\d`/`BR-\d`/`Lot` is timeline, not theme.
127
+ - **A "misc" WP, a single-ticket WP, or a milestone-only WP name.**
128
+ - **Multi-home an item** — split it instead; one item, one parent.
129
+ - **Drop a homeless todo** — surface it as a taxonomy gap; never let work vanish.
130
+ - **Collapse owner seams** — record vs render vs logic, referent vs contract (D5 ≠ M5) stay distinct.
131
+ - **Assert `%` by hand** — let `track report --wp` roll it up from leaves.
132
+ - **Impose globally or init/edit another repo or its rules.** Work on the repo you are invoked in; if track
133
+ is absent, *recommend* `track init` — never force it, never touch a foreign entrypoint.
134
+
135
+ ## Per-agent mapping (tool-neutral)
136
+
137
+ | Capability | Claude | Codex | Gemini-agy |
138
+ | --- | --- | --- | --- |
139
+ | skill entrypoint | `~/.claude/skills/propose-workpackages/SKILL.md` | `~/.codex/skills/propose-workpackages/SKILL.md` (project entry `AGENTS.md`) | `~/.gemini/commands/propose-workpackages.toml` (project entry `GEMINI.md`) |
140
+ | modal-ask tool | `AskUserQuestion` | a numbered prose Q/R | a numbered prose Q/R |
141
+ | code-search tool | Grep / Glob / Read | ripgrep / read | ripgrep / read |
142
+ | second-opinion tool | sub-agent / `codex` + `opus` CLIs | `opus` CLI | second-model CLI |
143
+ | decision presenter | compose `present-decision` | compose `present-decision` | compose `present-decision` |
144
+
145
+ `AGENTS.md` is the canonical entrypoint; `CLAUDE.md` / `GEMINI.md` point back to it. Existing repo methods
146
+ win on conflict.
@@ -0,0 +1,35 @@
1
+ # CLUSTERING CHECKLIST — run before emitting any workpackage proposal
2
+
3
+ Loop: run the checklist → if any item fails, FIX the taxonomy → re-run. Do not propose until every box is
4
+ checked. A failing check is a defect in the WP set, not a reason to ship anyway.
5
+
6
+ ## Checklist
7
+
8
+ - [ ] **Read from data** — the backlog came from `track report --format json` (+ `track query` / `item show`
9
+ for `parentId`), not from memory. Every item is accounted for.
10
+ - [ ] **Concern, not timeline** — no WP is defined by an `M\d`/`v\d`/`BR-\d`/`Lot`/sprint prefix. Milestone
11
+ items were mapped to the concern they advance.
12
+ - [ ] **4–7 workpackages** — the set is small enough to pilot and large enough to separate concerns.
13
+ - [ ] **Charter + boundary each** — every WP has a one-line charter AND an explicit "NOT here (→ which WP)"
14
+ boundary. No WP is a bare title.
15
+ - [ ] **No catch-all** — no "misc" / "other" / "general" WP. A would-be catch-all means a concern is missing.
16
+ - [ ] **No single-ticket WP** — no WP exists to hold exactly one todo.
17
+ - [ ] **No milestone-only name** — every WP is named for an owning artifact/concern, not a date or release.
18
+ - [ ] **Exactly one WP per todo** — every item is assigned to one parent by its primary concern.
19
+ - [ ] **No homeless todo** — every item fits a WP, or its homelessness is surfaced as a taxonomy gap (never
20
+ dropped, never hidden).
21
+ - [ ] **Splits, not multi-homes** — any item that genuinely spans two concerns is proposed as a SPLIT (two
22
+ items), not assigned to two WPs.
23
+ - [ ] **Owner seams preserved** — record-side vs render vs logic owners are not collapsed; referent vs
24
+ contract distinctions (e.g. D5 mockups ≠ M5 render contract) are intact.
25
+ - [ ] **Reparent plan resolves to real ids** — each row names a real `item id` and a real target WP (or a
26
+ WP to be created), so Step 7 can apply it verbatim.
27
+
28
+ ## Red flags — STOP and rebuild the taxonomy
29
+
30
+ - A WP whose charter is a list of unrelated things ("and also…") — that is two concerns wearing one name.
31
+ - An item you assigned "because it was open at the same time" — that is timeline clustering, not concern.
32
+ - A WP named after the milestone that happened to surface its items.
33
+ - A homeless item quietly parked in the closest-fitting WP instead of surfaced as a gap.
34
+ - The same item appearing under two WPs — it must be split, not multi-homed.
35
+ - More than 7 WPs, or fewer than 4 — re-cluster before proposing.
@@ -0,0 +1,57 @@
1
+ # Workpackage proposal — <repo / backlog name>
2
+
3
+ > Present this **prose first** (the WP set + rationale), **then** one modal-ask to capture the decision
4
+ > (approve / revise / defer). Nothing is written until the human approves. For a consequential
5
+ > restructuring, build this inside a `present-decision` dossier and run its self-audit gate first.
6
+ > Run `clustering-checklist.md` before presenting.
7
+
8
+ ## 1. The workpackage set (4–7 perennial WPs)
9
+
10
+ | sourceKey | title | charter (one line) | boundary — NOT here (→ where) |
11
+ |-----------|-------|--------------------|-------------------------------|
12
+ | `wp:<slug>` | <WP title> | <the durable concern this WP owns> | <what's excluded → neighbouring WP> |
13
+ | `wp:<slug>` | | | |
14
+ | `wp:<slug>` | | | |
15
+ | `wp:<slug>` | | | |
16
+
17
+ > `sourceKey` is a **non-positional** slug (`wp:record-integrity`), never `WP1` (that ordinal is a derived
18
+ > display label, not stored identity). WP-ness = `role:'workpackage'` on a `kind:'chore'` parent item.
19
+
20
+ ## 2. Per-item reparent plan
21
+
22
+ | item id | title | current parent | → target WP | note |
23
+ |---------|-------|----------------|-------------|------|
24
+ | <id> | <title> | <none / id> | `wp:<slug>` | |
25
+ | <id> | <title> | | `wp:<slug>` | |
26
+
27
+ (One row per backlog item. Every item appears exactly once. This table IS the set of writes Step 7 applies.)
28
+
29
+ ### Splits (items that genuinely span two concerns)
30
+
31
+ | original item id | title | → split into (per WP) | rationale |
32
+ |------------------|-------|-----------------------|-----------|
33
+ | <id> | <title> | `wp:<a>` half + `wp:<b>` half | <why one item can't hold both concerns> |
34
+
35
+ (Empty if no item spans two WPs. Splitting is part of the proposal — surfaced for ratification, not done silently.)
36
+
37
+ ### Surfaced homeless items (taxonomy gaps)
38
+
39
+ | item id | title | why it fits no WP | proposed fix |
40
+ |---------|-------|-------------------|--------------|
41
+ | <id> | <title> | <the missing concern / mis-drawn boundary> | <new WP / boundary change> |
42
+
43
+ (Empty if the taxonomy is complete. A homeless item is NEVER dropped — it is a signal the WP set is wrong.)
44
+
45
+ ## 3. Rationale (scannable)
46
+
47
+ - **Why these concerns**: <the durable seams the cut follows — owning artifacts, owner-level distinctions>.
48
+ - **What was de-milestoned**: <milestone-tagged items remapped to their concern, and from which prefix>.
49
+ - **Owner seams kept distinct**: <record vs render vs logic; referent vs contract>.
50
+
51
+ ## 4. The decision asked
52
+
53
+ Approve this WP set + reparent plan? Options: **approve** (apply via `track item new --role workpackage` +
54
+ `track item reparent`) · **revise** (<which WP / boundary to change>) · **defer**.
55
+
56
+ > On **approve**: create each WP, reparent each item, apply splits, then `track report --wp` to verify the
57
+ > rolled-up `%`. On **revise/defer**: do not write — fold the change and re-present.