@namewta/speculo 0.3.0 → 0.3.2

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 (149) hide show
  1. package/README.md +1 -2
  2. package/dist/src/cli.js +40 -6
  3. package/dist/src/cli.js.map +1 -1
  4. package/dist/src/index.js +5 -0
  5. package/dist/src/index.js.map +1 -1
  6. package/dist/src/skills-mirror.d.ts +38 -0
  7. package/dist/src/skills-mirror.js +160 -0
  8. package/dist/src/skills-mirror.js.map +1 -0
  9. package/package.json +3 -2
  10. package/template/canonical/README.md +7 -1
  11. package/template/canonical/canonical-specdev-engineering-cognitive-mentor.md +2040 -0
  12. package/template/canonical/canonical-specdev-goal-plan.md +1379 -0
  13. package/template/canonical/canonical-specdev-grill-with-docs.md +848 -285
  14. package/template/canonical/canonical-specdev-spec.md +1061 -46
  15. package/template/canonical/canonical-specdev-tickets.md +1529 -175
  16. package/template/canonical/canonical-specdev-wayfinder.md +677 -107
  17. package/template/commands/git-repository-audit.md +682 -0
  18. package/template/workflows/specdev/A-archive-and-consolidate/A-archive-and-consolidate.md +69 -36
  19. package/template/workflows/specdev/A-archive-and-consolidate/archive-checklist.md +15 -0
  20. package/template/workflows/specdev/A-archive-and-consolidate/knowledge-promotion-rules.md +32 -0
  21. package/template/workflows/specdev/D-diagnose-bugs/D-diagnose-bugs.md +51 -51
  22. package/template/workflows/specdev/D-diagnose-bugs/diagnosis-template.md +64 -0
  23. package/template/workflows/specdev/E-engineering-cognitive-mentor/E-engineering-cognitive-mentor.md +252 -0
  24. package/template/workflows/specdev/E-engineering-cognitive-mentor/architecture-guidance.md +90 -0
  25. package/template/workflows/specdev/E-engineering-cognitive-mentor/bug-guidance.md +80 -0
  26. package/template/workflows/specdev/E-engineering-cognitive-mentor/codebase-guidance.md +107 -0
  27. package/template/workflows/specdev/E-engineering-cognitive-mentor/comprehension-and-closure.md +95 -0
  28. package/template/workflows/specdev/E-engineering-cognitive-mentor/domain-learning-guidance.md +62 -0
  29. package/template/workflows/specdev/E-engineering-cognitive-mentor/evidence-and-options.md +132 -0
  30. package/template/workflows/specdev/E-engineering-cognitive-mentor/interaction-protocol.md +116 -0
  31. package/template/workflows/specdev/E-engineering-cognitive-mentor/mentor-report-template.md +135 -0
  32. package/template/workflows/specdev/E-engineering-cognitive-mentor/mode-routing.md +47 -0
  33. package/template/workflows/specdev/E-engineering-cognitive-mentor/persistence-and-resume.md +147 -0
  34. package/template/workflows/specdev/E-engineering-cognitive-mentor/requirements-guidance.md +92 -0
  35. package/template/workflows/specdev/G-grill-with-docs/G-grill-with-docs.md +100 -30
  36. package/template/workflows/specdev/G-grill-with-docs/adr-format.md +22 -77
  37. package/template/workflows/specdev/G-grill-with-docs/context-format.md +27 -53
  38. package/template/workflows/specdev/G-grill-with-docs/domain-modeling-rules.md +6 -82
  39. package/template/workflows/specdev/G-grill-with-docs/grilling-protocol.md +32 -49
  40. package/template/workflows/specdev/G-grill-with-docs/log-format.md +16 -98
  41. package/template/workflows/specdev/I-implement/I-implement.md +168 -52
  42. package/template/workflows/specdev/I-implement/code-review-process.md +10 -76
  43. package/template/workflows/specdev/I-implement/codebase-design-glossary.md +12 -109
  44. package/template/workflows/specdev/I-implement/deepening.md +12 -32
  45. package/template/workflows/specdev/I-implement/design-it-twice.md +6 -41
  46. package/template/workflows/specdev/I-implement/evidence-template.md +69 -0
  47. package/template/workflows/specdev/I-implement/execution-preflight.md +20 -0
  48. package/template/workflows/specdev/I-implement/tdd-examples.md +10 -135
  49. package/template/workflows/specdev/I-implement/tdd-rules.md +12 -28
  50. package/template/workflows/specdev/I-init-setup/I-init-setup.md +81 -86
  51. package/template/workflows/specdev/I-init-setup/change-status-template.json +15 -0
  52. package/template/workflows/specdev/I-init-setup/config-template.json +26 -0
  53. package/template/workflows/specdev/I-init-setup/domain-layout-template.md +23 -0
  54. package/template/workflows/specdev/I-init-setup/status-labels-template.md +55 -0
  55. package/template/workflows/specdev/I-init-setup/status-template.json +7 -0
  56. package/template/workflows/specdev/I-init-setup/tracking-template.md +10 -0
  57. package/template/workflows/specdev/INDEX.md +165 -82
  58. package/template/workflows/specdev/P-goal-plan/P-goal-plan.md +108 -44
  59. package/template/workflows/specdev/P-goal-plan/completion-control.md +79 -0
  60. package/template/workflows/specdev/P-goal-plan/goal-plan-template.md +105 -0
  61. package/template/workflows/specdev/P-goal-plan/orchestration-protocol.md +115 -0
  62. package/template/workflows/specdev/P-goal-plan/planning-modes.md +70 -0
  63. package/template/workflows/specdev/R-review-architecture/R-review-architecture.md +103 -40
  64. package/template/workflows/specdev/R-review-architecture/architecture-review-report-template.html +58 -0
  65. package/template/workflows/specdev/R-review-architecture/architecture-review-template.md +68 -0
  66. package/template/workflows/specdev/R-review-architecture/proposal-to-ticket.md +11 -0
  67. package/template/workflows/specdev/S-spec/S-spec.md +103 -49
  68. package/template/workflows/specdev/S-spec/spec-readiness.md +16 -0
  69. package/template/workflows/specdev/S-spec/spec-template.md +95 -0
  70. package/template/workflows/specdev/T-tickets/T-tickets.md +146 -133
  71. package/template/workflows/specdev/T-tickets/decomposition-rules.md +56 -0
  72. package/template/workflows/specdev/T-tickets/ticket-readiness.md +45 -0
  73. package/template/workflows/specdev/T-tickets/ticket-template.md +124 -0
  74. package/template/workflows/specdev/T-tickets/tickets-map-template.md +52 -50
  75. package/template/workflows/specdev/T-triage/T-triage.md +32 -63
  76. package/template/workflows/specdev/T-triage/triage-template.md +29 -0
  77. package/template/workflows/specdev/W-wayfinder/W-wayfinder.md +88 -155
  78. package/template/workflows/specdev/W-wayfinder/investigation-ticket-template.md +50 -0
  79. package/template/workflows/specdev/W-wayfinder/wayfinder-map-template.md +46 -0
  80. package/template/workflows/specdev/_state/status.json +1 -1
  81. package/template/workflows/specdev/common/README.md +47 -0
  82. package/template/workflows/specdev/common/rules/artifact-contract.md +57 -0
  83. package/template/workflows/specdev/common/rules/code-commenting-rule.md +39 -0
  84. package/template/workflows/specdev/common/rules/deviation-control.md +43 -0
  85. package/template/workflows/specdev/common/rules/evidence-and-verification.md +57 -0
  86. package/template/workflows/specdev/common/rules/path-ownership.md +35 -0
  87. package/template/workflows/specdev/common/rules/path-reference-contract.md +116 -0
  88. package/template/workflows/specdev/common/rules/planning-principles.md +57 -0
  89. package/template/workflows/specdev/common/rules/readiness-and-depth.md +51 -0
  90. package/template/workflows/specdev/common/schemas/change-status.schema.json +170 -0
  91. package/template/workflows/specdev/common/schemas/config.schema.json +54 -0
  92. package/template/workflows/specdev/common/schemas/goal-plan.schema.json +21 -0
  93. package/template/workflows/specdev/common/schemas/spec.schema.json +16 -0
  94. package/template/workflows/specdev/common/schemas/status.schema.json +149 -0
  95. package/template/workflows/specdev/common/schemas/ticket.schema.json +130 -0
  96. package/template/workflows/specdev/common/schemas/tickets-map.schema.json +14 -0
  97. package/template/workflows/specdev/common/skills/dev-worktree/SKILL.md +28 -0
  98. package/template/workflows/specdev/common/skills/dev-worktree/references/create.md +30 -0
  99. package/template/workflows/specdev/common/skills/dev-worktree/references/finalize.md +16 -0
  100. package/template/workflows/specdev/common/skills/research/SKILL.md +43 -0
  101. package/template/workflows/specdev/common/tools/README.md +16 -0
  102. package/template/workflows/specdev/common/tools/validate-specdev.mjs +1155 -0
  103. package/template/canonical/canonical-teach.md +0 -301
  104. package/template/workflows/specdev/A-archive-and-consolidate/archive-rules.md +0 -49
  105. package/template/workflows/specdev/A-archive-and-consolidate/cleanup-rules.md +0 -80
  106. package/template/workflows/specdev/A-archive-and-consolidate/consolidation-rules.md +0 -122
  107. package/template/workflows/specdev/A-archive-and-consolidate/discrimination-guide.md +0 -96
  108. package/template/workflows/specdev/A-archive-and-consolidate/knowledge-graduation.md +0 -51
  109. package/template/workflows/specdev/D-diagnose-bugs/cleanup-postmortem.md +0 -37
  110. package/template/workflows/specdev/D-diagnose-bugs/feedback-loop-techniques.md +0 -84
  111. package/template/workflows/specdev/D-diagnose-bugs/hypothesis-format.md +0 -46
  112. package/template/workflows/specdev/D-diagnose-bugs/instrumentation-rules.md +0 -51
  113. package/template/workflows/specdev/I-init-setup/domain-layout.md +0 -55
  114. package/template/workflows/specdev/I-init-setup/status-labels.md +0 -53
  115. package/template/workflows/specdev/I-init-setup/tracking-convention.md +0 -52
  116. package/template/workflows/specdev/P-goal-plan/execution-sections.md +0 -126
  117. package/template/workflows/specdev/P-goal-plan/governance-sections.md +0 -103
  118. package/template/workflows/specdev/P-goal-plan/input-validation.md +0 -94
  119. package/template/workflows/specdev/P-goal-plan/lead-orchestration-protocol.md +0 -158
  120. package/template/workflows/specdev/P-goal-plan/quick-reference-table.md +0 -60
  121. package/template/workflows/specdev/P-goal-plan/vision-sections.md +0 -80
  122. package/template/workflows/specdev/R-review-architecture/exploration-guide.md +0 -103
  123. package/template/workflows/specdev/R-review-architecture/html-report-template.md +0 -124
  124. package/template/workflows/specdev/T-triage/artifact-templates.md +0 -122
  125. package/template/workflows/specdev/T-triage/intake-rules.md +0 -71
  126. package/template/workflows/specdev/T-triage/routing-rules.md +0 -70
  127. package/template/workflows/specdev/T-triage/understanding-rules.md +0 -102
  128. package/template/workflows/specdev/_state/adr/.gitkeep +0 -0
  129. package/template/workflows/specdev/_state/context/.gitkeep +0 -0
  130. package/template/workflows/specdev/_state/research/.gitkeep +0 -0
  131. package/template/workflows/specdev/common/dev-worktree/SKILL.md +0 -48
  132. package/template/workflows/specdev/common/dev-worktree/references/create.md +0 -63
  133. package/template/workflows/specdev/common/dev-worktree/references/finalize.md +0 -102
  134. package/template/workflows/specdev/common/handoff/SKILL.md +0 -42
  135. package/template/workflows/specdev/common/neat-freak/SKILL.md +0 -210
  136. package/template/workflows/specdev/common/neat-freak/references/agent-paths.md +0 -72
  137. package/template/workflows/specdev/common/neat-freak/references/governance.md +0 -88
  138. package/template/workflows/specdev/common/neat-freak/references/sync-matrix.md +0 -77
  139. package/template/workflows/specdev/common/neat-freak/references/verification.md +0 -92
  140. package/template/workflows/specdev/common/neat-freak/scripts/audit-inventory.sh +0 -106
  141. package/template/workflows/specdev/common/prototype/LOGIC.md +0 -89
  142. package/template/workflows/specdev/common/prototype/SKILL.md +0 -78
  143. package/template/workflows/specdev/common/prototype/UI.md +0 -120
  144. package/template/workflows/specdev/common/research/SKILL.md +0 -54
  145. package/template/workflows/specdev/common/resolving-merge-conflicts/SKILL.md +0 -14
  146. package/template/workflows/specdev/common/scripts/hitl-loop.template.sh +0 -41
  147. package/template/workflows/specdev/common/triage/AGENT-BRIEF.md +0 -204
  148. package/template/workflows/specdev/common/triage/OUT-OF-SCOPE.md +0 -104
  149. package/template/workflows/specdev/common/triage/SKILL.md +0 -112
