qfai 1.0.7 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qfai",
3
- "version": "1.0.7",
3
+ "version": "1.1.0",
4
4
  "description": "Quality-first AI-driven development toolkit (SDD × ATDD × TDD).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,209 +0,0 @@
1
- <!--
2
- QFAI Prompt Body (SSOT)
3
- - This file is intended to be referenced by tool-specific custom prompt definitions (e.g., Copilot .prompt.md, Claude Code slash commands).
4
- - Keep tool-specific wrappers thin: "Read this file and follow it."
5
- -->
6
-
7
- ---
8
-
9
- id: qfai-pr
10
- title: QFAI PR (Prepare PR Description)
11
- description: "Generate a PR description that matches the project template and includes evidence."
12
- argument-hint: "<title> [--auto]"
13
- allowed-tools: [Read, Glob, Write, Task]
14
- roles: [Planner, QAEngineer, DevOpsCIEngineer, CodeReviewer]
15
- mode: doc-focused
16
-
17
- ---
18
-
19
- # /qfai-pr — Prepare PR Description
20
-
21
- ## Purpose
22
-
23
- Generate a PR description that helps reviewers approve quickly:
24
-
25
- - What changed / why
26
- - Impact and migration notes
27
- - How to verify (commands + evidence)
28
- - Risk areas to pay attention to
29
-
30
- ## Success Criteria
31
-
32
- - PR body matches the repository’s PR template (if any).
33
- - Includes verification evidence from /qfai-verify.
34
-
35
- ## Non‑Negotiable Principles (QFAI Articles)
36
-
37
- These principles are inspired by “constitution / articles” patterns used by other agent frameworks, but tailored to QFAI.
38
-
39
- 1. **SDD First (Specification is the source of truth)**
40
- If there is a conflict between code and spec, treat the spec as authoritative and either (a) fix code or (b) raise an explicit Open Question to change the spec.
41
-
42
- 2. **Traceability is mandatory**
43
- Every meaningful change must be traceable: **Require → Spec → Scenario → Tests → Code → Verification evidence**.
44
-
45
- 3. **Evidence over confidence**
46
- Prefer observable proof (logs, commands, file diffs, test results). If you cannot verify, say so and record it.
47
-
48
- 4. **Minimize scope, but never hide gaps**
49
- Keep changes minimal, but do not “paper over” missing decisions. If something blocks correctness, stop and ask.
50
-
51
- 5. **Quality gates are the decision mechanism**
52
- Use tests/lint/typecheck/build/pack verification (whatever the repo defines) as the primary guardrail. Fix until PASS.
53
-
54
- 6. **Make it runnable**
55
- Outputs must be executable in terminal/CI. Provide copy‑paste commands.
56
-
57
- 7. **User time is expensive**
58
- Ask only the questions that are truly blocking. Everything else: make reasonable assumptions and label them clearly.
59
-
60
- ## Absolute Rule — Output Language
61
-
62
- **All outputs MUST be written in the user’s working language for this session.**
63
-
64
- - If the user writes in Japanese, output Japanese.
65
- - If the user writes in English, output English.
66
- - If the user mixes languages, prefer the dominant language unless explicitly instructed otherwise.
67
- This rule overrides all other stylistic preferences.
68
-
69
- ## Multi‑Role Orchestration (Subagents)
70
-
71
- This workflow assumes the environment _may_ support subagents (e.g., Claude Code “Task” tool) or may not.
72
-
73
- ### If subagents are supported
74
-
75
- Delegate to multiple roles and then merge the results. Use a “real‑world workflow” order:
76
-
77
- - Facilitator → Interviewer → Requirements Analyst → Planner → Architect → (Contract Designer) → Test Engineer → QA Engineer → Code Reviewer → DevOps/CI Engineer
78
-
79
- **Pseudo‑invocation pattern** (adjust to your tool):
80
-
81
- ```text
82
- Task(
83
- subagent_type="planner",
84
- description="Create an execution plan and DoD",
85
- prompt="Context: ...\nGoal: ...\nConstraints: ...\nReturn: phases + risks + DoD"
86
- )
87
- ```
88
-
89
- ### If subagents are NOT supported
90
-
91
- Simulate roles by running the same sequence yourself:
92
-
93
- - Write a short “role output” section per role, then consolidate into the final deliverable(s).
94
-
95
- ## Step 0 — Load Context (always)
96
-
97
- 1. Read relevant **project steering** (if present):
98
- - `.qfai/assistant/steering/structure.md`
99
- - `.qfai/assistant/steering/tech.md`
100
- - `.qfai/assistant/steering/product.md`
101
- - any additional files under `.qfai/assistant/steering/`
102
-
103
- 2. Read **project constitution / instructions** (if present):
104
- - `.qfai/assistant/instructions/constitution.md`
105
- - `.qfai/assistant/instructions/workflow.md` (or equivalent)
106
-
107
- 3. Read existing artifacts for the current work item (if present):
108
- - `.qfai/require/`
109
- - `.qfai/specs/spec-*/`
110
- - `.qfai/contracts/`
111
-
112
- 4. Inspect repo conventions:
113
- - package manager (pnpm/npm/yarn), test runner, lint/typecheck scripts, CI definitions
114
- - existing test patterns (unit/integration/e2e)
115
-
116
- ## Step 0 — Project Analysis (mandatory)
117
-
118
- Before producing any deliverable, **thoroughly analyze the current project** so your outputs fit the repo’s:
119
-
120
- - background and goals
121
- - directory structure and conventions
122
- - chosen technologies and versions (runtime, package manager, test runner)
123
- - architecture boundaries (packages, CLI, core modules)
124
- - existing patterns for tests, docs, and CI
125
-
126
- ### Minimum analysis checklist
127
-
128
- - [ ] Read key repo docs: README / CHANGELOG / RELEASE (if present)
129
- - [ ] Inspect `.qfai/` layout and existing SDD/ATDD/TDD artifacts (if present)
130
- - [ ] Inspect `packages/qfai` structure (CLI entrypoints, core modules, validators, assets/init)
131
- - [ ] Identify standard gate commands (format/lint/type/test/verify-pack) and where they are defined
132
- - [ ] Search for existing examples/patterns of similar changes in tests (if available)
133
- - [ ] Note constraints: Node versions, CI matrix, packaging rules, verify-pack expectations
134
-
135
- If analysis cannot be performed (missing access), clearly state what could not be verified and proceed with minimal-risk assumptions.
136
-
137
- ## Step 0.5 — Steering Bootstrap / Refresh (mandatory when incomplete)
138
-
139
- QFAI expects `assistant/steering/` to contain **project‑specific facts** so all subsequent design/test/implementation fits this repository.
140
-
141
- ### What to do
142
-
143
- 1. Open these files:
144
-
145
- - `.qfai/assistant/steering/product.md`
146
- - `.qfai/assistant/steering/tech.md`
147
- - `.qfai/assistant/steering/structure.md`
148
-
149
- 2. If they are missing, mostly empty, or still have placeholders (e.g., `- ` only), **populate them by analyzing the current repository**:
150
-
151
- - derive “what/why/users/success/non-goals” from README/docs/issues (product.md)
152
- - derive runtime/tooling versions + constraints from package.json, CI config, lockfiles (tech.md)
153
- - derive repo layout + key directories + gate commands from the file tree and scripts (structure.md)
154
-
155
- 3. Do **not** invent facts. If something cannot be verified, write it as:
156
-
157
- - `TBD` + what evidence is missing, or
158
- - an Open Question (if it blocks correctness)
159
-
160
- ### Steering refresh checklist
161
-
162
- - [ ] product.md: what we build / users / success / non-goals / release posture
163
- - [ ] tech.md: Node / package manager / TS / test / lint / CI constraints
164
- - [ ] structure.md: repo layout, key packages, entrypoints, standard gate commands, how to run locally
165
-
166
- ## Step 1 — Locate PR template
167
-
168
- Search for:
169
-
170
- - `PULL_REQUEST_TEMPLATE.md`
171
- - `.github/PULL_REQUEST_TEMPLATE.md`
172
- - repo-specific templates
173
-
174
- If none exists, use the standard structure in Step 3.
175
-
176
- ## Step 2 — Collect evidence
177
-
178
- Read the latest verification evidence (from /qfai-verify output or logs).
179
-
180
- ## Step 3 — Write PR body
181
-
182
- Use this structure (adapt to template if present):
183
-
184
- ### Summary
185
-
186
- ### Motivation / Context
187
-
188
- ### Changes
189
-
190
- ### Impact / Migration
191
-
192
- ### Verification
193
-
194
- (copy‑paste commands + results)
195
-
196
- ### Risks / Notes
197
-
198
- ### Reviewer Focus
199
-
200
- (what to review carefully)
201
-
202
- ## Step 4 — Final review
203
-
204
- - QA: acceptance coverage and risk notes
205
- - Code Reviewer: clarity, missing information, misleading claims
206
-
207
- ## Output
208
-
209
- - Ready-to-paste PR title + body