dorfl 0.3.2 → 0.5.0

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,9 +1,14 @@
1
- import { existsSync, readdirSync, readFileSync, writeFileSync, copyFileSync, mkdirSync, rmdirSync, } from 'node:fs';
2
- import { join, relative, dirname, basename } from 'node:path';
1
+ import { existsSync, readdirSync, readFileSync, writeFileSync, rmdirSync, } from 'node:fs';
2
+ import { join, basename } from 'node:path';
3
3
  import { run, git, gitMv } from './git.js';
4
- import { resolveProtocolDoc } from './prompt.js';
5
4
  import { WORK_ROOT } from './work-layout.js';
6
5
  import { repoConfigPath } from './repo-config.js';
6
+ import { resyncProtocol, PROTOCOL_DOCS, } from './resync-protocol.js';
7
+ // The protocol re-sync now lives in the shared `resync-protocol.ts` module (so
8
+ // the standalone `dorfl sync` command and this migration engine share ONE
9
+ // implementation). Re-exported here for backward compatibility with existing
10
+ // importers/tests that reach for these symbols on `prd-to-spec.js`.
11
+ export { resyncProtocol, PROTOCOL_DOCS };
7
12
  /** The `prd → spec` cutover this verb enacts (ADR §7e). */
8
13
  export const MIGRATION = {
9
14
  from: 'prd',
@@ -12,24 +17,6 @@ export const MIGRATION = {
12
17
  toFolder: 'specs',
13
18
  configKeys: [{ from: 'prdsLandIn', to: 'specsLandIn' }],
14
19
  };
15
- /**
16
- * The FULL set of protocol docs `setup` propagates into a repo's
17
- * `work/protocol/`. The re-sync copies EACH from the package's canonical source
18
- * (via {@link resolveProtocolDoc}) so the migrated repo carries the new `spec`
19
- * contract. Kept in lockstep with `skills/setup/protocol/` (the source of truth)
20
- * and the `vendor-protocol` build step (which vendors these into `dist/protocol/`
21
- * so the published CLI is self-contained).
22
- */
23
- export const PROTOCOL_DOCS = [
24
- 'WORK-CONTRACT.md',
25
- 'CLAIM-PROTOCOL.md',
26
- 'REVIEW-PROTOCOL.md',
27
- 'SURFACE-PROTOCOL.md',
28
- 'TASKING-PROTOCOL.md',
29
- 'ADR-FORMAT.md',
30
- 'task-template.md',
31
- 'spec-template.md',
32
- ];
33
20
  // ───────────────────────────────────────────────────────────────────────────
34
21
  // Layer: keep-case replace (the bespoke sweep — see the tooling JSDoc above).
35
22
  // ───────────────────────────────────────────────────────────────────────────
@@ -124,78 +111,6 @@ export function checkQuiescence(repoPath, migration = MIGRATION, env = undefined
124
111
  }
125
112
  return undefined;
126
113
  }
127
- /**
128
- * Re-sync the target repo's `work/protocol/*` from the package's canonical
129
- * source (the deterministic part of the `setup` skill — copy the docs verbatim +
130
- * bump `VERSION`). Resolves each doc's SOURCE via {@link resolveProtocolDoc} with
131
- * NO `cwd`, so it reads the package-vendored (`dist/protocol/`) or dev-source
132
- * (`skills/setup/protocol/`) copy — NEVER the target repo's own (old) copy. This
133
- * is how the migrated repo picks up the new `spec` contract before its data is
134
- * converted. Idempotent: a doc already byte-identical is reported `unchanged`.
135
- * A doc whose SOURCE cannot be resolved is reported `skipped` (NOT copied, NEVER
136
- * a VERSION-bump) rather than silently bumping VERSION with nothing copied.
137
- *
138
- * `dryRun` reports what WOULD be copied without writing. `resolveDoc` overrides
139
- * how a doc's source path is resolved (defaults to {@link resolveProtocolDoc});
140
- * it exists so a test can force a non-resolvable source (a path that does not
141
- * exist) to exercise the skip path.
142
- */
143
- export function resyncProtocol(repoPath, options = {}) {
144
- const protocolDir = join(repoPath, WORK_ROOT, 'protocol');
145
- const resolveDoc = options.resolveDoc ?? ((name) => resolveProtocolDoc(name));
146
- const docs = [];
147
- for (const name of PROTOCOL_DOCS) {
148
- // Resolve the SOURCE (package/dev), never the target's adopted copy.
149
- const source = resolveDoc(name);
150
- const destAbs = join(protocolDir, name);
151
- const destRel = relative(repoPath, destAbs);
152
- const sourceExists = existsSync(source);
153
- if (!sourceExists) {
154
- // The source doc could not be resolved: copy NOTHING and record the doc as
155
- // SKIPPED (never a change). This is the latent-bug fix: a non-resolvable
156
- // source must not count as `changed` and bump `VERSION` while copying no
157
- // file. `unchanged: false` here is honest (the dest was not made to match a
158
- // source), but `skipped: true` keeps it OUT of the VERSION-bump tally.
159
- docs.push({ name, dest: destRel, unchanged: false, skipped: true });
160
- continue;
161
- }
162
- // Source resolved: a doc is CHANGED (VERSION-bump-worthy) only when the dest
163
- // is absent OR its content differs from the source. An identical dest is a
164
- // no-op copy (`unchanged`), so an already-synced re-run stays a true no-op.
165
- const unchanged = existsSync(destAbs) &&
166
- readFileSync(source, 'utf8') === readFileSync(destAbs, 'utf8');
167
- if (!options.dryRun) {
168
- mkdirSync(dirname(destAbs), { recursive: true });
169
- copyFileSync(source, destAbs);
170
- }
171
- docs.push({ name, dest: destRel, unchanged, skipped: false });
172
- }
173
- const versionAbs = join(protocolDir, 'VERSION');
174
- const versionRel = relative(repoPath, versionAbs);
175
- // Bump VERSION only when a doc was ACTUALLY COPIED with new content, or when
176
- // VERSION is absent AND at least one doc was genuinely synced (copied). A
177
- // SKIPPED doc (unresolvable source, nothing copied) is NEVER a change —
178
- // counting it would bump VERSION without copying a single doc (the latent bug),
179
- // and the write-when-absent fallback must ALSO require a real copy so an
180
- // all-skipped resync leaves no VERSION behind. A re-run on an already-synced
181
- // repo must stay a true no-op — otherwise the (always-fresh) `synced-at`
182
- // timestamp would dirty the tree on every idempotent re-run.
183
- const anyDocChanged = docs.some((d) => !d.unchanged && !d.skipped);
184
- const anyDocSynced = docs.some((d) => !d.skipped);
185
- if (!options.dryRun &&
186
- (anyDocChanged || (anyDocSynced && !existsSync(versionAbs)))) {
187
- mkdirSync(dirname(versionAbs), { recursive: true });
188
- const today = new Date().toISOString().slice(0, 10);
189
- writeFileSync(versionAbs, [
190
- `protocol-version: ${today}`,
191
- 'synced-from: skills/setup/protocol/',
192
- `synced-at: ${new Date().toISOString()}`,
193
- 'source-commit: dorfl prd-to-spec',
194
- '',
195
- ].join('\n'));
196
- }
197
- return { docs, versionPath: versionRel };
198
- }
199
114
  // ───────────────────────────────────────────────────────────────────────────
