gemstack-ai 1.1.2 → 1.2.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.
- package/.agents/skills/gemstack-plan/SKILL.md +2 -1
- package/.agents/skills/gemstack-qa/SKILL.md +3 -0
- package/.agents/skills/gemstack-ship/SKILL.md +5 -1
- package/.agents/skills/gemstack-spec/SKILL.md +3 -2
- package/.agents/skills/gemstack-tasks/SKILL.md +4 -3
- package/.gemstack/state.json +7 -9
- package/CHANGELOG.md +32 -0
- package/README.md +13 -0
- package/RELEASE_NOTES.md +24 -0
- package/docs/architecture-consistency.md +14 -2
- package/docs/spec-driven-development.md +26 -0
- package/{gemstack-ai-1.1.2.tgz → gemstack-ai-1.2.0.tgz} +0 -0
- package/handoff.md +28 -15
- package/package.json +2 -2
- package/specs/007-mechanical-test-matrix-closure-evidence/.gemstack.json +5 -0
- package/specs/007-mechanical-test-matrix-closure-evidence/closure.json +59 -0
- package/specs/007-mechanical-test-matrix-closure-evidence/plan.md +484 -0
- package/specs/007-mechanical-test-matrix-closure-evidence/spec.md +597 -0
- package/specs/007-mechanical-test-matrix-closure-evidence/tasks.md +536 -0
- package/specs/templates/plan.md +30 -0
- package/specs/templates/spec.md +18 -0
- package/specs/templates/tasks.md +9 -0
- package/src/cli.js +6 -0
- package/src/commands/collect.js +340 -0
- package/src/commands/ship.js +79 -0
- package/src/commands/verify.js +128 -6
- package/src/lib/closure-context.js +444 -0
- package/src/lib/runner-adapters.js +347 -0
- package/src/lib/test-matrix.js +187 -0
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
# Tareas de Implementación: Mechanical Test Matrix & Closure Evidence (Upgrade B)
|
|
2
|
+
|
|
3
|
+
**Feature Branch**: `007-mechanical-test-matrix-closure-evidence`
|
|
4
|
+
**Spec**: [`specs/007-mechanical-test-matrix-closure-evidence/spec.md`](file:///c:/CODES/Gemstack/specs/007-mechanical-test-matrix-closure-evidence/spec.md)
|
|
5
|
+
**Plan**: [`specs/007-mechanical-test-matrix-closure-evidence/plan.md`](file:///c:/CODES/Gemstack/specs/007-mechanical-test-matrix-closure-evidence/plan.md)
|
|
6
|
+
**Lifecycle Status**: `TASKS_COMPLETE`
|
|
7
|
+
**Stop Reason**: `TASKS_COMPLETE_AWAITING_IMPLEMENTATION`
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Contratos Congelados Heredados (Dogfooding)
|
|
12
|
+
|
|
13
|
+
```gemstack-contracts
|
|
14
|
+
[
|
|
15
|
+
{
|
|
16
|
+
"id": "zero-dependency-core",
|
|
17
|
+
"type": "BOOLEAN_INVARIANT",
|
|
18
|
+
"value": true,
|
|
19
|
+
"description": "Upgrade B implementation must introduce zero external production npm dependencies, using Node.js built-ins exclusively."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "upgrade-b-taxonomy-types",
|
|
23
|
+
"type": "ENUM_SET",
|
|
24
|
+
"values": [
|
|
25
|
+
"CANONICAL_TEST",
|
|
26
|
+
"PHYSICAL_TEST",
|
|
27
|
+
"SUPPORTING_TEST",
|
|
28
|
+
"DECLARED_TEST",
|
|
29
|
+
"EXECUTED_TEST",
|
|
30
|
+
"PASSED_TEST",
|
|
31
|
+
"FAILED_TEST",
|
|
32
|
+
"SKIPPED_TEST",
|
|
33
|
+
"PHANTOM_TEST",
|
|
34
|
+
"ORPHAN_TEST"
|
|
35
|
+
],
|
|
36
|
+
"description": "Canonical test taxonomy and state classifications in Upgrade B."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "upgrade-b-closure-gate-levels",
|
|
40
|
+
"type": "ENUM_SET",
|
|
41
|
+
"values": [
|
|
42
|
+
"REQUIRED",
|
|
43
|
+
"SUPPLEMENTAL"
|
|
44
|
+
],
|
|
45
|
+
"description": "Strictness levels for mechanical closure gates."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "upgrade-b-closure-status-values",
|
|
49
|
+
"type": "ENUM_SET",
|
|
50
|
+
"values": [
|
|
51
|
+
"NOT_EVALUATED",
|
|
52
|
+
"BLOCKED",
|
|
53
|
+
"VERIFIED",
|
|
54
|
+
"VERIFIED_WITH_EXCEPTIONS",
|
|
55
|
+
"STALE"
|
|
56
|
+
],
|
|
57
|
+
"description": "Formal mechanical closure states."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "mechanical-reconciliation-exact",
|
|
61
|
+
"type": "BOOLEAN_INVARIANT",
|
|
62
|
+
"value": true,
|
|
63
|
+
"description": "Total physical executed tests must exactly equal canonical executed tests plus supporting executed tests."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "closure-manifest-is-derived-only",
|
|
67
|
+
"type": "BOOLEAN_INVARIANT",
|
|
68
|
+
"value": true,
|
|
69
|
+
"description": "closure.json is a derived mechanical evidence snapshot generated by collection, never hand-edited."
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "verify-is-read-only",
|
|
73
|
+
"type": "BOOLEAN_INVARIANT",
|
|
74
|
+
"value": true,
|
|
75
|
+
"description": "gemstack verify is strictly read-only: it validates evidence and never collects, mutates, or regenerates closure.json."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "git-is-optional-for-closure",
|
|
79
|
+
"type": "BOOLEAN_INVARIANT",
|
|
80
|
+
"value": true,
|
|
81
|
+
"description": "Git metadata is optional enrichment; closure context resolution does not require git repository existence."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "no-generic-test-runner",
|
|
85
|
+
"type": "BOOLEAN_INVARIANT",
|
|
86
|
+
"value": true,
|
|
87
|
+
"description": "Gemstack does not reimplement a test runner; it interfaces with native runners via standardized adapters."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "legacy-specs-preserve-compatibility",
|
|
91
|
+
"type": "BOOLEAN_INVARIANT",
|
|
92
|
+
"value": true,
|
|
93
|
+
"description": "Specs without gemstack-test-matrix blocks operate in progressive legacy mode without blocking or breaking backward compatibility."
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Grafo de Dependencias de Tareas (6 Olas de Ejecución)
|
|
101
|
+
|
|
102
|
+
```mermaid
|
|
103
|
+
graph TD
|
|
104
|
+
subgraph "Wave 1: Test Matrix & Signatures"
|
|
105
|
+
T001["T001: Matrix Parser & Block Discovery"] --> T002["T002: Matrix Schema & Duplicate ID Validation"]
|
|
106
|
+
T002 --> T003["T003: Full-Record Canonical Serialization & acceptanceSignature"]
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
subgraph "Wave 2: Traceability & Closure Context"
|
|
110
|
+
T003 --> T004["T004: PLAN Bindings & Closure Gate Parser"]
|
|
111
|
+
T004 --> T005["T005: TASK Metadata & Validation Parser"]
|
|
112
|
+
T005 --> T006["T006: Bidirectional Traceability & Unmapped Finder"]
|
|
113
|
+
T006 --> T007["T007: RelevantClosureFiles & Content Hash Aggregator"]
|
|
114
|
+
T007 --> T008["T008: Repository Context & closureContextHash Engine"]
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
subgraph "Wave 3: Runner Adapter & Reconciliation"
|
|
118
|
+
T003 --> T009["T009: Safe node:test TAP Runner Adapter"]
|
|
119
|
+
T009 --> T010["T010: Terminal Outcome Normalization & Supporting Classifier"]
|
|
120
|
+
T010 --> T011["T011: Reconciliation Engine Math Missing Not Executed"]
|
|
121
|
+
T011 --> T012["T012: Phantom Orphan & Duplicate Binding Detectors"]
|
|
122
|
+
T008 --> T013["T013: Zero-Shell PACKAGE_SCRIPT Gate Runner"]
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
subgraph "Wave 4: Explicit Collection & Manifest Generation"
|
|
126
|
+
T012 --> T014["T014: Atomic closure.json Schema Serializer"]
|
|
127
|
+
T013 --> T014
|
|
128
|
+
T014 --> T015["T015: Dedicated CLI Command gemstack collect"]
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
subgraph "Wave 5: Read-Only Verify & Ship Enforcement"
|
|
132
|
+
T014 --> T016["T016: Verify Stage 5 Read-Only Closure & Freshness Validator"]
|
|
133
|
+
T016 --> T017["T017: Ship Gatekeeper & Closure Status Evaluator"]
|
|
134
|
+
T016 --> T018["T018: Legacy Mode Compatibility & 001-006 Support"]
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
subgraph "Wave 6: Templates, Skills, Regression & Dogfooding"
|
|
138
|
+
T015 --> T019["T019: Templates & Agent Skills Upgrade"]
|
|
139
|
+
T017 --> T019
|
|
140
|
+
T018 --> T019
|
|
141
|
+
T019 --> T020["T020: Upgrade B Technical & Operational Documentation"]
|
|
142
|
+
T020 --> T021["T021: Upgrade A Physical Regression Verification"]
|
|
143
|
+
T021 --> T022["T022: Upgrade B Feature 007 Dogfood Collection & Verification"]
|
|
144
|
+
end
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Inventario de Tareas de Implementación
|
|
150
|
+
|
|
151
|
+
### Wave 1: Test Matrix + Signatures
|
|
152
|
+
|
|
153
|
+
- [ ] **T001: Implement column-0 `gemstack-test-matrix` discovery and JSON block parser**
|
|
154
|
+
<!-- gemstack:validation_required=true -->
|
|
155
|
+
<!-- gemstack:tests=TEST-CLOSURE-A01,TEST-CLOSURE-A03 -->
|
|
156
|
+
<!-- gemstack:files=src/lib/test-matrix.js,tests/test-matrix.test.js -->
|
|
157
|
+
<!-- gemstack:depends= -->
|
|
158
|
+
*Scope*:
|
|
159
|
+
- Implement `extractTestMatrixBlock(content: string)` in `src/lib/test-matrix.js`.
|
|
160
|
+
- Strictly identify column-0 ```gemstack-test-matrix code fences.
|
|
161
|
+
- Return `{ matrix: null, isLegacy: true }` when 0 blocks exist.
|
|
162
|
+
- Parse strict JSON when exactly 1 block exists.
|
|
163
|
+
- Throw `TEST_MATRIX_PARSE_ERROR` when 2+ blocks exist or on JSON syntax error.
|
|
164
|
+
- Ignore non-column-0 or differently-tagged blocks cleanly.
|
|
165
|
+
*Completion Criteria*:
|
|
166
|
+
- Physical tests for `TEST-CLOSURE-A01` and `TEST-CLOSURE-A03` pass in `tests/test-matrix.test.js`.
|
|
167
|
+
- Zero external npm dependencies.
|
|
168
|
+
|
|
169
|
+
- [ ] **T002: Implement canonical test matrix schema and duplicate ID validator**
|
|
170
|
+
<!-- gemstack:validation_required=true -->
|
|
171
|
+
<!-- gemstack:tests=TEST-CLOSURE-A02 -->
|
|
172
|
+
<!-- gemstack:files=src/lib/test-matrix.js,tests/test-matrix.test.js -->
|
|
173
|
+
<!-- gemstack:depends=T001 -->
|
|
174
|
+
*Scope*:
|
|
175
|
+
- Implement `validateTestMatrix(matrix: any): object[]` in `src/lib/test-matrix.js`.
|
|
176
|
+
- Validate array structure and item schema: `id`, `category`, `layer`, `description`, `pass_criteria`, `gate`.
|
|
177
|
+
- Verify `id` matches `^TEST-[A-Z0-9]+-[A-Z0-9]+$`. Emit `TEST_MATRIX_INVALID_SHAPE` on failure.
|
|
178
|
+
- Detect duplicate IDs and emit `TEST_MATRIX_DUPLICATE_ID`.
|
|
179
|
+
- Validate enum values for `layer` (`UNIT`, `INTEGRATION`, `E2E`, `CLI`) and `gate` (`REQUIRED`, `SUPPLEMENTAL`).
|
|
180
|
+
*Completion Criteria*:
|
|
181
|
+
- Physical test for `TEST-CLOSURE-A02` passes with exact error codes.
|
|
182
|
+
- Validation returns sanitized, validated CanonicalTest objects.
|
|
183
|
+
|
|
184
|
+
- [ ] **T003: Implement full-record canonical serialization and `acceptanceSignature` digest**
|
|
185
|
+
<!-- gemstack:validation_required=true -->
|
|
186
|
+
<!-- gemstack:tests=TEST-CLOSURE-B01,TEST-CLOSURE-B02 -->
|
|
187
|
+
<!-- gemstack:files=src/lib/test-matrix.js,tests/test-matrix.test.js -->
|
|
188
|
+
<!-- gemstack:depends=T002 -->
|
|
189
|
+
*Scope*:
|
|
190
|
+
- Implement `computeAcceptanceSignature(matrix: object[]): string` in `src/lib/test-matrix.js`.
|
|
191
|
+
- Sort canonical records by `id` using ASCII/code-unit ordering `(a.id < b.id ? -1 : (a.id > b.id ? 1 : 0))`.
|
|
192
|
+
- Reconstruct each object with ASCII-sorted keys `["category", "description", "gate", "id", "layer", "pass_criteria"]`.
|
|
193
|
+
- Preserve exact semantic strings without trimming, case-folding, or whitespace modification.
|
|
194
|
+
- Serialize to compact canonical JSON without indentation or superfluous spaces.
|
|
195
|
+
- Compute SHA-256 lowercase 64-character hexadecimal digest over UTF-8 bytes.
|
|
196
|
+
- Verify that altering `description`, `pass_criteria`, `category`, `layer`, or `gate` changes the digest.
|
|
197
|
+
- Emit `ACCEPTANCE_SIGNATURE_MISMATCH` when structured matrix disagrees with approved signature.
|
|
198
|
+
*Completion Criteria*:
|
|
199
|
+
- Physical tests for `TEST-CLOSURE-B01` and `TEST-CLOSURE-B02` pass in `tests/test-matrix.test.js`.
|
|
200
|
+
- Invariant to input JSON key order, strictly sensitive to semantic field values.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### Wave 2: Traceability & Closure Context
|
|
205
|
+
|
|
206
|
+
- [ ] **T004: Implement PLAN physical bindings (`gemstack-test-bindings`) and gate parser (`gemstack-closure-gates`)**
|
|
207
|
+
<!-- gemstack:validation_required=true -->
|
|
208
|
+
<!-- gemstack:tests=TEST-CLOSURE-C02,TEST-CLOSURE-G01 -->
|
|
209
|
+
<!-- gemstack:files=src/lib/closure-context.js,tests/traceability.test.js -->
|
|
210
|
+
<!-- gemstack:depends=T003 -->
|
|
211
|
+
*Scope*:
|
|
212
|
+
- Implement `parsePlanBindings(planContent: string)` and `parsePlanGates(planContent: string)` in `src/lib/closure-context.js`.
|
|
213
|
+
- Parse column-0 fenced block `gemstack-test-bindings`: validate `test_id`, `runner`, and repository-relative POSIX `file`.
|
|
214
|
+
- Verify every required canonical test has exactly one physical binding record.
|
|
215
|
+
- Parse column-0 fenced block `gemstack-closure-gates`: validate `id`, `type`, `script`, `requirement`, and `waivable`.
|
|
216
|
+
- Enforce `waivable: boolean` as mandatory for `REQUIRED` gates.
|
|
217
|
+
*Completion Criteria*:
|
|
218
|
+
- Validates and returns structured bindings and closure gates.
|
|
219
|
+
- Throws or records finding on malformed bindings or invalid path separators.
|
|
220
|
+
|
|
221
|
+
- [ ] **T005: Implement TASK metadata parser and `validation_required` validator**
|
|
222
|
+
<!-- gemstack:validation_required=true -->
|
|
223
|
+
<!-- gemstack:tests=TEST-CLOSURE-E01 -->
|
|
224
|
+
<!-- gemstack:files=src/lib/closure-context.js,tests/traceability.test.js -->
|
|
225
|
+
<!-- gemstack:depends=T004 -->
|
|
226
|
+
*Scope*:
|
|
227
|
+
- Implement `parseTaskMetadata(tasksContent: string)` in `src/lib/closure-context.js`.
|
|
228
|
+
- Extract tasks with HTML-comment properties: `validation_required`, `tests`, `files`, `depends`.
|
|
229
|
+
- Ensure sequential task IDs (`T001`, `T002`, ...).
|
|
230
|
+
- Enforce that if `validation_required=true`, non-empty canonical test IDs must be bound.
|
|
231
|
+
- Emit `TASK_VALIDATION_MISSING` if `validation_required=true` has no tests.
|
|
232
|
+
*Completion Criteria*:
|
|
233
|
+
- Physical test for `TEST-CLOSURE-E01` passes in `tests/traceability.test.js`.
|
|
234
|
+
- Accurate extraction of task metadata dictionary.
|
|
235
|
+
|
|
236
|
+
- [ ] **T006: Implement bidirectional task-test traceability and unmapped canonical test finder**
|
|
237
|
+
<!-- gemstack:validation_required=true -->
|
|
238
|
+
<!-- gemstack:tests=TEST-CLOSURE-E02 -->
|
|
239
|
+
<!-- gemstack:files=src/lib/closure-context.js,tests/traceability.test.js -->
|
|
240
|
+
<!-- gemstack:depends=T005 -->
|
|
241
|
+
*Scope*:
|
|
242
|
+
- Implement `reconcileTaskTraceability(canonicalMatrix: object[], taskList: object[])` in `src/lib/closure-context.js`.
|
|
243
|
+
- Derive in-memory reverse mapping `TEST → TASKS` from forward bindings `TASK → TEST IDs`.
|
|
244
|
+
- Verify that every REQUIRED canonical test is bound to at least one implementation task.
|
|
245
|
+
- Emit `UNMAPPED_CANONICAL_TEST` if any canonical test lacks an implementation task.
|
|
246
|
+
- Produce summary: `tasks_total`, `tasks_with_validation`, `tasks_documentation_only`, `unmapped_canonical_tests`.
|
|
247
|
+
*Completion Criteria*:
|
|
248
|
+
- Physical test for `TEST-CLOSURE-E02` passes in `tests/traceability.test.js`.
|
|
249
|
+
- Zero unmapped canonical acceptance requirements.
|
|
250
|
+
|
|
251
|
+
- [ ] **T007: Implement `RelevantClosureFiles` derivation and deterministic content hash aggregator**
|
|
252
|
+
<!-- gemstack:validation_required=true -->
|
|
253
|
+
<!-- gemstack:tests=TEST-CLOSURE-F02 -->
|
|
254
|
+
<!-- gemstack:files=src/lib/closure-context.js,tests/closure-manifest.test.js -->
|
|
255
|
+
<!-- gemstack:depends=T006 -->
|
|
256
|
+
*Scope*:
|
|
257
|
+
- Implement `resolveRelevantFiles(featureDir: string, taskBindings: object, runnerFiles: string[], gateConfigs: object[])` in `src/lib/closure-context.js`.
|
|
258
|
+
- Bounded scope: phase artifacts (`spec.md`, `plan.md`, `tasks.md`), test files from plan bindings, implementation files from task metadata, and `package.json` if PACKAGE_SCRIPT gates exist.
|
|
259
|
+
- Strictly exclude entire-repository traversal, `node_modules`, `.git`, `coverage`, and `closure.json`.
|
|
260
|
+
- Implement `computeContentAggregateHash(rootPath: string, filePaths: string[]): string` sorting paths in ASCII code-unit order.
|
|
261
|
+
*Completion Criteria*:
|
|
262
|
+
- Relevant files are derived without whole-repo scanning.
|
|
263
|
+
- Produces stable SHA-256 digest over normalized POSIX file contents.
|
|
264
|
+
|
|
265
|
+
- [ ] **T008: Implement repository context resolver and `closureContextHash` engine**
|
|
266
|
+
<!-- gemstack:validation_required=true -->
|
|
267
|
+
<!-- gemstack:tests=TEST-CLOSURE-F02 -->
|
|
268
|
+
<!-- gemstack:files=src/lib/closure-context.js,tests/closure-manifest.test.js -->
|
|
269
|
+
<!-- gemstack:depends=T007 -->
|
|
270
|
+
*Scope*:
|
|
271
|
+
- Implement `resolveRepositoryContext(rootPath: string)` and `computeClosureContextHash(contextObj: object)` in `src/lib/closure-context.js`.
|
|
272
|
+
- Support Git clean (`type=git, commit=HEAD, working_tree_clean=true`), Git dirty (`working_tree_clean=false`), and non-Git (`type=non-git, commit=null, working_tree_clean=null`).
|
|
273
|
+
- Assemble `closureContext`: `version`, `repository`, `phase_hashes`, `acceptance_signature`, `test_files_hash`, `implementation_context_hash`, `required_gate_definition_hash`.
|
|
274
|
+
- Canonicalize JSON with ASCII-sorted keys, compact format, UTF-8 bytes, and SHA-256 digest.
|
|
275
|
+
*Completion Criteria*:
|
|
276
|
+
- Physical test for `TEST-CLOSURE-F02` passes across clean Git, dirty Git, and non-Git environments.
|
|
277
|
+
- Content hashes remain authoritative; Git metadata is strictly enrichment.
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
### Wave 3: Runner Adapter & Reconciliation
|
|
282
|
+
|
|
283
|
+
- [ ] **T009: Implement safe zero-shell `node:test` TAP runner adapter**
|
|
284
|
+
<!-- gemstack:validation_required=true -->
|
|
285
|
+
<!-- gemstack:tests=TEST-CLOSURE-D01,TEST-CLOSURE-D02,TEST-CLOSURE-D03 -->
|
|
286
|
+
<!-- gemstack:files=src/lib/runner-adapters.js,tests/runner-adapter.test.js -->
|
|
287
|
+
<!-- gemstack:depends=T003 -->
|
|
288
|
+
*Scope*:
|
|
289
|
+
- Implement `executeNodeTestRunner(rootPath: string, testFiles: string[], options: object)` in `src/lib/runner-adapters.js`.
|
|
290
|
+
- Spawn `process.execPath` with explicit argv: `['--test', '--test-reporter=tap', ...testFiles]`.
|
|
291
|
+
- Enforce `shell: false` and capture stdout/stderr via pipes.
|
|
292
|
+
- Implement `parseNodeTestTap(tapOutput: string): object` extracting passed, failed, skipped, todo, and cancelled counts.
|
|
293
|
+
- Extract canonical test IDs embedded in titles matching regex `\b(TEST-[A-Z0-9]+-[A-Z0-9]+)\b`.
|
|
294
|
+
- Handle non-zero runner exit codes gracefully without crashing the Gemstack process.
|
|
295
|
+
*Completion Criteria*:
|
|
296
|
+
- Physical tests for `TEST-CLOSURE-D01`, `TEST-CLOSURE-D02`, and `TEST-CLOSURE-D03` pass in `tests/runner-adapter.test.js`.
|
|
297
|
+
- Robust TAP parsing without shell execution.
|
|
298
|
+
|
|
299
|
+
- [ ] **T010: Implement terminal outcome normalizer and supporting test classifier**
|
|
300
|
+
<!-- gemstack:validation_required=true -->
|
|
301
|
+
<!-- gemstack:tests=TEST-CLOSURE-C01 -->
|
|
302
|
+
<!-- gemstack:files=src/lib/runner-adapters.js,tests/reconciliation.test.js -->
|
|
303
|
+
<!-- gemstack:depends=T009 -->
|
|
304
|
+
*Scope*:
|
|
305
|
+
- Implement `normalizeTestEvent(event: object): object` in `src/lib/runner-adapters.js`.
|
|
306
|
+
- Preserve authoritative raw outcomes (`PASS`, `FAIL`, `SKIP`, `TODO`, `CANCELLED`).
|
|
307
|
+
- Normalize findings: `FAIL → REQUIRED_TEST_FAILED`, `SKIP / TODO / CANCELLED → REQUIRED_TEST_SKIPPED`.
|
|
308
|
+
- Classify tests without canonical ID token as `SUPPORTING_TEST`.
|
|
309
|
+
- Ensure supporting tests contribute to physical count totals and propagate failures.
|
|
310
|
+
*Completion Criteria*:
|
|
311
|
+
- Exact event tracking preserving raw outcome and normalized finding type.
|
|
312
|
+
- Clear separation between canonical acceptance events and supporting tests.
|
|
313
|
+
|
|
314
|
+
- [ ] **T011: Implement reconciliation engine (exact count math, missing tests, not executed tests)**
|
|
315
|
+
<!-- gemstack:validation_required=true -->
|
|
316
|
+
<!-- gemstack:tests=TEST-CLOSURE-C01,TEST-CLOSURE-C02 -->
|
|
317
|
+
<!-- gemstack:files=src/lib/runner-adapters.js,tests/reconciliation.test.js -->
|
|
318
|
+
<!-- gemstack:depends=T010 -->
|
|
319
|
+
*Scope*:
|
|
320
|
+
- Implement `reconcileTestRun(canonicalMatrix: object[], planBindings: object[], executedEvents: object[]): object` in `src/lib/runner-adapters.js`.
|
|
321
|
+
- Validate exact arithmetic equations:
|
|
322
|
+
1. `PASS + FAIL + SKIP + TODO + CANCELLED == TOTAL_PHYSICAL_TEST_EVENTS`
|
|
323
|
+
2. `CANONICAL_PHYSICAL_EVENTS + SUPPORTING_PHYSICAL_EVENTS == TOTAL_PHYSICAL_TEST_EVENTS`
|
|
324
|
+
- Emit `CLOSURE_RECONCILIATION_FAILURE` on any count mismatch.
|
|
325
|
+
- Distinguish:
|
|
326
|
+
- `REQUIRED_TEST_MISSING`: Required canonical ID has no entry in `gemstack-test-bindings`.
|
|
327
|
+
- `REQUIRED_TEST_NOT_EXECUTED`: Required canonical ID is bound in plan, but absent from runner events.
|
|
328
|
+
*Completion Criteria*:
|
|
329
|
+
- Physical tests for `TEST-CLOSURE-C01` and `TEST-CLOSURE-C02` pass in `tests/reconciliation.test.js`.
|
|
330
|
+
- Zero arithmetic ambiguity.
|
|
331
|
+
|
|
332
|
+
- [ ] **T012: Implement phantom test, orphan test, and duplicate binding detectors**
|
|
333
|
+
<!-- gemstack:validation_required=true -->
|
|
334
|
+
<!-- gemstack:tests=TEST-CLOSURE-C03,TEST-CLOSURE-C04 -->
|
|
335
|
+
<!-- gemstack:files=src/lib/runner-adapters.js,tests/reconciliation.test.js -->
|
|
336
|
+
<!-- gemstack:depends=T011 -->
|
|
337
|
+
*Scope*:
|
|
338
|
+
- Implement anomaly detectors in `src/lib/runner-adapters.js`:
|
|
339
|
+
- `PHANTOM_TEST`: Detect claimed canonical tests that have no matching authoritative runner event.
|
|
340
|
+
- `ORPHAN_TEST`: Detect executed physical tests whose title claims a canonical ID not in `spec.md`.
|
|
341
|
+
- `DUPLICATE_TEST_BINDING`: Detect multiple executed physical tests claiming the same canonical ID.
|
|
342
|
+
- Enforce `PHANTOM_TEST` as strictly non-waivable.
|
|
343
|
+
*Completion Criteria*:
|
|
344
|
+
- Physical tests for `TEST-CLOSURE-C03` and `TEST-CLOSURE-C04` pass in `tests/reconciliation.test.js`.
|
|
345
|
+
- Anomalous test claims are blocked immediately.
|
|
346
|
+
|
|
347
|
+
- [ ] **T013: Implement zero-shell `PACKAGE_SCRIPT` gate runner**
|
|
348
|
+
<!-- gemstack:validation_required=true -->
|
|
349
|
+
<!-- gemstack:tests=TEST-CLOSURE-G01 -->
|
|
350
|
+
<!-- gemstack:files=src/lib/runner-adapters.js,tests/closure-gates.test.js -->
|
|
351
|
+
<!-- gemstack:depends=T008 -->
|
|
352
|
+
*Scope*:
|
|
353
|
+
- Implement `executePackageScriptGate(rootPath: string, gateConfig: object): Promise<{ exitCode: number, stdout: string, stderr: string }>` in `src/lib/runner-adapters.js`.
|
|
354
|
+
- Read `package.json` to verify script existence; emit `REQUIRED_GATE_MISSING` if missing.
|
|
355
|
+
- Resolve npm executable platform-safely: `npm.cmd` on Windows, `npm` on POSIX.
|
|
356
|
+
- Execute via `child_process.spawn(npmCmd, ['run', gateConfig.script], { shell: false, cwd: rootPath, stdio: 'pipe' })`.
|
|
357
|
+
- Emit `REQUIRED_GATE_FAILED` if process exits non-zero.
|
|
358
|
+
*Completion Criteria*:
|
|
359
|
+
- Safe package script execution without shell wrappers or arbitrary command string parsing.
|
|
360
|
+
- Respects `waivable` attribute from gate configuration.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
### Wave 4: Explicit Collection & Manifest Generation
|
|
365
|
+
|
|
366
|
+
- [ ] **T014: Implement atomic `closure.json` schema serializer and status evaluator**
|
|
367
|
+
<!-- gemstack:validation_required=true -->
|
|
368
|
+
<!-- gemstack:tests=TEST-CLOSURE-F01,TEST-CLOSURE-G02 -->
|
|
369
|
+
<!-- gemstack:files=src/lib/runner-adapters.js,tests/closure-manifest.test.js -->
|
|
370
|
+
<!-- gemstack:depends=T012,T013 -->
|
|
371
|
+
*Scope*:
|
|
372
|
+
- Implement `generateClosureManifest(params: object): object` in `src/lib/runner-adapters.js`.
|
|
373
|
+
- Serialize schema `"gemstack-closure"`, version 1, feature directory, `generated_at`, `closure_context`, `acceptance_signature`.
|
|
374
|
+
- Include `canonical_summary`, `physical_summary`, `reconciliation`, `task_traceability_summary`, `required_gates`, `supplemental_gates`, `exceptions`, `evidence_sources`, `blockers`, `warnings`.
|
|
375
|
+
- Evaluate status precedence:
|
|
376
|
+
- `CLOSURE_EVIDENCE_STALE` → `STALE`
|
|
377
|
+
- Any non-waivable blocker or un-waived required failure → `BLOCKED`
|
|
378
|
+
- Policy-waived deviations with human approval → `VERIFIED_WITH_EXCEPTIONS`
|
|
379
|
+
- Clean pass without waivers → `VERIFIED`
|
|
380
|
+
- Atomic file persistence to `specs/<feature>/closure.json` using `writeJsonAtomic()`.
|
|
381
|
+
*Completion Criteria*:
|
|
382
|
+
- Physical test for `TEST-CLOSURE-F01` passes in `tests/closure-manifest.test.js`.
|
|
383
|
+
- Generates valid, complete, and reproducible `closure.json`.
|
|
384
|
+
|
|
385
|
+
- [ ] **T015: Implement dedicated mutating CLI command `gemstack collect`**
|
|
386
|
+
<!-- gemstack:validation_required=true -->
|
|
387
|
+
<!-- gemstack:tests=TEST-CLOSURE-F01,TEST-CLOSURE-F02 -->
|
|
388
|
+
<!-- gemstack:files=src/commands/collect.js,src/cli.js,tests/closure-manifest.test.js -->
|
|
389
|
+
<!-- gemstack:depends=T014 -->
|
|
390
|
+
*Scope*:
|
|
391
|
+
- Implement `src/commands/collect.js` and wire `collect` command into `src/cli.js`.
|
|
392
|
+
- Resolve active feature directory from `.gemstack/state.json`.
|
|
393
|
+
- Load SPEC matrix, PLAN bindings, PLAN gates, and TASK metadata.
|
|
394
|
+
- Run test adapter and required project gates.
|
|
395
|
+
- Reconcile counts, compute `closureContextHash`, evaluate gates, and atomically write `specs/<feature>/closure.json`.
|
|
396
|
+
- Support flags: `--root <path>`, `--json`, `--dry-run`.
|
|
397
|
+
*Completion Criteria*:
|
|
398
|
+
- `gemstack collect` executes tests, produces `specs/<feature>/closure.json`, and outputs structured summary.
|
|
399
|
+
- Verification confirmed that `gemstack verify` remains strictly read-only.
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
### Wave 5: Read-Only Verify & Ship Enforcement
|
|
404
|
+
|
|
405
|
+
- [ ] **T016: Implement Verify Stage 5: Read-only closure evidence and freshness validation**
|
|
406
|
+
<!-- gemstack:validation_required=true -->
|
|
407
|
+
<!-- gemstack:tests=TEST-CLOSURE-F03,TEST-CLOSURE-G01 -->
|
|
408
|
+
<!-- gemstack:files=src/commands/verify.js,tests/closure-manifest.test.js,tests/closure-gates.test.js -->
|
|
409
|
+
<!-- gemstack:depends=T014 -->
|
|
410
|
+
*Scope*:
|
|
411
|
+
- Extend `src/commands/verify.js` to 6 distinct stages:
|
|
412
|
+
- 1/6: Structural Verification
|
|
413
|
+
- 2/6: Memory & Handoff Integrity
|
|
414
|
+
- 3/6: Local State Integrity
|
|
415
|
+
- 4/6: Architecture Consistency & Phase Hashes
|
|
416
|
+
- 5/6: Mechanical Closure Evidence Validation (read-only)
|
|
417
|
+
- 6/6: Security and Test Runners
|
|
418
|
+
- In Stage 5: read `specs/<active-feature>/closure.json`, recompute `closureContextHash` in-memory.
|
|
419
|
+
- Emit `CLOSURE_EVIDENCE_STALE` if hash differs.
|
|
420
|
+
- Check gates and report blockers. Strictly zero disk writes.
|
|
421
|
+
*Completion Criteria*:
|
|
422
|
+
- Physical test for `TEST-CLOSURE-F03` passes in `tests/closure-manifest.test.js`.
|
|
423
|
+
- `gemstack verify` validates existing manifest without modifying disk state.
|
|
424
|
+
|
|
425
|
+
- [ ] **T017: Implement Ship closure gatekeeper and lifecycle transition enforcement**
|
|
426
|
+
<!-- gemstack:validation_required=true -->
|
|
427
|
+
<!-- gemstack:tests=TEST-CLOSURE-G01,TEST-CLOSURE-G02 -->
|
|
428
|
+
<!-- gemstack:files=src/commands/ship.js,tests/closure-gates.test.js -->
|
|
429
|
+
<!-- gemstack:depends=T016 -->
|
|
430
|
+
*Scope*:
|
|
431
|
+
- Update `src/commands/ship.js` to inspect feature-local `specs/<feature>/closure.json`.
|
|
432
|
+
- Verify that status is `VERIFIED` or policy-permitted `VERIFIED_WITH_EXCEPTIONS`.
|
|
433
|
+
- Block shipping if status is `NOT_EVALUATED`, `BLOCKED`, `STALE`, or if `closure.json` is missing.
|
|
434
|
+
- Require explicit human confirmation before lifecycle transition to `SHIPPED`.
|
|
435
|
+
*Completion Criteria*:
|
|
436
|
+
- Physical tests for `TEST-CLOSURE-G01` and `TEST-CLOSURE-G02` pass in `tests/closure-gates.test.js`.
|
|
437
|
+
- Prevents false closure and premature shipping.
|
|
438
|
+
|
|
439
|
+
- [ ] **T018: Implement progressive legacy mode support for specifications without test matrix**
|
|
440
|
+
<!-- gemstack:validation_required=true -->
|
|
441
|
+
<!-- gemstack:tests=TEST-CLOSURE-H01 -->
|
|
442
|
+
<!-- gemstack:files=src/commands/verify.js,src/commands/ship.js,tests/closure-gates.test.js -->
|
|
443
|
+
<!-- gemstack:depends=T016,T017 -->
|
|
444
|
+
*Scope*:
|
|
445
|
+
- In `verify.js` and `ship.js`, check if `spec.md` lacks a `gemstack-test-matrix` block.
|
|
446
|
+
- If no matrix block exists: trigger `LEGACY` progressive adoption mode.
|
|
447
|
+
- Output informational notice `[LEGACY] Spec opera en modo legacy sin matriz de pruebas.`
|
|
448
|
+
- Skip Upgrade B mechanical gates with exit code 0 without blocking.
|
|
449
|
+
*Completion Criteria*:
|
|
450
|
+
- Physical test for `TEST-CLOSURE-H01` passes in `tests/closure-gates.test.js`.
|
|
451
|
+
- Existing specs 001–006 remain 100% functional without regressions.
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
### Wave 6: Templates, Skills, Regression & Dogfooding
|
|
456
|
+
|
|
457
|
+
- [ ] **T019: Update Gemstack templates and agent skills for Upgrade B lifecycle**
|
|
458
|
+
<!-- gemstack:validation_required=false -->
|
|
459
|
+
<!-- gemstack:tests= -->
|
|
460
|
+
<!-- gemstack:files=specs/templates/spec.md,specs/templates/plan.md,specs/templates/tasks.md,.agents/skills/gemstack-spec/SKILL.md,.agents/skills/gemstack-plan/SKILL.md,.agents/skills/gemstack-tasks/SKILL.md,.agents/skills/gemstack-qa/SKILL.md,.agents/skills/gemstack-ship/SKILL.md -->
|
|
461
|
+
<!-- gemstack:depends=T015,T017,T018 -->
|
|
462
|
+
*Scope*:
|
|
463
|
+
- Update `specs/templates/spec.md` with column-0 `gemstack-test-matrix` template.
|
|
464
|
+
- Update `specs/templates/plan.md` with `gemstack-test-bindings` and `gemstack-closure-gates` templates.
|
|
465
|
+
- Update `specs/templates/tasks.md` with task metadata comment format.
|
|
466
|
+
- Update agent skills (`gemstack-spec`, `gemstack-plan`, `gemstack-tasks`, `gemstack-qa`, `gemstack-ship`) to support `collect` and read-only `verify`.
|
|
467
|
+
*Completion Criteria*:
|
|
468
|
+
- New features automatically scaffold Upgrade B structured blocks.
|
|
469
|
+
- Historical specs 001–006 are not retroactively modified.
|
|
470
|
+
|
|
471
|
+
- [ ] **T020: Update technical and operational documentation for Upgrade B**
|
|
472
|
+
<!-- gemstack:validation_required=false -->
|
|
473
|
+
<!-- gemstack:tests= -->
|
|
474
|
+
<!-- gemstack:files=docs/spec-driven-development.md,docs/architecture-consistency.md,README.md -->
|
|
475
|
+
<!-- gemstack:depends=T019 -->
|
|
476
|
+
*Scope*:
|
|
477
|
+
- Document Mechanical Test Matrix, `acceptanceSignature`, and physical bindings.
|
|
478
|
+
- Document `TASK → TEST` unidirectional traceability and metadata syntax.
|
|
479
|
+
- Document `gemstack collect` mutating action vs. `gemstack verify` read-only validation.
|
|
480
|
+
- Document `closureContextHash`, feature-local `closure.json`, Git optionality, and legacy mode.
|
|
481
|
+
*Completion Criteria*:
|
|
482
|
+
- Clear, accurate, developer-ready documentation with zero out-of-scope mentions of Upgrade C/D functionality.
|
|
483
|
+
|
|
484
|
+
- [ ] **T021: Verify Upgrade A test regression suite across all 33 baseline physical tests**
|
|
485
|
+
<!-- gemstack:validation_required=true -->
|
|
486
|
+
<!-- gemstack:tests=TEST-CLOSURE-H01 -->
|
|
487
|
+
<!-- gemstack:files=tests/contracts.test.js,tests/hasher.test.js,tests/findings.test.js,tests/init.test.js,tests/verify.test.js,package.json -->
|
|
488
|
+
<!-- gemstack:depends=T020 -->
|
|
489
|
+
*Scope*:
|
|
490
|
+
- Update `package.json` test script to explicitly enumerate all 5 baseline test suites plus all 6 new Upgrade B test suites (11 files total, zero shell glob reliance).
|
|
491
|
+
- Run full test suite: confirm that all 33 baseline physical tests pass with 0 regressions.
|
|
492
|
+
- Confirm that all 25 Upgrade A canonical IDs (`TEST-CONSISTENCY-*`) remain valid.
|
|
493
|
+
*Completion Criteria*:
|
|
494
|
+
- 100% pass rate across baseline and new suites.
|
|
495
|
+
- Zero regression in Upgrade A architectural consistency engine.
|
|
496
|
+
|
|
497
|
+
- [ ] **T022: Execute Upgrade B dogfooding on Feature 007 and verify mechanical closure**
|
|
498
|
+
<!-- gemstack:validation_required=true -->
|
|
499
|
+
<!-- gemstack:tests=TEST-CLOSURE-F01,TEST-CLOSURE-F02,TEST-CLOSURE-F03,TEST-CLOSURE-G01,TEST-CLOSURE-G02 -->
|
|
500
|
+
<!-- gemstack:files=specs/007-mechanical-test-matrix-closure-evidence/closure.json,.gemstack/state.json -->
|
|
501
|
+
<!-- gemstack:depends=T021 -->
|
|
502
|
+
*Scope*:
|
|
503
|
+
- Execute `gemstack collect` on `specs/007-mechanical-test-matrix-closure-evidence/`.
|
|
504
|
+
- Verify that `specs/007-mechanical-test-matrix-closure-evidence/closure.json` is generated atomically.
|
|
505
|
+
- Confirm 20/20 canonical tests pass and reconcile with physical counts.
|
|
506
|
+
- Execute `gemstack verify` and confirm all 6 stages pass in read-only mode with status `VERIFIED`.
|
|
507
|
+
*Completion Criteria*:
|
|
508
|
+
- Fresh, valid `closure.json` with status `VERIFIED`.
|
|
509
|
+
- Verified ready for explicit human review and shipping.
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
## Matriz de Cobertura Canónica (20 Tests P1)
|
|
514
|
+
|
|
515
|
+
| Canonical ID | Categoría | Suite Física Declarada | Tareas de Implementación Asignadas |
|
|
516
|
+
| :--- | :--- | :--- | :--- |
|
|
517
|
+
| **TEST-CLOSURE-A01** | PARSING | `tests/test-matrix.test.js` | T001 |
|
|
518
|
+
| **TEST-CLOSURE-A02** | PARSING | `tests/test-matrix.test.js` | T002 |
|
|
519
|
+
| **TEST-CLOSURE-A03** | PARSING | `tests/test-matrix.test.js` | T001 |
|
|
520
|
+
| **TEST-CLOSURE-B01** | SIGNATURE | `tests/test-matrix.test.js` | T003 |
|
|
521
|
+
| **TEST-CLOSURE-B02** | SIGNATURE | `tests/test-matrix.test.js` | T003 |
|
|
522
|
+
| **TEST-CLOSURE-C01** | RECONCILIATION | `tests/reconciliation.test.js` | T010, T011 |
|
|
523
|
+
| **TEST-CLOSURE-C02** | RECONCILIATION | `tests/reconciliation.test.js` | T004, T011 |
|
|
524
|
+
| **TEST-CLOSURE-C03** | RECONCILIATION | `tests/reconciliation.test.js` | T012 |
|
|
525
|
+
| **TEST-CLOSURE-C04** | RECONCILIATION | `tests/reconciliation.test.js` | T012 |
|
|
526
|
+
| **TEST-CLOSURE-D01** | RUNNER_ADAPTER | `tests/runner-adapter.test.js` | T009 |
|
|
527
|
+
| **TEST-CLOSURE-D02** | RUNNER_ADAPTER | `tests/runner-adapter.test.js` | T009 |
|
|
528
|
+
| **TEST-CLOSURE-D03** | RUNNER_ADAPTER | `tests/runner-adapter.test.js` | T009 |
|
|
529
|
+
| **TEST-CLOSURE-E01** | TRACEABILITY | `tests/traceability.test.js` | T005 |
|
|
530
|
+
| **TEST-CLOSURE-E02** | TRACEABILITY | `tests/traceability.test.js` | T006 |
|
|
531
|
+
| **TEST-CLOSURE-F01** | MANIFEST & CONTEXT | `tests/closure-manifest.test.js` | T014, T015, T022 |
|
|
532
|
+
| **TEST-CLOSURE-F02** | MANIFEST & CONTEXT | `tests/closure-manifest.test.js` | T007, T008, T015, T022 |
|
|
533
|
+
| **TEST-CLOSURE-F03** | MANIFEST & CONTEXT | `tests/closure-manifest.test.js` | T016, T022 |
|
|
534
|
+
| **TEST-CLOSURE-G01** | GATES | `tests/closure-gates.test.js` | T004, T013, T016, T017, T022 |
|
|
535
|
+
| **TEST-CLOSURE-G02** | GATES | `tests/closure-gates.test.js` | T014, T017, T022 |
|
|
536
|
+
| **TEST-CLOSURE-H01** | LEGACY | `tests/closure-gates.test.js` | T018, T021 |
|
package/specs/templates/plan.md
CHANGED
|
@@ -47,3 +47,33 @@ ruta/archivo: [Razón]
|
|
|
47
47
|
[
|
|
48
48
|
]
|
|
49
49
|
```
|
|
50
|
+
|
|
51
|
+
## 7. Vinculación Física de Pruebas (Upgrade B)
|
|
52
|
+
<!--
|
|
53
|
+
Vincula cada test_id canónico de spec.md a un archivo físico ejecutable por el runner correspondiente.
|
|
54
|
+
-->
|
|
55
|
+
```gemstack-test-bindings
|
|
56
|
+
[
|
|
57
|
+
{
|
|
58
|
+
"test_id": "TEST-FEATURE-A01",
|
|
59
|
+
"runner": "node:test",
|
|
60
|
+
"file": "tests/feature.test.js"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 8. Gates de Cierre de Proyecto (Upgrade B)
|
|
66
|
+
<!--
|
|
67
|
+
Declara scripts requeridos del package.json como compuertas obligatorias de cierre.
|
|
68
|
+
-->
|
|
69
|
+
```gemstack-closure-gates
|
|
70
|
+
[
|
|
71
|
+
{
|
|
72
|
+
"id": "project-tests",
|
|
73
|
+
"type": "PACKAGE_SCRIPT",
|
|
74
|
+
"script": "test",
|
|
75
|
+
"requirement": "REQUIRED",
|
|
76
|
+
"waivable": false
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
```
|
package/specs/templates/spec.md
CHANGED
|
@@ -50,3 +50,21 @@
|
|
|
50
50
|
}
|
|
51
51
|
]
|
|
52
52
|
```
|
|
53
|
+
|
|
54
|
+
## 7. Matriz Mecánica de Pruebas de Aceptación (Upgrade B)
|
|
55
|
+
<!--
|
|
56
|
+
Declara la matriz canónica de pruebas para cierre mecánico en el bloque gemstack-test-matrix.
|
|
57
|
+
Campos requeridos: id, category, layer, description, pass_criteria, gate (REQUIRED | SUPPLEMENTAL).
|
|
58
|
+
-->
|
|
59
|
+
```gemstack-test-matrix
|
|
60
|
+
[
|
|
61
|
+
{
|
|
62
|
+
"id": "TEST-FEATURE-A01",
|
|
63
|
+
"category": "CORE",
|
|
64
|
+
"layer": "UNIT",
|
|
65
|
+
"description": "Verifica el comportamiento principal de la funcionalidad",
|
|
66
|
+
"pass_criteria": "Retorna resultado esperado bajo condiciones normales",
|
|
67
|
+
"gate": "REQUIRED"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
```
|
package/specs/templates/tasks.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
<!--
|
|
3
|
+
Sintaxis de Metadatos de Tareas (Upgrade B):
|
|
4
|
+
Para cada tarea ejecutable, añade comentarios HTML que declaren:
|
|
5
|
+
<!-- gemstack:validation_required=true|false -->
|
|
6
|
+
<!-- gemstack:tests=TEST-ID-1,TEST-ID-2 -->
|
|
7
|
+
<!-- gemstack:files=src/file.js,tests/file.test.js -->
|
|
8
|
+
<!-- gemstack:depends=T001,T002 -->
|
|
9
|
+
-->
|
|
1
10
|
# Tareas de Implementación
|
|
2
11
|
|
|
3
12
|
<!--
|
package/src/cli.js
CHANGED
|
@@ -9,6 +9,8 @@ const showCommand = require('./commands/show');
|
|
|
9
9
|
const hooksCommand = require('./commands/hooks');
|
|
10
10
|
const installCommand = require('./commands/install');
|
|
11
11
|
const verifyCommand = require('./commands/verify');
|
|
12
|
+
const collectCommand = require('./commands/collect');
|
|
13
|
+
const shipCommand = require('./commands/ship');
|
|
12
14
|
|
|
13
15
|
async function main() {
|
|
14
16
|
const { command, args, flags } = parser.parse(process.argv);
|
|
@@ -20,6 +22,8 @@ Commands:
|
|
|
20
22
|
update Update Gemstack-owned files
|
|
21
23
|
doctor Check health of the installation
|
|
22
24
|
verify Run complete integrity, state, memory and security audit (alias: audit)
|
|
25
|
+
collect Collect mechanical test matrix and closure evidence
|
|
26
|
+
ship Verify closure gates and transition feature to shipped
|
|
23
27
|
list List available skills
|
|
24
28
|
show Show content of a skill
|
|
25
29
|
handoff Show content of handoff.md
|
|
@@ -42,6 +46,8 @@ Options:
|
|
|
42
46
|
case 'doctor': await doctorCommand(flags); break;
|
|
43
47
|
case 'verify':
|
|
44
48
|
case 'audit': await verifyCommand(flags); break;
|
|
49
|
+
case 'collect': await collectCommand(flags); break;
|
|
50
|
+
case 'ship': await shipCommand(flags); break;
|
|
45
51
|
case 'list': await listCommand(flags); break;
|
|
46
52
|
case 'show': await showCommand(args[0], flags); break;
|
|
47
53
|
case 'hooks': hooksCommand.installHooks(flags.target); break;
|