valent-pipeline 0.2.20 → 0.2.21
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/README.md +438 -0
- package/package.json +1 -1
- package/pipeline/agents-manifest.yaml +61 -1
- package/pipeline/docs/agent-reference.md +82 -23
- package/pipeline/docs/design/refactor-checklist.md +111 -0
- package/pipeline/docs/index.md +60 -0
- package/pipeline/docs/pipeline-overview.md +4 -0
- package/pipeline/prompts/bend.md +5 -11
- package/pipeline/prompts/critic.md +9 -0
- package/pipeline/prompts/data.md +59 -0
- package/pipeline/prompts/docgen.md +61 -0
- package/pipeline/prompts/fend.md +3 -10
- package/pipeline/prompts/iac.md +70 -0
- package/pipeline/prompts/lead.md +81 -3
- package/pipeline/prompts/libdev.md +61 -0
- package/pipeline/prompts/mcp-dev.md +59 -0
- package/pipeline/prompts/mobile.md +92 -0
- package/pipeline/prompts/qa-a.md +1 -1
- package/pipeline/prompts/qa-b.md +1 -1
- package/pipeline/prompts/reqs.md +5 -1
- package/pipeline/scripts/db-bootstrap.ts +1 -1
- package/pipeline/scripts/embed-sqlite.ts +5 -0
- package/pipeline/steps/common/quality-standards.md +19 -0
- package/pipeline/steps/critic/data-pipeline.md +28 -0
- package/pipeline/steps/critic/document-generation.md +21 -0
- package/pipeline/steps/critic/iac.md +29 -0
- package/pipeline/steps/critic/library.md +24 -0
- package/pipeline/steps/critic/mcp-server.md +24 -0
- package/pipeline/steps/critic/mobile-app.md +29 -0
- package/pipeline/steps/data/estimate.md +51 -0
- package/pipeline/steps/data/handoff.md +9 -0
- package/pipeline/steps/data/implement.md +16 -0
- package/pipeline/steps/data/read-inputs.md +13 -0
- package/pipeline/steps/data/write-tests.md +13 -0
- package/pipeline/steps/docgen/estimate.md +49 -0
- package/pipeline/steps/docgen/handoff.md +9 -0
- package/pipeline/steps/docgen/implement.md +19 -0
- package/pipeline/steps/docgen/read-inputs.md +13 -0
- package/pipeline/steps/docgen/write-tests.md +15 -0
- package/pipeline/steps/iac/estimate.md +50 -0
- package/pipeline/steps/iac/handoff.md +9 -0
- package/pipeline/steps/iac/implement.md +19 -0
- package/pipeline/steps/iac/read-inputs.md +13 -0
- package/pipeline/steps/iac/write-tests.md +20 -0
- package/pipeline/steps/judge/ship-decision.md +14 -1
- package/pipeline/steps/libdev/estimate.md +49 -0
- package/pipeline/steps/libdev/handoff.md +9 -0
- package/pipeline/steps/libdev/implement.md +19 -0
- package/pipeline/steps/libdev/read-inputs.md +13 -0
- package/pipeline/steps/libdev/write-tests.md +16 -0
- package/pipeline/steps/mcp-dev/estimate.md +49 -0
- package/pipeline/steps/mcp-dev/handoff.md +9 -0
- package/pipeline/steps/mcp-dev/implement.md +29 -0
- package/pipeline/steps/mcp-dev/read-inputs.md +13 -0
- package/pipeline/steps/mcp-dev/write-tests.md +19 -0
- package/pipeline/steps/mobile/emulator-lifecycle.md +67 -0
- package/pipeline/steps/mobile/estimate.md +51 -0
- package/pipeline/steps/mobile/flutter.md +30 -0
- package/pipeline/steps/mobile/handoff.md +18 -0
- package/pipeline/steps/mobile/implement.md +20 -0
- package/pipeline/steps/mobile/react-native.md +32 -0
- package/pipeline/steps/mobile/read-inputs.md +10 -0
- package/pipeline/steps/mobile/write-tests.md +59 -0
- package/pipeline/steps/orchestration/adopt-lead-and-create-team.md +1 -1
- package/pipeline/steps/orchestration/sprint-groom.md +4 -0
- package/pipeline/steps/orchestration/sprint-size.md +19 -12
- package/pipeline/steps/orchestration/validate-story-inputs.md +9 -0
- package/pipeline/steps/qa-a/data-pipeline.md +32 -0
- package/pipeline/steps/qa-a/document-generation.md +52 -0
- package/pipeline/steps/qa-a/iac.md +30 -0
- package/pipeline/steps/qa-a/library.md +42 -0
- package/pipeline/steps/qa-a/mcp-server.md +31 -0
- package/pipeline/steps/qa-a/mobile-app.md +59 -0
- package/pipeline/steps/qa-b/data-pipeline.md +48 -0
- package/pipeline/steps/qa-b/document-generation.md +47 -0
- package/pipeline/steps/qa-b/iac.md +44 -0
- package/pipeline/steps/qa-b/library.md +61 -0
- package/pipeline/steps/qa-b/mcp-server.md +40 -0
- package/pipeline/steps/qa-b/mobile-app.md +71 -0
- package/pipeline/steps/readiness/standalone-review.md +7 -2
- package/pipeline/steps/reqs/data-pipeline.md +56 -0
- package/pipeline/steps/reqs/document-generation.md +55 -0
- package/pipeline/steps/reqs/draft-brief.md +10 -0
- package/pipeline/steps/reqs/iac.md +63 -0
- package/pipeline/steps/reqs/library.md +56 -0
- package/pipeline/steps/reqs/mcp-server.md +48 -0
- package/pipeline/steps/reqs/mobile-app.md +54 -0
- package/pipeline/steps/reqs/self-review.md +5 -3
- package/pipeline/task-graphs/backend-api.yaml +19 -2
- package/pipeline/task-graphs/data-pipeline.yaml +29 -12
- package/pipeline/task-graphs/document-generation.yaml +29 -12
- package/pipeline/task-graphs/frontend-only.yaml +19 -2
- package/pipeline/task-graphs/fullstack-web.yaml +19 -2
- package/pipeline/task-graphs/library.yaml +29 -12
- package/pipeline/task-graphs/mcp-server.yaml +29 -12
- package/pipeline/task-graphs/mobile-app.yaml +171 -0
- package/pipeline/templates/bugs.template.md +1 -1
- package/pipeline/templates/critic-review.template.md +1 -1
- package/pipeline/templates/data-handoff.template.md +96 -0
- package/pipeline/templates/docgen-handoff.template.md +83 -0
- package/pipeline/templates/iac-handoff.template.md +83 -0
- package/pipeline/templates/judge-decision.template.md +11 -1
- package/pipeline/templates/libdev-handoff.template.md +82 -0
- package/pipeline/templates/mcp-dev-handoff.template.md +87 -0
- package/pipeline/templates/mobile-handoff.template.md +122 -0
- package/pipeline/templates/reqs-brief.template.md +60 -4
- package/skills/valent-run-deferred-tests/SKILL.md +109 -0
- package/src/commands/db-rebuild.js +5 -0
- package/src/lib/config-schema.js +1 -1
- package/src/lib/db.js +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# QA-B Step: Library Testing
|
|
2
|
+
|
|
3
|
+
## Library Consumer Tests
|
|
4
|
+
|
|
5
|
+
Mandatory for all stories with library/package exports. Install the library in an isolated environment and test it as a real consumer would.
|
|
6
|
+
|
|
7
|
+
**Procedure:**
|
|
8
|
+
|
|
9
|
+
1. **Create isolated temp directory.** Initialize a fresh project with the appropriate package manager. This must be outside the library source tree.
|
|
10
|
+
2. **Install the library.** Use a local path install (`npm install ../path-to-lib`, `pip install -e ../path-to-lib`, etc.) to simulate a real consumer installation.
|
|
11
|
+
3. **Execute CJS import tests.** For each export in the Export Smoke Test table, `require()` the module path and verify the expected export is present and has the correct type/signature. Record PASS/FAIL.
|
|
12
|
+
4. **Execute ESM import tests.** For each export in the Export Smoke Test table, `import` the module path and verify the expected export is present and has the correct type/signature. Record PASS/FAIL.
|
|
13
|
+
5. **Execute API contract tests.** Call each exported function/class with the documented usage example. Verify return values match declared types and documented behavior.
|
|
14
|
+
6. **Measure bundle size.** If applicable, bundle the library with a standard bundler (esbuild, webpack, rollup) and record the output size. Flag if significantly larger than expected.
|
|
15
|
+
7. **Verify tree-shaking.** If `sideEffects: false` is declared, bundle a selective import and verify unused exports are excluded from the output.
|
|
16
|
+
8. **Clean up temp directory.**
|
|
17
|
+
|
|
18
|
+
**Record results** in `## Library Consumer Test Results` of execution-report.md:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
## Export Audit Results
|
|
22
|
+
|
|
23
|
+
| Export Name | CJS require() | ESM import | Type Declaration | Contract Test | Result |
|
|
24
|
+
|-------------|---------------|------------|-----------------|---------------|--------|
|
|
25
|
+
| {name} | {PASS/FAIL} | {PASS/FAIL} | {PASS/FAIL} | {PASS/FAIL} | {overall} |
|
|
26
|
+
|
|
27
|
+
## CJS/ESM Interop
|
|
28
|
+
|
|
29
|
+
| Test | Result | Notes |
|
|
30
|
+
|------|--------|-------|
|
|
31
|
+
| CJS require() resolves | {PASS/FAIL} | {details} |
|
|
32
|
+
| ESM import resolves | {PASS/FAIL} | {details} |
|
|
33
|
+
| Named exports match | {PASS/FAIL} | {details} |
|
|
34
|
+
| Default export consistent | {PASS/FAIL} | {details} |
|
|
35
|
+
| No dual-instance corruption | {PASS/FAIL} | {details} |
|
|
36
|
+
|
|
37
|
+
## Bundle Size
|
|
38
|
+
|
|
39
|
+
| Entry Point | Raw Size | Minified | Gzipped | Notes |
|
|
40
|
+
|-------------|----------|----------|---------|-------|
|
|
41
|
+
| {entry} | {bytes} | {bytes} | {bytes} | {flags if oversized} |
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Include raw commands and full output for reproducibility.
|
|
45
|
+
|
|
46
|
+
**Failure handling:**
|
|
47
|
+
- Install fails: file P1 bug, record error, continue.
|
|
48
|
+
- CJS/ESM import fails: file bug at appropriate priority, continue remaining tests.
|
|
49
|
+
- Type declarations missing: file P2 bug, continue.
|
|
50
|
+
- Bundle size exceeds threshold: file P3 bug as advisory.
|
|
51
|
+
|
|
52
|
+
**This step cannot be skipped.** If qa-test-spec.md lacks an Export Smoke Tests section, construct the table from exports in reqs-brief.md and execute.
|
|
53
|
+
|
|
54
|
+
## Execution Report Additions
|
|
55
|
+
|
|
56
|
+
The execution report MUST include:
|
|
57
|
+
- `## Export Audit Results` table with PASS/FAIL for each export and import method
|
|
58
|
+
- `## CJS/ESM Interop` table with detailed interop verification
|
|
59
|
+
- `## Bundle Size` table with measured sizes
|
|
60
|
+
- Raw install, import, and bundle commands with full output
|
|
61
|
+
- Isolated temp directory path and cleanup confirmation
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# QA-B Step: MCP Server Testing
|
|
2
|
+
|
|
3
|
+
## Protocol Compliance Tests
|
|
4
|
+
|
|
5
|
+
Mandatory for all stories with MCP server tools. Spawn a real server and communicate over the actual transport.
|
|
6
|
+
|
|
7
|
+
**Procedure:**
|
|
8
|
+
|
|
9
|
+
1. **Spawn server.** Start the MCP server process with the configured transport (stdio/SSE/HTTP). For stdio, connect to stdin/stdout pipes. For SSE/HTTP, poll the endpoint (max 10 retries, 1s apart) until the server accepts connections.
|
|
10
|
+
2. **JSON-RPC initialize.** Send `initialize` request. Verify server info (name, version) and capability declarations match expected values from qa-test-spec.md.
|
|
11
|
+
3. **tools/list.** Send `tools/list` request. Verify all expected tools are present with correct names, descriptions, and inputSchema.
|
|
12
|
+
4. **tools/call per tool.** For each tool in the protocol smoke test table, send `tools/call` with the specified params. Capture the result. Compare content types, result shape, and values against expected.
|
|
13
|
+
5. **Error paths.** Execute error path rows from the smoke test table:
|
|
14
|
+
- Unknown tool: send `tools/call` with a non-existent tool name. Verify JSON-RPC error response.
|
|
15
|
+
- Bad params: send `tools/call` with params violating the declared inputSchema. Verify `-32602` error code.
|
|
16
|
+
- Tool failure: trigger a tool-level error. Verify `isError: true` in the result.
|
|
17
|
+
- Malformed JSON: send raw invalid JSON over the transport. Verify `-32700` error code.
|
|
18
|
+
6. **Stop server.**
|
|
19
|
+
7. **Record results** in `## Protocol Compliance Results` of execution-report.md:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
| ID | JSON-RPC Method | Params | Expected Result | Actual Result | Expected Error Code | Actual Error Code | Result |
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Include raw JSON-RPC request/response pairs for reproducibility.
|
|
26
|
+
|
|
27
|
+
**Failure handling:**
|
|
28
|
+
- Server fails to start: file P1 bug, record error, continue.
|
|
29
|
+
- Protocol test fails: file bug at appropriate priority, continue remaining tests.
|
|
30
|
+
- Server crashes mid-test: file P1 bug, record crash output, attempt restart.
|
|
31
|
+
|
|
32
|
+
**This step cannot be skipped.** If qa-test-spec.md lacks a Protocol Smoke Tests section, construct the table from tools in reqs-brief.md and execute.
|
|
33
|
+
|
|
34
|
+
## Execution Report Additions
|
|
35
|
+
|
|
36
|
+
The execution report MUST include:
|
|
37
|
+
- `## Protocol Compliance Results` table with actual vs expected for every row
|
|
38
|
+
- Raw JSON-RPC request/response pairs
|
|
39
|
+
- Server startup command and output
|
|
40
|
+
- Transport type and connection confirmation
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# QA-B Step: Mobile App Testing
|
|
2
|
+
|
|
3
|
+
## Pre-Execution: Verify Mobile Infrastructure
|
|
4
|
+
|
|
5
|
+
Before running Maestro flows:
|
|
6
|
+
|
|
7
|
+
1. **Emulator check:** Verify `adb devices` shows at least one connected emulator/device in `device` state (not `offline` or `unauthorized`)
|
|
8
|
+
2. **If no emulator:** Follow boot procedure from MOBILE's emulator-lifecycle step. If boot fails after retries, file P1 bug: "Android emulator failed to boot. Cannot execute Maestro flows."
|
|
9
|
+
3. **App installed check:** `adb shell pm list packages | grep {app_package}`. If app not listed, build and install per MOBILE procedure. If install fails, file P1 bug.
|
|
10
|
+
4. **iOS check (Mac only):** Verify `xcrun simctl list devices | grep Booted` shows at least one booted simulator. If iOS flows exist but no simulator is booted, boot one. If not on Mac, iOS flows are deferred (not a bug).
|
|
11
|
+
5. **API server check (if story calls APIs):** Send health check to API server. If unreachable, start via `docker compose up -d db api` or project-equivalent. If still unreachable, file P1 bug.
|
|
12
|
+
|
|
13
|
+
## Maestro Flow Execution
|
|
14
|
+
|
|
15
|
+
For each Maestro flow from qa-test-spec.md:
|
|
16
|
+
1. **State isolation:** `adb shell pm clear {app_package}` (Android) / `xcrun simctl terminate + privacy reset` (iOS)
|
|
17
|
+
2. **Pre-grant permissions:** per flow's permission requirements
|
|
18
|
+
3. **Execute:** `maestro test {flow_file}` (Android) or `maestro test {flow_file} --device {simulator}` (iOS)
|
|
19
|
+
4. **Capture evidence:** Maestro test output + any `takeScreenshot` captures
|
|
20
|
+
5. **Record result:** pass/fail with output details
|
|
21
|
+
|
|
22
|
+
## Post-Execution: Platform Coverage Audit
|
|
23
|
+
|
|
24
|
+
After all Maestro flows execute, audit platform coverage:
|
|
25
|
+
|
|
26
|
+
### Step 1: Scan Flow Results by Platform
|
|
27
|
+
|
|
28
|
+
| Flow File | Android Result | iOS Result | Both Required |
|
|
29
|
+
|-----------|---------------|------------|---------------|
|
|
30
|
+
| {flow} | {PASS \| FAIL} | {PASS \| FAIL \| DEFERRED} | {yes \| no} |
|
|
31
|
+
|
|
32
|
+
### Step 2: Check for Deferred iOS Tests
|
|
33
|
+
|
|
34
|
+
If host is not Mac:
|
|
35
|
+
- All iOS-only and `both` flows that could not run on iOS are deferred
|
|
36
|
+
- This is expected — NOT a bug
|
|
37
|
+
- Record in execution report as "iOS deferred — host OS limitation"
|
|
38
|
+
|
|
39
|
+
### Step 3: File Bugs
|
|
40
|
+
|
|
41
|
+
- **Android failures are always bugs** — Android emulator is always available
|
|
42
|
+
- **iOS failures on Mac are bugs** — if the simulator was available and a flow failed, that is a real failure
|
|
43
|
+
- **iOS inability on Windows/Linux is deferred, not a bug** — record as deferred with platform reason
|
|
44
|
+
|
|
45
|
+
### Step 4: Mock Coverage (N/A for Maestro)
|
|
46
|
+
|
|
47
|
+
Maestro flows inherently hit the real app and real API server — there is no API interception mechanism. Unlike Playwright `route.fulfill()`, Maestro cannot mock API responses. This means mock coverage audit is not applicable for Maestro E2E flows. However, verify:
|
|
48
|
+
- The app is configured to hit the real API server (check base URL in build config / environment)
|
|
49
|
+
- Actual network traffic is flowing (check `adb shell dumpsys netstats uid {app_uid}` for non-zero bytes)
|
|
50
|
+
- If all API calls show zero bytes, file P1 bug: "App appears to use hardcoded/cached data — no real API traffic detected"
|
|
51
|
+
|
|
52
|
+
## Execution Report Additions
|
|
53
|
+
|
|
54
|
+
The execution report MUST include:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
## Mobile Platform Coverage Audit
|
|
58
|
+
|
|
59
|
+
- Host platform: {Mac | Windows | Linux}
|
|
60
|
+
- Android emulator: {PASS — booted | FAIL — details}
|
|
61
|
+
- iOS simulator: {PASS — booted | N/A — not Mac | FAIL — details}
|
|
62
|
+
- Total Maestro flows: {count}
|
|
63
|
+
- Android flows executed: {count} / passed: {count} / failed: {count}
|
|
64
|
+
- iOS flows executed: {count} / passed: {count} / deferred: {count}
|
|
65
|
+
- Platform coverage: {FULL | PARTIAL-IOS-DEFERRED}
|
|
66
|
+
- API traffic verified: {yes | no | N/A — no API calls}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Quality Gate: This Step Cannot Be Skipped
|
|
70
|
+
|
|
71
|
+
If `testing_profiles` includes `mobile-app`, this audit is mandatory. The mobile platform coverage audit must appear in the execution report.
|
|
@@ -10,6 +10,10 @@ Read the story's ACs and scope. Independently assess which `testing_profiles` sh
|
|
|
10
10
|
- `api` — story has API endpoints, backend logic, or database changes
|
|
11
11
|
- `ui` — story has UI components, pages, or visual elements
|
|
12
12
|
- `data-pipeline` — story has ETL, data transformation, or batch processing
|
|
13
|
+
- `mcp-server` — story has MCP server tools, handlers, or protocol work
|
|
14
|
+
- `library` — story is shared library/package (exports, packaging, versioning)
|
|
15
|
+
- `document-generation` — story has document/report template or generation pipeline work
|
|
16
|
+
- `iac` — story has infrastructure work (Terraform, CloudFormation, Kubernetes, CI/CD)
|
|
13
17
|
|
|
14
18
|
Compare your assessment against the `testing_profiles` tagged on the backlog entry:
|
|
15
19
|
- **Missing profile that should be present** → reject to Lead: `[READINESS-REJECTION] Story {story_id}: testing_profiles missing '{profile}'. Re-tag and re-groom.` **STOP.**
|
|
@@ -42,8 +46,9 @@ Read `{story_output_dir}/reqs-brief.md`. Record in `inputsRead`.
|
|
|
42
46
|
| Pre-mortem addressed | Findings folded-in or accepted-risk with justification |
|
|
43
47
|
| Required sections populated | All template sections present and non-empty (or N/A with rationale) |
|
|
44
48
|
| Business rules complete | Cover all ACs with edge case notes |
|
|
45
|
-
| Database changes specified | Present or explicitly "none" with rationale |
|
|
46
|
-
| API endpoints specified | Present or explicitly "none" with rationale |
|
|
49
|
+
| Database changes specified | Present or explicitly "none" with rationale (only check if api or data-pipeline in testing_profiles) |
|
|
50
|
+
| API endpoints specified | Present or explicitly "none" with rationale (only check if api in testing_profiles) |
|
|
51
|
+
| Domain-specific sections | Conditional sections populated per active testing_profiles (e.g., Tool Definitions for mcp-server, Public API Surface for library) |
|
|
47
52
|
| Cross-cutting concerns | Error handling, validation, auth defined |
|
|
48
53
|
|
|
49
54
|
**If ANY fails:** Reject to `readiness-review.md#reqs-rejection-reasons`. Send `[READINESS-REJECTION]` to **REQS** AND to Lead: `[READINESS-REJECTION] Story {story_id}: ACs need rework. See readiness-review.md#reqs-rejection-reasons.` **STOP**.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# REQS Step: Data Pipeline Requirements
|
|
2
|
+
|
|
3
|
+
## Step 4b: Data-Pipeline-Specific Requirement Extraction
|
|
4
|
+
|
|
5
|
+
For stories with `data-pipeline` in `testing_profiles`, extract additional requirements:
|
|
6
|
+
|
|
7
|
+
### Source and Destination Definitions
|
|
8
|
+
- Data format per source/destination (CSV, JSON, Parquet, database table, API response)
|
|
9
|
+
- Schema definition (column names, types, nullable, constraints)
|
|
10
|
+
- Location and access method (file path, connection string, API endpoint, bucket)
|
|
11
|
+
- Volume expectations (row counts, file sizes, batch frequency)
|
|
12
|
+
|
|
13
|
+
### Transform Specifications
|
|
14
|
+
- Business rules per transform stage (filtering criteria, aggregation logic, joins)
|
|
15
|
+
- Computation definitions (derived fields, formulas, lookups)
|
|
16
|
+
- Stage ordering and dependencies (which transforms must precede others)
|
|
17
|
+
- Data type coercions and casting rules
|
|
18
|
+
|
|
19
|
+
### Data Quality Rules
|
|
20
|
+
- Null handling per field (reject, default, propagate, coalesce)
|
|
21
|
+
- Deduplication strategy (natural keys, window, first/last wins)
|
|
22
|
+
- Referential integrity checks (foreign key validation, orphan handling)
|
|
23
|
+
- Row count expectations per stage (exact, range, ratio)
|
|
24
|
+
- Value range and format validation (regex, min/max, enum membership)
|
|
25
|
+
|
|
26
|
+
### Idempotency Strategy
|
|
27
|
+
- Natural keys or surrogate keys for upsert behavior
|
|
28
|
+
- Upsert vs insert-only vs replace semantics per destination
|
|
29
|
+
- Rerun safety guarantees (running the same input twice produces identical output)
|
|
30
|
+
- Timestamp or version column handling on reruns
|
|
31
|
+
|
|
32
|
+
### Checkpoint and Resume Design
|
|
33
|
+
- State persistence mechanism (file marker, database row, offset tracking)
|
|
34
|
+
- Checkpoint granularity (per-batch, per-file, per-row, per-stage)
|
|
35
|
+
- Recovery behavior on restart (replay from last checkpoint, skip completed)
|
|
36
|
+
- Partial output cleanup on failure (rollback, leave partial, quarantine)
|
|
37
|
+
|
|
38
|
+
### Error Handling per Stage
|
|
39
|
+
- Per-stage error strategy: skip row, fail batch, quarantine row, log and continue
|
|
40
|
+
- Quarantine destination and format (dead-letter table, error file, log)
|
|
41
|
+
- Error threshold before batch abort (count or percentage)
|
|
42
|
+
- Alerting and notification requirements on failure
|
|
43
|
+
|
|
44
|
+
### Schema Evolution Strategy
|
|
45
|
+
- How added columns are handled (ignore, default, fail)
|
|
46
|
+
- How removed columns are handled (ignore, fail, null-fill)
|
|
47
|
+
- How type changes are handled (coerce, fail, flag)
|
|
48
|
+
- Schema version tracking and compatibility policy
|
|
49
|
+
|
|
50
|
+
## Quality Gate Additions
|
|
51
|
+
|
|
52
|
+
- [ ] Every AC involving data movement has malformed-input behavior defined
|
|
53
|
+
- [ ] Every source and destination has format, schema, and location specified
|
|
54
|
+
- [ ] Idempotency strategy defined for every write stage
|
|
55
|
+
- [ ] Error handling strategy specified per pipeline stage
|
|
56
|
+
- [ ] Null handling defined for every nullable field
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# REQS Step: Document Generation Requirements
|
|
2
|
+
|
|
3
|
+
## Step 4b: Document-Generation-Specific Requirement Extraction
|
|
4
|
+
|
|
5
|
+
For stories with `document-generation` in `testing_profiles`, extract additional requirements:
|
|
6
|
+
|
|
7
|
+
### Template Definitions
|
|
8
|
+
- Which templates exist and what each produces
|
|
9
|
+
- Template format and engine (Handlebars, Jinja, EJS, custom)
|
|
10
|
+
- Template inheritance or composition (partials, layouts, includes)
|
|
11
|
+
- Template versioning and selection logic
|
|
12
|
+
|
|
13
|
+
### Variable Schema per Template
|
|
14
|
+
- Required variables with types and validation rules
|
|
15
|
+
- Optional variables with default values
|
|
16
|
+
- Null/missing variable behavior per field (blank, placeholder text, omit section, error)
|
|
17
|
+
- Variable nesting (objects, arrays, conditionals within variable data)
|
|
18
|
+
|
|
19
|
+
### Output Format Requirements
|
|
20
|
+
- Output format(s): PDF, HTML, Markdown, DOCX, other
|
|
21
|
+
- MIME type for each output format
|
|
22
|
+
- Page layout specifications (margins, orientation, page size) for paginated formats
|
|
23
|
+
- Styling requirements (CSS, embedded styles, theme)
|
|
24
|
+
|
|
25
|
+
### Conditional Section Rules
|
|
26
|
+
- Include/exclude logic per section (which variables or conditions control visibility)
|
|
27
|
+
- Empty collection handling (show "no items" message vs hide section entirely)
|
|
28
|
+
- Mutual exclusion rules (sections that cannot appear together)
|
|
29
|
+
- Ordering rules for dynamic sections
|
|
30
|
+
|
|
31
|
+
### Encoding Requirements
|
|
32
|
+
- Character encoding: UTF-8 handling and validation
|
|
33
|
+
- Unicode support (emoji, CJK, diacritics)
|
|
34
|
+
- RTL language support (if applicable)
|
|
35
|
+
- Special character escaping per output format (HTML entities, PDF text encoding)
|
|
36
|
+
|
|
37
|
+
### Asset Dependencies
|
|
38
|
+
- Fonts: which fonts, embedded or referenced, fallback chain
|
|
39
|
+
- Images and logos: source location, embedded or referenced, format (PNG, SVG, base64)
|
|
40
|
+
- Stylesheets: external or inline, caching behavior
|
|
41
|
+
- Asset resolution strategy (relative paths, CDN, bundled)
|
|
42
|
+
|
|
43
|
+
### Large Document Handling
|
|
44
|
+
- Streaming or chunked generation for large outputs
|
|
45
|
+
- Maximum document size or page count limits
|
|
46
|
+
- Memory constraints and timeout behavior
|
|
47
|
+
- Progress reporting for long-running generation
|
|
48
|
+
|
|
49
|
+
## Quality Gate Additions
|
|
50
|
+
|
|
51
|
+
- [ ] Every template variable has defined null/missing behavior
|
|
52
|
+
- [ ] Every template has output format and MIME type specified
|
|
53
|
+
- [ ] Conditional section logic documented with include/exclude rules
|
|
54
|
+
- [ ] Asset dependencies listed with embedding vs reference strategy
|
|
55
|
+
- [ ] Encoding requirements specified for non-ASCII content
|
|
@@ -25,3 +25,13 @@ Assign priority based on business impact, complexity, and novelty:
|
|
|
25
25
|
| P1 | Feature broken, degraded UX | Medium | Moderate | CRUD operations with business rules, form validation |
|
|
26
26
|
| P2 | Minor inconvenience | Low | Familiar | Display formatting, sort order, pagination |
|
|
27
27
|
| P3 | Cosmetic, nice-to-have | Trivial | Standard | Label text, tooltip content, logging |
|
|
28
|
+
|
|
29
|
+
### Profile-Aware Section Selection
|
|
30
|
+
|
|
31
|
+
Populate template sections based on active `{testing_profiles}`:
|
|
32
|
+
- **Database Changes**: include if `api` or `data-pipeline` in profiles. Skip entirely for other profiles.
|
|
33
|
+
- **API Endpoints**: include if `api` in profiles. Skip entirely for other profiles.
|
|
34
|
+
- **Authentication and Authorization**: include if `api` or `ui` in profiles. Skip entirely for other profiles.
|
|
35
|
+
- **Domain-specific sections**: include the conditional sections from `reqs-brief.template.md` that match active profiles (Data Pipeline Specification, Tool Definitions, Public API Surface, Template Specifications, Infrastructure Resources).
|
|
36
|
+
|
|
37
|
+
For multi-profile stories (e.g., `[api, iac]`), include ALL applicable sections.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# REQS Step: Infrastructure Requirements
|
|
2
|
+
|
|
3
|
+
## Step 4b: IaC-Specific Requirement Extraction
|
|
4
|
+
|
|
5
|
+
For stories with `iac` in `testing_profiles`, extract additional requirements:
|
|
6
|
+
|
|
7
|
+
### Resource Inventory
|
|
8
|
+
- What resources are created, modified, or destroyed (with provider and resource type)
|
|
9
|
+
- Purpose of each resource (why it exists, what depends on it)
|
|
10
|
+
- Resource dependencies and creation order
|
|
11
|
+
- Naming convention per resource (prefix, environment, region, random suffix)
|
|
12
|
+
|
|
13
|
+
### Tagging Policy
|
|
14
|
+
- Required tags per resource (environment, project, owner, cost-center, managed-by)
|
|
15
|
+
- Tag naming conventions and allowed values
|
|
16
|
+
- Tags that must propagate to child resources
|
|
17
|
+
- Tag enforcement mechanism (policy, validation, linting)
|
|
18
|
+
|
|
19
|
+
### IAM Requirements
|
|
20
|
+
- Roles and policies per resource (what identity, what permissions, on what scope)
|
|
21
|
+
- Least-privilege justification (why each permission is needed)
|
|
22
|
+
- Service account or managed identity requirements
|
|
23
|
+
- Cross-account or cross-subscription access (if applicable)
|
|
24
|
+
- Temporary credential strategy (assume role, workload identity federation)
|
|
25
|
+
|
|
26
|
+
### State Management
|
|
27
|
+
- Remote backend configuration (storage account, bucket, table)
|
|
28
|
+
- State locking mechanism and timeout
|
|
29
|
+
- State access control (who can read/write state)
|
|
30
|
+
- State file segmentation (per-environment, per-module, monolith)
|
|
31
|
+
|
|
32
|
+
### Environment Topology
|
|
33
|
+
- Environments: dev, staging, prod (and any others)
|
|
34
|
+
- Differences between environments (instance sizes, replica counts, feature flags)
|
|
35
|
+
- Environment promotion strategy (apply same config with different vars)
|
|
36
|
+
- Shared vs isolated resources across environments
|
|
37
|
+
|
|
38
|
+
### Compliance Constraints
|
|
39
|
+
- Encryption requirements: at rest (which resources, key management) and in transit (TLS version)
|
|
40
|
+
- Network isolation: VPC/VNet, subnets, security groups, private endpoints
|
|
41
|
+
- Audit logging: which resources, log destination, retention period
|
|
42
|
+
- Data residency: region constraints, data sovereignty requirements
|
|
43
|
+
- Regulatory framework alignment (SOC2, HIPAA, GDPR -- if applicable)
|
|
44
|
+
|
|
45
|
+
### Destroy Protection
|
|
46
|
+
- Which resources must never be accidentally destroyed (databases, storage, DNS)
|
|
47
|
+
- Safeguards per protected resource (lifecycle prevent_destroy, deletion locks, backups)
|
|
48
|
+
- Manual approval gates before destructive changes
|
|
49
|
+
- Backup and recovery requirements before destroy is permitted
|
|
50
|
+
|
|
51
|
+
### Drift Detection
|
|
52
|
+
- Detection method: scheduled plan, continuous monitoring, cloud-native service
|
|
53
|
+
- Alerting on drift detection (who is notified, channel, severity)
|
|
54
|
+
- Auto-remediation policy (auto-apply, alert-only, manual review)
|
|
55
|
+
- Expected drift sources (manual console changes, other automation)
|
|
56
|
+
|
|
57
|
+
## Quality Gate Additions
|
|
58
|
+
|
|
59
|
+
- [ ] Every resource has tagging and destroy-protection policy defined
|
|
60
|
+
- [ ] IAM permissions follow least-privilege with justification
|
|
61
|
+
- [ ] State management backend and locking strategy specified
|
|
62
|
+
- [ ] Environment topology differences documented
|
|
63
|
+
- [ ] Encryption and network isolation requirements specified per resource
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# REQS Step: Library Requirements
|
|
2
|
+
|
|
3
|
+
## Step 4b: Library-Specific Requirement Extraction
|
|
4
|
+
|
|
5
|
+
For stories with `library` in `testing_profiles`, extract additional requirements:
|
|
6
|
+
|
|
7
|
+
### Public API Surface
|
|
8
|
+
- Exported symbols (functions, classes, constants, types)
|
|
9
|
+
- Function signatures with parameter types and return types
|
|
10
|
+
- Overload variants (if applicable)
|
|
11
|
+
- Re-export paths (subpath exports via package.json `exports` map)
|
|
12
|
+
|
|
13
|
+
### Semver Policy
|
|
14
|
+
- What constitutes a breaking change (removed export, changed signature, changed behavior)
|
|
15
|
+
- What constitutes a minor change (new export, new optional parameter)
|
|
16
|
+
- What constitutes a patch change (bug fix, internal refactor, docs)
|
|
17
|
+
- Current version and expected version after this story ships
|
|
18
|
+
|
|
19
|
+
### Backwards Compatibility Constraints
|
|
20
|
+
- Previously published API surface that must remain stable
|
|
21
|
+
- Deprecated symbols and their migration path
|
|
22
|
+
- Minimum supported runtime versions (Node.js, browser targets)
|
|
23
|
+
- Compatibility with existing consumer code patterns
|
|
24
|
+
|
|
25
|
+
### Module System Requirements
|
|
26
|
+
- Package format: CJS, ESM, or dual
|
|
27
|
+
- Entry points: `main`, `module`, `exports` map configuration
|
|
28
|
+
- Conditional exports (node, import, require, default)
|
|
29
|
+
- Build output structure and file extensions (.js, .mjs, .cjs)
|
|
30
|
+
|
|
31
|
+
### Type Declaration Requirements
|
|
32
|
+
- Type declaration strategy: `.d.ts` files, inline TypeScript, JSDoc
|
|
33
|
+
- Generic type parameters and constraints
|
|
34
|
+
- Strict mode compatibility (noImplicitAny, strictNullChecks)
|
|
35
|
+
- Type export completeness (every public symbol has a corresponding type)
|
|
36
|
+
|
|
37
|
+
### Peer Dependency Contract
|
|
38
|
+
- Required peer dependencies with version ranges
|
|
39
|
+
- Optional peer dependencies and behavior when absent
|
|
40
|
+
- Conflict resolution for overlapping dependency ranges
|
|
41
|
+
- Runtime detection of missing peers (clear error messages)
|
|
42
|
+
|
|
43
|
+
### Tree-Shaking Requirements
|
|
44
|
+
- `sideEffects` field value (false, or list of side-effectful files)
|
|
45
|
+
- Barrel re-export avoidance (no index files that re-export everything)
|
|
46
|
+
- Per-export isolation (importing one symbol must not pull in unrelated code)
|
|
47
|
+
- Bundle size expectations for selective imports
|
|
48
|
+
|
|
49
|
+
## Quality Gate Additions
|
|
50
|
+
|
|
51
|
+
- [ ] Every exported symbol has defined behavior and type
|
|
52
|
+
- [ ] Semver impact classified (breaking, minor, or patch)
|
|
53
|
+
- [ ] Module system entry points specified (CJS, ESM, or dual)
|
|
54
|
+
- [ ] Type declarations defined for every public export
|
|
55
|
+
- [ ] Peer dependency contract documented with version ranges
|
|
56
|
+
- [ ] Tree-shaking requirements specified if sideEffects: false is declared
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# REQS Step: MCP Server Requirements
|
|
2
|
+
|
|
3
|
+
## Step 4b: MCP-Server-Specific Requirement Extraction
|
|
4
|
+
|
|
5
|
+
For stories with `mcp-server` in `testing_profiles`, extract additional requirements:
|
|
6
|
+
|
|
7
|
+
### Tool Definitions
|
|
8
|
+
- Tool name, human-readable description, and purpose
|
|
9
|
+
- Which tools the server exposes at `tools/list`
|
|
10
|
+
- Tool grouping or categorization (if server exposes many tools)
|
|
11
|
+
|
|
12
|
+
### Input Schemas per Tool
|
|
13
|
+
- Required and optional parameters with types
|
|
14
|
+
- Parameter constraints (min/max, regex, enum values, string length)
|
|
15
|
+
- Nested object schemas and array item types
|
|
16
|
+
- Default values for optional parameters
|
|
17
|
+
|
|
18
|
+
### Output Content Types per Tool
|
|
19
|
+
- Content type per tool response (text, image, audio, resource)
|
|
20
|
+
- Response shape: key fields, MIME types, encoding
|
|
21
|
+
- Multi-content responses (tools returning mixed content types)
|
|
22
|
+
- Resource URIs and their resolution behavior
|
|
23
|
+
|
|
24
|
+
### Capability Declarations
|
|
25
|
+
- What the server advertises in `initialize` response (tools, resources, prompts)
|
|
26
|
+
- Server info (name, version)
|
|
27
|
+
- Protocol version compatibility
|
|
28
|
+
- Resource subscription support (if applicable)
|
|
29
|
+
|
|
30
|
+
### Transport Requirements
|
|
31
|
+
- Supported transport(s): stdio, SSE, streamable HTTP
|
|
32
|
+
- Connection lifecycle (startup, shutdown, reconnect behavior)
|
|
33
|
+
- Concurrency model (serial tool calls vs parallel)
|
|
34
|
+
- Timeout behavior per tool (long-running operations, cancellation)
|
|
35
|
+
|
|
36
|
+
### Error Model per Tool
|
|
37
|
+
- JSON-RPC error codes for protocol-level failures (-32700, -32600, -32601, -32602, -32603)
|
|
38
|
+
- `isError: true` content responses for tool-level failures (business logic errors)
|
|
39
|
+
- Specific error scenarios per tool (invalid input, resource not found, permission denied, rate limited)
|
|
40
|
+
- Error message format and detail level
|
|
41
|
+
|
|
42
|
+
## Quality Gate Additions
|
|
43
|
+
|
|
44
|
+
- [ ] Every tool has explicit error behavior defined (both JSON-RPC codes and isError:true scenarios)
|
|
45
|
+
- [ ] Every tool has an input schema with required/optional params and types
|
|
46
|
+
- [ ] Every tool has output content type(s) specified
|
|
47
|
+
- [ ] Capability declarations documented for initialize handshake
|
|
48
|
+
- [ ] Transport requirements specified
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# REQS Step: Mobile App Requirements
|
|
2
|
+
|
|
3
|
+
## Step 4b: Mobile-App-Specific Requirement Extraction
|
|
4
|
+
|
|
5
|
+
For stories with `mobile-app` in `testing_profiles`, extract additional requirements:
|
|
6
|
+
|
|
7
|
+
### Screen Inventory
|
|
8
|
+
- Screen names and navigation hierarchy (stack, tab, drawer, modal)
|
|
9
|
+
- Deep link URI patterns per screen (e.g., `myapp://settings/profile`)
|
|
10
|
+
- Back button / gesture behavior per screen (Android hardware back, iOS swipe-to-go-back)
|
|
11
|
+
- Screen transition animations (if specified in UX)
|
|
12
|
+
|
|
13
|
+
### Platform-Specific Behavior
|
|
14
|
+
- Android-only vs iOS-only vs shared behavior per AC
|
|
15
|
+
- Permission requirements per platform (camera, location, notifications, storage, contacts, biometrics)
|
|
16
|
+
- Minimum OS version targets (Android API level, iOS version)
|
|
17
|
+
- Platform-specific UI patterns (Material Design vs Human Interface Guidelines)
|
|
18
|
+
|
|
19
|
+
### Offline and Connectivity Requirements
|
|
20
|
+
- Offline-capable features and sync behavior (queue-and-retry, optimistic UI, conflict resolution)
|
|
21
|
+
- Network error handling per screen (retry, fallback, offline banner)
|
|
22
|
+
- Local storage / caching strategy (AsyncStorage, MMKV, SQLite, Hive)
|
|
23
|
+
- Background sync requirements
|
|
24
|
+
|
|
25
|
+
### Device Form Factor
|
|
26
|
+
- Phone vs tablet layout requirements
|
|
27
|
+
- Orientation support (portrait, landscape, both) per screen
|
|
28
|
+
- Safe area / notch / dynamic island handling
|
|
29
|
+
- Keyboard avoidance behavior for input screens
|
|
30
|
+
|
|
31
|
+
### Push Notification Requirements
|
|
32
|
+
- Notification types and payload structure
|
|
33
|
+
- Foreground vs background handling behavior
|
|
34
|
+
- Deep link from notification tap (target screen, parameters)
|
|
35
|
+
- Silent / data-only notification handling
|
|
36
|
+
|
|
37
|
+
### App Lifecycle Requirements
|
|
38
|
+
- Background → foreground behavior (refresh data, re-authenticate)
|
|
39
|
+
- App termination recovery (restore navigation state, pending form data)
|
|
40
|
+
- Multi-window / split-screen behavior (if applicable)
|
|
41
|
+
|
|
42
|
+
### Native Module Dependencies
|
|
43
|
+
- Camera, biometrics, file system, Bluetooth, NFC, etc.
|
|
44
|
+
- Third-party SDK requirements (maps, analytics, crash reporting)
|
|
45
|
+
- Platform-specific native module availability
|
|
46
|
+
|
|
47
|
+
## Quality Gate Additions
|
|
48
|
+
|
|
49
|
+
- [ ] Every screen has navigation path and deep link documented
|
|
50
|
+
- [ ] Platform-specific behavior explicit for each AC (or explicitly marked "identical on both platforms")
|
|
51
|
+
- [ ] Permission requirements listed per platform
|
|
52
|
+
- [ ] Offline behavior specified (or explicitly marked as online-only)
|
|
53
|
+
- [ ] Push notification handling defined (or explicitly marked as no-push)
|
|
54
|
+
- [ ] App lifecycle edge cases addressed (background/foreground, termination recovery)
|
|
@@ -10,13 +10,15 @@ Verify completeness:
|
|
|
10
10
|
- [ ] Every AC has a priority classification (P0-P3)
|
|
11
11
|
- [ ] All ambiguities are documented with resolution and rationale
|
|
12
12
|
- [ ] Business rules cover all ACs with edge case notes
|
|
13
|
-
- [ ]
|
|
14
|
-
- [ ] API endpoints are specified (or explicitly marked "none" with rationale)
|
|
15
|
-
- [ ]
|
|
13
|
+
- [ ] If api or data-pipeline in testing_profiles: database changes are specified (or explicitly marked "none" with rationale)
|
|
14
|
+
- [ ] If api in testing_profiles: API endpoints are specified (or explicitly marked "none" with rationale)
|
|
15
|
+
- [ ] If api or ui in testing_profiles: auth requirements are defined
|
|
16
16
|
- [ ] Cross-cutting concerns are addressed
|
|
17
17
|
- [ ] NFR targets are set
|
|
18
18
|
- [ ] Pre-mortem has at least 3 findings
|
|
19
19
|
- [ ] All pre-mortem `folded-in` findings are reflected in the brief
|
|
20
20
|
- [ ] Cross-references section points to all consumed inputs
|
|
21
|
+
- [ ] All quality gate additions from loaded domain step files (Step 4b) are satisfied
|
|
22
|
+
- [ ] Domain-specific conditional sections from template are populated for each active profile
|
|
21
23
|
|
|
22
24
|
If any check fails, go back and fix it before proceeding.
|
|
@@ -37,12 +37,20 @@ tasks:
|
|
|
37
37
|
activeForm: "BEND implementing backend"
|
|
38
38
|
blockedBy: [readiness]
|
|
39
39
|
|
|
40
|
+
- ref: iac
|
|
41
|
+
agent: IAC
|
|
42
|
+
subject: "IAC: Implement infrastructure definitions and tests"
|
|
43
|
+
description: "Read reqs-brief.md and qa-test-spec.md, implement infrastructure code, produce iac-handoff.md."
|
|
44
|
+
activeForm: "IAC implementing infrastructure"
|
|
45
|
+
blockedBy: [readiness]
|
|
46
|
+
conditional: "testing_profiles includes iac"
|
|
47
|
+
|
|
40
48
|
- ref: critic
|
|
41
49
|
agent: CRITIC
|
|
42
50
|
subject: "CRITIC: Adversarial code review"
|
|
43
51
|
description: "Read git-diff, reqs-brief.md, qa-test-spec.md. Run blind-hunt, edge-case-hunt, acceptance-audit, triage passes. Produce critic-review.md."
|
|
44
52
|
activeForm: "CRITIC reviewing code"
|
|
45
|
-
blockedBy: [bend]
|
|
53
|
+
blockedBy: [bend, iac]
|
|
46
54
|
|
|
47
55
|
- ref: qa_b
|
|
48
56
|
agent: QA-B
|
|
@@ -102,12 +110,21 @@ agents:
|
|
|
102
110
|
completion: "Send [HANDOFF] to Lead and CRITIC. Mark task completed."
|
|
103
111
|
cd_targets: [bend]
|
|
104
112
|
|
|
113
|
+
- name: IAC
|
|
114
|
+
ref: iac
|
|
115
|
+
wave: 2
|
|
116
|
+
spawn_trigger: "qa_a completed"
|
|
117
|
+
prompt: .valent-pipeline/prompts/iac.md
|
|
118
|
+
trigger: "Begin immediately — you were spawned because QA-A completed. Wait for READINESS approval before starting implementation."
|
|
119
|
+
completion: "Send [HANDOFF] to Lead and CRITIC. Mark task completed."
|
|
120
|
+
cd_targets: [iac]
|
|
121
|
+
|
|
105
122
|
- name: CRITIC
|
|
106
123
|
ref: critic
|
|
107
124
|
wave: 2
|
|
108
125
|
spawn_trigger: "qa_a completed"
|
|
109
126
|
prompt: .valent-pipeline/prompts/critic.md
|
|
110
|
-
trigger: "Begin immediately — you were spawned because QA-A completed. Wait for [HANDOFF] from
|
|
127
|
+
trigger: "Begin immediately — you were spawned because QA-A completed. Wait for [HANDOFF] from all active dev agents before starting review."
|
|
111
128
|
completion: "Send [HANDOFF] to Lead and QA-B. Mark task completed."
|
|
112
129
|
cd_targets: [critic]
|
|
113
130
|
|