200
115
  // Layer 3a: the FOLDER move (in lockstep with work-layout.ts).
201
116
  // ───────────────────────────────────────────────────────────────────────────
@@ -684,7 +599,10 @@ export function runPrdToSpec(options) {
684
599
  };
685
600
  }
686
601
  // 2. Setup contract re-sync FIRST (decision B).
687
- const resync = resyncProtocol(repoPath, { dryRun });
602
+ const resync = resyncProtocol(repoPath, {
603
+ dryRun,
604
+ sourceCommit: 'dorfl prd-to-spec',
605
+ });
688
606
  // 3a. Folders (git mv) — before content, so the content sweep also fixes the
689
607
  // moved items' own `work/prds/…` body refs in their NEW location.
690
608
  const folderMoves = migrateFolders(repoPath, migration, { dryRun });
@@ -1 +1 @@
1
- {"version":3,"file":"prd-to-spec.js","sourceRoot":"","sources":["../src/prd-to-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,WAAW,EACX,YAAY,EAEZ,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAC,MAAM,UAAU,CAAC;AACzC,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AA0FhD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,SAAS,GAAwB;IAC7C,IAAI,EAAE,KAAK;IACX,EAAE,EAAE,MAAM;IACV,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,OAAO;IACjB,UAAU,EAAE,CAAC,EAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,aAAa,EAAC,CAAC;CACrD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC/C,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,qBAAqB;IACrB,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EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;IAEnE,OAAO;QACN,MAAM;QACN,MAAM;QACN,WAAW;QACX,eAAe;QACf,cAAc;QACd,UAAU;QACV,KAAK;KACL,CAAC;AACH,CAAC"}
@@ -25,6 +25,27 @@ Task titles and descriptions use the project's domain glossary. Respect ADRs / f
25
25
 
26
26
  **Check the spec against reality first (drift = a needs-attention signal).** A spec is a launch snapshot and may have DRIFTED from what has since landed (`tasks/done/`, ADRs, sibling tasks). Before tasking, verify its assumptions still hold. If it has drifted such that tasking it as-is would emit tasks built on a false premise, do NOT task it: set `needsAnswers: true` on the spec with the discrepancy in its body (or fix a small certain factual error first). See WORK-CONTRACT.md "Drift is a needs-attention signal". Never emit tasks from a stale spec.
27
27
 
28
+ ### 2a. Task the spec ATOMICALLY, or SPLIT it, or REFRAME it as an EXPLORATION — NEVER task a subset
29
+
30
+ **A spec is tasked ATOMICALLY at its own scope: EVERY user story in it becomes a task now, or NONE does.** There is no "partially tasked" state — tasked-ness is RESIDENCE in `work/specs/tasked/` (the folder is the sole signal, WORK-CONTRACT.md "The spec lifecycle"), and a spec is only there iff ALL of it was tasked. Before you draft any tasks, run this **combined decision procedure** over the spec's user stories (the three branches are exhaustive — every spec resolves to exactly one):
31
+
32
+ 1. **Every story build-taskable now?** A story is build-taskable when it is a committed direction, with no unanswered question gating it, AND you actually know HOW to build it (a vertical tracer-bullet task would be real, not fiction). If EVERY story clears, task the whole spec atomically (proceed to §3).
33
+ 2. **Part gated / deferred / unanswered (mixed confidence tiers)?** A story that needs an unanswered question resolved, or is "direction, not commitment" (a gated-on-open-questions milestone, a "beyond v0" wishlist), is NOT taskable now. If SOME stories are build-taskable and others are gated, the spec is MIS-SCOPED: **STOP. Do NOT task the confident subset.** SPLIT the spec (below).
34
+ 3. **The WHOLE thing too big / too uncertain to build-task, even after splitting?** If you do not yet KNOW how to build it — the approach is unproven, the seam is unvalidated, a load-bearing library/fork is unpicked — then build tasks written now would be FICTION, and splitting only yields smaller specs that STILL are not confidently buildable. **STOP. Do NOT write speculative build tasks.** REFRAME the spec as an EXPLORATION spec (below).
35
+
36
+ **The split (branch 2).** Carve the spec into (a) a fully-build-taskable spec whose stories are ALL committed-and-answerable, and (b) a separate spec for the gated/deferred remainder, grouped logically. Task (a) atomically; leave (b) in `work/specs/ready/` with its open questions and `needsAnswers: true`. Where (b) depends on (a), add `taskedAfter: [<a-slug>]` to (b) so the ordering is recorded (atomicity is WITHIN a spec; cross-spec ORDER stays expressed by `taskedAfter:` — §3b). Authoring a spec whose stories span multiple confidence tiers is the mis-scope the `to-spec` skill's right-sizing check tries to catch UP FRONT; if it reached tasking un-split, splitting it here is the last line of defence. (If a split PIECE is itself too-big/uncertain, that piece takes branch 3.)
37
+
38
+ **The exploration reframe (branch 3).** A too-big/uncertain spec's honest atomically-taskable form is an **EXPLORATION spec**, NOT a smaller build spec. This is a first-class SPEC KIND (see ADR `exploration-vs-build-spec-kinds`), distinguished by its definition of DONE:
39
+
40
+ - A **build spec**'s "done" = the capability is SHIPPED (tasked atomically as vertical build tasks — the existing model).
41
+ - An **exploration spec**'s "done" = CONFIDENCE + a de-risked, sliced BUILD PLAN. Its stories are "reach confidence" stories, not "deliver the capability" stories: pin the seam/interface, spike the risky part on the NARROWEST real case, resolve the open questions into decisions, and emit the build plan. THAT is atomically taskable (a handful of "pin interface X", "spike Y on one case", "evaluate-and-recommend Z", "emit the build plan" tasks). The capability BUILD then becomes a FOLLOW-ON build spec, written AFTER the exploration says "yes, this way, and here is how" (ordered via `taskedAfter:` from the follow-on to the exploration).
42
+
43
+ The spike/pin/evaluate tasks an exploration emits ARE throwaway-code-that-answers-a-question in the sense of the `prototype` skill — reuse that vocabulary (a spike is a prototype scoped to one question on the narrowest real case; the ANSWER is the deliverable, captured into the build plan / an ADR, not the code). Do NOT invent a parallel spike vocabulary, and do NOT add a new folder or state: an exploration spec is STILL just a spec in `work/specs/`, tasked atomically like any other. The reframe is what stops a too-big BUILD ambition from ballooning into an un-taskable build spec that then gets partially tasked (the branch-2 failure) or tasked as fiction (the branch-3 failure).
44
+
45
+ **Why forbid the subset.** Tasking a confident subset and papering the rest over in prose FEELS like progress, but it silently commits the project to a SEQUENCING decision (build the easy part first) that should be made deliberately at the split, not by default. The prose note it forces ("the rest is NOT tasked") is exactly the half-state the binary folder taxonomy cannot represent — the signal that the spec was mis-scoped. The anti-pattern to recognise: a single spec mixing a committed "v0" milestone with a gated "beyond v0" direction behind open questions (see ADR `tasking-is-atomic-or-split-no-partial-tasked-state`); a related anti-pattern is a decade-scale "grow the whole capability" build spec whose approach is unproven — that one is branch 3, an exploration reframe.
46
+
47
+ **How the two paths enforce it.** The AUTO-tasker gate is already whole-spec: it refuses a spec that is `needsAnswers`/`humanOnly`, so a spec with any gated story (branch 2) or unresolved approach (branch 3, which carries open questions) is never auto-tasked — that whole-spec refusal IS the atomicity guarantee on the agent path. The HUMAN `to-task` path is UNBOUND by that gate, so this decision procedure is what makes the rule symmetric: a human must NOT task a subset (branch 2) and must NOT write fictional build tasks (branch 3) and move the spec to `tasked/` — split or reframe first.
48
+
28
49
  ### 3. Draft vertical tasks
29
50
 
30
51
  Each task is a **tracer bullet** — a thin vertical path through ALL layers end-to-end, not a horizontal cross-section of one layer.
@@ -79,7 +100,7 @@ The spec is a launch snapshot (see the `to-spec` skill). Now that the work is ta
79
100
  - The tasks now own _what to build_ (Implementation/Testing detail) — remove those sections from the spec.
80
101
  - Any **durable rationale** worth keeping (the _why_ of a decision) is RELOCATED to an ADR (`docs/adr/<slug>.md`), not deleted.
81
102
  - The spec settles to its durable framing: Problem / Solution / User Stories / Out of Scope (+ its launch-snapshot banner). Leave a one-line pointer that detail moved to tasks/ADRs.
82
- - **Move the spec to `work/specs/tasked/`** to record that it has been tasked: `git mv work/specs/<src>/<slug>.md work/specs/tasked/<slug>.md`, where `<src>` is the spec's CURRENT non-pool resting position — `ready` on the runner/dorfl path, but `proposed` on the human-driven path (a human MAY task a spec straight from `specs/proposed/` without first promoting it to `ready/`; doing so is deliberate — staging keeps it out of the auto-tasking pool so CI cannot race the human, and a forced `proposed → ready` pre-move would re-open exactly that race). The DESTINATION is always `tasked/` regardless of source. Transforming a spec into tasks MUST move it: residence in `work/specs/tasked/` IS tasked-ness (the build-machine `tasks/done/` analogue for specs, the sole signal); a tasked spec left in `proposed/`/`ready/` both lies about its state and stays auto-taskable (CI could re-fan-out). Do NOT add a `tasked:` frontmatter marker; the folder is the source of truth. (On the dorfl path `do spec:<slug>` performs this move itself as part of its runner-owned integration commit; this manual step is for the human-driven, no-lock tasking path.)
103
+ - **Move the spec to `work/specs/tasked/`** to record that it has been tasked: `git mv work/specs/<src>/<slug>.md work/specs/tasked/<slug>.md`, where `<src>` is the spec's CURRENT non-pool resting position. (Precondition: the spec was tasked ATOMICALLY every story became a task, per §2a — whether it was a BUILD spec or an EXPLORATION spec; both move atomically. `specs/tasked/` residence means the WHOLE spec was tasked; moving a subset-tasked spec here is the partial-tasking wart §2a forbids.) — `ready` on the runner/dorfl path, but `proposed` on the human-driven path (a human MAY task a spec straight from `specs/proposed/` without first promoting it to `ready/`; doing so is deliberate — staging keeps it out of the auto-tasking pool so CI cannot race the human, and a forced `proposed → ready` pre-move would re-open exactly that race). The DESTINATION is always `tasked/` regardless of source. Transforming a spec into tasks MUST move it: residence in `work/specs/tasked/` IS tasked-ness (the build-machine `tasks/done/` analogue for specs, the sole signal); a tasked spec left in `proposed/`/`ready/` both lies about its state and stays auto-taskable (CI could re-fan-out). Do NOT add a `tasked:` frontmatter marker; the folder is the source of truth. (On the dorfl path `do spec:<slug>` performs this move itself as part of its runner-owned integration commit; this manual step is for the human-driven, no-lock tasking path.)
83
104
 
84
105
  This is a hand-off transition, not ongoing maintenance — after this single trim the spec is stable because the stale-prone part was relocated, not because it is kept in sync. (Nothing is lost: detail → tasks; rationale → ADR.)
85
106
 
@@ -0,0 +1,73 @@
1
+ /**
2
+ * The **protocol re-sync** primitive: copy the package's canonical
3
+ * `work/protocol/*` docs into a target repo's `work/protocol/` and bump
4
+ * `work/protocol/VERSION`. This is the deterministic slice of what the `setup`
5
+ * skill does — the SINGLE source of truth for "make this repo carry the current
6
+ * protocol contract".
7
+ *
8
+ * Two verbs drive it:
9
+ * - `dorfl sync` — the standalone "get the latest protocol" command (a repo
10
+ * that adopted an OLD protocol picks up the new docs in one command);
11
+ * - `dorfl prd-to-spec` — the vocabulary-migration engine, which re-syncs the
12
+ * contract FIRST (before converting the repo's data) so the migrated repo
13
+ * lands on the new `spec` contract.
14
+ *
15
+ * It was lifted out of `prd-to-spec.ts` (where it began life) into this shared
16
+ * module so both verbs import ONE implementation; `prd-to-spec.ts` re-exports
17
+ * the symbols for backward compatibility.
18
+ */
19
+ /**
20
+ * The FULL set of protocol docs `setup` propagates into a repo's
21
+ * `work/protocol/`. The re-sync copies EACH from the package's canonical source
22
+ * (via {@link resolveProtocolDoc}) so a set-up repo carries the current
23
+ * contract. Kept in lockstep with `skills/setup/protocol/` (the source of truth)
24
+ * and the `vendor-protocol` build step (which vendors these into `dist/protocol/`
25
+ * so the published CLI is self-contained).
26
+ */
27
+ export declare const PROTOCOL_DOCS: readonly string[];
28
+ /** One protocol doc the re-sync copied (or WOULD copy under `--dry-run`). */
29
+ export interface ResyncedDoc {
30
+ /** The doc basename (e.g. `'WORK-CONTRACT.md'`). */
31
+ name: string;
32
+ /** Repo-relative destination (`work/protocol/<name>`). */
33
+ dest: string;
34
+ /** True when the target already had byte-identical content (a no-op copy). */
35
+ unchanged: boolean;
36
+ /**
37
+ * True when the doc's SOURCE could not be resolved (the package/dev copy is
38
+ * missing), so NOTHING was copied to `dest`. A skipped doc is NEVER counted as
39
+ * a change (it must not bump `VERSION` — the latent bug this field guards) and
40
+ * is surfaced LOUDLY by the caller. Distinct from `unchanged` (which means the
41
+ * source WAS resolved and matched the dest byte-for-byte).
42
+ */
43
+ skipped: boolean;
44
+ }
45
+ /** What the protocol re-sync did (or would do). */
46
+ export interface ResyncResult {
47
+ docs: ResyncedDoc[];
48
+ /** Repo-relative `work/protocol/VERSION` path (written unless dry-run). */
49
+ versionPath: string;
50
+ }
51
+ /**
52
+ * Re-sync the target repo's `work/protocol/*` from the package's canonical
53
+ * source (the deterministic part of the `setup` skill — copy the docs verbatim +
54
+ * bump `VERSION`). Resolves each doc's SOURCE via {@link resolveProtocolDoc} with
55
+ * NO `cwd`, so it reads the package-vendored (`dist/protocol/`) or dev-source
56
+ * (`skills/setup/protocol/`) copy — NEVER the target repo's own (old) copy. This
57
+ * is how a repo picks up the current contract. Idempotent: a doc already
58
+ * byte-identical is reported `unchanged`. A doc whose SOURCE cannot be resolved
59
+ * is reported `skipped` (NOT copied, NEVER a VERSION-bump) rather than silently
60
+ * bumping VERSION with nothing copied.
61
+ *
62
+ * `dryRun` reports what WOULD be copied without writing. `resolveDoc` overrides
63
+ * how a doc's source path is resolved (defaults to {@link resolveProtocolDoc});
64
+ * it exists so a test can force a non-resolvable source (a path that does not
65
+ * exist) to exercise the skip path. `sourceCommit` is stamped into the written
66
+ * `VERSION` provenance line so a reader can tell which verb wrote it.
67
+ */
68
+ export declare function resyncProtocol(repoPath: string, options?: {
69
+ dryRun?: boolean;
70
+ resolveDoc?: (name: string) => string;
71
+ sourceCommit?: string;
72
+ }): ResyncResult;
73
+ //# sourceMappingURL=resync-protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resync-protocol.d.ts","sourceRoot":"","sources":["../src/resync-protocol.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAS1C,CAAC;AAEF,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC3B,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,SAAS,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,OAAO,EAAE,OAAO,CAAC;CACjB;AAED,mDAAmD;AACnD,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,2EAA2E;IAC3E,WAAW,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAC7B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;CACjB,GACJ,YAAY,CA+Dd"}
@@ -0,0 +1,114 @@
1
+ import { existsSync, readFileSync, writeFileSync, copyFileSync, mkdirSync, } from 'node:fs';
2
+ import { join, relative, dirname } from 'node:path';
3
+ import { resolveProtocolDoc } from './prompt.js';
4
+ import { WORK_ROOT } from './work-layout.js';
5
+ /**
6
+ * The **protocol re-sync** primitive: copy the package's canonical
7
+ * `work/protocol/*` docs into a target repo's `work/protocol/` and bump
8
+ * `work/protocol/VERSION`. This is the deterministic slice of what the `setup`
9
+ * skill does — the SINGLE source of truth for "make this repo carry the current
10
+ * protocol contract".
11
+ *
12
+ * Two verbs drive it:
13
+ * - `dorfl sync` — the standalone "get the latest protocol" command (a repo
14
+ * that adopted an OLD protocol picks up the new docs in one command);
15
+ * - `dorfl prd-to-spec` — the vocabulary-migration engine, which re-syncs the
16
+ * contract FIRST (before converting the repo's data) so the migrated repo
17
+ * lands on the new `spec` contract.
18
+ *
19
+ * It was lifted out of `prd-to-spec.ts` (where it began life) into this shared
20
+ * module so both verbs import ONE implementation; `prd-to-spec.ts` re-exports
21
+ * the symbols for backward compatibility.
22
+ */
23
+ /**
24
+ * The FULL set of protocol docs `setup` propagates into a repo's
25
+ * `work/protocol/`. The re-sync copies EACH from the package's canonical source
26
+ * (via {@link resolveProtocolDoc}) so a set-up repo carries the current
27
+ * contract. Kept in lockstep with `skills/setup/protocol/` (the source of truth)
28
+ * and the `vendor-protocol` build step (which vendors these into `dist/protocol/`
29
+ * so the published CLI is self-contained).
30
+ */
31
+ export const PROTOCOL_DOCS = [
32
+ 'WORK-CONTRACT.md',
33
+ 'CLAIM-PROTOCOL.md',
34
+ 'REVIEW-PROTOCOL.md',
35
+ 'SURFACE-PROTOCOL.md',
36
+ 'TASKING-PROTOCOL.md',
37
+ 'ADR-FORMAT.md',
38
+ 'task-template.md',
39
+ 'spec-template.md',
40
+ ];
41
+ /**
42
+ * Re-sync the target repo's `work/protocol/*` from the package's canonical
43
+ * source (the deterministic part of the `setup` skill — copy the docs verbatim +
44
+ * bump `VERSION`). Resolves each doc's SOURCE via {@link resolveProtocolDoc} with
45
+ * NO `cwd`, so it reads the package-vendored (`dist/protocol/`) or dev-source
46
+ * (`skills/setup/protocol/`) copy — NEVER the target repo's own (old) copy. This
47
+ * is how a repo picks up the current contract. Idempotent: a doc already
48
+ * byte-identical is reported `unchanged`. A doc whose SOURCE cannot be resolved
49
+ * is reported `skipped` (NOT copied, NEVER a VERSION-bump) rather than silently
50
+ * bumping VERSION with nothing copied.
51
+ *
52
+ * `dryRun` reports what WOULD be copied without writing. `resolveDoc` overrides
53
+ * how a doc's source path is resolved (defaults to {@link resolveProtocolDoc});
54
+ * it exists so a test can force a non-resolvable source (a path that does not
55
+ * exist) to exercise the skip path. `sourceCommit` is stamped into the written
56
+ * `VERSION` provenance line so a reader can tell which verb wrote it.
57
+ */
58
+ export function resyncProtocol(repoPath, options = {}) {
59
+ const protocolDir = join(repoPath, WORK_ROOT, 'protocol');
60
+ const resolveDoc = options.resolveDoc ?? ((name) => resolveProtocolDoc(name));
61
+ const docs = [];
62
+ for (const name of PROTOCOL_DOCS) {
63
+ // Resolve the SOURCE (package/dev), never the target's adopted copy.
64
+ const source = resolveDoc(name);
65
+ const destAbs = join(protocolDir, name);
66
+ const destRel = relative(repoPath, destAbs);
67
+ const sourceExists = existsSync(source);
68
+ if (!sourceExists) {
69
+ // The source doc could not be resolved: copy NOTHING and record the doc as
70
+ // SKIPPED (never a change). This is the latent-bug fix: a non-resolvable
71
+ // source must not count as `changed` and bump `VERSION` while copying no
72
+ // file. `unchanged: false` here is honest (the dest was not made to match a
73
+ // source), but `skipped: true` keeps it OUT of the VERSION-bump tally.
74
+ docs.push({ name, dest: destRel, unchanged: false, skipped: true });
75
+ continue;
76
+ }
77
+ // Source resolved: a doc is CHANGED (VERSION-bump-worthy) only when the dest
78
+ // is absent OR its content differs from the source. An identical dest is a
79
+ // no-op copy (`unchanged`), so an already-synced re-run stays a true no-op.
80
+ const unchanged = existsSync(destAbs) &&
81
+ readFileSync(source, 'utf8') === readFileSync(destAbs, 'utf8');
82
+ if (!options.dryRun) {
83
+ mkdirSync(dirname(destAbs), { recursive: true });
84
+ copyFileSync(source, destAbs);
85
+ }
86
+ docs.push({ name, dest: destRel, unchanged, skipped: false });
87
+ }
88
+ const versionAbs = join(protocolDir, 'VERSION');
89
+ const versionRel = relative(repoPath, versionAbs);
90
+ // Bump VERSION only when a doc was ACTUALLY COPIED with new content, or when
91
+ // VERSION is absent AND at least one doc was genuinely synced (copied). A
92
+ // SKIPPED doc (unresolvable source, nothing copied) is NEVER a change —
93
+ // counting it would bump VERSION without copying a single doc (the latent bug),
94
+ // and the write-when-absent fallback must ALSO require a real copy so an
95
+ // all-skipped resync leaves no VERSION behind. A re-run on an already-synced
96
+ // repo must stay a true no-op — otherwise the (always-fresh) `synced-at`
97
+ // timestamp would dirty the tree on every idempotent re-run.
98
+ const anyDocChanged = docs.some((d) => !d.unchanged && !d.skipped);
99
+ const anyDocSynced = docs.some((d) => !d.skipped);
100
+ if (!options.dryRun &&
101
+ (anyDocChanged || (anyDocSynced && !existsSync(versionAbs)))) {
102
+ mkdirSync(dirname(versionAbs), { recursive: true });
103
+ const today = new Date().toISOString().slice(0, 10);
104
+ writeFileSync(versionAbs, [
105
+ `protocol-version: ${today}`,
106
+ 'synced-from: skills/setup/protocol/',
107
+ `synced-at: ${new Date().toISOString()}`,
108
+ `source-commit: ${options.sourceCommit ?? 'dorfl sync'}`,
109
+ '',
110
+ ].join('\n'));
111
+ }
112
+ return { docs, versionPath: versionRel };
113
+ }
114
+ //# sourceMappingURL=resync-protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resync-protocol.js","sourceRoot":"","sources":["../src/resync-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,SAAS,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAC,MAAM,WAAW,CAAC;AAClD,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAE3C;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC/C,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,qBAAqB;IACrB,qBAAqB;IACrB,eAAe;IACf,kBAAkB;IAClB,kBAAkB;CAClB,CAAC;AA2BF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,cAAc,CAC7B,QAAgB,EAChB,UAII,EAAE;IAEN,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IAC1D,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9E,MAAM,IAAI,GAAkB,EAAE,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;QAClC,qEAAqE;QACrE,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACxC,MAAM,OAAO,G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AAC,SAAS,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IACnE,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAClD,IACC,CAAC,OAAO,CAAC,MAAM;QACf,CAAC,aAAa,IAAI,CAAC,YAAY,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,EAC3D,CAAC;QACF,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;QAClD,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACpD,aAAa,CACZ,UAAU,EACV;YACC,qBAAqB,KAAK,EAAE;YAC5B,qCAAqC;YACrC,cAAc,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE;YACxC,kBAAkB,OAAO,CAAC,YAAY,IAAI,YAAY,EAAE;YACxD,EAAE;SACF,CAAC,IAAI,CAAC,IAAI,CAAC,CACZ,CAAC;IACH,CAAC;IAED,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAC,CAAC;AACxC,CAAC"}
@@ -37,7 +37,7 @@ An **ADR** (`docs/adr/`) records a **DECISION + its why** — the rejected optio
37
37
  `ls`/glob the repo first. For EACH artifact setup would write, if it ALREADY exists, do NOT overwrite — report it and leave it (or, for `dorfl.json` / `CONTEXT.md`, offer to MERGE-in only the missing keys/sections). Only CREATE what is missing. This is what makes setup safe to run on a populated repo and idempotent to re-run.
38
38
 
39
39
  - If `work/` already has the folders → skip them. **If `work/` is on the LEGACY FLAT layout** (top-level `backlog/` / `prd/` / `observations/` / … instead of the `notes/` / `tasks/` / `specs/` umbrellas) → do NOT silently scaffold a second, parallel tree beside it; surface it and offer the documented migration mapping (see A5b).
40
- - **`work/protocol/` is the ONE exception to never-clobber — it is protocol-owned, not repo-owned.** The repo's `work/` _items_ (tasks/specs/notes) are sacred and never touched; but the `work/protocol/` reference docs are verbatim copies setup owns, so re-running setup **re-syncs** them (overwrite with the current canonical copies + bump `work/protocol/VERSION`). This is how a repo picks up protocol updates. Never hand-edit `work/protocol/<doc>` in a target repo — edits belong in setup's canonical `protocol/` source and propagate via re-sync.
40
+ - **`work/protocol/` is the ONE exception to never-clobber — it is protocol-owned, not repo-owned.** The repo's `work/` _items_ (tasks/specs/notes) are sacred and never touched; but the `work/protocol/` reference docs are verbatim copies setup owns, so re-running setup **re-syncs** them (overwrite with the current canonical copies + bump `work/protocol/VERSION`). This is how a repo picks up protocol updates. (If `dorfl` is installed, `dorfl sync` is the focused, non-interactive way to do JUST this re-sync — no re-scan/conversation — and can additionally `--add-skills` to refresh the operator's packaged skills.) Never hand-edit `work/protocol/<doc>` in a target repo — edits belong in setup's canonical `protocol/` source and propagate via re-sync.
41
41
  - If `CONTEXT.md` exists → do not overwrite; offer to APPEND a "domain terms" section if absent, else leave it.
