@sockulags/agent-os 0.11.0 → 0.12.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.
Files changed (43) hide show
  1. package/README.md +155 -127
  2. package/cli/index.mjs +1022 -735
  3. package/cli/index.test.mjs +574 -300
  4. package/hooks/hooks.json +17 -0
  5. package/package.json +34 -32
  6. package/policy.md +47 -45
  7. package/skills/batch-work/SKILL.md +43 -43
  8. package/skills/batch-work/agents/openai.yaml +2 -2
  9. package/skills/batch-work/references/manifest.md +100 -100
  10. package/skills/batch-work/scripts/manifest-hash.mjs +263 -263
  11. package/skills/batch-work/scripts/test-manifest-hash.mjs +132 -132
  12. package/skills/chart-work/SKILL.md +37 -37
  13. package/skills/chart-work/references/elicitation.md +25 -25
  14. package/skills/chart-work/references/map.md +84 -84
  15. package/skills/chart-work/references/prototypes.md +21 -21
  16. package/skills/check-work/SKILL.md +61 -0
  17. package/skills/deliver-work/SKILL.md +12 -12
  18. package/skills/deliver-work/workflow.md +119 -113
  19. package/skills/diagnose-before-fix/SKILL.md +24 -24
  20. package/skills/dispatch-next/SKILL.md +28 -28
  21. package/skills/init-agent-os/SKILL.md +54 -39
  22. package/skills/init-agent-os/references/repository-init.md +74 -0
  23. package/skills/init-agent-os/scripts/policy-block.ps1 +87 -87
  24. package/skills/list-skills/SKILL.md +43 -42
  25. package/skills/list-skills/agents/openai.yaml +2 -2
  26. package/skills/plain-voice/SKILL.md +39 -0
  27. package/skills/plain-voice/references/tells.md +82 -0
  28. package/skills/proportional-testing/SKILL.md +30 -30
  29. package/skills/proportional-testing/references/strategy.md +75 -75
  30. package/skills/quality-ratchet/SKILL.md +50 -0
  31. package/skills/quality-ratchet/scripts/quality-delta.mjs +752 -0
  32. package/skills/quality-ratchet/scripts/quality-delta.test.mjs +514 -0
  33. package/skills/scope-guard/SKILL.md +21 -21
  34. package/skills/shape-work/SKILL.md +39 -39
  35. package/skills/shape-work/references/implementation-issues.md +69 -69
  36. package/skills/shape-work/references/mockups.md +23 -23
  37. package/skills/simplifier/SKILL.md +34 -34
  38. package/skills/simplifier/agents/openai.yaml +2 -2
  39. package/skills/simplifier-audit/SKILL.md +28 -28
  40. package/skills/simplifier-audit/agents/openai.yaml +2 -2
  41. package/skills/simplifier-review/SKILL.md +36 -29
  42. package/skills/verify-before-done/SKILL.md +29 -29
  43. package/skills/writing-skills/SKILL.md +68 -68
