qfai 2.3.0 → 2.4.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/README.md +23 -3
- package/assets/init/.claude/settings.json +35 -1
- package/assets/init/.codex/hooks.json +24 -0
- package/assets/init/.github/instructions/code-review.instructions.md +1 -1
- package/assets/init/.qfai/assistant/agent/architecture-reviewer.md +2 -2
- package/assets/init/.qfai/assistant/agent/fullstack-engineer.md +32 -4
- package/assets/init/.qfai/assistant/agent/implementation-reviewer.md +4 -4
- package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +7 -3
- package/assets/init/.qfai/assistant/agent/requirements-reviewer.md +2 -2
- package/assets/init/.qfai/assistant/rule/agent-selection.md +1 -1
- package/assets/init/.qfai/assistant/rule/communication.md +1 -1
- package/assets/init/.qfai/assistant/rule/constitution.md +77 -242
- package/assets/init/.qfai/assistant/rule/drift-protocol.md +30 -164
- package/assets/init/.qfai/assistant/rule/references/asset-authoring.md +3 -2
- package/assets/init/.qfai/assistant/rule/references/gate-failure-autorepair.md +2 -2
- package/assets/init/.qfai/assistant/rule/references/placeholder-scan.md +2 -3
- package/assets/init/.qfai/assistant/rule/references/reviewer-findings.md +3 -3
- package/assets/init/.qfai/assistant/rule/references/worker-edit-boundary.md +12 -3
- package/assets/init/.qfai/assistant/rule/review-convergence.md +6 -6
- package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +6 -6
- package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +17 -17
- package/assets/init/.qfai/assistant/rule/test-layers.md +1 -1
- package/assets/init/.qfai/assistant/rule/thinking.md +2 -2
- package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +5 -5
- package/assets/init/.qfai/assistant/rule/ui-procurement.md +1 -1
- package/assets/init/.qfai/assistant/rule/workflow.md +12 -12
- package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +12 -14
- package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +2 -4
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/03_Story-Workshop.md +1 -2
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/50_review_input_bundle.md +4 -3
- package/assets/init/.qfai/assistant/skill/qfai-grill/SKILL.md +1 -3
- package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +30 -43
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/confirmation-sheet.md +71 -0
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/delegated-session.md +18 -1
- package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +2 -4
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +3 -3
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +35 -2
- package/assets/init/.qfai/assistant/skill/qfai-maintain/SKILL.md +2 -4
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +0 -2
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-guide.md +2 -3
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +5 -6
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +75 -4
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/handoff.md +2 -1
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/iteration-loop.md +58 -3
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +11 -2
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +41 -10
- package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +7 -8
- package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +12 -7
- package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/SKILL.md +10 -12
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/concrete-abstract-cycle.md +25 -27
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +8 -10
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-anti-patterns.md +36 -3
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md +8 -9
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/requirements-decomposition.md +6 -6
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +6 -6
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-phase-checklists.md +5 -5
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-pre-draft-grilling.md +5 -5
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-quality-gate.md +3 -3
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md +115 -199
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +25 -25
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +23 -113
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-design-contract-normalization.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/ui-contract.sample.yaml +8 -7
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/03_contract/tech.md +1 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions/page-NNNN.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +59 -31
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/open-questions.md +15 -11
- package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +1 -3
- package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +2 -4
- package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +1 -1
- package/assets/init/.qfai/assistant/skill/web-research/SKILL.md +1 -3
- package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +9 -9
- package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +2 -2
- package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +3 -3
- package/assets/init/.qfai/assistant/step/common-policy-check/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +6 -4
- package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +7 -7
- package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +43 -0
- package/assets/init/.qfai/assistant/step/implement-acceptance/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +11 -13
- package/assets/init/.qfai/assistant/step/implement-procedure/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/implement-regression-fix/STEP.md +2 -2
- package/assets/init/.qfai/assistant/step/implement-scaffold/STEP.md +5 -5
- package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +7 -8
- package/assets/init/.qfai/assistant/step/maintain-edit/STEP.md +17 -17
- package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +89 -12
- package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +16 -15
- package/assets/init/.qfai/assistant/step/sdd-cycle/STEP.md +7 -8
- package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +25 -4
- package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +6 -6
- package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +66 -75
- package/assets/init/.qfai/assistant/step/triage-operate/STEP.md +29 -15
- package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +2 -4
- package/assets/init/.qfai/assistant/step/verify-context/STEP.md +1 -1
- package/assets/init/root/.agents/rules/ai-readable-markdown.md +8 -1
- package/assets/init/root/.agents/rules/delegation-steering.md +69 -0
- package/assets/init/root/.agents/rules/grilling.md +72 -43
- package/assets/init/root/.agents/rules/minimal-implementation.md +5 -5
- package/assets/init/root/.agents/rules/reply-forms.md +191 -0
- package/assets/init/root/.agents/rules/session-feedback.md +104 -27
- package/assets/init/root/.agents/rules/user-questions.md +6 -1
- package/assets/init/root/.gitattributes +5 -6
- package/assets/init/root/AGENTS.md +4 -2
- package/assets/mdschema/story/03_contract/tech.mdschema.yml +1 -1
- package/assets/mdschema/story/decisions/page-NNNN.mdschema.yml +3 -3
- package/assets/mdschema/story/decisions.mdschema.yml +4 -4
- package/assets/mdschema/story/open-questions.mdschema.yml +3 -3
- package/assets/schemas/workflow/extraction.schema.json +0 -2
- package/dist/cli/index.cjs +3749 -3029
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +3718 -3006
- package/dist/cli/index.mjs.map +1 -1
- package/dist/hook/turn-end.cjs +1022 -0
- package/dist/hook/turn-end.cjs.map +1 -0
- package/dist/hook/turn-end.d.cts +2 -0
- package/dist/hook/turn-end.d.ts +2 -0
- package/dist/hook/turn-end.mjs +998 -0
- package/dist/hook/turn-end.mjs.map +1 -0
- package/dist/index.cjs +3626 -3577
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.mjs +3544 -3498
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/change-request.md +0 -52
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sdd-triage
|
|
3
3
|
owner: qfai-sdd
|
|
4
|
-
purpose: "Select the requirement source, classify each requirement against the story tree, and
|
|
4
|
+
purpose: "Select the requirement source, classify each requirement against the story tree, and settle the decisions and questions the later writes depend on."
|
|
5
5
|
requires: []
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -14,7 +14,7 @@ changes, and record that decision before anything depends on it.
|
|
|
14
14
|
|
|
15
15
|
- The applicable `.qfai/assistant/rule/` files.
|
|
16
16
|
- `.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md`: the operation set,
|
|
17
|
-
the
|
|
17
|
+
the critical decisions and the decision-row format.
|
|
18
18
|
- `.qfai/assistant/skill/qfai-sdd/references/requirements-decomposition.md` and
|
|
19
19
|
`.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md`.
|
|
20
20
|
- `.qfai/assistant/rule/change-classification.md`, the classification
|
|
@@ -35,7 +35,7 @@ no-argument batch, and its gate runs with `--flow BF-NNNN` for that flow.
|
|
|
35
35
|
## Stage 0: source and preflight
|
|
36
36
|
|
|
37
37
|
1. Use the launcher established by
|
|
38
|
-
`.qfai/assistant/rule/shared-skill-operating-baseline.md#canonical-qfai-launcher
|
|
38
|
+
`.qfai/assistant/rule/shared-skill-operating-baseline.md#canonical-qfai-launcher`.
|
|
39
39
|
Record its resolved package path and version in the SDD report. Check that
|
|
40
40
|
the installed Stage 0 instructions support the procedure being used.
|
|
41
41
|
2. Run `npx qfai sdd preflight` and use its `selectedInputPath`; a selected
|
|
@@ -65,48 +65,44 @@ only when the existing tree cannot represent it. Trace impact through BF → US
|
|
|
65
65
|
AC → EX and every enforcing contract.
|
|
66
66
|
|
|
67
67
|
Read the complete decision register using the Decision pages rules in the triage
|
|
68
|
-
reference before allocating IDs or relying on
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
`
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
When a decision
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
appends no row. Do not write a second
|
|
94
|
-
directory or a retired story file. Listed pages are members of
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
it. A request from the user in the session that names the operation and its
|
|
107
|
-
effect is that approval: list the files in the announcement and ask nothing
|
|
108
|
-
more. `--auto` asks no questions and never supplies its own approval; stop
|
|
109
|
-
before the dependent write and report pending approvals.
|
|
68
|
+
reference before allocating IDs or relying on a decision. Append new rows only
|
|
69
|
+
to the root table, and never move a row between files; an unreadable or
|
|
70
|
+
incomplete register stops this stage.
|
|
71
|
+
|
|
72
|
+
Record in `<paths.specsDir>/decisions.md` only the decisions the user made,
|
|
73
|
+
approvals included, that pass the recording test at the top of the
|
|
74
|
+
`qfai-sdd` decisions template: hard to reverse, surprising to a reader without
|
|
75
|
+
context, and the result of a real trade-off. The stage report states every
|
|
76
|
+
other decision. Record unresolved questions in `<paths.specsDir>/open-questions.md`.
|
|
77
|
+
Every row has exactly `ID | Content | Approach`. A new row's ID is
|
|
78
|
+
`DEC-yyyymmddhhMMss` or `OQ-yyyymmddhhMMss`, the UTC time it is written.
|
|
79
|
+
|
|
80
|
+
- A decisions.md row is appended once, keeps its ID and is never removed or renumbered; only its wording may be restated.
|
|
81
|
+
- An option the user rejects is a row whose Content opens `Declined:`,
|
|
82
|
+
recording who declined it and when. It authorizes nothing.
|
|
83
|
+
- Name each requirement's source as `discussion-<id>#REQ-NNNN` when that
|
|
84
|
+
source exists, in the stage report and in any row the decision writes.
|
|
85
|
+
- A decision that refers to an earlier row is a new row whose Approach opens
|
|
86
|
+
with the earlier ID: `Supersedes DEC-…`, `Narrows DEC-…`, or `Reopens DEC-…`
|
|
87
|
+
for a declined option.
|
|
88
|
+
- When a decision settles an open question, the same change appends the
|
|
89
|
+
decision row, naming the OQ ID, and deletes the question row.
|
|
90
|
+
- To defer a question already written, delete its row and append a new one
|
|
91
|
+
whose Approach names the next decision point and says `Replaces OQ-…`.
|
|
92
|
+
|
|
93
|
+
A decision the agent took appends no row. Do not write a second
|
|
94
|
+
decision-record directory or a retired story file. Listed pages are members of
|
|
95
|
+
the same register, not a second decision home. Write each decision's result
|
|
96
|
+
where it lives as the triage reference's "Where a decision's result lives"
|
|
97
|
+
section says: the current state only, one statement per concept.
|
|
98
|
+
|
|
99
|
+
Put each critical decision to the user before anything depends on it, as the
|
|
100
|
+
triage reference's "Critical decisions and no-question mode" section lists
|
|
101
|
+
them. A request from the user in the session that names the operation and its
|
|
102
|
+
effect is that answer: list the files in the announcement and ask nothing
|
|
103
|
+
more. Make every other story-tree or contract change yourself and list it in
|
|
104
|
+
the stage report. `--auto` asks no questions and never supplies its own
|
|
105
|
+
answer; stop before the dependent write and report pending decisions.
|
|
110
106
|
|
|
111
107
|
### UI-bearing flows
|
|
112
108
|
|
|
@@ -125,7 +121,7 @@ validator and the template it checks, a contract and the code, a record and
|
|
|
125
121
|
what was built — decide which one owns the truth before any later step writes.
|
|
126
122
|
|
|
127
123
|
1. Take the order the project has recorded, highest first:
|
|
128
|
-
-
|
|
124
|
+
- a `decisions.md` row that settles it and that no later row supersedes;
|
|
129
125
|
- the story tree and the contracts, over the code, tests and prose that
|
|
130
126
|
implement them, as Article IV of `.qfai/assistant/rule/constitution.md`
|
|
131
127
|
states;
|
|
@@ -154,7 +150,10 @@ wired or retired:
|
|
|
154
150
|
## Settled mode
|
|
155
151
|
|
|
156
152
|
A work order step with `mode: settled` applies a decision already recorded and
|
|
157
|
-
approved: the one the work order's `settled` field or the request cites.
|
|
153
|
+
approved: the one the work order's `settled` field or the request cites. The
|
|
154
|
+
record is a `decisions.md` row, or the output of the step that branched here,
|
|
155
|
+
such as `branch: { outcome: contract-finding }`, which names the change, who
|
|
156
|
+
approved it and when.
|
|
158
157
|
|
|
159
158
|
- Read that record and the part of the story tree it names. Do not reopen,
|
|
160
159
|
grill again or widen what it settles.
|
|
@@ -163,8 +162,9 @@ approved: the one the work order's `settled` field or the request cites.
|
|
|
163
162
|
changed criterion, a behaviour the record never mentions — stops the step.
|
|
164
163
|
Write nothing, and report `branch: { outcome: outside-record }`, which moves
|
|
165
164
|
the work to `decide-design`.
|
|
166
|
-
- A citation that resolves to
|
|
167
|
-
record to the operator as a question, and
|
|
165
|
+
- A citation that resolves to neither a `decisions.md` row nor that branch output
|
|
166
|
+
stops the step: put the missing record to the operator as a question, and
|
|
167
|
+
write nothing.
|
|
168
168
|
|
|
169
169
|
## At a decision point
|
|
170
170
|
|
|
@@ -187,14 +187,16 @@ this step took it or the operator answered it.
|
|
|
187
187
|
|
|
188
188
|
## ID allocation
|
|
189
189
|
|
|
190
|
-
Allocate each new ID from the highest ID of its kind in
|
|
191
|
-
including retired IDs named in decisions rows. BF scope is
|
|
192
|
-
scope is its BF; AC and EX scope is their US; a contract
|
|
193
|
-
contract of every kind; BR scope is its contract, whose
|
|
194
|
-
(`BR-0006-0001` belongs to `API-0006`)
|
|
195
|
-
|
|
190
|
+
Allocate each new BF, US, AC, EX or BR ID from the highest ID of its kind in
|
|
191
|
+
scope plus one, including retired IDs named in decisions rows. BF scope is
|
|
192
|
+
project-wide; US scope is its BF; AC and EX scope is their US; a contract
|
|
193
|
+
number's scope is every contract of every kind; BR scope is its contract, whose
|
|
194
|
+
number the BR carries (`BR-0006-0001` belongs to `API-0006`). Empty scopes begin
|
|
195
|
+
at `0001`, or `01` for AC and EX tails. Take each new ID from
|
|
196
196
|
`npx qfai sdd next-id <kind> [<parent-ID>] --base <local-ref>` with a fetched
|
|
197
197
|
base: it prints the number after the highest of the working tree and the base.
|
|
198
|
+
A decisions.md or open-questions.md row takes its timestamp ID instead, and
|
|
199
|
+
reads neither the base nor any pull request.
|
|
198
200
|
|
|
199
201
|
Parallel branches pick the same next ID unless each reads the others first:
|
|
200
202
|
|
|
@@ -206,17 +208,12 @@ Parallel branches pick the same next ID unless each reads the others first:
|
|
|
206
208
|
the IDs it adds from `git diff <base>...<head>`. Take the highest across the
|
|
207
209
|
base, the working tree and those heads, plus one. Without a forge CLI, read
|
|
208
210
|
the base alone.
|
|
209
|
-
2. When merging the base into the branch, check each ID the branch adds
|
|
210
|
-
the
|
|
211
|
-
item and every reference to it, then runs the gates again.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
would duplicate a colliding ID without a conflict.
|
|
216
|
-
- Any other ID: check after the merge.
|
|
217
|
-
3. Keep the change-request row last in `decisions.md`, so the rows the branch
|
|
218
|
-
added stay in ascending order at the end of the register, where the
|
|
219
|
-
merge-time renumbering works from the lowest colliding one upward.
|
|
211
|
+
2. When merging the base into the branch, check each such ID the branch adds
|
|
212
|
+
against the merged base. The base's item keeps its ID; the branch renumbers
|
|
213
|
+
its own item and every reference to it, then runs the gates again.
|
|
214
|
+
3. A conflict confined to `decisions.md`, its pages or `open-questions.md` is
|
|
215
|
+
resolved by `git merge origin/<base>` run locally: the union merge keeps
|
|
216
|
+
both sides' rows. Push the merge. Renumber, edit or move no register row.
|
|
220
217
|
|
|
221
218
|
## Pre-draft grilling
|
|
222
219
|
|
|
@@ -227,16 +224,10 @@ decision it holds to the user, and list each decision it adopted in the final
|
|
|
227
224
|
report. Each later design-writing step runs its own checkpoint the
|
|
228
225
|
same way.
|
|
229
226
|
|
|
230
|
-
## A change to the story tree
|
|
231
|
-
|
|
232
|
-
A story-tree or contract file changes only on the user's approval, as
|
|
233
|
-
`.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md#a-change-to-the-story-tree`
|
|
234
|
-
sets out. Every later step of the stage writes under that rule.
|
|
235
|
-
|
|
236
227
|
## Gate
|
|
237
228
|
|
|
238
|
-
The affected-flow scope and
|
|
239
|
-
step starts. Every requirement has a target, an
|
|
240
|
-
|
|
229
|
+
The affected-flow scope and the answers to its critical decisions are recorded
|
|
230
|
+
before any drafting step starts. Every requirement has a target, an operation
|
|
231
|
+
the user decided or the agent took, and a recorded impact path, as
|
|
241
232
|
`.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md#completion-of-triage`
|
|
242
233
|
states.
|
|
@@ -32,14 +32,23 @@ operation. This step runs it and reports what happened.
|
|
|
32
32
|
a new pull request starts when the user asked to see them pass. Poll no
|
|
33
33
|
faster than the checks change. A failing check that a rerun does not clear
|
|
34
34
|
stops the operation as a tracked change it needs, as below.
|
|
35
|
-
4.
|
|
35
|
+
4. Never enable a host's auto-merge. Before a merge, merge the base branch into
|
|
36
|
+
the pull request's branch locally (`git merge origin/<base>`), push, and
|
|
37
|
+
wait for the checks that push starts; only then merge. A conflict the host
|
|
38
|
+
shows only in `decisions.md`, its pages or `open-questions.md` is resolved
|
|
39
|
+
the same way: the union merge completes it. Edit no register row except to
|
|
40
|
+
delete again a question row the union merge kept although one side deleted
|
|
41
|
+
it, committing that deletion before the push. Renumber no ID, and ask for no
|
|
42
|
+
new review of that merge. A conflict in any other file
|
|
43
|
+
stops the operation as a tracked change it needs.
|
|
44
|
+
5. Run the operation, and observe its result: the merge commit, the deploy
|
|
36
45
|
status, the closed item.
|
|
37
|
-
|
|
46
|
+
6. After a merge, check the merged result: the target branch holds the merge
|
|
38
47
|
commit, and, when the user asked to see them pass or the project's policy
|
|
39
48
|
requires it, the checks the project runs on that branch pass. A failure
|
|
40
49
|
there is reported as `needs-change`, naming the merge commit, since the
|
|
41
50
|
merge itself stands.
|
|
42
|
-
|
|
51
|
+
7. Report the result as observed, including a failure.
|
|
43
52
|
|
|
44
53
|
Before creating an issue, search the tracker for a matching open issue with the
|
|
45
54
|
forge CLI's issue search and key terms from the title. When one request files
|
|
@@ -52,8 +61,8 @@ rate limit, report that and leave creating the issue to the user, unless the
|
|
|
52
61
|
instruction allows creating it without the search. The report names the issue
|
|
53
62
|
matched or created.
|
|
54
63
|
|
|
55
|
-
An operation that needs a tracked file to change, such as a conflict
|
|
56
|
-
or a failing check to fix, stops here: report the outcome `needs-change` with an
|
|
64
|
+
An operation that needs a tracked file to change, such as a conflict outside the
|
|
65
|
+
registers to resolve or a failing check to fix, stops here: report the outcome `needs-change` with an
|
|
57
66
|
extraction of the request as the change it needs, naming the artifacts that
|
|
58
67
|
change, so the decision rules route it again. Change nothing to make the
|
|
59
68
|
operation pass. List each follow-up in the final report, since no close step
|
|
@@ -61,9 +70,10 @@ follows.
|
|
|
61
70
|
|
|
62
71
|
For a request to take one base change into several branches, first check each
|
|
63
72
|
branch with `git merge-tree --write-tree <branch> <base>`, which writes
|
|
64
|
-
nothing. A branch that merges cleanly
|
|
65
|
-
|
|
66
|
-
|
|
73
|
+
nothing. A branch that merges cleanly, or whose only conflicts lie in
|
|
74
|
+
`decisions.md`, its pages or `open-questions.md`, is a branch update the user
|
|
75
|
+
asked for: update it here as an operation, merged and pushed only as the
|
|
76
|
+
instruction names. A branch with any other conflict is not an operation: report `needs-change` with
|
|
67
77
|
one extraction for each such branch,
|
|
68
78
|
`{ intent: order, qualifiers: [meaning-preserving] }` naming the artifacts of
|
|
69
79
|
its conflicting paths, so the decision rules plan `resolve-conflicts` for
|
|
@@ -86,11 +96,14 @@ request, or the version edit alone.
|
|
|
86
96
|
2. Follow the project's release documents with the version the user named,
|
|
87
97
|
never another. Start the preparation they name, such as a workflow that
|
|
88
98
|
sets the version and opens the release pull request. An instruction that
|
|
89
|
-
covers only the version edit stops once that edit is made. A release
|
|
90
|
-
the documents make by hand is a tracked change: report
|
|
91
|
-
an extraction of it as an `order` naming the `release`
|
|
92
|
-
the
|
|
93
|
-
|
|
99
|
+
covers only the version edit stops once that edit is made. A release-notes
|
|
100
|
+
or changelog edit the documents make by hand is a tracked change: report
|
|
101
|
+
`needs-change` with an extraction of it as an `order` naming the `release`
|
|
102
|
+
artifact and the `release-notes` signal, and carry the quoted instruction
|
|
103
|
+
and the named version into that extraction's request, so the next plan
|
|
104
|
+
makes the edit under the same instruction. Any other hand-made release
|
|
105
|
+
edit, such as a version bump the preparation does not make, has no route:
|
|
106
|
+
report it as a blocker that names the edit.
|
|
94
107
|
3. Review the release pull request as the project's review rules say, and
|
|
95
108
|
merge it only when they allow, waiting for its checks as above. Where the
|
|
96
109
|
release documents make the merge the instruction for the tag, such as a
|
|
@@ -110,12 +123,13 @@ request, or the version edit alone.
|
|
|
110
123
|
|
|
111
124
|
## What it writes
|
|
112
125
|
|
|
113
|
-
- No file git tracks
|
|
126
|
+
- No file git tracks, apart from the base changes a merge of the base brings
|
|
127
|
+
in.
|
|
114
128
|
- The operation, its result and any `needs-change` outcome, in the report.
|
|
115
129
|
|
|
116
130
|
## Gate
|
|
117
131
|
|
|
118
132
|
The stage worker confirms the operation was one the user named, its result is
|
|
119
|
-
recorded as observed, and no tracked file changed. For a release, it also
|
|
133
|
+
recorded as observed, and no tracked file changed beyond a merge of the base. For a release, it also
|
|
120
134
|
confirms the delegation is quoted with its source, and that no tag, publication
|
|
121
135
|
or publication approval came from the agent.
|
|
@@ -21,8 +21,7 @@ The last step of a change route. It records the run's work as a local commit.
|
|
|
21
21
|
|
|
22
22
|
- One commit on the current branch holding the run's changes.
|
|
23
23
|
- In the final report: the commit, and the files it holds. In the
|
|
24
|
-
`resolve-conflicts` route, also each renumber
|
|
25
|
-
one left after `git reset --merge ORIG_HEAD`.
|
|
24
|
+
`resolve-conflicts` route, also each renumber the merge holds, as old → new.
|
|
26
25
|
|
|
27
26
|
A local commit records work; it does not establish formal verification. Push,
|
|
28
27
|
pull request creation and merge each need a user instruction or project policy
|
|
@@ -88,8 +87,7 @@ When the delegated check reports, `verify-repo-gate`'s `## After CI` updates the
|
|
|
88
87
|
|
|
89
88
|
- The commit exists and holds exactly the tracked deliverables the run wrote,
|
|
90
89
|
or, in the `resolve-conflicts` route, the merge the run concluded. The final
|
|
91
|
-
report names each renumber
|
|
92
|
-
`git reset --merge ORIG_HEAD`.
|
|
90
|
+
report names each renumber the merge holds.
|
|
93
91
|
- Pending CI is named in the report with the target, current head, run ID or URL
|
|
94
92
|
when available, check, observed outcome and counts, blocker and resume condition.
|
|
95
93
|
If no run exists, say so; invent no run ID or result.
|
|
@@ -96,7 +96,7 @@ technical obstacle stops the work under Article IX of
|
|
|
96
96
|
Before any gate runs, check that each gate in scope has an entry in
|
|
97
97
|
`.qfai/spec/03_contract/tech.md#standard-commands-copy-paste`, the section
|
|
98
98
|
`common-gate-run` reads. Discover and record a missing one as
|
|
99
|
-
`.qfai/assistant/rule/shared-skill-operating-baseline.md#standard-commands
|
|
99
|
+
`.qfai/assistant/rule/shared-skill-operating-baseline.md#standard-commands`
|
|
100
100
|
says. A gate still without an entry is UNRUN, and no PASS is claimed over it.
|
|
101
101
|
|
|
102
102
|
## For the rest of the run
|
|
@@ -26,6 +26,12 @@ The body excludes YAML frontmatter; a character is one Unicode code point.
|
|
|
26
26
|
A file near a limit is a signal to move a section out, not to pack more onto
|
|
27
27
|
each line.
|
|
28
28
|
|
|
29
|
+
`qfai validate --profile verify` warns on a `SKILL.md` over 500 lines, on a
|
|
30
|
+
skill whose `description` and `when_to_use` exceed 1,536 characters, which a
|
|
31
|
+
host truncates, and on an `AGENTS.md` over 32 KiB, which a host stops reading.
|
|
32
|
+
It also warns on emphasis in capitals, such as `MUST` or `NEVER`, outside code
|
|
33
|
+
and quotations.
|
|
34
|
+
|
|
29
35
|
## 2. Budget what a task loads
|
|
30
36
|
|
|
31
37
|
Splitting helps only when the pieces are loaded on demand. A piece that is
|
|
@@ -85,7 +91,8 @@ them, and nothing says which.
|
|
|
85
91
|
## Held by
|
|
86
92
|
|
|
87
93
|
Review, and any check a project adds for itself. `npx qfai doctor` reports a
|
|
88
|
-
Markdown assistant asset over the line limit in § 1.
|
|
94
|
+
Markdown assistant asset over the line limit in § 1, and a `SKILL.md` body over
|
|
95
|
+
the character limit.
|
|
89
96
|
|
|
90
97
|
## Related
|
|
91
98
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Delegation Steering
|
|
2
|
+
|
|
3
|
+
How an agent steers a task it handed to another agent while the user is in the
|
|
4
|
+
session: look at the first actions, stop a wrong course early, and replace a
|
|
5
|
+
brief that two corrections did not fix.
|
|
6
|
+
|
|
7
|
+
A delegated task that starts off course rarely finds its way back alone, and
|
|
8
|
+
each correction stacked on a wrong start leaves that start in the agent's
|
|
9
|
+
context. A look at the first actions costs little, and a rewritten brief costs
|
|
10
|
+
less than a third correction.
|
|
11
|
+
|
|
12
|
+
## Scope
|
|
13
|
+
|
|
14
|
+
| Target | Applies |
|
|
15
|
+
| ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| A task delegated to another agent in a session where the user is present | Always |
|
|
17
|
+
| A run under `--auto`, or any run where nobody is present | Never: `.qfai/assistant/rule/shared-skill-operating-baseline.md`, "Unattended Runs: Ending a Turn", governs |
|
|
18
|
+
| Whether to delegate, and what a brief holds | Outside this rule: `.qfai/assistant/rule/shared-skill-delegation-baseline.md` |
|
|
19
|
+
|
|
20
|
+
## 1. Check the first actions
|
|
21
|
+
|
|
22
|
+
Where the host shows a delegated agent's progress, read its first actions as
|
|
23
|
+
they appear: the files it opens, the commands it runs, its first edit. They show
|
|
24
|
+
whether it read the brief as meant: the right paths, the right step, nothing
|
|
25
|
+
outside what it was given. Where the host shows nothing before the result, the
|
|
26
|
+
result is the first check.
|
|
27
|
+
|
|
28
|
+
## 2. Interrupt early
|
|
29
|
+
|
|
30
|
+
When the first actions go off course, such as a path outside the task, a step
|
|
31
|
+
the brief did not name or a goal read wrongly, interrupt then through the
|
|
32
|
+
host's message or stop mechanism. Do not wait for the result. Name what is off
|
|
33
|
+
and what the brief meant.
|
|
34
|
+
|
|
35
|
+
For an independent judgement, such as a review or a griller, off course means
|
|
36
|
+
outside its brief or its remit. A verdict the session disagrees with is not off
|
|
37
|
+
course, and nobody steers it. An interrupt to a judgement restates only the
|
|
38
|
+
brief's scope and remit, never the author's reasoning or view.
|
|
39
|
+
|
|
40
|
+
## 3. Restart after two corrections that do not land
|
|
41
|
+
|
|
42
|
+
A correction lands when the next actions follow it. After two corrections on
|
|
43
|
+
one task that do not land, send no third. Stop the task, rewrite the brief and
|
|
44
|
+
start again. The rewritten brief carries what was learned: what the first
|
|
45
|
+
attempt misread, the constraint it kept missing, the facts it had to search
|
|
46
|
+
for. It leaves out the transcript of the failed attempt.
|
|
47
|
+
|
|
48
|
+
A rewritten judgement brief stays black-box, as the delegation baseline says:
|
|
49
|
+
what was learned may sharpen the scope and the remit, never add the author's
|
|
50
|
+
reasoning. A restarted judgement is the same one review: its work order takes
|
|
51
|
+
the next replacement ordinal.
|
|
52
|
+
|
|
53
|
+
When the rewritten brief goes off course the same way, start no third attempt:
|
|
54
|
+
put it to the user with the next actions, as `user-questions.md` sets out.
|
|
55
|
+
|
|
56
|
+
## Related
|
|
57
|
+
|
|
58
|
+
- What a brief holds, and when to delegate at all:
|
|
59
|
+
`.qfai/assistant/rule/shared-skill-delegation-baseline.md`
|
|
60
|
+
- The unit work order template:
|
|
61
|
+
`.qfai/assistant/rule/references/worker-edit-boundary.md`
|
|
62
|
+
- A run with nobody present: `.qfai/assistant/rule/shared-skill-operating-baseline.md`
|
|
63
|
+
- The form of a question to the user: `user-questions.md`
|
|
64
|
+
|
|
65
|
+
## Scope of this file
|
|
66
|
+
|
|
67
|
+
This is the master copy for every AI coding agent in this repository.
|
|
68
|
+
Tool-specific instruction files point here instead of restating it. Edit this
|
|
69
|
+
file when the rule changes.
|