42
42
  - If `dorfl.json` exists → do not overwrite; report its `verify`/`harness` and offer to fill only ABSENT keys.
43
43
  - **Detect Phase B material — do NOT skip dotfolders that might hold meaningful content.** While inventorying, note any **convertible material**: a `tasks/` folder, a `TODO.md`, an issue-tracker export, `docs/` design notes / RFCs, plan files, and **substantial source code** (code that embodies decisions). A plain `ls` of the visible top level is NOT enough: a hidden (dot-prefixed) folder can hold real sources (design docs, plans, tasks, notes), and a missed source is silently under-routed (a rich design doc that should be a spec never gets seen). So look inside dotfolders too, and judge each by whether it _could plausibly contain documents/plans/notes_ worth converting. **Skip only the noise** — `.git/`, `node_modules/` and other dependency dirs, build output, and anything `.gitignore`d are never sources. This detection decides whether Phase B runs (see A4 / Phase B). A repo with only a README that says "clean slate" (or nothing) → Phase B is empty; finish after Phase A.
@@ -25,6 +25,27 @@ Task titles and descriptions use the project's domain glossary. Respect ADRs / f
25
25
 
26
26
  **Check the spec against reality first (drift = a needs-attention signal).** A spec is a launch snapshot and may have DRIFTED from what has since landed (`tasks/done/`, ADRs, sibling tasks). Before tasking, verify its assumptions still hold. If it has drifted such that tasking it as-is would emit tasks built on a false premise, do NOT task it: set `needsAnswers: true` on the spec with the discrepancy in its body (or fix a small certain factual error first). See WORK-CONTRACT.md "Drift is a needs-attention signal". Never emit tasks from a stale spec.