@@ -1,132 +1,132 @@
1
- #!/usr/bin/env node
2
-
3
- import assert from 'node:assert/strict'
4
- import fs from 'node:fs'
5
- import os from 'node:os'
6
- import path from 'node:path'
7
- import { spawnSync } from 'node:child_process'
8
- import { fileURLToPath } from 'node:url'
9
- import { checkManifest, hashManifest, hashTask, parseCursor, parseManifest } from './manifest-hash.mjs'
10
-
11
- function task(key, dependencies = []) {
12
- return {
13
- task_key: key,
14
- source: 'spec.md',
15
- dependencies,
16
- scope: [`src/${key}/`],
17
- outcome: `Implement ${key}`,
18
- non_goals: ['Unrelated cleanup'],
19
- checks: [`test ${key}`],
20
- task_hash: ''
21
- }
22
- }
23
-
24
- function plan() {
25
- return {
26
- baseline_sha: 'abc123',
27
- integration_branch: 'batch/demo',
28
- max_workers: 2,
29
- retry_limit: 1,
30
- integration_strategy: 'serial cherry-pick',
31
- aggregate_checks: ['npm test']
32
- }
33
- }
34
-
35
- function manifest(tasks, status = 'planned', cursorExtras = {}) {
36
- const batchPlan = plan()
37
- const taskHashes = Object.fromEntries(tasks.map((value) => [value.task_key, hashTask(value)]))
38
- const complete = tasks.map((value) => ({ ...value, task_hash: taskHashes[value.task_key] }))
39
- const manifestHash = hashManifest('demo-batch', batchPlan, complete)
40
- const runtime = {
41
- tasks: complete.map((value) => ({
42
- task_key: value.task_key,
43
- state: 'pending',
44
- attempt: 0,
45
- branch: '',
46
- worktree: '',
47
- worker_id: '',
48
- head_sha: '',
49
- result: ''
50
- }))
51
- }
52
- const cursor = {
53
- agent_os_batch: '2',
54
- batch_id: 'demo-batch',
55
- status,
56
- next_action: status === 'delivered' ? '' : 'dispatch-frontier',
57
- manifest_hash: manifestHash,
58
- ...cursorExtras
59
- }
60
- const frontmatter = Object.entries(cursor).map(([key, value]) => `${key}: "${value}"`).join('\n')
61
- const taskBlocks = complete.map((value) => `\`\`\`json batch-task\n${JSON.stringify(value, null, 2)}\n\`\`\``).join('\n\n')
62
- return `---\n${frontmatter}\n---\n\n\`\`\`json batch-plan\n${JSON.stringify(batchPlan, null, 2)}\n\`\`\`\n\n${taskBlocks}\n\n\`\`\`json batch-runtime\n${JSON.stringify(runtime, null, 2)}\n\`\`\`\n`
63
- }
64
-
65
- function rewriteRuntime(content, update) {
66
- return content.replace(/```json batch-runtime\n([\s\S]*?)\n```/, (_match, json) => {
67
- const runtime = JSON.parse(json)
68
- update(runtime)
69
- return `\`\`\`json batch-runtime\n${JSON.stringify(runtime, null, 2)}\n\`\`\``
70
- })
71
- }
72
-
73
- const alpha = task('alpha')
74
- const beta = task('beta', ['alpha'])
75
- const valid = manifest([alpha, beta])
76
- assert.deepEqual(checkManifest(valid).mismatches, [])
77
- assert.equal(parseManifest(valid).tasks.length, 2)
78
- assert.equal(parseCursor(valid).status, 'planned')
79
-
80
- assert.equal(hashTask(alpha), hashTask({ ...alpha, task_hash: 'ignored' }))
81
- assert.notEqual(hashTask(alpha), hashTask({ ...alpha, outcome: 'Changed outcome' }))
82
- assert.equal(
83
- hashManifest('demo-batch', plan(), [alpha, beta]),
84
- hashManifest('demo-batch', plan(), [beta, alpha]),
85
- 'task order must not affect aggregate hash'
86
- )
87
-
88
- assert.throws(() => parseCursor(valid.replace('status: "planned"', 'status: "planned"\nstatus: "running"')), /duplicate cursor/)
89
- assert.throws(() => parseManifest(valid.replace('"dependencies": []', '"dependencies": ["missing"]')), /unknown dependency/)
90
- assert.throws(() => parseManifest(manifest([task('alpha', ['beta']), task('beta', ['alpha'])])), /dependency cycle/)
91
-
92
- const activeWithoutWorkspace = rewriteRuntime(valid, (runtime) => {
93
- runtime.tasks[0].state = 'running'
94
- runtime.tasks[0].attempt = 1
95
- })
96
- assert.throws(() => parseManifest(activeWithoutWorkspace), /requires attempt, branch, and worktree/)
97
-
98
- const absoluteWorktree = rewriteRuntime(valid, (runtime) => {
99
- Object.assign(runtime.tasks[0], {
100
- state: 'ready',
101
- attempt: 1,
102
- branch: 'task/alpha',
103
- worktree: 'C:\\temp\\alpha'
104
- })
105
- })
106
- assert.throws(() => parseManifest(absoluteWorktree), /worktree must be portable/)
107
-
108
- const blockedDependency = rewriteRuntime(valid, (runtime) => {
109
- Object.assign(runtime.tasks[1], {
110
- state: 'ready',
111
- attempt: 1,
112
- branch: 'task/beta',
113
- worktree: 'worktrees/beta'
114
- })
115
- })
116
- assert.throws(() => parseManifest(blockedDependency), /dependency alpha is not integrated/)
117
-
118
- const staleHash = valid.replace(/task_hash": "[a-f0-9]+"/, 'task_hash": "stale"')
119
- assert(checkManifest(staleHash).mismatches.includes('alpha: task_hash mismatch'))
120
-
121
- const temporary = fs.mkdtempSync(path.join(os.tmpdir(), 'agent-os-batch-'))
122
- try {
123
- const file = path.join(temporary, 'manifest.md')
124
- fs.writeFileSync(file, valid)
125
- const script = path.resolve(path.dirname(fileURLToPath(import.meta.url)), 'manifest-hash.mjs')
126
- const result = spawnSync(process.execPath, [script, '--check', file], { encoding: 'utf8' })
127
- assert.equal(result.status, 0, result.stderr)
128
- } finally {
129
- fs.rmSync(temporary, { recursive: true, force: true })
130
- }
131
-
132
- console.log('batch manifest tests passed.')
1
+ #!/usr/bin/env node
2
+
3
+ import assert from 'node:assert/strict'
4
+ import fs from 'node:fs'
5
+ import os from 'node:os'
6
+ import path from 'node:path'
7
+ import { spawnSync } from 'node:child_process'
8
+ import { fileURLToPath } from 'node:url'
9
+ import { checkManifest, hashManifest, hashTask, parseCursor, parseManifest } from './manifest-hash.mjs'
10
+
11
+ function task(key, dependencies = []) {
12
+ return {
13
+ task_key: key,
14
+ source: 'spec.md',
15
+ dependencies,
16
+ scope: [`src/${key}/`],
17
+ outcome: `Implement ${key}`,
18
+ non_goals: ['Unrelated cleanup'],
19
+ checks: [`test ${key}`],
20
+ task_hash: ''
21
+ }
22
+ }
23
+
24
+ function plan() {
25
+ return {
26
+ baseline_sha: 'abc123',
27
+ integration_branch: 'batch/demo',
28
+ max_workers: 2,
29
+ retry_limit: 1,
30
+ integration_strategy: 'serial cherry-pick',
31
+ aggregate_checks: ['npm test']
32
+ }
33
+ }
34
+
35
+ function manifest(tasks, status = 'planned', cursorExtras = {}) {
36
+ const batchPlan = plan()
37
+ const taskHashes = Object.fromEntries(tasks.map((value) => [value.task_key, hashTask(value)]))
38
+ const complete = tasks.map((value) => ({ ...value, task_hash: taskHashes[value.task_key] }))
39
+ const manifestHash = hashManifest('demo-batch', batchPlan, complete)
40
+ const runtime = {
41
+ tasks: complete.map((value) => ({
42
+ task_key: value.task_key,
43
+ state: 'pending',
44
+ attempt: 0,
45
+ branch: '',
46
+ worktree: '',
47
+ worker_id: '',
48
+ head_sha: '',
49
+ result: ''
50
+ }))
51
+ }
52
+ const cursor = {
53
+ agent_os_batch: '2',
54
+ batch_id: 'demo-batch',
55
+ status,
56
+ next_action: status === 'delivered' ? '' : 'dispatch-frontier',
57
+ manifest_hash: manifestHash,
58
+ ...cursorExtras
59
+ }
60
+ const frontmatter = Object.entries(cursor).map(([key, value]) => `${key}: "${value}"`).join('\n')
61
+ const taskBlocks = complete.map((value) => `\`\`\`json batch-task\n${JSON.stringify(value, null, 2)}\n\`\`\``).join('\n\n')
62
+ return `---\n${frontmatter}\n---\n\n\`\`\`json batch-plan\n${JSON.stringify(batchPlan, null, 2)}\n\`\`\`\n\n${taskBlocks}\n\n\`\`\`json batch-runtime\n${JSON.stringify(runtime, null, 2)}\n\`\`\`\n`
63
+ }
64
+
65
+ function rewriteRuntime(content, update) {
66
+ return content.replace(/```json batch-runtime\n([\s\S]*?)\n```/, (_match, json) => {
67
+ const runtime = JSON.parse(json)
68
+ update(runtime)
69
+ return `\`\`\`json batch-runtime\n${JSON.stringify(runtime, null, 2)}\n\`\`\``
70
+ })
71
+ }
72
+
73
+ const alpha = task('alpha')
74
+ const beta = task('beta', ['alpha'])
75
+ const valid = manifest([alpha, beta])
76
+ assert.deepEqual(checkManifest(valid).mismatches, [])
77
+ assert.equal(parseManifest(valid).tasks.length, 2)
78
+ assert.equal(parseCursor(valid).status, 'planned')
79
+
80
+ assert.equal(hashTask(alpha), hashTask({ ...alpha, task_hash: 'ignored' }))
81
+ assert.notEqual(hashTask(alpha), hashTask({ ...alpha, outcome: 'Changed outcome' }))
82
+ assert.equal(
83
+ hashManifest('demo-batch', plan(), [alpha, beta]),
84
+ hashManifest('demo-batch', plan(), [beta, alpha]),
85
+ 'task order must not affect aggregate hash'
86
+ )
87
+
88
+ assert.throws(() => parseCursor(valid.replace('status: "planned"', 'status: "planned"\nstatus: "running"')), /duplicate cursor/)
89
+ assert.throws(() => parseManifest(valid.replace('"dependencies": []', '"dependencies": ["missing"]')), /unknown dependency/)
90
+ assert.throws(() => parseManifest(manifest([task('alpha', ['beta']), task('beta', ['alpha'])])), /dependency cycle/)
91
+
92
+ const activeWithoutWorkspace = rewriteRuntime(valid, (runtime) => {
93
+ runtime.tasks[0].state = 'running'
94
+ runtime.tasks[0].attempt = 1
95
+ })
96
+ assert.throws(() => parseManifest(activeWithoutWorkspace), /requires attempt, branch, and worktree/)
97
+
98
+ const absoluteWorktree = rewriteRuntime(valid, (runtime) => {
99
+ Object.assign(runtime.tasks[0], {
100
+ state: 'ready',
101
+ attempt: 1,
102
+ branch: 'task/alpha',
103
+ worktree: 'C:\\temp\\alpha'
104
+ })
105
+ })
106
+ assert.throws(() => parseManifest(absoluteWorktree), /worktree must be portable/)
107
+
108
+ const blockedDependency = rewriteRuntime(valid, (runtime) => {
109
+ Object.assign(runtime.tasks[1], {
110
+ state: 'ready',
111
+ attempt: 1,
112
+ branch: 'task/beta',
113
+ worktree: 'worktrees/beta'
114
+ })
115
+ })
116
+ assert.throws(() => parseManifest(blockedDependency), /dependency alpha is not integrated/)
117
+
118
+ const staleHash = valid.replace(/task_hash": "[a-f0-9]+"/, 'task_hash": "stale"')
119
+ assert(checkManifest(staleHash).mismatches.includes('alpha: task_hash mismatch'))
120
+
121
+ const temporary = fs.mkdtempSync(path.join(os.tmpdir(), 'agent-os-batch-'))
122
+ try {
123
+ const file = path.join(temporary, 'manifest.md')
124
+ fs.writeFileSync(file, valid)
125
+ const script = path.resolve(path.dirname(fileURLToPath(import.meta.url)), 'manifest-hash.mjs')
126
+ const result = spawnSync(process.execPath, [script, '--check', file], { encoding: 'utf8' })
127
+ assert.equal(result.status, 0, result.stderr)
128
+ } finally {
129
+ fs.rmSync(temporary, { recursive: true, force: true })
130
+ }
131
+
132
+ console.log('batch manifest tests passed.')
@@ -1,37 +1,37 @@
1
- ---
2
- name: chart-work
3
- description: Charts broad work as a parallel graph of evidence-backed decision tickets. User-invoked when an effort spans several decision threads or sessions. Not for one bounded choice or decision-ready implementation.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Chart work
8
-
9
- Turn fog into decision tickets that can move independently. The ticket is canonical; the map is an
10
- index that can be repaired from its children.
11
-
12
- Read project policy and [references/map.md](references/map.md). Use
13
- [references/elicitation.md](references/elicitation.md) for developer decisions and
14
- [references/prototypes.md](references/prototypes.md) when a prototype supplies evidence.
15
-
16
- ## Chart
17
-
18
- Name the destination and boundaries. Create tickets for precise questions, leave immature unknowns
19
- in Fog, connect dependencies, and expose the open unblocked frontier. The invocation authorizes
20
- writes to the configured planning surface. Report the resulting parallel starts.
21
-
22
- ## Resolve
23
-
24
- Read and claim one open frontier ticket by default; explicit parallel execution may claim several
25
- independent tickets in separate contexts. Produce evidence, record the decision and consequence,
26
- then update the map without overwriting concurrent work. Human preference evidence must come from
27
- the developer; the agent may recommend and challenge but cannot invent the answer.
28
-
29
- When a branch becomes bounded enough for one `shape-work` session, create or reuse one linked
30
- handoff containing settled decisions and remaining questions. This moves the branch to shaping; it
31
- does not make the branch delivery-ready. Shape-work later creates the implementation issues and
32
- reconciles their links and frontier into the map. A selected branch in shaping keeps the map open.
33
- Close the decision map only when every selected path is delivery-ready, parked, or ruled out and no
34
- Fog remains.
35
-
36
- Planning writes do not imply product implementation. Side discoveries become child decisions,
37
- ordinary backlog items, shaping handoffs, or parked paths rather than hidden scope expansion.
1
+ ---
2
+ name: chart-work
3
+ description: Charts broad work as a parallel graph of evidence-backed decision tickets. User-invoked when an effort spans several decision threads or sessions. Not for one bounded choice or decision-ready implementation.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Chart work
8
+
9
+ Turn fog into decision tickets that can move independently. The ticket is canonical; the map is an
10
+ index that can be repaired from its children.
11
+
12
+ Read project policy and [references/map.md](references/map.md). Use
13
+ [references/elicitation.md](references/elicitation.md) for developer decisions and
14
+ [references/prototypes.md](references/prototypes.md) when a prototype supplies evidence.
15
+
16
+ ## Chart
17
+
18
+ Name the destination and boundaries. Create tickets for precise questions, leave immature unknowns
19
+ in Fog, connect dependencies, and expose the open unblocked frontier. The invocation authorizes
20
+ writes to the configured planning surface. Report the resulting parallel starts.
21
+
22
+ ## Resolve
23
+
24
+ Read and claim one open frontier ticket by default; explicit parallel execution may claim several
25
+ independent tickets in separate contexts. Produce evidence, record the decision and consequence,
26
+ then update the map without overwriting concurrent work. Human preference evidence must come from
27
+ the developer; the agent may recommend and challenge but cannot invent the answer.
28
+
29
+ When a branch becomes bounded enough for one `shape-work` session, create or reuse one linked
30
+ handoff containing settled decisions and remaining questions. This moves the branch to shaping; it
31
+ does not make the branch delivery-ready. Shape-work later creates the implementation issues and
32
+ reconciles their links and frontier into the map. A selected branch in shaping keeps the map open.
33
+ Close the decision map only when every selected path is delivery-ready, parked, or ruled out and no
34
+ Fog remains.
35
+
36
+ Planning writes do not imply product implementation. Side discoveries become child decisions,
37
+ ordinary backlog items, shaping handoffs, or parked paths rather than hidden scope expansion.
@@ -1,25 +1,25 @@
1
- # Elicitation and evidence
2
-
3
- Ask for the smallest evidence that can settle the active ticket.
4
-
5
- ## Developer choice
6
-
7
- Follow the questioning loop in [understand-work](../../understand-work/SKILL.md). When words are
8
- insufficient, use a prototype.
9
-
10
- ## Research
11
-
12
- Use repository evidence, primary sources, or direct measurements. Cite the decisive source or
13
- observation and state uncertainty that could change the decision.
14
-
15
- ## Prototype
16
-
17
- Follow [prototypes.md](prototypes.md). Separate observed behavior from the developer's judgment.
18
-
19
- ## Prerequisite task
20
-
21
- Do only the prerequisite needed to make the decision stateable. Record the result and the question
22
- it unlocked.
23
-
24
- Do not treat silence, momentum, or approval of a larger bundle as an answer to a specific product
25
- choice.
1
+ # Elicitation and evidence
2
+
3
+ Ask for the smallest evidence that can settle the active ticket.
4
+
5
+ ## Developer choice
6
+
7
+ Follow the questioning loop in [understand-work](../../understand-work/SKILL.md). When words are
8
+ insufficient, use a prototype.
9
+
10
+ ## Research
11
+
12
+ Use repository evidence, primary sources, or direct measurements. Cite the decisive source or
13
+ observation and state uncertainty that could change the decision.
14
+
15
+ ## Prototype
16
+
17
+ Follow [prototypes.md](prototypes.md). Separate observed behavior from the developer's judgment.
18
+
19
+ ## Prerequisite task
20
+
21
+ Do only the prerequisite needed to make the decision stateable. Record the result and the question
22
+ it unlocked.
23
+
24
+ Do not treat silence, momentum, or approval of a larger bundle as an answer to a specific product
25
+ choice.
@@ -1,84 +1,84 @@
1
- # Decision map
2
-
3
- The configured planning surface owns the map and its tickets. With no project convention, use:
4
-
5
- ```text
6
- planning/<map-slug>/map.md
7
- planning/<map-slug>/decisions/<ticket-slug>.md
8
- planning/<map-slug>/shape-work/<branch-key>.md
9
- ```
10
-
11
- ## Map
12
-
13
- Keep the map low-resolution and rebuildable from its tickets:
14
-
15
- ```text
16
- ## TLDR
17
- ## Destination
18
- ## Boundaries
19
- ## Decisions
20
- - <ticket> → <decision gist> (<link>)
21
- ## Fog
22
- ## Shaping handoffs
23
- - <branch> → <shape-work handoff> (<link>)
24
- ## Delivery-ready branches
25
- - <branch> → <implementation issues and frontier> (<links>)
26
- ## Spawned work
27
- ```
28
-
29
- The map orients. It does not duplicate ticket evidence. `## TLDR` holds the approved plain-language
30
- summary when the map originates from `guide-me`; omit the section otherwise.
31
-
32
- ## Decision tickets
33
-
34
- Every ticket states one question, why it matters, the evidence needed, and its dependencies. Choose
35
- the evidence path that fits:
36
-
37
- - `research`: repository evidence, primary sources, or measurements;
38
- - `prototype`: a comparison that makes the contested behavior observable;
39
- - `grilling`: a product trade-off the developer must decide;
40
- - `task`: a prerequisite needed before the decision can be stated.
41
-
42
- An open, unblocked, unclaimed ticket is on the frontier. Claim before working and re-read live state
43
- before writing. Independent frontier tickets may run in parallel; each worker writes its own ticket.
44
-
45
- Resolve a ticket with:
46
-
47
- ```text
48
- ## Decision
49
- ## Evidence
50
- ## Rejected alternatives
51
- ## Consequence
52
- ## New work
53
- ## Open risks
54
- ```
55
-
56
- Evidence must support the decision. Route new findings as child decisions, ordinary backlog work,
57
- shaping handoffs, or parked paths.
58
-
59
- ## Shape-work handoff
60
-
61
- When a branch's remaining product choices fit one bounded session, create or reuse a handoff.
62
- Identity is `(origin map, branch key)`:
63
-
64
- ```text
65
- ## Shape-work handoff
66
- Origin map: <link or id>
67
- Branch key: <stable key>
68
-
69
- ## Outcome
70
- ## Boundaries
71
- ## Settled decisions
72
- ## Evidence and prototypes
73
- ## Questions left
74
- ```
75
-
76
- Search before creating so retries reuse the same handoff. Link it from the map and relevant source
77
- tickets. Update links idempotently and preserve concurrent entries. The handoff moves the branch to
78
- shaping, not to `delivery-ready`. After shaping, `shape-work` creates or reuses the implementation
79
- issues, records the ready or blocked frontier, and moves the branch to Delivery-ready branches. A
80
- planning handoff or implementation issue does not authorize product implementation; a later
81
- implementation request does.
82
-
83
- A selected branch in shaping keeps the map open. Close it only when selected paths are
84
- delivery-ready, parked, or ruled out and no Fog remains.
1
+ # Decision map
2
+
3
+ The configured planning surface owns the map and its tickets. With no project convention, use:
4
+
5
+ ```text
6
+ planning/<map-slug>/map.md
7
+ planning/<map-slug>/decisions/<ticket-slug>.md
8
+ planning/<map-slug>/shape-work/<branch-key>.md
9
+ ```
10
+
11
+ ## Map
12
+
13
+ Keep the map low-resolution and rebuildable from its tickets:
14
+
15
+ ```text
16
+ ## TLDR
17
+ ## Destination
18
+ ## Boundaries
19
+ ## Decisions
20
+ - <ticket> → <decision gist> (<link>)
21
+ ## Fog
22
+ ## Shaping handoffs
23
+ - <branch> → <shape-work handoff> (<link>)
24
+ ## Delivery-ready branches
25
+ - <branch> → <implementation issues and frontier> (<links>)
26
+ ## Spawned work
27
+ ```
28
+
29
+ The map orients. It does not duplicate ticket evidence. `## TLDR` holds the approved plain-language
30
+ summary when the map originates from `guide-me`; omit the section otherwise.
31
+
32
+ ## Decision tickets
33
+
34
+ Every ticket states one question, why it matters, the evidence needed, and its dependencies. Choose
35
+ the evidence path that fits:
36
+
37
+ - `research`: repository evidence, primary sources, or measurements;
38
+ - `prototype`: a comparison that makes the contested behavior observable;
39
+ - `grilling`: a product trade-off the developer must decide;
40
+ - `task`: a prerequisite needed before the decision can be stated.
41
+
42
+ An open, unblocked, unclaimed ticket is on the frontier. Claim before working and re-read live state
43
+ before writing. Independent frontier tickets may run in parallel; each worker writes its own ticket.
44
+
45
+ Resolve a ticket with:
46
+
47
+ ```text
48
+ ## Decision
49
+ ## Evidence
50
+ ## Rejected alternatives
51
+ ## Consequence
52
+ ## New work
53
+ ## Open risks
54
+ ```
55
+
56
+ Evidence must support the decision. Route new findings as child decisions, ordinary backlog work,
57
+ shaping handoffs, or parked paths.
58
+
59
+ ## Shape-work handoff
60
+
61
+ When a branch's remaining product choices fit one bounded session, create or reuse a handoff.
62
+ Identity is `(origin map, branch key)`:
63
+
64
+ ```text
65
+ ## Shape-work handoff
66
+ Origin map: <link or id>
67
+ Branch key: <stable key>
68
+
69
+ ## Outcome
70
+ ## Boundaries
71
+ ## Settled decisions
72
+ ## Evidence and prototypes
73
+ ## Questions left
74
+ ```
75
+
76
+ Search before creating so retries reuse the same handoff. Link it from the map and relevant source
77
+ tickets. Update links idempotently and preserve concurrent entries. The handoff moves the branch to
78
+ shaping, not to `delivery-ready`. After shaping, `shape-work` creates or reuses the implementation
79
+ issues, records the ready or blocked frontier, and moves the branch to Delivery-ready branches. A
80
+ planning handoff or implementation issue does not authorize product implementation; a later
81
+ implementation request does.
82
+
83
+ A selected branch in shaping keeps the map open. Close it only when selected paths are
84
+ delivery-ready, parked, or ruled out and no Fog remains.
@@ -1,21 +1,21 @@
1
- # Prototype evidence
2
-
3
- A prototype exists to settle a decision, not to become an accidental product implementation.
4
-
5
- Build the smallest comparison that makes the contested behavior observable. Keep alternatives easy
6
- to compare and ask the developer to perform the shortest meaningful task.
7
-
8
- Record:
9
-
10
- ```text
11
- ## Prototype evidence
12
- - Question:
13
- - Artifact: <stable link or repository-relative path>
14
- - How it was exercised:
15
- - Observation:
16
- - Developer decision and rationale:
17
- - Open uncertainty:
18
- ```
19
-
20
- Keep the artifact inspectable while the decision depends on it. Frontend prototypes also follow the
21
- shared [mockup guidance](../../shape-work/references/mockups.md).
1
+ # Prototype evidence
2
+
3
+ A prototype exists to settle a decision, not to become an accidental product implementation.
4
+
5
+ Build the smallest comparison that makes the contested behavior observable. Keep alternatives easy
6
+ to compare and ask the developer to perform the shortest meaningful task.
7
+
8
+ Record:
9
+
10
+ ```text
11
+ ## Prototype evidence
12
+ - Question:
13
+ - Artifact: <stable link or repository-relative path>
14
+ - How it was exercised:
15
+ - Observation:
16
+ - Developer decision and rationale:
17
+ - Open uncertainty:
18
+ ```
19
+
20
+ Keep the artifact inspectable while the decision depends on it. Frontend prototypes also follow the
21
+ shared [mockup guidance](../../shape-work/references/mockups.md).