qfai 1.5.3 → 1.5.5
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 +8 -2
- package/assets/init/.qfai/assistant/instructions/requirements-decomposition.md +14 -14
- package/assets/init/.qfai/assistant/instructions/workflow.md +1 -1
- package/assets/init/.qfai/assistant/manifest/spec_required_files.json +2 -1
- package/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +32 -10
- package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +30 -12
- package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +18 -12
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/Rxx_reviewer.md +3 -3
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/summary.json +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +30 -10
- package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +29 -10
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/report/preflight_summary.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/05_Contracts.md +26 -8
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/01_Spec.md +7 -7
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/02_User-stories.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-tdd-green/SKILL.md +18 -9
- package/assets/init/.qfai/assistant/skills/qfai-tdd-red/SKILL.md +18 -9
- package/assets/init/.qfai/assistant/skills/qfai-tdd-refactor/SKILL.md +18 -9
- package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +33 -14
- package/assets/init/.qfai/review/.gitignore +2 -0
- package/assets/init/.qfai/review/README.md +4 -4
- package/assets/init/.qfai/specs/README.md +1 -1
- package/dist/cli/index.cjs +229 -304
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +230 -305
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +2 -1
- package/assets/init/.qfai/specs/_policies/.gitkeep +0 -1
package/README.md
CHANGED
|
@@ -17,6 +17,10 @@ The agent reads the repository, produces the required artifacts, and iterates un
|
|
|
17
17
|
|
|
18
18
|
## Quick start
|
|
19
19
|
|
|
20
|
+
> **Windows users:** `qfai init` creates symlinks internally.
|
|
21
|
+
> You must enable **Developer Mode** (Settings → System → For developers → Developer Mode: ON)
|
|
22
|
+
> before running `npx qfai init`, otherwise symlink creation will fail due to insufficient privileges.
|
|
23
|
+
|
|
20
24
|
```bash
|
|
21
25
|
# 1) Initialize QFAI assets in your repository
|
|
22
26
|
npx qfai init
|
|
@@ -246,7 +250,7 @@ flowchart LR
|
|
|
246
250
|
- Contracts SSOT: `.qfai/contracts/**`
|
|
247
251
|
- Report outputs (`.qfai/report/**`) are derived artifacts and not SSOT.
|
|
248
252
|
|
|
249
|
-
## Minimal tutorial (v1.5.
|
|
253
|
+
## Minimal tutorial (v1.5.5)
|
|
250
254
|
|
|
251
255
|
1. `npx qfai init`
|
|
252
256
|
2. Run `/qfai-discussion` to structure scope, open questions, and produce a discussion pack under `.qfai/discussion/discussion-<ts>/`.
|
|
@@ -278,7 +282,8 @@ It does not generate GitHub Actions workflows.
|
|
|
278
282
|
Configure CI in your own platform and run:
|
|
279
283
|
|
|
280
284
|
```bash
|
|
281
|
-
pnpm ci:
|
|
285
|
+
pnpm ci:gate
|
|
286
|
+
pnpm check-types:future
|
|
282
287
|
# or, minimum gate only:
|
|
283
288
|
npx qfai validate --fail-on error
|
|
284
289
|
```
|
|
@@ -286,6 +291,7 @@ npx qfai validate --fail-on error
|
|
|
286
291
|
Recommended baseline.
|
|
287
292
|
|
|
288
293
|
- Keep CI on default/full validation (`qfai validate --fail-on error`); do not use `--phase refinement` in CI.
|
|
294
|
+
- Keep `pnpm check-types:future` as a separate mandatory gate so future TS compatibility runs once without duplicating `pnpm ci:gate`.
|
|
289
295
|
- Add a report step (`npx qfai report`) when you need a human-readable artifact.
|
|
290
296
|
- Tune traceability globs in `qfai.config.yaml` to match your test layout.
|
|
291
297
|
|
|
@@ -12,11 +12,11 @@ This document is the decision rule SSOT for AI and humans when answering:
|
|
|
12
12
|
|
|
13
13
|
## Canonical order (top -> down)
|
|
14
14
|
|
|
15
|
-
1. **Source registry** (
|
|
16
|
-
2. **Requirement index** (
|
|
17
|
-
3. **Input gaps / Open Questions** (
|
|
18
|
-
4. **Policy layer** (
|
|
19
|
-
5. **Capability slices** (
|
|
15
|
+
1. **Source registry** (`.qfai/require/require-*/01_Sources.md`)
|
|
16
|
+
2. **Requirement index** (`.qfai/require/require-*/03_REQ.md`)
|
|
17
|
+
3. **Input gaps / Open Questions** (`.qfai/require/require-*/08_OQ.md`)
|
|
18
|
+
4. **Policy layer** (`.qfai/specs/_policies/01..04`)
|
|
19
|
+
5. **Capability slices** (`.qfai/specs/spec-*/01..05` minimum)
|
|
20
20
|
6. **ATDD / TDD** (tests + code)
|
|
21
21
|
|
|
22
22
|
## Decision rules
|
|
@@ -28,9 +28,9 @@ This document is the decision rule SSOT for AI and humans when answering:
|
|
|
28
28
|
|
|
29
29
|
### Rule 2 - Preserve layered ownership
|
|
30
30
|
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
- Do not duplicate detailed spec text in
|
|
31
|
+
- `.qfai/require/` stores only source/index/gap inputs.
|
|
32
|
+
- `.qfai/specs/` is the SSOT for detailed behavior and design decisions.
|
|
33
|
+
- Do not duplicate detailed spec text in `.qfai/require/`.
|
|
34
34
|
|
|
35
35
|
### Rule 3 - Keep ambiguity explicit
|
|
36
36
|
|
|
@@ -39,9 +39,9 @@ This document is the decision rule SSOT for AI and humans when answering:
|
|
|
39
39
|
|
|
40
40
|
## How to decompose (mechanical procedure)
|
|
41
41
|
|
|
42
|
-
1. Register source documents and assumptions in
|
|
43
|
-
2. Extract concise requirement index entries in
|
|
44
|
-
3. Capture missing information in
|
|
42
|
+
1. Register source documents and assumptions in `.qfai/require/require-*/01_Sources.md`.
|
|
43
|
+
2. Extract concise requirement index entries in `.qfai/require/require-*/03_REQ.md`.
|
|
44
|
+
3. Capture missing information in `.qfai/require/require-*/08_OQ.md`.
|
|
45
45
|
4. Build `_policies` layer (`Objective`, `Initiative`, `Capabilities`, `Business Flow`).
|
|
46
46
|
5. Split by capability (`1 CAP = 1 spec-XXXX`) and produce slice files.
|
|
47
47
|
6. Derive acceptance tests and implementation from the finalized slices.
|
|
@@ -49,11 +49,11 @@ This document is the decision rule SSOT for AI and humans when answering:
|
|
|
49
49
|
## Example
|
|
50
50
|
|
|
51
51
|
- Requirement index entry: `REQ-0003` linked to `SRC-0002`
|
|
52
|
-
- Capability mapping: `CAP-0003` in
|
|
53
|
-
- Spec slice:
|
|
52
|
+
- Capability mapping: `CAP-0003` in `.qfai/specs/_policies/03_Capabilities.md`
|
|
53
|
+
- Spec slice: `.qfai/specs/spec-0003/01_Spec.md` through `06_Test-Cases.md`
|
|
54
54
|
|
|
55
55
|
## Non-goals
|
|
56
56
|
|
|
57
57
|
- Managing release status flags in specs.
|
|
58
|
-
- Keeping full requirement prose in
|
|
58
|
+
- Keeping full requirement prose in `.qfai/require/`.
|
|
59
59
|
- Treating diagrams as mandatory at require stage.
|
|
@@ -1,25 +1,47 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
QFAI Skill Body (SSOT)
|
|
3
|
-
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
4
|
-
- Keep wrappers thin and route users to this skill body.
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
1
|
---
|
|
8
|
-
|
|
9
2
|
name: qfai-atdd
|
|
10
3
|
title: QFAI ATDD (Executable acceptance tests)
|
|
11
4
|
description: "Implement automated acceptance tests (E2E/API/Integration) aligned with US/TC/CON-API obligations from specs and contracts."
|
|
12
5
|
argument-hint: "<spec-id> [--auto]"
|
|
13
6
|
allowed-tools: [Read, Glob, Write, TodoWrite, Task, Bash]
|
|
14
|
-
roles:
|
|
7
|
+
roles:
|
|
8
|
+
- Orchestrator
|
|
9
|
+
- TestVolumeEstimator
|
|
10
|
+
- ATDDE2EImplementer
|
|
11
|
+
- ATDDAPIImplementer
|
|
12
|
+
- ATDDIntegrationImplementer
|
|
13
|
+
- QAEngineer
|
|
14
|
+
- TestEngineer
|
|
15
|
+
- BackendEngineer
|
|
16
|
+
- FrontendEngineer
|
|
17
|
+
- Reviewer
|
|
18
|
+
- RuntimeGatekeeper
|
|
19
|
+
- DevOpsCIEngineer
|
|
20
|
+
- CodeReviewer
|
|
15
21
|
mode: execution-focused
|
|
16
|
-
|
|
17
22
|
---
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
<!--
|
|
25
|
+
QFAI Skill Body (SSOT)
|
|
26
|
+
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
27
|
+
- Keep wrappers thin and route users to this skill body.
|
|
28
|
+
-->
|
|
29
|
+
|
|
30
|
+
## /qfai-atdd — Implement Automated Acceptance Tests (ATDD)
|
|
20
31
|
|
|
21
32
|
[DRIFT-PROTOCOL:MANDATORY]
|
|
22
33
|
|
|
34
|
+
## User Questions (AskUserQuestion Protocol)
|
|
35
|
+
|
|
36
|
+
- When a question to the user is needed (e.g., test scope decisions, runtime environment confirmation),
|
|
37
|
+
the agent MUST use AskUserQuestion if the tool is available.
|
|
38
|
+
- When AskUserQuestion supports structured choices (radio/multi-select),
|
|
39
|
+
the agent MUST prefer structured choices over free-text input.
|
|
40
|
+
- If AskUserQuestion is technically unavailable, present the same question as a normal message
|
|
41
|
+
with explicit numbered choices.
|
|
42
|
+
The agent SHOULD preserve structured choice semantics (enumerated options, selection constraints).
|
|
43
|
+
The reason for unavailability MUST be stated.
|
|
44
|
+
|
|
23
45
|
## FORMAT SSOT (Mandatory)
|
|
24
46
|
|
|
25
47
|
- Before writing or editing any `.qfai/**` artifact, read and follow the relevant directory README template and sample.
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
QFAI Skill Body (SSOT)
|
|
3
|
-
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
4
|
-
- Keep wrappers thin and route users to this skill body.
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
1
|
---
|
|
8
|
-
|
|
9
2
|
name: qfai-configure
|
|
10
3
|
title: QFAI Configure (Tune qfai.config.yaml)
|
|
11
4
|
description: "Analyze the repository and tune qfai.config.yaml (testFileGlobs, exclude globs, optional specSections)."
|
|
@@ -13,13 +6,29 @@ argument-hint: "[--auto]"
|
|
|
13
6
|
allowed-tools: [Read, Glob, Write, TodoWrite, Task]
|
|
14
7
|
roles: [DevOpsCIEngineer, QAEngineer, CodeReviewer, Planner]
|
|
15
8
|
mode: evidence-focused
|
|
16
|
-
|
|
17
9
|
---
|
|
18
10
|
|
|
19
|
-
|
|
11
|
+
<!--
|
|
12
|
+
QFAI Skill Body (SSOT)
|
|
13
|
+
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
14
|
+
- Keep wrappers thin and route users to this skill body.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
## /qfai-configure - Configure QFAI for this repository
|
|
20
18
|
|
|
21
19
|
[DRIFT-PROTOCOL:MANDATORY]
|
|
22
20
|
|
|
21
|
+
## User Questions (AskUserQuestion Protocol)
|
|
22
|
+
|
|
23
|
+
- When a question to the user is needed (e.g., configuration decisions, glob pattern confirmation),
|
|
24
|
+
the agent MUST use AskUserQuestion if the tool is available.
|
|
25
|
+
- When AskUserQuestion supports structured choices (radio/multi-select),
|
|
26
|
+
the agent MUST prefer structured choices over free-text input.
|
|
27
|
+
- If AskUserQuestion is technically unavailable, present the same question as a normal message
|
|
28
|
+
with explicit numbered choices.
|
|
29
|
+
The agent SHOULD preserve structured choice semantics (enumerated options, selection constraints).
|
|
30
|
+
The reason for unavailability MUST be stated.
|
|
31
|
+
|
|
23
32
|
## FORMAT SSOT (Mandatory)
|
|
24
33
|
|
|
25
34
|
- **Before writing or editing any `.qfai/**` artifact\*\*, read and follow the relevant directory README template and sample:
|
|
@@ -148,7 +157,9 @@ Rules:
|
|
|
148
157
|
## Delta Rejected Guard (Mandatory)
|
|
149
158
|
|
|
150
159
|
- Do NOT reintroduce options marked as rejected in 09_delta.md.
|
|
151
|
-
- If a rejected option must be reconsidered, create a **[RE-OPEN]** Decision
|
|
160
|
+
- If a rejected option must be reconsidered, create a **[RE-OPEN]** Decision
|
|
161
|
+
Record in 09_delta.md that references the prior DR-ID, states what changed +
|
|
162
|
+
new criteria, and includes explicit approval (user or instructions/steering).
|
|
152
163
|
|
|
153
164
|
## CRITICAL CONSTRAINTS (Read First)
|
|
154
165
|
|
|
@@ -166,8 +177,15 @@ Before declaring completion, you MUST:
|
|
|
166
177
|
|
|
167
178
|
- OQ / undefined resolution: detect undefined or ambiguous items; resolve them or explicitly defer them with documented rationale and (when required by this prompt) user approval.
|
|
168
179
|
- Deliverable completeness: verify every expected artifact listed in this prompt (and required README templates) exists and is fully populated; no missing required sections.
|
|
169
|
-
- OQ / placeholder scan: scan all generated artifacts (including evidence) for
|
|
170
|
-
|
|
180
|
+
- OQ / placeholder scan: scan all generated artifacts (including evidence) for
|
|
181
|
+
placeholders such as "TBD", "TODO", "TBA", "TBC", "XXX", "???", "OQ",
|
|
182
|
+
"OPEN QUESTION", "UNDEFINED", "PLACEHOLDER", and localized equivalents in
|
|
183
|
+
the user's language. Resolve or explicitly defer; do not leave silent
|
|
184
|
+
placeholders.
|
|
185
|
+
- Smoke check (if applicable): when the prompt produces runnable code, tests,
|
|
186
|
+
or configs, execute the smallest command that proves basic run/start/operate
|
|
187
|
+
and record evidence. If not applicable, state "not applicable" with a short
|
|
188
|
+
rationale.
|
|
171
189
|
|
|
172
190
|
## Goal
|
|
173
191
|
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
````skill
|
|
2
|
-
<!--
|
|
3
|
-
QFAI Skill Body (SSOT)
|
|
4
|
-
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
5
|
-
- Keep wrappers thin and route users to this skill body.
|
|
6
|
-
-->
|
|
7
|
-
|
|
8
1
|
---
|
|
9
|
-
|
|
10
2
|
name: qfai-discussion
|
|
11
3
|
title: QFAI Discussion (Unified Discuss + Require)
|
|
12
4
|
description: "Run structured discussion that merges discuss and require into a single 15-file discussion pack with OQ-driven exit."
|
|
@@ -14,13 +6,29 @@ argument-hint: "<idea-or-problem> [--auto]"
|
|
|
14
6
|
allowed-tools: [Read, Glob, Write, TodoWrite, Task, Bash]
|
|
15
7
|
roles: [Researcher, Facilitator, Interviewer, RequirementsAnalyst, QAEngineer, Planner]
|
|
16
8
|
mode: interactive-by-default
|
|
17
|
-
|
|
18
9
|
---
|
|
19
10
|
|
|
20
|
-
|
|
11
|
+
<!--
|
|
12
|
+
QFAI Skill Body (SSOT)
|
|
13
|
+
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
14
|
+
- Keep wrappers thin and route users to this skill body.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
## /qfai-discussion - Unified Discuss + Require
|
|
21
18
|
|
|
22
19
|
[DRIFT-PROTOCOL:MANDATORY]
|
|
23
20
|
|
|
21
|
+
## User Questions (AskUserQuestion Protocol)
|
|
22
|
+
|
|
23
|
+
- When a question to the user is needed (e.g., Simulation mode approval, scope confirmation),
|
|
24
|
+
the agent MUST use AskUserQuestion if the tool is available.
|
|
25
|
+
- When AskUserQuestion supports structured choices (radio/multi-select),
|
|
26
|
+
the agent MUST prefer structured choices over free-text input.
|
|
27
|
+
- If AskUserQuestion is technically unavailable, present the same question as a normal message
|
|
28
|
+
with explicit numbered choices.
|
|
29
|
+
The agent SHOULD preserve structured choice semantics (enumerated options, selection constraints).
|
|
30
|
+
The reason for unavailability MUST be stated.
|
|
31
|
+
|
|
24
32
|
## FORMAT SSOT (Mandatory)
|
|
25
33
|
|
|
26
34
|
- Before writing artifacts, read and follow:
|
|
@@ -333,5 +341,3 @@ You MUST end the user-facing output with a handoff sentence to `/qfai-sdd` in th
|
|
|
333
341
|
Action: continue discussion loops until OQ states are explicit and complete.
|
|
334
342
|
- Need additional risk analysis before SDD:
|
|
335
343
|
Action: update `03_Story-Workshop.md` and `11_OQ-Register.md` with additional findings.
|
|
336
|
-
|
|
337
|
-
````
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Reviewer Result
|
|
2
2
|
|
|
3
|
-
- reviewer_id:
|
|
4
|
-
- reviewer_role:
|
|
3
|
+
- reviewer_id: `Rxx`
|
|
4
|
+
- reviewer_role: `qa-lead`
|
|
5
5
|
- verdict: `PASS` <!-- PASS | FAIL | N/A -->
|
|
6
|
-
- reviewed_at:
|
|
6
|
+
- reviewed_at: `YYYY-MM-DDThh:mm:ssZ`
|
|
7
7
|
|
|
8
8
|
## Checked
|
|
9
9
|
|
|
@@ -1,25 +1,45 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
QFAI Skill Body (SSOT)
|
|
3
|
-
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
4
|
-
- Keep wrappers thin and route users to this skill body.
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
1
|
---
|
|
8
|
-
|
|
9
2
|
name: qfai-prototyping
|
|
10
3
|
title: QFAI Prototyping (All-spec runnable skeleton gate)
|
|
11
4
|
description: "Implement a minimum runnable skeleton for ALL specs and block DONE until evidence + validate gate pass."
|
|
12
5
|
argument-hint: "[--auto]"
|
|
13
6
|
allowed-tools: [Read, Glob, Write, TodoWrite, Task, Bash]
|
|
14
|
-
roles:
|
|
7
|
+
roles:
|
|
8
|
+
[
|
|
9
|
+
FullStackEngineer,
|
|
10
|
+
BackendEngineer,
|
|
11
|
+
FrontendEngineer,
|
|
12
|
+
DBEngineer,
|
|
13
|
+
DevOpsCIEngineer,
|
|
14
|
+
QAEngineer,
|
|
15
|
+
RuntimeGatekeeper,
|
|
16
|
+
UIUXReviewer,
|
|
17
|
+
CodeReviewer,
|
|
18
|
+
]
|
|
15
19
|
mode: execution-focused
|
|
16
|
-
|
|
17
20
|
---
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
<!--
|
|
23
|
+
QFAI Skill Body (SSOT)
|
|
24
|
+
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
25
|
+
- Keep wrappers thin and route users to this skill body.
|
|
26
|
+
-->
|
|
27
|
+
|
|
28
|
+
## /qfai-prototyping
|
|
20
29
|
|
|
21
30
|
[DRIFT-PROTOCOL:MANDATORY]
|
|
22
31
|
|
|
32
|
+
## User Questions (AskUserQuestion Protocol)
|
|
33
|
+
|
|
34
|
+
- When a question to the user is needed (e.g., implementation scope decisions, runtime environment confirmation),
|
|
35
|
+
the agent MUST use AskUserQuestion if the tool is available.
|
|
36
|
+
- When AskUserQuestion supports structured choices (radio/multi-select),
|
|
37
|
+
the agent MUST prefer structured choices over free-text input.
|
|
38
|
+
- If AskUserQuestion is technically unavailable, present the same question as a normal message
|
|
39
|
+
with explicit numbered choices.
|
|
40
|
+
The agent SHOULD preserve structured choice semantics (enumerated options, selection constraints).
|
|
41
|
+
The reason for unavailability MUST be stated.
|
|
42
|
+
|
|
23
43
|
Run prototyping as an **all-spec stage**. Scope is fixed to **ALL specs** resolved from `.qfai/specs/spec-*`.
|
|
24
44
|
|
|
25
45
|
This stage is complete only when all specs pass the minimum runtime contract:
|
|
@@ -1,25 +1,44 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
QFAI Skill Body (SSOT)
|
|
3
|
-
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
4
|
-
- Keep wrappers thin and route users to this skill body.
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
1
|
---
|
|
8
|
-
|
|
9
2
|
name: qfai-sdd
|
|
10
3
|
title: QFAI SDD Unified (Outline/Slice/Plan/Delta)
|
|
11
4
|
description: "Create and update layered SDD artifacts (\_policies + spec-XXXX) in one workflow."
|
|
12
5
|
argument-hint: "[<spec-id-or-name>] [--auto]"
|
|
13
6
|
allowed-tools: [Read, Glob, Write, TodoWrite, Task, Bash]
|
|
14
|
-
roles:
|
|
7
|
+
roles:
|
|
8
|
+
[
|
|
9
|
+
Planner,
|
|
10
|
+
Architect,
|
|
11
|
+
RequirementsAnalyst,
|
|
12
|
+
SpecWriter,
|
|
13
|
+
TraceabilityBuilder,
|
|
14
|
+
TestStrategist,
|
|
15
|
+
QAEngineer,
|
|
16
|
+
CodeReviewer,
|
|
17
|
+
]
|
|
15
18
|
mode: approval-gated
|
|
16
|
-
|
|
17
19
|
---
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
<!--
|
|
22
|
+
QFAI Skill Body (SSOT)
|
|
23
|
+
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
24
|
+
- Keep wrappers thin and route users to this skill body.
|
|
25
|
+
-->
|
|
26
|
+
|
|
27
|
+
## /qfai-sdd - Unified SDD Workflow
|
|
20
28
|
|
|
21
29
|
[DRIFT-PROTOCOL:MANDATORY]
|
|
22
30
|
|
|
31
|
+
## User Questions (AskUserQuestion Protocol)
|
|
32
|
+
|
|
33
|
+
- When a question to the user is needed (e.g., OQ resolution, NFR priority decisions),
|
|
34
|
+
the agent MUST use AskUserQuestion if the tool is available.
|
|
35
|
+
- When AskUserQuestion supports structured choices (radio/multi-select),
|
|
36
|
+
the agent MUST prefer structured choices over free-text input.
|
|
37
|
+
- If AskUserQuestion is technically unavailable, present the same question as a normal message
|
|
38
|
+
with explicit numbered choices.
|
|
39
|
+
The agent SHOULD preserve structured choice semantics (enumerated options, selection constraints).
|
|
40
|
+
The reason for unavailability MUST be stated.
|
|
41
|
+
|
|
23
42
|
## FORMAT SSOT (Mandatory)
|
|
24
43
|
|
|
25
44
|
- Before writing or editing any `.qfai/**` artifact, read and follow:
|
package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/05_Contracts.md
CHANGED
|
@@ -9,29 +9,47 @@
|
|
|
9
9
|
|
|
10
10
|
### DB Contracts
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
0 items
|
|
13
|
+
|
|
14
|
+
<!-- Example row (remove this comment block and add real rows when contracts exist):
|
|
14
15
|
| DB-001 | order_drafts | CON-DB-0001 | `.qfai/contracts/db/db-0001-<slug>.sql` | draft persistence |
|
|
16
|
+
-->
|
|
17
|
+
|
|
18
|
+
| Short ID | Entity | Declared ID | File | Purpose |
|
|
19
|
+
| -------- | ------ | ----------- | ---- | ------- |
|
|
15
20
|
|
|
16
21
|
### API Contracts
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
0 items
|
|
24
|
+
|
|
25
|
+
<!-- Example row:
|
|
20
26
|
| API-001 | /api/orders | CON-API-0001 | `.qfai/contracts/api/api-0001-<slug>.yaml` | create draft |
|
|
27
|
+
-->
|
|
28
|
+
|
|
29
|
+
| Short ID | Router | Declared ID | File | Purpose |
|
|
30
|
+
| -------- | ------ | ----------- | ---- | ------- |
|
|
21
31
|
|
|
22
32
|
### UI Contracts
|
|
23
33
|
|
|
24
|
-
|
|
25
|
-
|
|
34
|
+
0 items
|
|
35
|
+
|
|
36
|
+
<!-- Example row:
|
|
26
37
|
| UI-001 | order-create | CON-UI-0001 | `.qfai/contracts/ui/ui-0001-<slug>.yaml` | draft input form |
|
|
38
|
+
-->
|
|
39
|
+
|
|
40
|
+
| Short ID | Screen | Declared ID | File | Purpose |
|
|
41
|
+
| -------- | ------ | ----------- | ---- | ------- |
|
|
27
42
|
|
|
28
43
|
## Mapping Rules
|
|
29
44
|
|
|
45
|
+
- If no contracts are needed, keep each table and state `0 items` explicitly.
|
|
46
|
+
- `<slug>` must be kebab-case from entity/router/screen.
|
|
47
|
+
|
|
48
|
+
<!-- Example mappings (add when contracts exist):
|
|
30
49
|
- `DB-001` maps to `CON-DB-0001`, file `db-0001-<slug>.sql`.
|
|
31
50
|
- `API-001` maps to `CON-API-0001`, file `api-0001-<slug>.yaml`.
|
|
32
51
|
- `UI-001` maps to `CON-UI-0001`, file `ui-0001-<slug>.yaml`.
|
|
33
|
-
|
|
34
|
-
- If no contracts are needed, keep each table and state `0 items` explicitly.
|
|
52
|
+
-->
|
|
35
53
|
|
|
36
54
|
## Diagram (Mermaid required for ER/relationship)
|
|
37
55
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# 01 Spec
|
|
2
2
|
|
|
3
|
-
- Spec: spec-
|
|
4
|
-
- Parent: CAP-
|
|
3
|
+
- Spec: spec-XXXX
|
|
4
|
+
- Parent: CAP-XXXX
|
|
5
5
|
|
|
6
6
|
## Consumer View
|
|
7
7
|
|
|
8
|
-
- Primary SSOT for execution: `spec-
|
|
8
|
+
- Primary SSOT for execution: `spec-XXXX/01_Spec.md`
|
|
9
9
|
- Default read set: this file + relevant contracts only
|
|
10
10
|
- `_policies` is read-only escalation context and must not be read by default
|
|
11
11
|
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
### Escalation Targets (Read-only, decision basis)
|
|
49
49
|
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
50
|
+
- \_policies/01_Objective.md
|
|
51
|
+
- \_policies/02_Initiative.md
|
|
52
|
+
- \_policies/07_Constraints.md
|
|
53
|
+
- \_policies/08_Decisions.md
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
QFAI Skill Body (SSOT)
|
|
3
|
-
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
4
|
-
- Keep wrappers thin and route users to this skill body.
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
1
|
---
|
|
8
|
-
|
|
9
2
|
name: qfai-tdd-green
|
|
10
3
|
title: QFAI TDD Green (Deprecated Wrapper)
|
|
11
4
|
description: "Deprecated wrapper. Legacy red/green/refactor chain is no longer a completion gate."
|
|
@@ -13,13 +6,29 @@ argument-hint: "[optional notes]"
|
|
|
13
6
|
allowed-tools: [Read]
|
|
14
7
|
roles: [Reviewer]
|
|
15
8
|
mode: approval-gated
|
|
16
|
-
|
|
17
9
|
---
|
|
18
10
|
|
|
19
|
-
|
|
11
|
+
<!--
|
|
12
|
+
QFAI Skill Body (SSOT)
|
|
13
|
+
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
14
|
+
- Keep wrappers thin and route users to this skill body.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
## /qfai-tdd-green - Deprecated Wrapper
|
|
20
18
|
|
|
21
19
|
[DRIFT-PROTOCOL:MANDATORY]
|
|
22
20
|
|
|
21
|
+
## User Questions (AskUserQuestion Protocol)
|
|
22
|
+
|
|
23
|
+
- When a question to the user is needed (e.g., Simulation mode approval),
|
|
24
|
+
the agent MUST use AskUserQuestion if the tool is available.
|
|
25
|
+
- When AskUserQuestion supports structured choices (radio/multi-select),
|
|
26
|
+
the agent MUST prefer structured choices over free-text input.
|
|
27
|
+
- If AskUserQuestion is technically unavailable, present the same question as a normal message
|
|
28
|
+
with explicit numbered choices.
|
|
29
|
+
The agent SHOULD preserve structured choice semantics (enumerated options, selection constraints).
|
|
30
|
+
The reason for unavailability MUST be stated.
|
|
31
|
+
|
|
23
32
|
## Deprecation Notice (MUST)
|
|
24
33
|
|
|
25
34
|
- This command is deprecated.
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
QFAI Skill Body (SSOT)
|
|
3
|
-
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
4
|
-
- Keep wrappers thin and route users to this skill body.
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
1
|
---
|
|
8
|
-
|
|
9
2
|
name: qfai-tdd-red
|
|
10
3
|
title: QFAI TDD Red (Deprecated Wrapper)
|
|
11
4
|
description: "Deprecated wrapper. Legacy red/green/refactor chain is no longer a completion gate."
|
|
@@ -13,13 +6,29 @@ argument-hint: "[optional notes]"
|
|
|
13
6
|
allowed-tools: [Read]
|
|
14
7
|
roles: [Reviewer]
|
|
15
8
|
mode: approval-gated
|
|
16
|
-
|
|
17
9
|
---
|
|
18
10
|
|
|
19
|
-
|
|
11
|
+
<!--
|
|
12
|
+
QFAI Skill Body (SSOT)
|
|
13
|
+
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
14
|
+
- Keep wrappers thin and route users to this skill body.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
## /qfai-tdd-red - Deprecated Wrapper
|
|
20
18
|
|
|
21
19
|
[DRIFT-PROTOCOL:MANDATORY]
|
|
22
20
|
|
|
21
|
+
## User Questions (AskUserQuestion Protocol)
|
|
22
|
+
|
|
23
|
+
- When a question to the user is needed (e.g., Simulation mode approval),
|
|
24
|
+
the agent MUST use AskUserQuestion if the tool is available.
|
|
25
|
+
- When AskUserQuestion supports structured choices (radio/multi-select),
|
|
26
|
+
the agent MUST prefer structured choices over free-text input.
|
|
27
|
+
- If AskUserQuestion is technically unavailable, present the same question as a normal message
|
|
28
|
+
with explicit numbered choices.
|
|
29
|
+
The agent SHOULD preserve structured choice semantics (enumerated options, selection constraints).
|
|
30
|
+
The reason for unavailability MUST be stated.
|
|
31
|
+
|
|
23
32
|
## Deprecation Notice (MUST)
|
|
24
33
|
|
|
25
34
|
- This command is deprecated.
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
QFAI Skill Body (SSOT)
|
|
3
|
-
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
4
|
-
- Keep wrappers thin and route users to this skill body.
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
1
|
---
|
|
8
|
-
|
|
9
2
|
name: qfai-tdd-refactor
|
|
10
3
|
title: QFAI TDD Refactor (Deprecated Wrapper)
|
|
11
4
|
description: "Deprecated wrapper. Legacy red/green/refactor chain is no longer a completion gate."
|
|
@@ -13,13 +6,29 @@ argument-hint: "[optional notes]"
|
|
|
13
6
|
allowed-tools: [Read]
|
|
14
7
|
roles: [Reviewer]
|
|
15
8
|
mode: approval-gated
|
|
16
|
-
|
|
17
9
|
---
|
|
18
10
|
|
|
19
|
-
|
|
11
|
+
<!--
|
|
12
|
+
QFAI Skill Body (SSOT)
|
|
13
|
+
- This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
|
|
14
|
+
- Keep wrappers thin and route users to this skill body.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
## /qfai-tdd-refactor - Deprecated Wrapper
|
|
20
18
|
|
|
21
19
|
[DRIFT-PROTOCOL:MANDATORY]
|
|
22
20
|
|
|
21
|
+
## User Questions (AskUserQuestion Protocol)
|
|
22
|
+
|
|
23
|
+
- When a question to the user is needed (e.g., Simulation mode approval),
|
|
24
|
+
the agent MUST use AskUserQuestion if the tool is available.
|
|
25
|
+
- When AskUserQuestion supports structured choices (radio/multi-select),
|
|
26
|
+
the agent MUST prefer structured choices over free-text input.
|
|
27
|
+
- If AskUserQuestion is technically unavailable, present the same question as a normal message
|
|
28
|
+
with explicit numbered choices.
|
|
29
|
+
The agent SHOULD preserve structured choice semantics (enumerated options, selection constraints).
|
|
30
|
+
The reason for unavailability MUST be stated.
|
|
31
|
+
|
|
23
32
|
## Deprecation Notice (MUST)
|
|
24
33
|
|
|
25
34
|
- This command is deprecated.
|