27
27
 
28
+ ### 2a. Task the spec ATOMICALLY, or SPLIT it, or REFRAME it as an EXPLORATION — NEVER task a subset
29
+
30
+ **A spec is tasked ATOMICALLY at its own scope: EVERY user story in it becomes a task now, or NONE does.** There is no "partially tasked" state — tasked-ness is RESIDENCE in `work/specs/tasked/` (the folder is the sole signal, WORK-CONTRACT.md "The spec lifecycle"), and a spec is only there iff ALL of it was tasked. Before you draft any tasks, run this **combined decision procedure** over the spec's user stories (the three branches are exhaustive — every spec resolves to exactly one):
31
+
32
+ 1. **Every story build-taskable now?** A story is build-taskable when it is a committed direction, with no unanswered question gating it, AND you actually know HOW to build it (a vertical tracer-bullet task would be real, not fiction). If EVERY story clears, task the whole spec atomically (proceed to §3).
33
+ 2. **Part gated / deferred / unanswered (mixed confidence tiers)?** A story that needs an unanswered question resolved, or is "direction, not commitment" (a gated-on-open-questions milestone, a "beyond v0" wishlist), is NOT taskable now. If SOME stories are build-taskable and others are gated, the spec is MIS-SCOPED: **STOP. Do NOT task the confident subset.** SPLIT the spec (below).
34
+ 3. **The WHOLE thing too big / too uncertain to build-task, even after splitting?** If you do not yet KNOW how to build it — the approach is unproven, the seam is unvalidated, a load-bearing library/fork is unpicked — then build tasks written now would be FICTION, and splitting only yields smaller specs that STILL are not confidently buildable. **STOP. Do NOT write speculative build tasks.** REFRAME the spec as an EXPLORATION spec (below).
35
+
36
+ **The split (branch 2).** Carve the spec into (a) a fully-build-taskable spec whose stories are ALL committed-and-answerable, and (b) a separate spec for the gated/deferred remainder, grouped logically. Task (a) atomically; leave (b) in `work/specs/ready/` with its open questions and `needsAnswers: true`. Where (b) depends on (a), add `taskedAfter: [<a-slug>]` to (b) so the ordering is recorded (atomicity is WITHIN a spec; cross-spec ORDER stays expressed by `taskedAfter:` — §3b). Authoring a spec whose stories span multiple confidence tiers is the mis-scope the `to-spec` skill's right-sizing check tries to catch UP FRONT; if it reached tasking un-split, splitting it here is the last line of defence. (If a split PIECE is itself too-big/uncertain, that piece takes branch 3.)
37
+
38
+ **The exploration reframe (branch 3).** A too-big/uncertain spec's honest atomically-taskable form is an **EXPLORATION spec**, NOT a smaller build spec. This is a first-class SPEC KIND (see ADR `exploration-vs-build-spec-kinds`), distinguished by its definition of DONE:
39
+
40
+ - A **build spec**'s "done" = the capability is SHIPPED (tasked atomically as vertical build tasks — the existing model).
41
+ - An **exploration spec**'s "done" = CONFIDENCE + a de-risked, sliced BUILD PLAN. Its stories are "reach confidence" stories, not "deliver the capability" stories: pin the seam/interface, spike the risky part on the NARROWEST real case, resolve the open questions into decisions, and emit the build plan. THAT is atomically taskable (a handful of "pin interface X", "spike Y on one case", "evaluate-and-recommend Z", "emit the build plan" tasks). The capability BUILD then becomes a FOLLOW-ON build spec, written AFTER the exploration says "yes, this way, and here is how" (ordered via `taskedAfter:` from the follow-on to the exploration).
42
+
43
+ The spike/pin/evaluate tasks an exploration emits ARE throwaway-code-that-answers-a-question in the sense of the `prototype` skill — reuse that vocabulary (a spike is a prototype scoped to one question on the narrowest real case; the ANSWER is the deliverable, captured into the build plan / an ADR, not the code). Do NOT invent a parallel spike vocabulary, and do NOT add a new folder or state: an exploration spec is STILL just a spec in `work/specs/`, tasked atomically like any other. The reframe is what stops a too-big BUILD ambition from ballooning into an un-taskable build spec that then gets partially tasked (the branch-2 failure) or tasked as fiction (the branch-3 failure).
44
+
45
+ **Why forbid the subset.** Tasking a confident subset and papering the rest over in prose FEELS like progress, but it silently commits the project to a SEQUENCING decision (build the easy part first) that should be made deliberately at the split, not by default. The prose note it forces ("the rest is NOT tasked") is exactly the half-state the binary folder taxonomy cannot represent — the signal that the spec was mis-scoped. The anti-pattern to recognise: a single spec mixing a committed "v0" milestone with a gated "beyond v0" direction behind open questions (see ADR `tasking-is-atomic-or-split-no-partial-tasked-state`); a related anti-pattern is a decade-scale "grow the whole capability" build spec whose approach is unproven — that one is branch 3, an exploration reframe.
46
+
47
+ **How the two paths enforce it.** The AUTO-tasker gate is already whole-spec: it refuses a spec that is `needsAnswers`/`humanOnly`, so a spec with any gated story (branch 2) or unresolved approach (branch 3, which carries open questions) is never auto-tasked — that whole-spec refusal IS the atomicity guarantee on the agent path. The HUMAN `to-task` path is UNBOUND by that gate, so this decision procedure is what makes the rule symmetric: a human must NOT task a subset (branch 2) and must NOT write fictional build tasks (branch 3) and move the spec to `tasked/` — split or reframe first.
48
+
28
49
  ### 3. Draft vertical tasks
