qfai 2.2.1 → 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 +37 -20
- 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 +4 -4
- package/assets/init/.qfai/assistant/agent/fullstack-engineer.md +129 -0
- package/assets/init/.qfai/assistant/agent/implementation-reviewer.md +76 -4
- package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +9 -5
- package/assets/init/.qfai/assistant/agent/requirements-reviewer.md +13 -3
- package/assets/init/.qfai/assistant/rule/agent-selection.md +22 -42
- 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 +31 -165
- package/assets/init/.qfai/assistant/rule/references/asset-authoring.md +4 -3
- package/assets/init/.qfai/assistant/rule/references/codex-delegation.md +4 -4
- 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 +15 -6
- package/assets/init/.qfai/assistant/rule/research-first-protocol.md +7 -6
- package/assets/init/.qfai/assistant/rule/review-convergence.md +7 -7
- package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +82 -66
- package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +19 -21
- 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 +16 -16
- package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +27 -60
- package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +3 -17
- 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 +9 -10
- package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +45 -58
- 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 +35 -18
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/session-record.md +3 -3
- package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +2 -18
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +53 -21
- 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 -5
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +2 -15
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-guide.md +10 -14
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-placement.md +0 -7
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +6 -15
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +76 -5
- 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 +60 -5
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +15 -6
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +42 -11
- package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +8 -10
- package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +12 -7
- package/assets/init/.qfai/assistant/skill/qfai-run/references/operator-screens.md +4 -4
- 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 -25
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/concrete-abstract-cycle.md +27 -29
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +13 -3
- 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 +7 -7
- 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 +7 -7
- 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 -14
- package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +2 -13
- 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 +19 -21
- package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +9 -11
- package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +2 -3
- package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +3 -4
- package/assets/init/.qfai/assistant/step/common-policy-check/STEP.md +1 -2
- package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +8 -7
- package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +7 -9
- package/assets/init/.qfai/assistant/step/discussion-oq/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +43 -2
- package/assets/init/.qfai/assistant/step/discussion-research/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/discussion-uiux/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/implement-acceptance/STEP.md +1 -5
- package/assets/init/.qfai/assistant/step/implement-backport/STEP.md +0 -5
- package/assets/init/.qfai/assistant/step/implement-benchmark/STEP.md +0 -4
- package/assets/init/.qfai/assistant/step/implement-bisect/STEP.md +0 -5
- package/assets/init/.qfai/assistant/step/implement-credentials/STEP.md +0 -4
- package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +11 -18
- package/assets/init/.qfai/assistant/step/implement-diagnose/STEP.md +0 -6
- package/assets/init/.qfai/assistant/step/implement-minimize/STEP.md +0 -5
- package/assets/init/.qfai/assistant/step/implement-oracle-parity/STEP.md +0 -6
- package/assets/init/.qfai/assistant/step/implement-procedure/STEP.md +1 -3
- package/assets/init/.qfai/assistant/step/implement-quarantine/STEP.md +0 -4
- package/assets/init/.qfai/assistant/step/implement-refactor/STEP.md +0 -4
- package/assets/init/.qfai/assistant/step/implement-regression-fix/STEP.md +2 -6
- package/assets/init/.qfai/assistant/step/implement-retire/STEP.md +0 -6
- package/assets/init/.qfai/assistant/step/implement-revert/STEP.md +0 -4
- package/assets/init/.qfai/assistant/step/implement-scaffold/STEP.md +5 -7
- package/assets/init/.qfai/assistant/step/implement-seam/STEP.md +0 -4
- package/assets/init/.qfai/assistant/step/implement-stress-harness/STEP.md +0 -5
- package/assets/init/.qfai/assistant/step/implement-sweep/STEP.md +0 -5
- package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +10 -18
- package/assets/init/.qfai/assistant/step/implement-test-fix/STEP.md +0 -5
- package/assets/init/.qfai/assistant/step/implement-tooling/STEP.md +0 -3
- package/assets/init/.qfai/assistant/step/maintain-edit/STEP.md +18 -21
- package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +4 -6
- package/assets/init/.qfai/assistant/step/prototyping-handoff/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +106 -31
- package/assets/init/.qfai/assistant/step/prototyping-preflight/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +18 -19
- package/assets/init/.qfai/assistant/step/sdd-cycle/STEP.md +8 -11
- package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +25 -6
- package/assets/init/.qfai/assistant/step/sdd-gate/STEP.md +0 -1
- package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +6 -8
- package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +71 -82
- package/assets/init/.qfai/assistant/step/triage-answer/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/triage-close/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/triage-cluster/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/triage-decompose/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/triage-dedupe/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/triage-handoff/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/triage-investigate/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/triage-operate/STEP.md +29 -17
- package/assets/init/.qfai/assistant/step/triage-owned-cleanup/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/triage-request-info/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/triage-security-intake/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/verify-advisory/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/verify-change-note/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +2 -6
- package/assets/init/.qfai/assistant/step/verify-context/STEP.md +7 -26
- package/assets/init/.qfai/assistant/step/verify-external/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/verify-manual/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/verify-qfai-gate/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/verify-release-notes/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/verify-repeat-run/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/verify-repo-gate/STEP.md +0 -2
- 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 +81 -52
- 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 +3826 -3929
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +3793 -3904
- package/dist/cli/index.mjs.map +1 -1
- package/dist/graph/cli.cjs +14 -2
- package/dist/graph/cli.cjs.map +1 -1
- package/dist/graph/cli.d.cts +1 -1
- package/dist/graph/cli.d.ts +1 -1
- package/dist/graph/cli.mjs +14 -2
- package/dist/graph/cli.mjs.map +1 -1
- package/dist/graph/hook.cjs.map +1 -1
- package/dist/graph/hook.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 +3635 -4578
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -21
- package/dist/index.d.ts +20 -21
- package/dist/index.mjs +3696 -4641
- package/dist/index.mjs.map +1 -1
- package/dist/process-qqX2Owgq.d.cts +18 -0
- package/dist/process-qqX2Owgq.d.ts +18 -0
- package/package.json +2 -2
- package/assets/defaults/agent-routing/_contract.yml +0 -77
- package/assets/defaults/agent-routing/common.yml +0 -14
- package/assets/defaults/agent-routing/qfai-discussion.yml +0 -57
- package/assets/defaults/agent-routing/qfai-implement.yml +0 -236
- package/assets/defaults/agent-routing/qfai-maintain.yml +0 -12
- package/assets/defaults/agent-routing/qfai-prototyping.yml +0 -48
- package/assets/defaults/agent-routing/qfai-sdd.yml +0 -56
- package/assets/defaults/agent-routing/qfai-triage.yml +0 -108
- package/assets/defaults/agent-routing/qfai-verify.yml +0 -92
- package/assets/defaults/agent-routing/skills.yml +0 -59
- package/assets/defaults/review-profiles.yml +0 -25
- package/assets/init/.qfai/assistant/agent/acceptance-test-engineer.md +0 -81
- package/assets/init/.qfai/assistant/agent/backend-engineer.md +0 -90
- package/assets/init/.qfai/assistant/agent/completion-reviewer.md +0 -88
- package/assets/init/.qfai/assistant/agent/delivery-planner.md +0 -85
- package/assets/init/.qfai/assistant/agent/devops-ci-engineer.md +0 -78
- package/assets/init/.qfai/assistant/agent/discovery-analyst.md +0 -81
- package/assets/init/.qfai/assistant/agent/doc-steward.md +0 -78
- package/assets/init/.qfai/assistant/agent/frontend-engineer.md +0 -94
- package/assets/init/.qfai/assistant/agent/orchestrator.md +0 -92
- package/assets/init/.qfai/assistant/agent/product-experience-architect.md +0 -101
- package/assets/init/.qfai/assistant/agent/qa-gatekeeper.md +0 -153
- package/assets/init/.qfai/assistant/agent/qa-strategist.md +0 -82
- package/assets/init/.qfai/assistant/agent/requirements-analyst.md +0 -96
- package/assets/init/.qfai/assistant/agent/solution-architect.md +0 -89
- package/assets/init/.qfai/assistant/agent/test-design-analyst.md +0 -132
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/change-request.md +0 -52
- package/dist/process-C21nTvkT.d.cts +0 -12
- package/dist/process-C21nTvkT.d.ts +0 -12
|
@@ -1,57 +1,74 @@
|
|
|
1
1
|
# Shared Skill Delegation Baseline
|
|
2
2
|
|
|
3
|
-
Skills cite this baseline and add only
|
|
3
|
+
Skills cite this baseline and add only stage or gate overrides.
|
|
4
4
|
|
|
5
|
-
## Sub-agent Delegation
|
|
5
|
+
## Sub-agent Delegation
|
|
6
6
|
|
|
7
7
|
This section binds every skill and step. A skill or step repeats none of it
|
|
8
8
|
and adds no placeholder for a subsection it does not change. State only an
|
|
9
9
|
override, under the subsection it overrides.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
The session agent, the agent the user talks to, does the work itself:
|
|
12
|
+
research, design, the specification, code, tests and documentation. Background
|
|
13
|
+
shared in one context is not lost in a hand-off, so the session agent starts a
|
|
14
|
+
sub-agent for exactly two reasons:
|
|
15
|
+
|
|
16
|
+
| Reason | What it covers | Agent |
|
|
17
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
18
|
+
| An independent judgement | A review, the finder of the concrete-abstract cycle, a griller, the prototyping evaluator: work whose value is that its judge did not make what it judges | The reviewer the plan or the skill names; the finder and a griller on `requirements-reviewer`, a griller on a contract or architecture decision on `architecture-reviewer` |
|
|
19
|
+
| Parallel units | Two or more story units or read-only lookups that pass the parallel-unit gate of `.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md` | `fullstack-engineer`, one per unit |
|
|
20
|
+
|
|
21
|
+
Nothing else is a reason. Context size is not: the host compacts a long run. A
|
|
22
|
+
technical domain is not, and neither is keeping the session's own context
|
|
23
|
+
small. A host's built-in agents follow the same two reasons. An agent that only
|
|
24
|
+
stands in for a tool the host lacks, and returns that tool's result, is a tool
|
|
25
|
+
call, not a delegation.
|
|
26
|
+
Whatever the skill, an agent is never simulated, and a failed delegation is
|
|
19
27
|
classified by the taxonomy below before any response.
|
|
20
28
|
|
|
21
|
-
###
|
|
22
|
-
|
|
23
|
-
- The
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
29
|
+
### Session Agent Protocol
|
|
30
|
+
|
|
31
|
+
- The session agent authors every artifact itself, starts a sub-agent only for
|
|
32
|
+
one of the two reasons above, and integrates and presents the results.
|
|
33
|
+
- **No sub-agent inherits the conversation.** Each starts from a
|
|
34
|
+
self-contained brief: never a forked copy of the session. A host that can
|
|
35
|
+
only fork the conversation is `unavailable` for an independent judgement.
|
|
36
|
+
- **A judgement brief is black-box.** It holds the fixed revision, the request
|
|
37
|
+
in the user's own words, the story tree and contracts that bind the work, the
|
|
38
|
+
written decisions and the remit. It never holds the author's rationale, the
|
|
39
|
+
options the session weighed, or the session's view of its own work.
|
|
40
|
+
- **A unit brief is complete.** It holds the step files to run, the story-tree
|
|
41
|
+
IDs, the owned paths (none for a lookup) and the answer's shape. A unit whose
|
|
42
|
+
brief would have to retell the conversation is not a unit; the session agent
|
|
43
|
+
does that work itself.
|
|
44
|
+
- The session agent is not required to wait while a sub-agent runs. Where the
|
|
27
45
|
host starts a delegation and returns at once, delivers the finished result
|
|
28
|
-
later as a message, and lets the
|
|
29
|
-
the
|
|
30
|
-
it has none. A host without all three keeps the
|
|
31
|
-
- That work is planning, preparing the next
|
|
46
|
+
later as a message, and lets the session agent wait for a result on purpose,
|
|
47
|
+
the session agent carries on with its own work meanwhile and waits only when
|
|
48
|
+
it has none. A host without all three keeps the session agent waiting.
|
|
49
|
+
- That work is planning, preparing the next brief, integrating results
|
|
32
50
|
already returned, and its own part of the task. It never repeats the work it
|
|
33
|
-
handed out. Starting another delegation needs the
|
|
34
|
-
`.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md`.
|
|
51
|
+
handed out. Starting another delegation needs the parallel-unit gate.
|
|
35
52
|
Where the stage's ledger or a seam makes an ordering mandatory, carrying on
|
|
36
53
|
does not override it.
|
|
37
54
|
- On Codex, read `.qfai/assistant/rule/references/codex-delegation.md` before delegating.
|
|
38
|
-
- The
|
|
55
|
+
- The session agent runs every step that starts a finder, griller or reviewer,
|
|
39
56
|
and starts those agents itself: `sdd-cycle`, `common-review-cycle`,
|
|
40
57
|
`prototyping-grill`, `prototyping-loop` and any step that holds a
|
|
41
|
-
delegated grilling session, such as a pre-draft grilling checkpoint. A
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
failure handling below applies.
|
|
58
|
+
delegated grilling session, such as a pre-draft grilling checkpoint. A
|
|
59
|
+
`fullstack-engineer` it delegates to starts no agent of its own. Where a
|
|
60
|
+
judgement cannot be delegated, the failure handling below applies.
|
|
45
61
|
- A review is done by an agent that did not author what it reviews. The
|
|
46
|
-
|
|
62
|
+
session agent never judges its own work and never approves it for
|
|
47
63
|
convenience.
|
|
48
64
|
- A read-only agent never runs `git checkout` or `git switch` in a worktree it
|
|
49
65
|
shares; it reads other revisions with `git show <rev>:<path>`. Each agent
|
|
50
66
|
writes scratch files only under a path of its own.
|
|
51
|
-
- Give each
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
- Give each judge a fixed revision: a commit, or the base commit with the
|
|
68
|
+
exact diff of the uncommitted work saved where the judge can read it. Leave
|
|
69
|
+
the checkout alone until reviews return. Only read-only fixed-SHA `git show`
|
|
70
|
+
reviews permit clean switches. Writers, local gates and reviews using live
|
|
71
|
+
files or checkout-dependent execution must finish first.
|
|
55
72
|
- A reviewer runs no suite or gate the verify stage runs; it reads their
|
|
56
73
|
results.
|
|
57
74
|
|
|
@@ -60,25 +77,25 @@ classified by the taxonomy below before any response.
|
|
|
60
77
|
Before assigning write paths or handling a refused edit, read
|
|
61
78
|
`.qfai/assistant/rule/references/worker-edit-boundary.md`.
|
|
62
79
|
|
|
63
|
-
### Capability Probe
|
|
80
|
+
### Capability Probe
|
|
64
81
|
|
|
65
|
-
1. No delegation attempt is required at the start of a stage. The
|
|
82
|
+
1. No delegation attempt is required at the start of a stage. The session agent
|
|
66
83
|
delegates only when it chooses to.
|
|
67
84
|
2. When it does, the real delegation attempt is the capability check. Do not
|
|
68
85
|
gate execution on preflight availability questions or synthetic probe-only
|
|
69
86
|
checks.
|
|
70
87
|
3. If the delegation fails, classify the failure first (see
|
|
71
88
|
`Delegation Failure Taxonomy`), then apply the response for that class.
|
|
72
|
-
Never simulate
|
|
89
|
+
Never simulate an agent.
|
|
73
90
|
|
|
74
|
-
### Delegation Failure Taxonomy
|
|
91
|
+
### Delegation Failure Taxonomy
|
|
75
92
|
|
|
76
93
|
Every delegation failure belongs to exactly one of two classes.
|
|
77
94
|
|
|
78
|
-
| Class | Meaning | Sanctioned response
|
|
79
|
-
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
80
|
-
| `unavailable` | The host has no usable delegation mechanism, the
|
|
81
|
-
| `saturated` | The host can delegate but is momentarily out of budget — `agent thread limit reached`, concurrency cap, queue full, rate limit, busy pool. The identical call would succeed later with no change by anyone. | Bounded wait-and-retry of the identical delegation
|
|
95
|
+
| Class | Meaning | Sanctioned response |
|
|
96
|
+
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
97
|
+
| `unavailable` | The host has no usable delegation mechanism, the agent is unknown, or the failure is a configuration / tooling / quota gap only the user can close — including a limit that waiting cannot clear. | The session agent does the work itself. An independent judgement stops the stage instead |
|
|
98
|
+
| `saturated` | The host can delegate but is momentarily out of budget — `agent thread limit reached`, concurrency cap, queue full, rate limit, busy pool. The identical call would succeed later with no change by anyone. | Bounded wait-and-retry of the identical delegation |
|
|
82
99
|
|
|
83
100
|
- Classify from the raw failure reason, and classify `saturated` only when the reason states or plainly implies that the identical call would succeed later **with no change by anyone**: a queue or pool that is currently full, a rate limit with a retry window, a concurrency cap that is momentarily reached, an explicit "try again later".
|
|
84
101
|
- A limit or quota that only a user can lift is `unavailable`, not `saturated` — a configured concurrency cap of 0, a maximum delegation depth, an input-size limit, an exhausted account quota or plan. Waiting cannot clear those, so a retry loop would only delay the response.
|
|
@@ -88,40 +105,39 @@ Every delegation failure belongs to exactly one of two classes.
|
|
|
88
105
|
### Delegation Failure — `saturated` (Bounded Retry)
|
|
89
106
|
|
|
90
107
|
- Retry the identical delegation with backoff: 30s, then 60s, then 120s. Attempt cap: 3 retries per delegation.
|
|
91
|
-
- Do not re-scope, re-plan, or re-route the delegation between retries — same
|
|
108
|
+
- Do not re-scope, re-plan, or re-route the delegation between retries — same agent, same task.
|
|
92
109
|
- Report on entering the retry loop and on its outcome:
|
|
93
110
|
- `Delegation deferred: <raw reason or concise summary>`
|
|
94
111
|
- `Failure class: saturated`
|
|
95
|
-
- `Attempted
|
|
112
|
+
- `Attempted agent: <agent>`
|
|
96
113
|
- `Attempted task: <task title>`
|
|
97
114
|
- `Retry condition: retry after <N> seconds / when a delegation slot frees`
|
|
98
115
|
- `Attempts used: <n>/3`
|
|
99
116
|
|
|
100
|
-
### Delegation Failure — `unavailable` (The
|
|
117
|
+
### Delegation Failure — `unavailable` (The Session Agent Does The Work)
|
|
101
118
|
|
|
102
|
-
- The
|
|
103
|
-
attempted
|
|
119
|
+
- The session agent does the work itself and reports it as its own, never as the
|
|
120
|
+
attempted agent's.
|
|
104
121
|
- Report all of:
|
|
105
122
|
- `Delegation failure: <raw reason or concise summary>`
|
|
106
123
|
- `Failure class: unavailable | saturated (retry budget exhausted)`
|
|
107
|
-
- `Attempted
|
|
124
|
+
- `Attempted agent: <agent>`
|
|
108
125
|
- `Attempted task: <task title>`
|
|
109
|
-
- `Done by: the
|
|
110
|
-
-
|
|
111
|
-
|
|
126
|
+
- `Done by: the session agent`
|
|
127
|
+
- An independent judgement is the exception. The
|
|
128
|
+
session agent does not do it, and the stage stops under the hard stop below.
|
|
112
129
|
|
|
113
130
|
### Delegation Failure (Hard Stop)
|
|
114
131
|
|
|
115
|
-
Applies when the failed delegation is
|
|
116
|
-
|
|
117
|
-
`saturated (retry budget exhausted)`.
|
|
132
|
+
Applies when the failed delegation is an independent judgement, and the class
|
|
133
|
+
is `unavailable` or `saturated (retry budget exhausted)`.
|
|
118
134
|
|
|
119
135
|
- Report all of:
|
|
120
136
|
- `Delegation failure: <raw reason or concise summary>`
|
|
121
137
|
- `Failure class: unavailable | saturated (retry budget exhausted)`
|
|
122
|
-
- `Attempted
|
|
138
|
+
- `Attempted agent: <agent>`
|
|
123
139
|
- `Attempted task: <task title>`
|
|
124
|
-
- `Why stopped: this
|
|
140
|
+
- `Why stopped: this judgement needs an agent that did not author the work.`
|
|
125
141
|
- `User action needed: <settings or tooling changes required — or "none; wait for a delegation slot to free" when the class is saturated>`
|
|
126
142
|
- `Retry condition: rerun after the review delegation succeeds`
|
|
127
143
|
|
|
@@ -129,8 +145,8 @@ has to do, and the class is `unavailable` or
|
|
|
129
145
|
|
|
130
146
|
- A delegated agent stages only the paths it declared as deliverables in its work order: `git add <path> …`.
|
|
131
147
|
- `git add -A`, `git add .` and `git commit -a` are forbidden for delegated agents, in both isolation modes. In degraded / shared-index mode the concurrent agents share one index, so a sweeping stage command commits a sibling agent's in-flight files and misattributes work in the audit trail. Under worktree separation the command still stages whatever else is loose in that agent's own worktree.
|
|
132
|
-
- When the agent's deliverable paths are not known up front, it hands back an unstaged diff and the
|
|
133
|
-
- Isolation requirements for concurrent stages are defined once in `.qfai/assistant/rule/workflow.md#concurrency-stage
|
|
148
|
+
- When the agent's deliverable paths are not known up front, it hands back an unstaged diff and the session agent commits — under the same rule. The session agent commits one handed-back diff at a time, stages that agent's declared paths only, and is equally forbidden from `git add -A` / `git add .` / `git commit -a` while a parallel stage is in flight. Being the committer does not exempt it.
|
|
149
|
+
- Isolation requirements for concurrent stages are defined once in `.qfai/assistant/rule/workflow.md#concurrency-every-stage`.
|
|
134
150
|
|
|
135
151
|
### Host backstops above the declared shape
|
|
136
152
|
|
|
@@ -140,12 +156,12 @@ Read `.qfai/assistant/rule/references/host-backstops.md` when you set or read a
|
|
|
140
156
|
|
|
141
157
|
A stage that fans work out to agents in parallel records the fan-out in this table:
|
|
142
158
|
|
|
143
|
-
| Step |
|
|
144
|
-
| ---- |
|
|
145
|
-
| 1 | <
|
|
159
|
+
| Step | Agent (sub-agent) | Agent instance | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE/PENDING) |
|
|
160
|
+
| ---- | ----------------- | -------------- | ---------- | ------------ | ------------- | ---------------------------- |
|
|
161
|
+
| 1 | <agent> | <instance id> | <task> | <refs> | <refs> | PASS/REVISE/PENDING |
|
|
146
162
|
|
|
147
163
|
- `Output (refs)` should point to in-file anchors or relative evidence paths.
|
|
148
|
-
- `Agent instance` is a run-stable identifier for the sub-agent that actually performed the step (platform-supplied id where available, otherwise `<
|
|
164
|
+
- `Agent instance` is a run-stable identifier for the sub-agent that actually performed the step (platform-supplied id where available, otherwise `<agent>#<n>` assigned in order of first use). It exists so an author→reviewer collision is detectable after the fact from the evidence alone; the same instance appearing in an authoring step and in a review step over the same artifact is a
|
|
149
165
|
reviewer-independence violation.
|
|
150
166
|
- `PENDING` records a gate that could not be run — the only honest status for the exhausted-budget branch below, which mandates it. It is never a substitute for `PASS`: DONE stays blocked while any row is `PENDING`. A skill that allows only `PASS`/`REVISE` would force an agent on that path to either break the schema or mislabel an unrun gate.
|
|
151
167
|
|
|
@@ -157,7 +173,7 @@ signals-not-gates bullets below, and the `PASS` / `REVISE` vocabulary, are not
|
|
|
157
173
|
restated. A skill with no check of its own carries no reviewer gate section. A
|
|
158
174
|
stage that runs several steps is reviewed once, after its last step, by the one
|
|
159
175
|
review its parent names
|
|
160
|
-
(`.qfai/assistant/rule/shared-skill-operating-baseline.md#running-steps
|
|
176
|
+
(`.qfai/assistant/rule/shared-skill-operating-baseline.md#running-steps`).
|
|
161
177
|
|
|
162
178
|
- Final completion gate must be delegated to an independent reviewer, except where the skill runs no review: `qfai-triage` invoked by name, and a `qfai-verify` run that wrote nothing.
|
|
163
179
|
- Each reviewer records an explicit PASS or REVISE for the reviewed revision.
|
|
@@ -168,9 +184,9 @@ review its parent names
|
|
|
168
184
|
|
|
169
185
|
An **independent reviewer** is a sub-agent that did **not** author or edit any artifact under review in this run.
|
|
170
186
|
|
|
171
|
-
- The protected invariant is independence from authorship, not reviewer instance identity. An agent that produced or modified none of the artifacts under review is independent even if it filled another role earlier in the run; an agent that drafted or edited one of them is not independent, however it is
|
|
187
|
+
- The protected invariant is independence from authorship, not reviewer instance identity. An agent that produced or modified none of the artifacts under review is independent even if it filled another role earlier in the run; an agent that drafted or edited one of them is not independent, however it is briefed.
|
|
172
188
|
- Independence is judged per review target, over the whole run — not per phase. Authoring in an earlier phase disqualifies the agent from reviewing that artifact in a later one.
|
|
173
|
-
-
|
|
189
|
+
- A card alone never establishes independence: independence is a separate constraint the briefed agent must satisfy and attest to.
|
|
174
190
|
- A reviewer that discovers it authored or edited a review target must stop, declare the conflict, and hand the same evidence set to a non-participating reviewer. It must not return `PASS` on an artifact it authored.
|
|
175
191
|
- This definition governs every skill. Skill-local wording (e.g. `qfai-configure`'s "a reviewer who did not modify the config") is an instance of it, not a competing rule.
|
|
176
192
|
|
|
@@ -186,7 +202,7 @@ cannot accept its own output.
|
|
|
186
202
|
- Test volume ratios, floors and planning estimates are signals, not gates,
|
|
187
203
|
unless the skill explicitly says so.
|
|
188
204
|
- Do not declare DONE until every finding of its one review is fixed or answered, as `.qfai/assistant/rule/review-convergence.md` sets out.
|
|
189
|
-
- An in-scope blocking finding from a
|
|
205
|
+
- An in-scope blocking finding from a required reviewer prevents DONE until it is fixed or answered; only a behaviour fix is re-reviewed, once.
|
|
190
206
|
- Every reviewer returning `REVISE` must include a concrete fix proposal.
|
|
191
207
|
|
|
192
208
|
#### A griller's recommendations, and what they disqualify
|
|
@@ -205,7 +221,7 @@ Read `.qfai/assistant/rule/references/reviewer-remit.md` when you brief a review
|
|
|
205
221
|
|
|
206
222
|
Read `.qfai/assistant/rule/references/reviewer-findings.md` when you write or judge a reviewer finding: where it comes from, and what a reviewer may demand more of. Not needed when no review runs.
|
|
207
223
|
|
|
208
|
-
### What a reviewer may demand more of
|
|
224
|
+
### What a reviewer may demand more of
|
|
209
225
|
|
|
210
226
|
What a reviewer may demand is in `.qfai/assistant/rule/references/reviewer-findings.md`, read under the condition above.
|
|
211
227
|
|
|
@@ -214,7 +230,7 @@ What a reviewer may demand is in `.qfai/assistant/rule/references/reviewer-findi
|
|
|
214
230
|
A blocking review that cannot be delegated because the agent budget is spent is a `saturated` failure, not a licence to skip the gate or to self-review.
|
|
215
231
|
|
|
216
232
|
- First apply the `saturated` bounded retry. A freed slot is the preferred outcome.
|
|
217
|
-
- If retries are exhausted, a reviewer
|
|
233
|
+
- If retries are exhausted, a reviewer card MAY be reused sequentially with a cleared context, provided the reviewer did not author or edit any artifact under review in this run. The protected invariant is independence from authorship, not reviewer instance identity.
|
|
218
234
|
- Record the reuse in the stage report.
|
|
219
235
|
- If even sequential reuse is impossible, hard stop with the review gate recorded as `PENDING` rather than `PASS`. `PENDING` is not `PASS`, and DONE stays blocked.
|
|
220
236
|
- Never record a waived or self-performed review as `PASS`.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Use this document to keep SKILL bodies compact. Skill files should reference this baseline and only restate skill-specific additions or overrides.
|
|
4
4
|
|
|
5
|
-
## Asset Authoring Shape
|
|
5
|
+
## Asset Authoring Shape
|
|
6
6
|
|
|
7
7
|
Read `.qfai/assistant/rule/references/asset-authoring.md` when you write or change a file under `.qfai/assistant/**` or another shipped asset, including its citation paths. It holds the shape every asset takes, which tree owns a file, how machine-readable assets split, and the form of a citation path. Not needed for a run that only reads assets or edits project files.
|
|
8
8
|
|
|
9
|
-
## Citation Path Form
|
|
9
|
+
## Citation Path Form
|
|
10
10
|
|
|
11
11
|
The form of a citation path is in `.qfai/assistant/rule/references/asset-authoring.md`, read under the same condition as the section above.
|
|
12
12
|
|
|
@@ -116,7 +116,7 @@ Route every `ask-user` and `hard-required` item through
|
|
|
116
116
|
including its `--auto` rule. What each bucket needs inside a workflow run is
|
|
117
117
|
[Default Autopilot Policy inside a run](#default-autopilot-policy-inside-a-run).
|
|
118
118
|
|
|
119
|
-
## Canonical qfai Launcher
|
|
119
|
+
## Canonical qfai Launcher
|
|
120
120
|
|
|
121
121
|
- **Launcher preflight — run once, before the first `npx qfai` call**, a gate or a run's `workflow plan` alike. Confirm the project resolves qfai from its own dependencies. Either proof is sufficient:
|
|
122
122
|
- **A local binary at `node_modules/.bin/qfai`.** The normal case for npm, pnpm and Yarn configured with `nodeLinker: node-modules`.
|
|
@@ -138,9 +138,9 @@ including its `--auto` rule. What each bucket needs inside a workflow run is
|
|
|
138
138
|
- Never launch a gate as a bare `qfai` command: qfai is a project dependency, not a global one, so that is `command not found` on a normal local install — and a gate that cannot run is a gate that silently passes.
|
|
139
139
|
- The preflight is the guard, not a flag. `npx` runs "a command from a local **or remote** npm package": with nothing resolvable locally it downloads and runs one (non-interactive shells do this without prompting), and `npx --no-install` still executes a copy already sitting in the npx cache. Neither spelling can tell you the qfai that ran was this project's; only the preflight can.
|
|
140
140
|
- If the launcher cannot be resolved at any point, that call, a gate included, is UNRUN, not PASS. Report it as a blocker instead of completing the stage.
|
|
141
|
-
- The project's gate commands belong in the Standard commands section of `<paths.contractsDir>/tech.md` ([Standard Commands](#standard-commands
|
|
141
|
+
- The project's gate commands belong in the Standard commands section of `<paths.contractsDir>/tech.md` ([Standard Commands](#standard-commands) below). The CI workflow generated by `npx qfai init` is the one deliberate exception: it runs before any project install can be assumed and must still be able to bootstrap.
|
|
142
142
|
|
|
143
|
-
## Standard Commands
|
|
143
|
+
## Standard Commands
|
|
144
144
|
|
|
145
145
|
A project's gate commands have one home:
|
|
146
146
|
`<paths.contractsDir>/tech.md#standard-commands-copy-paste`. The directory comes
|
|
@@ -161,23 +161,23 @@ from `qfai.config.yaml`.
|
|
|
161
161
|
|
|
162
162
|
The `common-gate-run` step runs a gate from this section and records it.
|
|
163
163
|
|
|
164
|
-
## FORMAT SSOT
|
|
164
|
+
## FORMAT SSOT
|
|
165
165
|
|
|
166
166
|
- Before writing or editing `.qfai/**`, read the template or sample for the target artifact.
|
|
167
167
|
- Do not copy templates or samples into prompt markdown.
|
|
168
168
|
- Generated artifacts match their template's headings, ordering, content kinds and table columns, and add no section, including no history section. Under `<paths.specsDir>` a document schema rejects anything else; `.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md#document-shapes` states what a template cannot show.
|
|
169
169
|
- Completion requires a format self-check in evidence.
|
|
170
170
|
|
|
171
|
-
## Policy check
|
|
171
|
+
## Policy check
|
|
172
172
|
|
|
173
173
|
A run, an exempt route aside, starts with the policy check once and does not
|
|
174
174
|
continue affected work on stale policy. The contract is
|
|
175
|
-
`.qfai/assistant/rule/workflow.md#policy-check
|
|
175
|
+
`.qfai/assistant/rule/workflow.md#policy-check`.
|
|
176
176
|
The procedure — which files, what counts as incomplete, how a fact is filled
|
|
177
177
|
and where an unverifiable one goes — is the `common-policy-check` step. A
|
|
178
178
|
skill or step cites the step and restates none of it.
|
|
179
179
|
|
|
180
|
-
## Workflow Run Entry Check
|
|
180
|
+
## Workflow Run Entry Check
|
|
181
181
|
|
|
182
182
|
A skill that a built-in workflow plan names runs this check first, before
|
|
183
183
|
the policy check. The mode is `workflow.mode` in `qfai.config.yaml`. An absent key means
|
|
@@ -203,7 +203,7 @@ the policy check. The mode is `workflow.mode` in `qfai.config.yaml`. An absent k
|
|
|
203
203
|
independent reviewer.
|
|
204
204
|
- These statements add to the constitution. They except no article.
|
|
205
205
|
|
|
206
|
-
## Running Steps
|
|
206
|
+
## Running Steps
|
|
207
207
|
|
|
208
208
|
A step is one part of a parent skill's procedure, kept at
|
|
209
209
|
`.qfai/assistant/step/<name>/STEP.md`. No host lists a step as a skill; a step
|
|
@@ -214,16 +214,14 @@ runs only from its parent or from the plan `qfai-run` follows.
|
|
|
214
214
|
- **A parent's `requires` names the `common-*` steps its own body runs**, such
|
|
215
215
|
as `common-review-cycle` after the last step. Like a step's, it names no
|
|
216
216
|
other kind of step.
|
|
217
|
-
- **A step has no review of its own.**
|
|
218
|
-
|
|
219
|
-
- **Routing and review-profile overrides in `qfai.config.yaml` are keyed by
|
|
220
|
-
step name.**
|
|
217
|
+
- **A step has no review of its own.** The review is the one its parent or its
|
|
218
|
+
plan names.
|
|
221
219
|
|
|
222
220
|
### A parent skill invoked by name
|
|
223
221
|
|
|
224
|
-
1. Run the [entry check](#workflow-run-entry-check
|
|
222
|
+
1. Run the [entry check](#workflow-run-entry-check).
|
|
225
223
|
2. Run `common-policy-check` once, as the
|
|
226
|
-
[policy check](#policy-check
|
|
224
|
+
[policy check](#policy-check) says.
|
|
227
225
|
3. Take the steps from the parent's `steps:` list, in that order. Skip a step
|
|
228
226
|
only where the parent's body names the condition that skips it.
|
|
229
227
|
4. For each step: read that step's `STEP.md` and no other, run it, and pass its
|
|
@@ -290,12 +288,12 @@ work order's target names the flow, so the skill does not ask for it. With no
|
|
|
290
288
|
binding, the flow stays `hard-required`: a direct invocation with no flow it
|
|
291
289
|
can resolve stops at preflight.
|
|
292
290
|
|
|
293
|
-
## Rejected Option Guard
|
|
291
|
+
## Rejected Option Guard
|
|
294
292
|
|
|
295
|
-
- Do not reintroduce an option whose row in `<paths.specsDir>/decisions.md` has
|
|
296
|
-
- To reconsider it, ask the user. Only on approval append a new `DEC-
|
|
297
|
-
-
|
|
298
|
-
- The reviewer checks the new row and approval provenance before accepting a formerly rejected option. `npx qfai validate` checks the
|
|
293
|
+
- Do not reintroduce an option whose row in `<paths.specsDir>/decisions.md` has Content opening `Declined:`, or `Declined change request:` in a row written before change requests were retired.
|
|
294
|
+
- To reconsider it, ask the user. Only on approval append a new `DEC-yyyymmddhhMMss` row whose Approach opens `Reopens DEC-…` with the declined row's full ID, then states the changed evidence and who approved it, when, and the option chosen. Leave the declined row intact.
|
|
295
|
+
- A PR description or completion report alone does not reopen the option.
|
|
296
|
+
- The reviewer checks the new row and approval provenance before accepting a formerly rejected option. `npx qfai validate` checks the three-column decision-table shape and that no existing row was removed or renumbered; it does not infer that two differently worded options are the same.
|
|
299
297
|
|
|
300
298
|
## Gate Failure Autorepair Protocol
|
|
301
299
|
|
|
@@ -152,7 +152,7 @@ read.
|
|
|
152
152
|
- Do not let a helper script or a workaround stand in for the standard tools
|
|
153
153
|
the task calls for.
|
|
154
154
|
- Where the task cannot be done as specified, or a test case is itself wrong,
|
|
155
|
-
stop and report it. The route is a
|
|
155
|
+
stop and report it. The route is a specification change through its owner
|
|
156
156
|
(`.qfai/assistant/rule/drift-protocol.md`), never an edit that makes the
|
|
157
157
|
wrong case pass.
|
|
158
158
|
|
|
@@ -18,8 +18,8 @@ The stage that owns `<paths.specsDir>/decisions.md`, `qfai-sdd`, records each
|
|
|
18
18
|
decision as one row there. Every other stage records each decision in its own
|
|
19
19
|
final report.
|
|
20
20
|
|
|
21
|
-
Either record
|
|
22
|
-
at the top of `.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md`.
|
|
21
|
+
Either record is a short decision record: what was decided and why, in the
|
|
22
|
+
form stated at the top of `.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md`.
|
|
23
23
|
|
|
24
24
|
## When to stop and ask
|
|
25
25
|
|
|
@@ -27,8 +27,8 @@ A downstream skill reads the UI definition in this order.
|
|
|
27
27
|
- primary tasks
|
|
28
28
|
- states
|
|
29
29
|
- actions
|
|
30
|
-
- supplements
|
|
31
|
-
|
|
30
|
+
- supplements and structure, when written: a description of the copy and the
|
|
31
|
+
groups the screen is read in
|
|
32
32
|
|
|
33
33
|
3. **Brand SSOT**
|
|
34
34
|
- root `DESIGN.md` (front-matter + `# Brand Philosophy` body), the only
|
|
@@ -39,9 +39,9 @@ A downstream skill reads the UI definition in this order.
|
|
|
39
39
|
notes, or, for a `restyle` handoff, its `liveRoutes` (compare in the running
|
|
40
40
|
app) and `entryPoints`
|
|
41
41
|
|
|
42
|
-
The supplements and structure
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
The supplements and structure describe copy; `npx qfai validate` does not check them.
|
|
43
|
+
What it checks is the UI source: every plain text there carries a `qfai-text`
|
|
44
|
+
reason comment (`.qfai/assistant/skill/qfai-implement/references/ui-affecting.md`).
|
|
45
45
|
|
|
46
46
|
The paths that render a user-visible surface are declared by `uiux.surfacePaths`
|
|
47
47
|
in `qfai.config.yaml`, and nowhere else.
|
|
@@ -20,7 +20,7 @@ catalogue. Root `DESIGN.md` owns the adopted theme. `qfai.config.yaml` carries
|
|
|
20
20
|
|
|
21
21
|
Per screen region, stop at the first rung that holds.
|
|
22
22
|
|
|
23
|
-
1. **Does this region need to exist at all?** Once a screen contract names it, that question is a
|
|
23
|
+
1. **Does this region need to exist at all?** Once a screen contract names it, that question is a specification change for its owner rather than a choice made here.
|
|
24
24
|
2. **Does the project's installed design system already have it?**
|
|
25
25
|
3. **Does a catalogue have it?** Prefer whole over parts: a page, then a block, then a component.
|
|
26
26
|
4. **Can it be composed from primitives already present?**
|
|
@@ -10,7 +10,7 @@ This file defines the canonical stages and delegation expectations.
|
|
|
10
10
|
|
|
11
11
|
## Absolute Rule — Output Language
|
|
12
12
|
|
|
13
|
-
**
|
|
13
|
+
**Write all outputs in the user’s working language for this session.**
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
@@ -54,14 +54,14 @@ writes nothing; the session runs the plan.
|
|
|
54
54
|
|
|
55
55
|
---
|
|
56
56
|
|
|
57
|
-
## Drift Protocol
|
|
57
|
+
## Drift Protocol
|
|
58
58
|
|
|
59
59
|
- Read and enforce `.qfai/assistant/rule/drift-protocol.md`.
|
|
60
|
-
- Downstream phases must not edit upstream SSOT artifacts
|
|
61
|
-
- If drift is required,
|
|
62
|
-
- The STOP is scoped: it halts the affected upstream artifact and every downstream item that depends on it, which the
|
|
60
|
+
- Downstream phases must not edit upstream SSOT artifacts; the owner skill changes them.
|
|
61
|
+
- If drift is required, send the proposed change to the owner skill, put a critical decision to the user, and rerun the owner skill. A defect with one sound repair does not need invented alternatives.
|
|
62
|
+
- The STOP is scoped: it halts the affected upstream artifact and every downstream item that depends on it, which the proposed change enumerates. Unaffected items continue, and more than one change may be open at once — see `.qfai/assistant/rule/drift-protocol.md#multiple-open-changes`.
|
|
63
63
|
|
|
64
|
-
## Test-layer policy
|
|
64
|
+
## Test-layer policy
|
|
65
65
|
|
|
66
66
|
- Read and enforce `.qfai/assistant/rule/test-layers.md`.
|
|
67
67
|
- Treat floors/ratios as signals, not completion gates.
|
|
@@ -82,36 +82,36 @@ Stage 3 (`/qfai-sdd`) target policy:
|
|
|
82
82
|
|
|
83
83
|
- With a BF argument, scope requested work to that flow and its shared dependencies.
|
|
84
84
|
- Without an argument, triage the incoming requirements and update the flows they affect.
|
|
85
|
-
- Record
|
|
85
|
+
- Record a decision in `decisions.md` only when it is hard to reverse, would surprise a reader without context, and was the result of a real trade-off; the stage report states every other one.
|
|
86
86
|
- Write policy and flows before stories, AC, EX, and enforcing contracts. Validate every affected BF.
|
|
87
87
|
|
|
88
88
|
Prototyping stage policy:
|
|
89
89
|
|
|
90
|
-
- `/qfai-prototyping` scope is governed by Article VII § Prototyping exception (scope floor) in `.qfai/assistant/rule/constitution.md` — the single home for both the scope floor and the
|
|
91
|
-
- Prototyping completes when the user confirms the prototype. No command or check certifies it.
|
|
90
|
+
- `/qfai-prototyping` scope is governed by Article VII § Prototyping exception (scope floor) in `.qfai/assistant/rule/constitution.md` — the single home for both the scope floor and the user-approved exception to it. Do not restate the floor here; on any overlap between this file and the constitution, the constitution wins.
|
|
91
|
+
- Prototyping completes when the user confirms the prototype. No command or check certifies it. A `qfai` command reads two kinds of file under `.qfai/prototype/`: `final/handoff.json`, which `npx qfai validate --profile saas-package` checks, and the current pages (`final/index.html` and the latest `iter-NN/index.html`) whose plain text `npx qfai validate` checks.
|
|
92
92
|
- Coverage gaps (missing BF or AC obligations, unresolved declared checks, API 404) are blocking.
|
|
93
93
|
|
|
94
94
|
Implementation stage:
|
|
95
95
|
|
|
96
96
|
- Inside a route, `/qfai-implement` works the examples its work order names and runs no `npx qfai validate`. Invoked by name, it validates the flow once, at completion, with `npx qfai validate --profile tdd --fail-on error --flow BF-NNNN`. For each example it records an observable assertion failure, the passing result, and the refactor check for that EX.
|
|
97
97
|
- A collection, import, syntax, or fixture failure is not an admissible RED. When existing behavior already satisfies the EX, record falsifiability evidence under the rule in `references/red-not-observable.md`. Never weaken a correct test to manufacture RED.
|
|
98
|
-
- While implementing, run only the test being written. Lint, typecheck, build, the full suite and `npx qfai validate` run once, in the verify stage. Parallel execution
|
|
98
|
+
- While implementing, run only the test being written. Lint, typecheck, build, the full suite and `npx qfai validate` run once, in the verify stage. Parallel execution is only for the units the parallel-unit gate admits, which the session agent decides.
|
|
99
99
|
|
|
100
|
-
### Concurrency (stage
|
|
100
|
+
### Concurrency (every stage)
|
|
101
101
|
|
|
102
102
|
This subsection binds **every** stage that delegates in parallel, including
|
|
103
103
|
`/qfai-sdd` no-argument batch runs and `/qfai-implement` slice execution. It is
|
|
104
|
-
a real heading so `.qfai/assistant/rule/workflow.md#concurrency-stage
|
|
104
|
+
a real heading so `.qfai/assistant/rule/workflow.md#concurrency-every-stage` resolves
|
|
105
105
|
from the skills and baselines that cite it.
|
|
106
106
|
|
|
107
107
|
- Worktree separation is required whenever two or more delegated agents write
|
|
108
108
|
files concurrently. One agent per worktree; no shared index.
|
|
109
109
|
- If worktree separation is not available, parallel delegation degrades to
|
|
110
110
|
"one agent commits at a time; the others hand back an unstaged diff to the
|
|
111
|
-
|
|
111
|
+
session agent". State which of the two modes is in force in the stage
|
|
112
112
|
evidence.
|
|
113
113
|
- Commit scoping is mandatory in both modes and binds **every** committer —
|
|
114
|
-
delegated agent and
|
|
114
|
+
delegated agent and session agent alike. Stage only the paths belonging to the
|
|
115
115
|
task being committed (`git add <paths>`). `git add -A`, `git add .` and
|
|
116
116
|
`git commit -a` are forbidden while any parallel stage is in flight.
|
|
117
117
|
- In **degraded / shared-index** mode the damage is immediate: the siblings
|
|
@@ -123,13 +123,13 @@ from the skills and baselines that cite it.
|
|
|
123
123
|
else is loose in that agent's own worktree — build output, scratch files, a
|
|
124
124
|
half-finished edit outside the work order — so the commit still stops
|
|
125
125
|
matching its declared deliverables, which is what the audit trail reads.
|
|
126
|
-
- Degraded mode makes this the **
|
|
126
|
+
- Degraded mode makes this the **session agent's** obligation above all, since
|
|
127
127
|
it is the one holding the commit: it commits one handed-back diff at a time,
|
|
128
128
|
staging that agent's declared deliverable paths only, and never blanket-stages
|
|
129
129
|
the shared worktree. A diff whose paths it cannot enumerate is not
|
|
130
130
|
committable — ask the agent for its path list first.
|
|
131
131
|
|
|
132
|
-
### Policy check
|
|
132
|
+
### Policy check
|
|
133
133
|
|
|
134
134
|
Once per run, at the start, before the first stage. A stage invoked by name on
|
|
135
135
|
its own is a run of its own. The ultra-light routes `answer-in-session` and
|