specweave 3.0.15 → 3.0.16
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-plugin/marketplace.json +2 -2
- package/README.md +12 -1
- package/bin/specweave.js +25 -7
- package/dist/plugins/specweave/lib/integrations/github/github-client-v2.js +2 -2
- package/dist/plugins/specweave/lib/integrations/github/github-client-v2.js.map +1 -1
- package/dist/src/cli/commands/auto-status.d.ts +0 -10
- package/dist/src/cli/commands/auto-status.d.ts.map +1 -1
- package/dist/src/cli/commands/auto-status.js +3 -2
- package/dist/src/cli/commands/auto-status.js.map +1 -1
- package/dist/src/cli/commands/auto.d.ts +0 -17
- package/dist/src/cli/commands/auto.d.ts.map +1 -1
- package/dist/src/cli/commands/auto.js +8 -14
- package/dist/src/cli/commands/auto.js.map +1 -1
- package/dist/src/cli/commands/get.d.ts +4 -0
- package/dist/src/cli/commands/get.d.ts.map +1 -1
- package/dist/src/cli/commands/get.js +15 -33
- package/dist/src/cli/commands/get.js.map +1 -1
- package/dist/src/cli/commands/qa.js +2 -2
- package/dist/src/cli/commands/qa.js.map +1 -1
- package/dist/src/cli/commands/save.js +1 -1
- package/dist/src/cli/commands/save.js.map +1 -1
- package/dist/src/cli/commands/sync-progress.d.ts +0 -10
- package/dist/src/cli/commands/sync-progress.d.ts.map +1 -1
- package/dist/src/cli/commands/sync-progress.js +21 -27
- package/dist/src/cli/commands/sync-progress.js.map +1 -1
- package/dist/src/cli/commands/task.js +1 -1
- package/dist/src/cli/commands/task.js.map +1 -1
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/cli/commands/update.js.map +1 -1
- package/dist/src/cli/helpers/get/register-repo.d.ts +1 -11
- package/dist/src/cli/helpers/get/register-repo.d.ts.map +1 -1
- package/dist/src/cli/helpers/get/register-repo.js +6 -85
- package/dist/src/cli/helpers/get/register-repo.js.map +1 -1
- package/dist/src/cli/helpers/get/source-parser.d.ts +1 -1
- package/dist/src/cli/helpers/get/source-parser.d.ts.map +1 -1
- package/dist/src/cli/helpers/get/source-parser.js +4 -4
- package/dist/src/cli/helpers/get/source-parser.js.map +1 -1
- package/dist/src/cli/helpers/init/path-utils.d.ts +1 -1
- package/dist/src/cli/helpers/init/path-utils.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/path-utils.js +44 -2
- package/dist/src/cli/helpers/init/path-utils.js.map +1 -1
- package/dist/src/cli/helpers/init/types.d.ts +1 -0
- package/dist/src/cli/helpers/init/types.d.ts.map +1 -1
- package/dist/src/core/ac-test-validator-cli.js +1 -1
- package/dist/src/core/ac-test-validator-cli.js.map +1 -1
- package/dist/src/core/config/types.d.ts +3 -1
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/doctor/checkers/increments-checker.js +2 -2
- package/dist/src/core/doctor/checkers/increments-checker.js.map +1 -1
- package/dist/src/core/hooks/handlers/hook-router.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/hook-router.js +5 -7
- package/dist/src/core/hooks/handlers/hook-router.js.map +1 -1
- package/dist/src/core/hooks/handlers/stop.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/stop.js +17 -14
- package/dist/src/core/hooks/handlers/stop.js.map +1 -1
- package/dist/src/core/hooks/handlers/utils.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/utils.js +7 -15
- package/dist/src/core/hooks/handlers/utils.js.map +1 -1
- package/dist/src/core/increment/duplicate-detector.d.ts +0 -8
- package/dist/src/core/increment/duplicate-detector.d.ts.map +1 -1
- package/dist/src/core/increment/duplicate-detector.js +15 -11
- package/dist/src/core/increment/duplicate-detector.js.map +1 -1
- package/dist/src/core/increment/increment-archiver.d.ts +0 -6
- package/dist/src/core/increment/increment-archiver.d.ts.map +1 -1
- package/dist/src/core/increment/increment-archiver.js +10 -5
- package/dist/src/core/increment/increment-archiver.js.map +1 -1
- package/dist/src/core/increment/increment-utils.d.ts +6 -6
- package/dist/src/core/increment/increment-utils.d.ts.map +1 -1
- package/dist/src/core/increment/increment-utils.js +26 -27
- package/dist/src/core/increment/increment-utils.js.map +1 -1
- package/dist/src/core/increment/metadata-manager.d.ts.map +1 -1
- package/dist/src/core/increment/metadata-manager.js +19 -6
- package/dist/src/core/increment/metadata-manager.js.map +1 -1
- package/dist/src/core/increment/number-reservation.d.ts +16 -0
- package/dist/src/core/increment/number-reservation.d.ts.map +1 -0
- package/dist/src/core/increment/number-reservation.js +125 -0
- package/dist/src/core/increment/number-reservation.js.map +1 -0
- package/dist/src/core/increment/template-creator.d.ts.map +1 -1
- package/dist/src/core/increment/template-creator.js +11 -43
- package/dist/src/core/increment/template-creator.js.map +1 -1
- package/dist/src/core/living-docs/feature-archiver.js +3 -3
- package/dist/src/core/living-docs/feature-archiver.js.map +1 -1
- package/dist/src/core/living-docs/feature-consistency-validator.js +1 -1
- package/dist/src/core/living-docs/feature-consistency-validator.js.map +1 -1
- package/dist/src/core/living-docs/feature-id-manager.js +2 -2
- package/dist/src/core/living-docs/feature-id-manager.js.map +1 -1
- package/dist/src/core/living-docs/hierarchy-mapper.js +3 -3
- package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/dist/src/core/qa/qa-runner.d.ts +0 -6
- package/dist/src/core/qa/qa-runner.d.ts.map +1 -1
- package/dist/src/core/qa/qa-runner.js +8 -10
- package/dist/src/core/qa/qa-runner.js.map +1 -1
- package/dist/src/core/session/handoff-all.d.ts +2 -2
- package/dist/src/core/session/handoff-all.d.ts.map +1 -1
- package/dist/src/core/session/handoff-all.js +5 -3
- package/dist/src/core/session/handoff-all.js.map +1 -1
- package/dist/src/core/session/handoff-list.d.ts +0 -19
- package/dist/src/core/session/handoff-list.d.ts.map +1 -1
- package/dist/src/core/session/handoff-list.js +7 -4
- package/dist/src/core/session/handoff-list.js.map +1 -1
- package/dist/src/core/session/handoff-remote.d.ts +0 -19
- package/dist/src/core/session/handoff-remote.d.ts.map +1 -1
- package/dist/src/core/session/handoff-remote.js +3 -3
- package/dist/src/core/session/handoff-remote.js.map +1 -1
- package/dist/src/core/session/nested-repos.d.ts.map +1 -1
- package/dist/src/core/session/nested-repos.js +7 -1
- package/dist/src/core/session/nested-repos.js.map +1 -1
- package/dist/src/core/specs/spec-metadata-manager.js +1 -1
- package/dist/src/core/specs/spec-metadata-manager.js.map +1 -1
- package/dist/src/core/specs/spec-parser.js +1 -1
- package/dist/src/core/specs/spec-parser.js.map +1 -1
- package/dist/src/core/tasks/resolve-increment.d.ts.map +1 -1
- package/dist/src/core/tasks/resolve-increment.js +3 -2
- package/dist/src/core/tasks/resolve-increment.js.map +1 -1
- package/dist/src/core/types/increment-metadata.d.ts +2 -0
- package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
- package/dist/src/core/types/increment-metadata.js.map +1 -1
- package/dist/src/core/workspace/adoption.d.ts +21 -0
- package/dist/src/core/workspace/adoption.d.ts.map +1 -0
- package/dist/src/core/workspace/adoption.js +187 -0
- package/dist/src/core/workspace/adoption.js.map +1 -0
- package/dist/src/core/workspace/context.d.ts +21 -0
- package/dist/src/core/workspace/context.d.ts.map +1 -0
- package/dist/src/core/workspace/context.js +105 -0
- package/dist/src/core/workspace/context.js.map +1 -0
- package/dist/src/importers/item-converter.js +1 -1
- package/dist/src/importers/item-converter.js.map +1 -1
- package/dist/src/sync/github-reconciler.js +2 -2
- package/dist/src/sync/github-reconciler.js.map +1 -1
- package/dist/src/utils/external-tool-drift-detector.js +1 -1
- package/dist/src/utils/external-tool-drift-detector.js.map +1 -1
- package/dist/src/utils/feature-id-collision.js +1 -1
- package/dist/src/utils/feature-id-collision.js.map +1 -1
- package/dist/src/utils/find-project-root.d.ts.map +1 -1
- package/dist/src/utils/find-project-root.js +16 -36
- package/dist/src/utils/find-project-root.js.map +1 -1
- package/dist/src/utils/increment-id-validator.d.ts +27 -67
- package/dist/src/utils/increment-id-validator.d.ts.map +1 -1
- package/dist/src/utils/increment-id-validator.js +57 -106
- package/dist/src/utils/increment-id-validator.js.map +1 -1
- package/dist/src/utils/resolve-increment-id.d.ts +0 -22
- package/dist/src/utils/resolve-increment-id.d.ts.map +1 -1
- package/dist/src/utils/resolve-increment-id.js +17 -41
- package/dist/src/utils/resolve-increment-id.js.map +1 -1
- package/package.json +2 -1
- package/plugins/specweave/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave/lib/integrations/github/github-client-v2.js +2 -2
- package/plugins/specweave/lib/integrations/github/github-client-v2.ts +2 -2
- package/src/core/schemas/specweave-config.schema.json +1130 -0
- package/src/core/schemas/sync.schema.json +687 -0
- package/src/core/schemas/workspace.schema.json +209 -0
- package/src/templates/git-hooks/pre-commit.template +4 -4
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"description": "Unified workspace configuration (v3.0). Replaces umbrella, multiProject, and projectMappings.",
|
|
5
|
+
"properties": {
|
|
6
|
+
"name": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Workspace display name",
|
|
9
|
+
"minLength": 1,
|
|
10
|
+
"maxLength": 256
|
|
11
|
+
},
|
|
12
|
+
"rootRepo": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"description": "Sync targets for the root/umbrella repo itself",
|
|
15
|
+
"properties": {
|
|
16
|
+
"github": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"owner": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1
|
|
22
|
+
},
|
|
23
|
+
"repo": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1
|
|
26
|
+
},
|
|
27
|
+
"direction": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"import",
|
|
31
|
+
"export",
|
|
32
|
+
"bidirectional"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": [
|
|
37
|
+
"owner",
|
|
38
|
+
"repo"
|
|
39
|
+
],
|
|
40
|
+
"additionalProperties": false
|
|
41
|
+
},
|
|
42
|
+
"jira": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"projectKey": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"minLength": 1
|
|
48
|
+
},
|
|
49
|
+
"domain": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": [
|
|
54
|
+
"projectKey"
|
|
55
|
+
],
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
},
|
|
58
|
+
"ado": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"organization": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"project": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": [
|
|
70
|
+
"project"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
},
|
|
77
|
+
"repos": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"description": "All repos in this workspace",
|
|
80
|
+
"items": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"description": "A repository within the workspace",
|
|
83
|
+
"properties": {
|
|
84
|
+
"id": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "Stable workspace identifier; adopted repositories include the source owner",
|
|
87
|
+
"pattern": "^[a-z0-9-]+$",
|
|
88
|
+
"minLength": 1,
|
|
89
|
+
"maxLength": 64
|
|
90
|
+
},
|
|
91
|
+
"path": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"description": "Path to repo (relative or absolute)"
|
|
94
|
+
},
|
|
95
|
+
"identity": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"description": "Credential-free canonical origin host/owner/repository; checkout path remains distinct"
|
|
98
|
+
},
|
|
99
|
+
"prefix": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"description": "User story prefix for US-{PREFIX}-001 format",
|
|
102
|
+
"minLength": 1,
|
|
103
|
+
"maxLength": 10
|
|
104
|
+
},
|
|
105
|
+
"name": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"description": "Display name (defaults to id)",
|
|
108
|
+
"maxLength": 128
|
|
109
|
+
},
|
|
110
|
+
"techStack": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"description": "Tech stack keywords",
|
|
113
|
+
"items": {
|
|
114
|
+
"type": "string"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"role": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"description": "Repository role",
|
|
120
|
+
"enum": [
|
|
121
|
+
"frontend",
|
|
122
|
+
"backend",
|
|
123
|
+
"mobile",
|
|
124
|
+
"infra",
|
|
125
|
+
"shared",
|
|
126
|
+
"other"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"sync": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"description": "Sync targets for this repo",
|
|
132
|
+
"properties": {
|
|
133
|
+
"github": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"properties": {
|
|
136
|
+
"owner": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"minLength": 1
|
|
139
|
+
},
|
|
140
|
+
"repo": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"minLength": 1
|
|
143
|
+
},
|
|
144
|
+
"direction": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"enum": [
|
|
147
|
+
"import",
|
|
148
|
+
"export",
|
|
149
|
+
"bidirectional"
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"required": [
|
|
154
|
+
"owner",
|
|
155
|
+
"repo"
|
|
156
|
+
],
|
|
157
|
+
"additionalProperties": false
|
|
158
|
+
},
|
|
159
|
+
"jira": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"properties": {
|
|
162
|
+
"projectKey": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"minLength": 1
|
|
165
|
+
},
|
|
166
|
+
"domain": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"required": [
|
|
171
|
+
"projectKey"
|
|
172
|
+
],
|
|
173
|
+
"additionalProperties": false
|
|
174
|
+
},
|
|
175
|
+
"ado": {
|
|
176
|
+
"type": "object",
|
|
177
|
+
"properties": {
|
|
178
|
+
"organization": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
},
|
|
181
|
+
"project": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"minLength": 1
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"required": [
|
|
187
|
+
"project"
|
|
188
|
+
],
|
|
189
|
+
"additionalProperties": false
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"additionalProperties": false
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"required": [
|
|
196
|
+
"id",
|
|
197
|
+
"path",
|
|
198
|
+
"prefix"
|
|
199
|
+
],
|
|
200
|
+
"additionalProperties": false
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"required": [
|
|
205
|
+
"name",
|
|
206
|
+
"repos"
|
|
207
|
+
],
|
|
208
|
+
"additionalProperties": false
|
|
209
|
+
}
|
|
@@ -129,14 +129,14 @@ ALLOWED_INCREMENT_ROOT_FILES="{{ALLOWED_INCREMENT_ROOT_FILES}}"
|
|
|
129
129
|
echo "2️⃣ Checking increment folder cleanliness..."
|
|
130
130
|
|
|
131
131
|
# Get staged files in increment directories
|
|
132
|
-
STAGED_INCREMENT_FILES=$(git diff --cached --name-only --diff-filter=AM | grep -E '\.specweave/increments/[0-9]{
|
|
132
|
+
STAGED_INCREMENT_FILES=$(git diff --cached --name-only --diff-filter=AM | grep -E '\.specweave/increments/[0-9]{3,}[A-Za-z]?-' || true)
|
|
133
133
|
|
|
134
134
|
if [ -n "$STAGED_INCREMENT_FILES" ]; then
|
|
135
135
|
POLLUTION_FOUND=0
|
|
136
136
|
|
|
137
137
|
for file in $STAGED_INCREMENT_FILES; do
|
|
138
138
|
# Extract increment directory and relative path within it
|
|
139
|
-
increment_dir=$(echo "$file" | grep -oE '\.specweave/increments/[0-9]{
|
|
139
|
+
increment_dir=$(echo "$file" | grep -oE '\.specweave/increments/[0-9]{3,}[A-Za-z]?-[^/]+' || true)
|
|
140
140
|
if [ -n "$increment_dir" ]; then
|
|
141
141
|
# Get path relative to increment directory
|
|
142
142
|
relative_path=$(echo "$file" | sed "s|^$increment_dir/||")
|
|
@@ -200,8 +200,8 @@ if [ -d ".specweave/increments" ]; then
|
|
|
200
200
|
# Get all increment IDs across ALL directories (including _archive, _paused, etc.)
|
|
201
201
|
# -name filters on the directory's OWN basename, so `0001-slug/reports`
|
|
202
202
|
# (depth 2) is NOT counted as a second `0001` while `_archive/0002-slug` is.
|
|
203
|
-
ALL_IDS=$(find .specweave/increments -maxdepth 2 -type d -name '[0-9]
|
|
204
|
-
sed 's|.*/||' |
|
|
203
|
+
ALL_IDS=$(find .specweave/increments -maxdepth 2 -type d -name '[0-9]*-*' | \
|
|
204
|
+
sed 's|.*/||' | grep -E '^[0-9]{3,}[A-Za-z]?-' | sed -E 's/^([0-9]+)[A-Za-z]?-.*/\1/; s/^0+//; s/^$/0/' | \
|
|
205
205
|
sort)
|
|
206
206
|
|
|
207
207
|
# Check for duplicates
|