29
50
 
30
51
  Each task is a **tracer bullet** — a thin vertical path through ALL layers end-to-end, not a horizontal cross-section of one layer.
@@ -79,7 +100,7 @@ The spec is a launch snapshot (see the `to-spec` skill). Now that the work is ta
79
100
  - The tasks now own _what to build_ (Implementation/Testing detail) — remove those sections from the spec.
80
101
  - Any **durable rationale** worth keeping (the _why_ of a decision) is RELOCATED to an ADR (`docs/adr/<slug>.md`), not deleted.
81
102
  - The spec settles to its durable framing: Problem / Solution / User Stories / Out of Scope (+ its launch-snapshot banner). Leave a one-line pointer that detail moved to tasks/ADRs.
82
- - **Move the spec to `work/specs/tasked/`** to record that it has been tasked: `git mv work/specs/<src>/<slug>.md work/specs/tasked/<slug>.md`, where `<src>` is the spec's CURRENT non-pool resting position — `ready` on the runner/dorfl path, but `proposed` on the human-driven path (a human MAY task a spec straight from `specs/proposed/` without first promoting it to `ready/`; doing so is deliberate — staging keeps it out of the auto-tasking pool so CI cannot race the human, and a forced `proposed → ready` pre-move would re-open exactly that race). The DESTINATION is always `tasked/` regardless of source. Transforming a spec into tasks MUST move it: residence in `work/specs/tasked/` IS tasked-ness (the build-machine `tasks/done/` analogue for specs, the sole signal); a tasked spec left in `proposed/`/`ready/` both lies about its state and stays auto-taskable (CI could re-fan-out). Do NOT add a `tasked:` frontmatter marker; the folder is the source of truth. (On the dorfl path `do spec:<slug>` performs this move itself as part of its runner-owned integration commit; this manual step is for the human-driven, no-lock tasking path.)
103
+ - **Move the spec to `work/specs/tasked/`** to record that it has been tasked: `git mv work/specs/<src>/<slug>.md work/specs/tasked/<slug>.md`, where `<src>` is the spec's CURRENT non-pool resting position. (Precondition: the spec was tasked ATOMICALLY every story became a task, per §2a — whether it was a BUILD spec or an EXPLORATION spec; both move atomically. `specs/tasked/` residence means the WHOLE spec was tasked; moving a subset-tasked spec here is the partial-tasking wart §2a forbids.) — `ready` on the runner/dorfl path, but `proposed` on the human-driven path (a human MAY task a spec straight from `specs/proposed/` without first promoting it to `ready/`; doing so is deliberate — staging keeps it out of the auto-tasking pool so CI cannot race the human, and a forced `proposed → ready` pre-move would re-open exactly that race). The DESTINATION is always `tasked/` regardless of source. Transforming a spec into tasks MUST move it: residence in `work/specs/tasked/` IS tasked-ness (the build-machine `tasks/done/` analogue for specs, the sole signal); a tasked spec left in `proposed/`/`ready/` both lies about its state and stays auto-taskable (CI could re-fan-out). Do NOT add a `tasked:` frontmatter marker; the folder is the source of truth. (On the dorfl path `do spec:<slug>` performs this move itself as part of its runner-owned integration commit; this manual step is for the human-driven, no-lock tasking path.)
83
104
 
