dw-kit 1.4.0 โ 1.7.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/executor.md +80 -80
- package/.claude/hooks/pre-commit-gate.sh +59 -0
- package/.claude/hooks/stop-check.sh +111 -31
- package/.claude/rules/commit-standards.md +48 -37
- package/.claude/rules/dw.md +47 -11
- package/.claude/skills/dw-commit/SKILL.md +7 -4
- package/.claude/skills/dw-decision/SKILL.md +5 -4
- package/.claude/skills/dw-execute/SKILL.md +18 -5
- package/.claude/skills/dw-handoff/SKILL.md +8 -3
- package/.claude/skills/dw-plan/SKILL.md +15 -2
- package/.claude/skills/dw-research/SKILL.md +7 -5
- package/.claude/skills/dw-retroactive/SKILL.md +75 -63
- package/.claude/skills/dw-task-init/SKILL.md +40 -35
- package/.dw/adapters/generic/AGENT.md +171 -169
- package/.dw/core/WORKFLOW.md +450 -450
- package/.dw/core/schemas/agent-claim.schema.json +127 -0
- package/.dw/core/schemas/agent-report.schema.json +72 -0
- package/.dw/core/schemas/goal-frontmatter.schema.json +84 -0
- package/.dw/core/schemas/task-frontmatter.schema.json +97 -0
- package/.dw/core/templates/v3/goal.md +146 -0
- package/.dw/core/templates/v3/task.md +188 -0
- package/CLAUDE.md +2 -2
- package/MIGRATION-v1.5.md +330 -0
- package/README.md +17 -0
- package/package.json +3 -2
- package/src/cli.mjs +312 -0
- package/src/commands/agent-claim.mjs +235 -0
- package/src/commands/agent-inspect.mjs +123 -0
- package/src/commands/doctor.mjs +64 -0
- package/src/commands/goal-bump.mjs +50 -0
- package/src/commands/goal-delete.mjs +120 -0
- package/src/commands/goal-link.mjs +126 -0
- package/src/commands/goal-lint.mjs +152 -0
- package/src/commands/goal-new.mjs +86 -0
- package/src/commands/goal-portfolio.mjs +84 -0
- package/src/commands/goal-render.mjs +49 -0
- package/src/commands/goal-set.mjs +62 -0
- package/src/commands/goal-show.mjs +94 -0
- package/src/commands/goal-stubs.mjs +21 -0
- package/src/commands/goal-suggest-krs.mjs +139 -0
- package/src/commands/goal-summary.mjs +67 -0
- package/src/commands/goal-view.mjs +196 -0
- package/src/commands/lint-task.mjs +112 -0
- package/src/commands/task-migrate.mjs +471 -0
- package/src/commands/task-new.mjs +90 -0
- package/src/commands/task-render.mjs +235 -0
- package/src/commands/task-rotate.mjs +168 -0
- package/src/commands/task-show.mjs +137 -0
- package/src/commands/task-summary.mjs +68 -0
- package/src/commands/task-view.mjs +386 -0
- package/src/commands/task-watch.mjs +868 -0
- package/src/lib/active-index.mjs +19 -1
- package/src/lib/agent-claim.mjs +173 -0
- package/src/lib/agent-conflict.mjs +137 -0
- package/src/lib/agent-events.mjs +43 -0
- package/src/lib/agent-report.mjs +96 -0
- package/src/lib/frontmatter.mjs +72 -0
- package/src/lib/goal-events.mjs +79 -0
- package/src/lib/goal-store.mjs +202 -0
- package/src/lib/goal-svg.mjs +293 -0
- package/src/lib/goal-watch.mjs +133 -0
- package/src/lib/lint-rules.mjs +149 -0
- package/src/lib/sse-broker.mjs +91 -0
- package/src/lib/timeline-parser.mjs +80 -0
- package/src/lib/watch-auth.mjs +64 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/dv-workflow/dv-workflow/blob/main/.dw/core/schemas/agent-claim.schema.json",
|
|
4
|
+
"title": "agent-claim@v1",
|
|
5
|
+
"description": "Agent OS claim file schema (ADR-0009 Round 2). Cooperative lock declaring ownership of subtasks + write_scope.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"claim_id",
|
|
10
|
+
"task_id",
|
|
11
|
+
"agent",
|
|
12
|
+
"subtasks",
|
|
13
|
+
"write_scope",
|
|
14
|
+
"lease_expires",
|
|
15
|
+
"lease_duration_seconds",
|
|
16
|
+
"status",
|
|
17
|
+
"created_at"
|
|
18
|
+
],
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"properties": {
|
|
21
|
+
"schema_version": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"const": "agent-claim@v1",
|
|
24
|
+
"description": "Schema version. Bump rule: minor for additive fields, major for breaking changes."
|
|
25
|
+
},
|
|
26
|
+
"claim_id": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^[a-z0-9][a-z0-9-]*-\\d{8}T\\d{6}Z(-[a-z0-9]+)?$",
|
|
29
|
+
"description": "Format: {task-id-slug}-{subtask-ids-joined}-{YYYYMMDDTHHMMSSZ}-{random4}. Random suffix prevents same-second collision. Never reused after release/expire."
|
|
30
|
+
},
|
|
31
|
+
"task_id": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^[a-z0-9](?:[a-z0-9.-]{0,62}[a-z0-9])?$",
|
|
34
|
+
"description": "References .dw/tasks/{task_id}/task.md"
|
|
35
|
+
},
|
|
36
|
+
"agent": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["id", "vendor", "role"],
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"properties": {
|
|
41
|
+
"id": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"maxLength": 64,
|
|
45
|
+
"description": "Stable identifier for this agent instance (e.g., 'codex-1', 'claude-main')"
|
|
46
|
+
},
|
|
47
|
+
"vendor": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"enum": ["claude", "codex", "gemini", "human", "other"],
|
|
50
|
+
"description": "Agent vendor for adapter routing"
|
|
51
|
+
},
|
|
52
|
+
"role": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"enum": ["worker", "reader", "orchestrator", "reviewer"],
|
|
55
|
+
"description": "worker=writes files; reader=read-only research; orchestrator=splits work; reviewer=approves merge"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"subtasks": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^(ST|WS)-[0-9.]+$"
|
|
64
|
+
},
|
|
65
|
+
"minItems": 1,
|
|
66
|
+
"description": "Semantic ownership: subtask IDs from task.md Section 3 tracker. Empty array rejected per R2-7."
|
|
67
|
+
},
|
|
68
|
+
"write_scope": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"minLength": 1
|
|
73
|
+
},
|
|
74
|
+
"description": "Filesystem ownership: glob paths agent may modify. Empty array allowed only if role=reader."
|
|
75
|
+
},
|
|
76
|
+
"read_scope": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": { "type": "string" },
|
|
79
|
+
"description": "Optional: paths agent will read but not modify. Informational; not enforced."
|
|
80
|
+
},
|
|
81
|
+
"lease_expires": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
|
|
84
|
+
"description": "Wall-clock ISO UTC expiry. Per R2-9 used together with lease_duration_seconds via max()."
|
|
85
|
+
},
|
|
86
|
+
"lease_duration_seconds": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"minimum": 60,
|
|
89
|
+
"maximum": 86400,
|
|
90
|
+
"description": "Relative lease length (1 min to 24 hours). Per R2-9 fallback if wall clock skewed."
|
|
91
|
+
},
|
|
92
|
+
"status": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"enum": ["created", "active", "released", "expired", "invalidated"],
|
|
95
|
+
"description": "Lifecycle state per R2-1. createdโactiveโreleased (clean) or โexpired (lease passed) or โinvalidated (orchestrator override)."
|
|
96
|
+
},
|
|
97
|
+
"created_at": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
|
|
100
|
+
},
|
|
101
|
+
"activated_at": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
|
|
104
|
+
"description": "When status transitioned createdโactive (first edit)"
|
|
105
|
+
},
|
|
106
|
+
"released_at": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
|
|
109
|
+
"description": "When status transitioned to released/expired/invalidated"
|
|
110
|
+
},
|
|
111
|
+
"release_reason": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"description": "Optional free-text reason for release/expire/invalidate"
|
|
114
|
+
},
|
|
115
|
+
"worktree_path": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "If agent operates in a git worktree per R2-3, the worktree path. .dw/cache/worktrees/{agent-id}/"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"allOf": [
|
|
121
|
+
{
|
|
122
|
+
"if": { "properties": { "agent": { "properties": { "role": { "const": "reader" } } } } },
|
|
123
|
+
"then": { "properties": { "write_scope": { "maxItems": 0 } } },
|
|
124
|
+
"else": { "properties": { "write_scope": { "minItems": 1 } } }
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/dv-workflow/dv-workflow/blob/main/.dw/core/schemas/agent-report.schema.json",
|
|
4
|
+
"title": "agent-report@v1",
|
|
5
|
+
"description": "Agent OS report frontmatter schema (ADR-0009 Round 2). Each agent writes a markdown report file after work; this validates the frontmatter portion. Body is free-form markdown.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"task_id",
|
|
10
|
+
"agent_id",
|
|
11
|
+
"vendor",
|
|
12
|
+
"claim_id",
|
|
13
|
+
"status",
|
|
14
|
+
"created_at"
|
|
15
|
+
],
|
|
16
|
+
"additionalProperties": true,
|
|
17
|
+
"properties": {
|
|
18
|
+
"schema_version": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"const": "agent-report@v1"
|
|
21
|
+
},
|
|
22
|
+
"task_id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^[a-z0-9](?:[a-z0-9.-]{0,62}[a-z0-9])?$"
|
|
25
|
+
},
|
|
26
|
+
"agent_id": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1,
|
|
29
|
+
"maxLength": 64
|
|
30
|
+
},
|
|
31
|
+
"vendor": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": ["claude", "codex", "gemini", "human", "other"]
|
|
34
|
+
},
|
|
35
|
+
"claim_id": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"pattern": "^[a-z0-9][a-z0-9-]*-\\d{8}T\\d{6}Z(-[a-z0-9]+)?$",
|
|
38
|
+
"description": "Must reference an existing claim (active, released, expired, or invalidated)."
|
|
39
|
+
},
|
|
40
|
+
"status": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"enum": ["completed", "partial", "blocked", "needs-review", "abandoned"],
|
|
43
|
+
"description": "Report outcome. needs-review = flagged for human attention (e.g., edited outside write_scope)."
|
|
44
|
+
},
|
|
45
|
+
"subtasks_addressed": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": { "type": "string", "pattern": "^(ST|WS)-[0-9.]+$" }
|
|
48
|
+
},
|
|
49
|
+
"files_changed": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": { "type": "string" },
|
|
52
|
+
"description": "Paths (relative to repo root) that this agent modified during the claim."
|
|
53
|
+
},
|
|
54
|
+
"files_outside_scope": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": { "type": "string" },
|
|
57
|
+
"description": "Files agent edited that were NOT in declared write_scope. Triggers needs-review status."
|
|
58
|
+
},
|
|
59
|
+
"open_questions": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": { "type": "string" }
|
|
62
|
+
},
|
|
63
|
+
"next_actions": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": { "type": "string" }
|
|
66
|
+
},
|
|
67
|
+
"created_at": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/dv-workflow/dv-workflow/blob/main/.dw/core/schemas/goal-frontmatter.schema.json",
|
|
4
|
+
"title": "goal@v1",
|
|
5
|
+
"description": "Frontmatter schema for .dw/goals/{goal-id}/goal.md (ADR-0010 Goals Management Layer, v1.7).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"goal_id",
|
|
9
|
+
"schema_version",
|
|
10
|
+
"created",
|
|
11
|
+
"last_updated",
|
|
12
|
+
"status",
|
|
13
|
+
"owner",
|
|
14
|
+
"goal_version"
|
|
15
|
+
],
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"properties": {
|
|
18
|
+
"goal_id": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^G-[A-Za-z0-9](?:[A-Za-z0-9.-]{0,31}[A-Za-z0-9])?$",
|
|
21
|
+
"description": "Goal identifier. Format G-{slug}; uniqueness enforced via goals-index.json (W-1)."
|
|
22
|
+
},
|
|
23
|
+
"schema_version": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"const": "goal@v1",
|
|
26
|
+
"description": "Schema version. Upgrade path via `dw goal migrate --to goal@v2` (S-1)."
|
|
27
|
+
},
|
|
28
|
+
"created": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
31
|
+
"description": "ISO date YYYY-MM-DD"
|
|
32
|
+
},
|
|
33
|
+
"last_updated": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
36
|
+
"description": "ISO date YYYY-MM-DD"
|
|
37
|
+
},
|
|
38
|
+
"status": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": ["Draft", "Active", "Achieved", "Abandoned", "Pivoted"],
|
|
41
|
+
"description": "Q3 OKR-style lifecycle. Status transitions auto-bump goal_version (Q4/C-1)."
|
|
42
|
+
},
|
|
43
|
+
"owner": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"description": "Person responsible for shipping this goal."
|
|
47
|
+
},
|
|
48
|
+
"target_date": {
|
|
49
|
+
"type": ["string", "null"],
|
|
50
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$|^TBD$",
|
|
51
|
+
"description": "ISO date YYYY-MM-DD or 'TBD' or null."
|
|
52
|
+
},
|
|
53
|
+
"goal_version": {
|
|
54
|
+
"type": "integer",
|
|
55
|
+
"minimum": 1,
|
|
56
|
+
"description": "Q4/C-1: Bumped only on manual `dw goal bump --reason` or status transition (goal_status_changed event). Field edits (KR progress, summary) emit goal_field_updated event without counter increment."
|
|
57
|
+
},
|
|
58
|
+
"archived_at": {
|
|
59
|
+
"type": ["string", "null"],
|
|
60
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
|
|
61
|
+
"description": "C-2: Soft-delete timestamp ISO UTC. null = active. Set automatically when status transitions to Abandoned or via `dw goal delete`."
|
|
62
|
+
},
|
|
63
|
+
"parent_goal_id": {
|
|
64
|
+
"type": ["string", "null"],
|
|
65
|
+
"pattern": "^G-[A-Za-z0-9](?:[A-Za-z0-9.-]{0,31}[A-Za-z0-9])?$|^none$",
|
|
66
|
+
"description": "Optional parent goal (for sub-goals). 'none' or null = top-level goal."
|
|
67
|
+
},
|
|
68
|
+
"summary": {
|
|
69
|
+
"type": ["string", "null"],
|
|
70
|
+
"maxLength": 1000,
|
|
71
|
+
"description": "โค1000-char short-form (agentchattr borrow). Mirrored to goals-index.json for O(1) portfolio reads + Tier 1 agent reaction."
|
|
72
|
+
},
|
|
73
|
+
"icon": {
|
|
74
|
+
"type": ["string", "null"],
|
|
75
|
+
"maxLength": 8,
|
|
76
|
+
"description": "Optional emoji/icon for visual differentiation in portfolio cards (bigokr borrow)."
|
|
77
|
+
},
|
|
78
|
+
"cycle": {
|
|
79
|
+
"type": ["string", "null"],
|
|
80
|
+
"maxLength": 32,
|
|
81
|
+
"description": "Optional temporal grouping label e.g. 'Q1 2026', 'v1.7-cycle', '2026 H1' (bigokr borrow). Portfolio groups goals by cycle."
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/dv-workflow/dv-workflow/blob/main/.dw/core/schemas/task-frontmatter.schema.json",
|
|
4
|
+
"title": "task-frontmatter",
|
|
5
|
+
"description": "Frontmatter schema for .dw/tasks/{name}/task.md (v3 task format per ADR-0008; v3.1 adds optional goal linkage + summary per ADR-0010)",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"task_id",
|
|
9
|
+
"created",
|
|
10
|
+
"last_updated",
|
|
11
|
+
"status",
|
|
12
|
+
"owner",
|
|
13
|
+
"depth",
|
|
14
|
+
"schema_version"
|
|
15
|
+
],
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"properties": {
|
|
18
|
+
"task_id": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^[a-z0-9](?:[a-z0-9.-]{0,62}[a-z0-9])?$",
|
|
21
|
+
"description": "Kebab-case slug (dots allowed for version-like IDs e.g. sc-guard-v1.3.5); matches parent folder name in .dw/tasks/"
|
|
22
|
+
},
|
|
23
|
+
"created": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
26
|
+
"description": "ISO date YYYY-MM-DD"
|
|
27
|
+
},
|
|
28
|
+
"last_updated": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
31
|
+
"description": "ISO date YYYY-MM-DD; updated by stop-check hook on session end"
|
|
32
|
+
},
|
|
33
|
+
"status": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": [
|
|
36
|
+
"Draft",
|
|
37
|
+
"Approved",
|
|
38
|
+
"In Progress",
|
|
39
|
+
"Blocked",
|
|
40
|
+
"Paused",
|
|
41
|
+
"Done"
|
|
42
|
+
],
|
|
43
|
+
"description": "Lifecycle status. Single-source-of-truth for task state."
|
|
44
|
+
},
|
|
45
|
+
"phase": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "Free-form current phase description (e.g., 'WS-3 lint impl')"
|
|
48
|
+
},
|
|
49
|
+
"owner": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1,
|
|
52
|
+
"description": "Person responsible for shipping this task"
|
|
53
|
+
},
|
|
54
|
+
"depth": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": ["quick", "standard", "thorough"],
|
|
57
|
+
"description": "Workflow depth routing per dw config"
|
|
58
|
+
},
|
|
59
|
+
"related_adr": {
|
|
60
|
+
"type": ["string", "null"],
|
|
61
|
+
"pattern": "^(ADR-\\d{4}|none)$",
|
|
62
|
+
"description": "ADR reference (ADR-NNNN format) or 'none' or null"
|
|
63
|
+
},
|
|
64
|
+
"target_ship": {
|
|
65
|
+
"type": ["string", "null"],
|
|
66
|
+
"description": "Free-form target ship date or milestone (e.g., 'v1.5' or 'TBD')"
|
|
67
|
+
},
|
|
68
|
+
"schema_version": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": ["v3.0", "v3.1"],
|
|
71
|
+
"description": "Frontmatter schema version. v3.1 adds optional parent_goal_id, contributing_goal_ids, summary per ADR-0010."
|
|
72
|
+
},
|
|
73
|
+
"blockers": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "Current blockers in free-form text; use 'none' if unblocked"
|
|
76
|
+
},
|
|
77
|
+
"parent_goal_id": {
|
|
78
|
+
"type": ["string", "null"],
|
|
79
|
+
"pattern": "^G-[A-Za-z0-9](?:[A-Za-z0-9.-]{0,31}[A-Za-z0-9])?$|^none$",
|
|
80
|
+
"description": "v3.1 (ADR-0010 Q1): Primary goal this task contributes to. Single goal; ownership semantics. Format G-{slug} or 'none' or null."
|
|
81
|
+
},
|
|
82
|
+
"contributing_goal_ids": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"items": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"pattern": "^G-[A-Za-z0-9](?:[A-Za-z0-9.-]{0,31}[A-Za-z0-9])?$"
|
|
87
|
+
},
|
|
88
|
+
"uniqueItems": true,
|
|
89
|
+
"description": "v3.1 (ADR-0010 Q1): Optional secondary goals task contributes to. Informational only; no ownership/portfolio-placement effect."
|
|
90
|
+
},
|
|
91
|
+
"summary": {
|
|
92
|
+
"type": ["string", "null"],
|
|
93
|
+
"maxLength": 1000,
|
|
94
|
+
"description": "v3.1 (ADR-0010 + agentchattr borrow): โค1000-char short-form for portfolio cards + Tier 1 agent reaction. Mirrored to goals-index.json/active-index when applicable."
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
goal_id: G-{slug}
|
|
3
|
+
schema_version: goal@v1
|
|
4
|
+
created: {YYYY-MM-DD}
|
|
5
|
+
last_updated: {YYYY-MM-DD}
|
|
6
|
+
status: Draft
|
|
7
|
+
owner: {name}
|
|
8
|
+
target_date: {YYYY-MM-DD or TBD}
|
|
9
|
+
goal_version: 1
|
|
10
|
+
archived_at: null
|
|
11
|
+
parent_goal_id: none
|
|
12
|
+
icon: "๐ฏ"
|
|
13
|
+
cycle: "{Q1 2026 | v1.7-cycle | 2026 H1 | null}"
|
|
14
|
+
summary: "{โค1000-char short-form for portfolio cards + agent reaction; mirrored to goals-index.json}"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Goal: {Title}
|
|
18
|
+
|
|
19
|
+
<!--
|
|
20
|
+
Goals Management Layer (ADR-0010 Accepted Round 2, 2026-05-22).
|
|
21
|
+
|
|
22
|
+
This template mirrors task.md v3 structure (dual-projection per ADR-0008) so
|
|
23
|
+
agents and humans navigate goal.md and task.md with the same mental model.
|
|
24
|
+
|
|
25
|
+
Status lives ONLY in Section 3 (Subtask/KR Tracker) โ never in Section 2.
|
|
26
|
+
Status transitions auto-bump goal_version per Q4/C-1; non-status field edits
|
|
27
|
+
emit goal_field_updated event without counter increment.
|
|
28
|
+
|
|
29
|
+
Sidecar SVG (timeline-goal.svg) auto-rendered by `dw goal render` once
|
|
30
|
+
dw-kit-render `renderGoal()` ships (R-G6 telemetry-gated, post-P1).
|
|
31
|
+
-->
|
|
32
|
+
|
|
33
|
+
<!--  -->
|
|
34
|
+
|
|
35
|
+
## 1. Snapshot
|
|
36
|
+
|
|
37
|
+
**Status:** {Draft | Active | Achieved | Abandoned | Pivoted}
|
|
38
|
+
**Owner:** {name}
|
|
39
|
+
**Target date:** {YYYY-MM-DD or TBD}
|
|
40
|
+
**Goal version:** {1}
|
|
41
|
+
**Last updated:** {YYYY-MM-DD}
|
|
42
|
+
**Linked tasks:** {auto-populated from `dw goal lint` or `dw goal portfolio`}
|
|
43
|
+
|
|
44
|
+
## 2. Statement
|
|
45
|
+
|
|
46
|
+
<!--
|
|
47
|
+
Section 2 is the stable intent contract. Per lint convention, status markers
|
|
48
|
+
(โ
, ๐ก, dates) MUST NOT appear in Section 2 โ those live exclusively in
|
|
49
|
+
Section 3 (Tracker). Section 2 changes only when intent or scope genuinely
|
|
50
|
+
changes (auto-bumps goal_version via `dw goal bump --reason`).
|
|
51
|
+
-->
|
|
52
|
+
|
|
53
|
+
### What
|
|
54
|
+
|
|
55
|
+
{1-2 paragraphs โ what outcome this goal is chasing. No background padding.}
|
|
56
|
+
|
|
57
|
+
### Why Now
|
|
58
|
+
|
|
59
|
+
{Forcing function: deadline, market signal, dependency, strategic bet.}
|
|
60
|
+
|
|
61
|
+
### Out of Scope
|
|
62
|
+
|
|
63
|
+
- {Explicit exclusions โ prevents goal scope creep into Jira-lite territory (R-G1)}
|
|
64
|
+
|
|
65
|
+
## 3. Key Results & Linked Tasks Tracker
|
|
66
|
+
|
|
67
|
+
<!--
|
|
68
|
+
SINGLE SOURCE OF TRUTH for KR status. This is the only section where status
|
|
69
|
+
markers (โฌ๐กโ
๐ดโธ) are allowed. KR progress is percentage 0-100% per Q2.
|
|
70
|
+
Linked tasks auto-populated from frontmatter parent_goal_id / contributing_goal_ids
|
|
71
|
+
in task.md v3.1.
|
|
72
|
+
-->
|
|
73
|
+
|
|
74
|
+
### Key Results
|
|
75
|
+
|
|
76
|
+
| # | Key Result | Target | Current | Status | Notes |
|
|
77
|
+
|---|-----------|--------|---------|--------|-------|
|
|
78
|
+
| KR-001 | {measurable outcome} | {100%} | {0%} | โฌ Pending | |
|
|
79
|
+
| KR-002 | ... | ... | ... | โฌ Pending | |
|
|
80
|
+
|
|
81
|
+
Status legend: โฌ Pending ยท ๐ก In Progress ยท โ
Achieved ยท ๐ด Blocked ยท โธ Paused
|
|
82
|
+
|
|
83
|
+
### Linked Tasks
|
|
84
|
+
|
|
85
|
+
| Task | Role | KR | Status |
|
|
86
|
+
|------|------|----|--------|
|
|
87
|
+
| {auto-populated by `dw goal lint`} | primary/contributing | KR-N | ... |
|
|
88
|
+
|
|
89
|
+
## 4. Timeline / Changelog
|
|
90
|
+
|
|
91
|
+
<!--
|
|
92
|
+
Reverse-chronological. Each pivot or material change = one heading. Section
|
|
93
|
+
auto-rotates per goal_version bump (manual `dw goal bump --reason` or status
|
|
94
|
+
transition). Field edits emit events to events-global.jsonl WITHOUT bumping
|
|
95
|
+
this section (Q4/C-1 separation).
|
|
96
|
+
-->
|
|
97
|
+
|
|
98
|
+
```mermaid
|
|
99
|
+
timeline
|
|
100
|
+
title Goal Lifecycle
|
|
101
|
+
{YYYY-MM-DD} : Drafted (v1)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### {YYYY-MM-DD} โ Goal drafted (version 1)
|
|
105
|
+
|
|
106
|
+
**Statement:**
|
|
107
|
+
{snapshot of Section 2 at creation time for diff history}
|
|
108
|
+
|
|
109
|
+
**Key Results defined:**
|
|
110
|
+
- KR-001: ...
|
|
111
|
+
- KR-002: ...
|
|
112
|
+
|
|
113
|
+
**Initial target date:** {YYYY-MM-DD or TBD}
|
|
114
|
+
|
|
115
|
+
## 5. Handoff & Annotations
|
|
116
|
+
|
|
117
|
+
<!--
|
|
118
|
+
Cross-session context for agents picking up work on this goal. Annotations
|
|
119
|
+
(canvas-style sticky notes) live in peer file goal-annotations.md per Q6
|
|
120
|
+
(ADR-0010 P6 scope).
|
|
121
|
+
-->
|
|
122
|
+
|
|
123
|
+
**For next session (or next agent):**
|
|
124
|
+
|
|
125
|
+
- **Read first:** {related ADRs, parent goal if any, linked task.md files}
|
|
126
|
+
- **Current state:** {phase, blocked-on, last decision}
|
|
127
|
+
- **Don't do:** {anti-patterns specific to this goal}
|
|
128
|
+
- **Watch out:** {strategic risks, dependencies, stakeholder commitments}
|
|
129
|
+
|
|
130
|
+
### Friction Journal
|
|
131
|
+
|
|
132
|
+
| Date | Friction | Component | Proposed fix |
|
|
133
|
+
|------|----------|-----------|-------------|
|
|
134
|
+
| {YYYY-MM-DD} | ... | ... | ... |
|
|
135
|
+
|
|
136
|
+
## 6. Annexes
|
|
137
|
+
|
|
138
|
+
<!--
|
|
139
|
+
Free-form supplements. Recommended names:
|
|
140
|
+
- baseline.md โ initial metrics
|
|
141
|
+
- pivot-r{N}.md โ pivot rationale
|
|
142
|
+
- goal-annotations.md โ canvas annotations (P6+)
|
|
143
|
+
- timeline-history.md โ auto-rotated overflow
|
|
144
|
+
-->
|
|
145
|
+
|
|
146
|
+
- (none)
|