@@ -0,0 +1,170 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:speculo:specdev:change-status:v3",
4
+ "title": "SpecDev Change Status",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "artifact",
9
+ "change",
10
+ "change_status",
11
+ "current_work",
12
+ "created_at",
13
+ "updated_at",
14
+ "completed_at",
15
+ "archived",
16
+ "archive_path",
17
+ "blockers",
18
+ "deviations"
19
+ ],
20
+ "properties": {
21
+ "schema_version": {
22
+ "const": 3
23
+ },
24
+ "artifact": {
25
+ "const": "change-status"
26
+ },
27
+ "change": {
28
+ "type": "string",
29
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9]+(?:-[a-z0-9]+)*$"
30
+ },
31
+ "change_status": {
32
+ "enum": [
33
+ "active",
34
+ "blocked",
35
+ "completed",
36
+ "archived"
37
+ ]
38
+ },
39
+ "current_work": {
40
+ "type": [
41
+ "string",
42
+ "null"
43
+ ]
44
+ },
45
+ "created_at": {
46
+ "type": "string",
47
+ "minLength": 1
48
+ },
49
+ "updated_at": {
50
+ "type": "string",
51
+ "minLength": 1
52
+ },
53
+ "completed_at": {
54
+ "type": [
55
+ "string",
56
+ "null"
57
+ ]
58
+ },
59
+ "archived": {
60
+ "type": "boolean"
61
+ },
62
+ "archive_path": {
63
+ "anyOf": [
64
+ {
65
+ "type": "null"
66
+ },
67
+ {
68
+ "type": "string",
69
+ "pattern": "^<Path>\\{roots\\.state\\}/specdev/archive/[^<]+</Path>$"
70
+ }
71
+ ]
72
+ },
73
+ "blockers": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "string"
77
+ }
78
+ },
79
+ "deviations": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "string"
83
+ }
84
+ },
85
+ "worktrees": {
86
+ "type": "array",
87
+ "items": {
88
+ "type": "object",
89
+ "required": [
90
+ "ticket_id",
91
+ "owner",
92
+ "provider",
93
+ "base_sha",
94
+ "branch",
95
+ "workspace_ref",
96
+ "status",
97
+ "updated_at"
98
+ ],
99
+ "properties": {
100
+ "ticket_id": {
101
+ "type": "string",
102
+ "pattern": "^T-[0-9]{2,}$"
103
+ },
104
+ "owner": {
105
+ "type": "string",
106
+ "minLength": 1
107
+ },
108
+ "provider": {
109
+ "enum": [
110
+ "native",
111
+ "git",
112
+ "external"
113
+ ]
114
+ },
115
+ "base_sha": {
116
+ "type": "string",
117
+ "minLength": 1
118
+ },
119
+ "branch": {
120
+ "type": "string",
121
+ "minLength": 1
122
+ },
123
+ "workspace_ref": {
124
+ "type": "string",
125
+ "minLength": 1,
126
+ "pattern": "^(?!/)(?![A-Za-z]:[\\\\/]).+"
127
+ },
128
+ "status": {
129
+ "enum": [
130
+ "planned",
131
+ "active",
132
+ "review",
133
+ "integrated",
134
+ "removed",
135
+ "blocked"
136
+ ]
137
+ },
138
+ "updated_at": {
139
+ "type": "string",
140
+ "minLength": 1
141
+ }
142
+ },
143
+ "additionalProperties": true
144
+ }
145
+ }
146
+ },
147
+ "allOf": [
148
+ {
149
+ "if": {
150
+ "properties": {
151
+ "change_status": {
152
+ "const": "archived"
153
+ }
154
+ }
155
+ },
156
+ "then": {
157
+ "properties": {
158
+ "archived": {
159
+ "const": true
160
+ },
161
+ "archive_path": {
162
+ "type": "string",
163
+ "pattern": "^<Path>\\{roots\\.state\\}/specdev/archive/[^<]+</Path>$"
164
+ }
165
+ }
166
+ }
167
+ }
168
+ ],
169
+ "additionalProperties": true
170
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:speculo:specdev:config:v3",
4
+ "title": "SpecDev Configuration",
5
+ "type": "object",
6
+ "required": ["schema_version", "interaction_language", "artifact_language", "git", "execution", "verification", "planning"],
7
+ "properties": {
8
+ "schema_version": {"const": 3},
9
+ "interaction_language": {"type": "string", "minLength": 1},
10
+ "artifact_language": {"type": "string", "minLength": 1},
11
+ "git": {
12
+ "type": "object",
13
+ "required": ["auto_commit", "default_branch", "worktree_for_parallel"],
14
+ "properties": {
15
+ "auto_commit": {"type": "boolean"},
16
+ "default_branch": {"type": ["string", "null"]},
17
+ "worktree_for_parallel": {"type": "boolean"}
18
+ },
19
+ "additionalProperties": true
20
+ },
21
+ "execution": {
22
+ "type": "object",
23
+ "required": ["max_parallel", "deep_ticket_human_approval", "shared_path_owner"],
24
+ "properties": {
25
+ "max_parallel": {"type": "integer", "minimum": 1},
26
+ "deep_ticket_human_approval": {"type": "boolean"},
27
+ "shared_path_owner": {"type": "string", "minLength": 1}
28
+ },
29
+ "additionalProperties": true
30
+ },
31
+ "verification": {
32
+ "type": "object",
33
+ "required": ["test", "typecheck", "lint", "build"],
34
+ "properties": {
35
+ "test": {"type": ["string", "null"]},
36
+ "typecheck": {"type": ["string", "null"]},
37
+ "lint": {"type": ["string", "null"]},
38
+ "build": {"type": ["string", "null"]}
39
+ },
40
+ "additionalProperties": true
41
+ },
42
+ "planning": {
43
+ "type": "object",
44
+ "required": ["default_depth", "require_ready_gate", "require_evidence"],
45
+ "properties": {
46
+ "default_depth": {"enum": ["lite", "standard", "deep"]},
47
+ "require_ready_gate": {"type": "boolean"},
48
+ "require_evidence": {"type": "boolean"}
49
+ },
50
+ "additionalProperties": true
51
+ }
52
+ },
53
+ "additionalProperties": true
54
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:speculo:specdev:goal-plan:v3",
4
+ "title": "SpecDev Goal Plan Frontmatter",
5
+ "type": "object",
6
+ "required": ["schema_version", "artifact", "change", "status", "modes", "ready_for_execution"],
7
+ "properties": {
8
+ "schema_version": {"const": 3},
9
+ "artifact": {"const": "goal-plan"},
10
+ "change": {"type": "string", "minLength": 1},
11
+ "status": {"enum": ["draft", "ready", "in_progress", "completed", "blocked"]},
12
+ "modes": {
13
+ "type": "array",
14
+ "items": {"enum": ["coordination", "migration", "high-assurance", "reference-conformance", "release-coordination"]},
15
+ "minItems": 1,
16
+ "uniqueItems": true
17
+ },
18
+ "ready_for_execution": {"type": "boolean"}
19
+ },
20
+ "additionalProperties": true
21
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:speculo:specdev:spec:v3",
4
+ "title": "SpecDev Spec Frontmatter",
5
+ "type": "object",
6
+ "required": ["schema_version", "artifact", "change", "status", "ready_for_tickets", "sources"],
7
+ "properties": {
8
+ "schema_version": {"const": 3},
9
+ "artifact": {"const": "spec"},
10
+ "change": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9]+(?:-[a-z0-9]+)*$"},
11
+ "status": {"enum": ["draft", "ready", "superseded"]},
12
+ "ready_for_tickets": {"type": "boolean"},
13
+ "sources": {"type": "array", "items": {"type": "string", "minLength": 1}, "minItems": 1, "uniqueItems": true}
14
+ },
15
+ "additionalProperties": true
16
+ }
@@ -0,0 +1,149 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:speculo:specdev:status:v3",
4
+ "title": "SpecDev Global Status",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "workflow",
9
+ "active",
10
+ "work_history",
11
+ "completed"
12
+ ],
13
+ "properties": {
14
+ "schema_version": {
15
+ "const": 3
16
+ },
17
+ "workflow": {
18
+ "const": "specdev"
19
+ },
20
+ "active": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "required": [
25
+ "change",
26
+ "current_work",
27
+ "works_run",
28
+ "result"
29
+ ],
30
+ "properties": {
31
+ "change": {
32
+ "type": "string"
33
+ },
34
+ "current_work": {
35
+ "type": [
36
+ "string",
37
+ "null"
38
+ ]
39
+ },
40
+ "works_run": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "string"
44
+ }
45
+ },
46
+ "result": {
47
+ "type": [
48
+ "string",
49
+ "null"
50
+ ]
51
+ },
52
+ "claimed_investigations": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "object",
56
+ "required": [
57
+ "id",
58
+ "owner",
59
+ "claimed_at"
60
+ ],
61
+ "properties": {
62
+ "id": {
63
+ "type": "string"
64
+ },
65
+ "owner": {
66
+ "type": "string"
67
+ },
68
+ "session": {
69
+ "type": [
70
+ "string",
71
+ "null"
72
+ ]
73
+ },
74
+ "claimed_at": {
75
+ "type": "string"
76
+ }
77
+ },
78
+ "additionalProperties": true
79
+ }
80
+ }
81
+ },
82
+ "additionalProperties": true
83
+ }
84
+ },
85
+ "work_history": {
86
+ "type": "array",
87
+ "items": {
88
+ "type": "object",
89
+ "required": [
90
+ "change",
91
+ "work_id",
92
+ "started_at",
93
+ "completed_at",
94
+ "result"
95
+ ],
96
+ "properties": {
97
+ "change": {
98
+ "type": "string"
99
+ },
100
+ "work_id": {
101
+ "type": "string",
102
+ "pattern": "^specdev/"
103
+ },
104
+ "started_at": {
105
+ "type": "string"
106
+ },
107
+ "completed_at": {
108
+ "type": [
109
+ "string",
110
+ "null"
111
+ ]
112
+ },
113
+ "result": {
114
+ "type": [
115
+ "string",
116
+ "null"
117
+ ]
118
+ }
119
+ },
120
+ "additionalProperties": true
121
+ }
122
+ },
123
+ "completed": {
124
+ "type": "array",
125
+ "items": {
126
+ "type": "object",
127
+ "required": [
128
+ "change",
129
+ "archived_at",
130
+ "archive_path"
131
+ ],
132
+ "properties": {
133
+ "change": {
134
+ "type": "string"
135
+ },
136
+ "archived_at": {
137
+ "type": "string"
138
+ },
139
+ "archive_path": {
140
+ "type": "string",
141
+ "pattern": "^<Path>\\{roots\\.state\\}/specdev/archive/[^<]+</Path>$"
142
+ }
143
+ },
144
+ "additionalProperties": true
145
+ }
146
+ }
147
+ },
148
+ "additionalProperties": true
149
+ }
@@ -0,0 +1,130 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:speculo:specdev:ticket:v3",
4
+ "title": "SpecDev Ticket Frontmatter",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "artifact",
9
+ "change",
10
+ "id",
11
+ "title",
12
+ "status",
13
+ "planning_depth",
14
+ "planning_depth_reason",
15
+ "ready",
16
+ "risk",
17
+ "blocked_by",
18
+ "contract_ids",
19
+ "owner",
20
+ "expected_changes",
21
+ "writable_paths",
22
+ "read_only_paths",
23
+ "shared_paths",
24
+ "shared_path_owners"
25
+ ],
26
+ "properties": {
27
+ "schema_version": {
28
+ "const": 3
29
+ },
30
+ "artifact": {
31
+ "const": "ticket"
32
+ },
33
+ "change": {
34
+ "type": "string",
35
+ "minLength": 1
36
+ },
37
+ "id": {
38
+ "type": "string",
39
+ "pattern": "^T-[0-9]{2,}$"
40
+ },
41
+ "title": {
42
+ "type": "string",
43
+ "minLength": 1
44
+ },
45
+ "status": {
46
+ "enum": [
47
+ "draft",
48
+ "ready",
49
+ "in_progress",
50
+ "blocked",
51
+ "review",
52
+ "done",
53
+ "deviated",
54
+ "cancelled"
55
+ ]
56
+ },
57
+ "planning_depth": {
58
+ "enum": [
59
+ "lite",
60
+ "standard",
61
+ "deep"
62
+ ]
63
+ },
64
+ "planning_depth_reason": {
65
+ "type": "string",
66
+ "minLength": 1
67
+ },
68
+ "ready": {
69
+ "type": "boolean"
70
+ },
71
+ "risk": {
72
+ "enum": [
73
+ "low",
74
+ "medium",
75
+ "high",
76
+ "critical"
77
+ ]
78
+ },
79
+ "blocked_by": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "string",
83
+ "pattern": "^T-[0-9]{2,}$"
84
+ },
85
+ "uniqueItems": true
86
+ },
87
+ "contract_ids": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "string"
91
+ },
92
+ "uniqueItems": true
93
+ },
94
+ "owner": {
95
+ "type": "string",
96
+ "minLength": 1
97
+ },
98
+ "expected_changes": {
99
+ "$ref": "#/$defs/pathArray"
100
+ },
101
+ "writable_paths": {
102
+ "$ref": "#/$defs/pathArray"
103
+ },
104
+ "read_only_paths": {
105
+ "$ref": "#/$defs/pathArray"
106
+ },
107
+ "shared_paths": {
108
+ "$ref": "#/$defs/pathArray"
109
+ },
110
+ "shared_path_owners": {
111
+ "type": "array",
112
+ "items": {
113
+ "type": "string",
114
+ "pattern": "^<Path>[^<]+</Path>\\s*=>\\s*[^=].+$"
115
+ },
116
+ "uniqueItems": true
117
+ }
118
+ },
119
+ "$defs": {
120
+ "pathArray": {
121
+ "type": "array",
122
+ "items": {
123
+ "type": "string",
124
+ "pattern": "^<Path>[^<]+</Path>$"
125
+ },
126
+ "uniqueItems": true
127
+ }
128
+ },
129
+ "additionalProperties": true
130
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:speculo:specdev:tickets-map:v3",
4
+ "title": "SpecDev Tickets Map Frontmatter",
5
+ "type": "object",
6
+ "required": ["schema_version", "artifact", "change", "status"],
7
+ "properties": {
8
+ "schema_version": {"const": 3},
9
+ "artifact": {"const": "tickets-map"},
10
+ "change": {"type": "string", "minLength": 1},
11
+ "status": {"enum": ["draft", "ready", "in_progress", "completed", "blocked"]}
12
+ },
13
+ "additionalProperties": true
14
+ }
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: specdev-dev-worktree
3
+ description: 为并行写代码的 Ready Ticket 建立隔离 worktree,并由 Lead 完成基线、集成验证和清理。Goal Plan Lead 在创建、恢复或收尾 Ticket worktree 时使用。
4
+ ---
5
+
6
+ # SpecDev Dev Worktree
7
+
8
+ ## 适用范围
9
+
10
+ - 仅用于并行写代码且路径所有权不冲突的 Ready Ticket。
11
+ - 只读调查和顺序执行默认共用当前工作区。
12
+ - Lead 管理创建、集成和清理;Worker 只实现、验证并返回 Evidence。
13
+ - 平台原生 worktree 优先;不可用时使用 Git worktree。
14
+
15
+ ## 生命周期
16
+
17
+ 1. 创建或恢复时加载 `<Path>{roots.workflows}/specdev/common/skills/dev-worktree/references/create.md</Path>`。
18
+ 2. Worker 完成后将记录从 `active` 更新为 `review`,返回 Ticket 状态、Evidence 路径、`workspace_ref`、commit 或 PR 引用,以及条件性 Lead E2E。
19
+ 3. Lead 集成或清理时加载 `<Path>{roots.workflows}/specdev/common/skills/dev-worktree/references/finalize.md</Path>`。
20
+
21
+ 状态依次为 `planned → active → review → integrated → removed`;失败进入 `blocked`。记录写入 `<Path>{roots.state}/specdev/changes/{change}/.status.json</Path>` 的 `worktrees`。
22
+
23
+ ## 边界
24
+
25
+ - 每个并行 Ticket 使用独立 worktree、分支和相同 `base_sha`。
26
+ - 持久状态只保存 `workspace_ref`,不保存机器绝对路径。
27
+ - E2E 仅由 Lead 在集成阶段执行,且仅适用于用户界面交互受影响的变更。
28
+ - 合并、推送、PR、删除分支或 worktree 仍需用户授权。
@@ -0,0 +1,30 @@
1
+ # 创建或恢复 Ticket Worktree
2
+
3
+ ## 前置
4
+
5
+ - Ticket `ready: true`,依赖完成,写路径无冲突。
6
+ - `<Path>{roots.state}/specdev/config.json</Path>` 中 `git.worktree_for_parallel: true`。
7
+ - Lead 已固定所有并行 Ticket 共用的 `base_sha`。
8
+
9
+ ## 创建
10
+
11
+ 1. 若 `<Path>{roots.state}/specdev/changes/{change}/.status.json</Path>` 的 `worktrees` 已有该 Ticket 的 `active` 或 `review` 记录,解析 `workspace_ref` 并验证分支、`base_sha` 和工作区状态;一致则恢复。
12
+ 2. 否则优先调用平台原生 worktree 能力;不可用时从 `base_sha` 执行 `git worktree add -b <ticket-branch> <physical-path> <base-sha>`。物理路径必须位于主工作树之外。
13
+ 3. 分支使用 `speculo/<change>/<ticket-id>`;现有分支或目标路径未能匹配记录时停止。
14
+ 4. 安装项目所需依赖,运行最小基线检查。E2E 不属于 Worker 基线。
15
+ 5. 写入 `worktrees`:
16
+
17
+ ```json
18
+ {
19
+ "ticket_id": "T-01",
20
+ "owner": "<worker>",
21
+ "provider": "native",
22
+ "base_sha": "<sha>",
23
+ "branch": "speculo/<change>/T-01",
24
+ "workspace_ref": "<provider-opaque-or-project-relative-ref>",
25
+ "status": "active",
26
+ "updated_at": "<ISO-8601>"
27
+ }
28
+ ```
29
+
30
+ 完成条件:工作区可定位、基线可用、状态记录与实际分支一致。失败时设为 `blocked` 并保留现场。
@@ -0,0 +1,16 @@
1
+ # 集成与清理 Ticket Worktree
2
+
3
+ ## Lead 集成
4
+
5
+ 1. 确认记录为 `review`,读取 Worker Evidence,实际修改未越过路径契约。
6
+ 2. 在目标集成基线上应用变更并运行受影响的定向与回归验证。
7
+ 3. 仅当变更影响用户界面交互时,由 Lead 运行验收所需的最小 E2E;Worker 只提供场景和预期结果。
8
+ 4. 验证通过后将记录更新为 `integrated`;冲突或失败时设为 `blocked` 并保留 worktree。
9
+
10
+ ## 清理
11
+
12
+ 1. 取得用户对删除 worktree 和分支的授权。
13
+ 2. 从主工作树或平台管理入口移除已集成 worktree。
14
+ 3. 确认 worktree 不再注册后删除对应分支,并将状态更新为 `removed`。
15
+
16
+ PR 或暂缓集成时保留 worktree。清理失败时停止;仅在用户明确要求时使用强制删除。
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: specdev-research
3
+ description: 针对影响 SpecDev 决策的外部技术、依赖、标准或未知行为进行来源分级研究,并输出可追踪的结论与不确定性。
4
+ ---
5
+
6
+ # SpecDev Research
7
+
8
+ ## 触发
9
+
10
+ 当外部 API、库版本、协议、法规、产品能力或最佳实践会改变设计/实现决策,且当前材料不足时使用。
11
+
12
+ ## 流程
13
+
14
+ 1. 写清楚要支持的具体决策和停止条件。
15
+ 2. 优先官方文档、规范、源代码、论文或维护者材料;技术问题优先一手来源。
16
+ 3. 核对版本、发布日期、适用环境和已知限制。
17
+ 4. 区分:来源明确事实、代码库事实、推断、建议。
18
+ 5. 对关键结论至少交叉验证;来源冲突时并列呈现,不强行调和。
19
+ 6. 记录摘要、证据、置信度、对 ADR/Spec/Ticket 的影响和仍未知项。
20
+ 7. 长期有效且经实现验证后才可由 Archive 提升到永久 research。
21
+
22
+ ## 输出模板
23
+
24
+ ```markdown
25
+ # Research: <问题>
26
+ - 决策用途:
27
+ - 范围/版本:
28
+ - 停止条件:
29
+
30
+ ## Findings
31
+ ### R-001
32
+ - 结论:
33
+ - 类型:官方事实 / 代码事实 / 推断 / 建议
34
+ - 来源:
35
+ - 置信度:high / medium / low
36
+ - 适用限制:
37
+ - 对工件影响:
38
+
39
+ ## Conflicts and Unknowns
40
+ ## Recommendation
41
+ ```
42
+
43
+ 不得长篇复制受版权保护的来源;使用短引文和自己的准确摘要。