84
105
  This is a hand-off transition, not ongoing maintenance — after this single trim the spec is stable because the stale-prone part was relocated, not because it is kept in sync. (Nothing is lost: detail → tasks; rationale → ADR.)
85
106
 
@@ -28,6 +28,8 @@ Put a one-line banner at the top of every spec you write:
28
28
  - **`humanOnly` (DECIDED):** set `humanOnly: true` on the spec ONLY to mean "a human must drive the TASKING of this spec" (its sole effect: an agent may not auto-task it). This is DISJOINT from any task's `humanOnly` — it does NOT propagate to or guide the gates of the tasks it produces (a `humanOnly` spec can yield fully agent-buildable tasks). Describe judgement-heavy areas in prose as ordinary domain context, but do NOT treat the spec flag as a way to pre-set task gates (the tasker decides each task's gate from that task's own build-nature — see the `to-task` skill §3b).
29
29
  - **`needsAnswers` (DISCOVERED):** if the conversation did NOT fully resolve the spec, set `needsAnswers: true` and **list the open questions in the spec body** — the auto-tasker refuses to task until they are answered and the flag cleared. Be honest: flag an incomplete spec rather than let it produce wrongly-cut tasks. Omit both flags when everything is resolved and agent-taskable.
30
30
  - If this spec's tasks will depend on another spec's tasks, set `taskedAfter: [other-spec]` so it is tasked in the right order. With auto-tasking the ordering must be pre-recorded here OR honestly flagged, since there may be no human at tasking time to supply it.
31
+ - **Right-size the spec: one confidence tier per spec (author the split UP FRONT).** A spec is tasked ATOMICALLY — every story becomes a task, or none does (a spec that can only be partially tasked is MIS-SCOPED and gets SPLIT at tasking time; see the `to-task` skill §2a and ADR `tasking-is-atomic-or-split-no-partial-tasked-state`). So do NOT author one spec whose stories span multiple confidence tiers (a committed "v0" milestone PLUS a gated "beyond v0" direction behind open questions). Write the committed slice as its own fully-taskable spec and the gated remainder as a SEPARATE spec (`needsAnswers: true`, with its open questions, ordered via `taskedAfter:` where it depends on the committed one) — or, if you cannot cleanly split now, flag the spec explicitly as a split candidate in its body. Catching the mis-scope here (at authoring) is cheaper than forcing the split at tasking.
32
+ - **Choose the spec KIND by its definition of DONE — author an EXPLORATION spec when the ambition is too big/uncertain to build-task (ADR `exploration-vs-build-spec-kinds`).** A **build spec**'s done = the capability is SHIPPED (vertical build tasks — the default). An **exploration spec**'s done = CONFIDENCE + a de-risked, sliced build plan. If you do NOT yet know HOW to build the thing (the approach is unproven, the seam unvalidated, a load-bearing library/fork unpicked), do NOT author a build spec whose tasks would be fiction: author an EXPLORATION spec instead — confidence-scoped stories (pin the seam, spike the risky part on the NARROWEST real case, evaluate-and-recommend the fork, resolve the open questions) plus an explicit "emit the build plan" story — and leave the capability BUILD to a follow-on build spec the exploration de-risks (ordered via `taskedAfter:`). Reuse the `prototype` skill vocabulary for the spikes (a spike is a prototype scoped to one question; the ANSWER is the deliverable, not the code). Signal the kind in the slug (e.g. an `explore-*` prefix). An exploration spec is STILL just a spec — no new folder or state.
31
33
 
32
34
  4. **Write** the spec to `work/specs/ready/<slug>.md` using [spec-template.md](work/protocol/spec-template.md), content-derived slug. Create `work/specs/ready/` lazily if absent.
33
35
 
@@ -13,7 +13,7 @@ This skill stays **user-invoked** (`disable-model-invocation: true`): unlike `re
13
13
  ## How to use
14
14
 
15
15
  1. Read `work/protocol/TASKING-PROTOCOL.md` in the repo you are working in.
16
- 2. Apply its discipline to the source `work/specs/ready/<slug>.md` (or design doc / plan): explore the codebase, draft the vertical tasks, quiz the user (or do the confidence check if no human is present), and write the task files under `work/tasks/backlog/`.
17
- 3. Trim the spec to its durable framing and move it `work/specs/ready/ → work/specs/tasked/` (the one-time hand-off transition the doc describes).
16
+ 2. Apply its discipline to the source `work/specs/ready/<slug>.md` (or design doc / plan): explore the codebase, run the **§2a decision procedure** (task the WHOLE spec or none of it: every story build-taskable → task; part gated/mixed confidence → SPLIT; whole thing too big/uncertain to build-task → REFRAME as an EXPLORATION spec whose done is confidence + a build plan — never task a subset or write fictional build tasks), draft the vertical tasks, quiz the user (or do the confidence check if no human is present), and write the task files under `work/tasks/backlog/`.
17
+ 3. Trim the spec to its durable framing and move it `work/specs/ready/ → work/specs/tasked/` (the one-time hand-off transition the doc describes). Only move a spec that was tasked ATOMICALLY — `specs/tasked/` residence means the WHOLE spec was tasked (§2a).
18
18
 
19
19
  > Why the standard lives in `work/protocol/`: a discipline the autonomous runner invokes BY NAME (the `do spec:<slug>` tasking path reads it via `resolveProtocolDoc`) must be in-band in every set-up repo, not host-installed. Operator skills (this file) are human-facing and not copied.
@@ -1 +1 @@
1
- {"version":3,"file":"tasking.d.ts","sourceRoot":"","sources":["../src/tasking.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAKpD,OAAO,EAGN,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,E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E,MAAM,CAAC,UAAU,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IAC7B,8CAA8C;IAC9C,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAID;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,QAAiC,CAAC;AA0C/D;;;;;GAKG;AACH,wBAAsB,WAAW,CAChC,OAAO,EAAE,kBAAkB,GACzB,OAAO,CAAC,UAAU,CAAC,CAobrB;AAwoBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CACxC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,MAAM,GAAG,SAAS,CAoEpB"}
package/dist/tasking.js CHANGED
@@ -878,6 +878,21 @@ function buildTaskingSpec(slug, _spec) {
878
878
  `rather than guessing — or, if the whole decomposition is unclear, stop and`,
879
879
  `route the spec to needs-attention with the questions.`,
880
880
  ``,
881
+ `Task the spec ATOMICALLY or NOT AT ALL (\`TASKING-PROTOCOL.md\` §2a): run the`,
882
+ `COMPLETENESS CHECK across the spec's user stories FIRST — a three-branch`,
883
+ `decision. Every story becomes a task now, or NONE does; there is no "partially`,
884
+ `tasked" state. (1) EVERY story build-taskable now (committed, answered, and you`,
885
+ `know HOW to build it) — task the whole spec. (2) SOME stories gated / deferred /`,
886
+ `unanswered (mixed confidence) — the spec is MIS-SCOPED: do NOT task the confident`,
887
+ `subset; it must be SPLIT (a fully-taskable spec plus a separate spec for the`,
888
+ `gated remainder). (3) The WHOLE thing too big / too uncertain to build-task even`,
889
+ `after splitting (you do NOT yet know HOW to build it) — do NOT write FICTIONAL`,
890
+ `build tasks; it must be REFRAMED as an EXPLORATION spec whose "done" is`,
891
+ `confidence + a de-risked build plan (pin the seam, spike the risky part on one`,
892
+ `case, resolve the questions, emit the plan). In BOTH the split and the reframe`,
893
+ `case, emit NO tasks: stop and route the spec to needs-attention with the reason`,
894
+ `(a human authors the split / exploration reframe).`,
895
+ ``,
881
896
  `WRITE EVERY emitted task file under \`${STAGED_TASKS_DIR}/\` (the STAGING folder)`,
882
897
  `— NEVER \`work/tasks/ready/\`. \`work/tasks/ready/\` is the agent-eligible POOL and`,
883
898
  `the runner owns the runner/human-only promotion into it; the tasker's staging`,