qfai 2.2.0 → 2.3.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 +60 -23
- package/assets/defaults/workflows/bump-dependency.yml +4 -1
- package/assets/defaults/workflows/decide-design.yml +5 -1
- package/assets/defaults/workflows/rename-concept.yml +30 -0
- package/assets/defaults/workflows/resolve-conflicts.yml +14 -0
- package/assets/defaults/workflows/retire-feature.yml +26 -0
- package/assets/defaults/workflows/run-release.yml +12 -0
- package/assets/init/.claude/settings.json +11 -11
- package/assets/init/.codex/hooks.json +9 -9
- package/assets/init/.qfai/assistant/agent/architecture-reviewer.md +2 -2
- package/assets/init/.qfai/assistant/agent/fullstack-engineer.md +101 -0
- package/assets/init/.qfai/assistant/agent/implementation-reviewer.md +78 -1
- package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +10 -5
- package/assets/init/.qfai/assistant/agent/requirements-reviewer.md +12 -2
- package/assets/init/.qfai/assistant/rule/agent-selection.md +22 -42
- package/assets/init/.qfai/assistant/rule/constitution.md +5 -3
- package/assets/init/.qfai/assistant/rule/drift-protocol.md +19 -1
- package/assets/init/.qfai/assistant/rule/references/asset-authoring.md +1 -1
- package/assets/init/.qfai/assistant/rule/references/codex-delegation.md +4 -4
- package/assets/init/.qfai/assistant/rule/references/gate-failure-autorepair.md +1 -1
- package/assets/init/.qfai/assistant/rule/references/reviewer-findings.md +1 -1
- package/assets/init/.qfai/assistant/rule/references/worker-edit-boundary.md +3 -3
- package/assets/init/.qfai/assistant/rule/research-first-protocol.md +7 -6
- package/assets/init/.qfai/assistant/rule/review-convergence.md +10 -4
- package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +81 -56
- package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +8 -8
- package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +2 -1
- package/assets/init/.qfai/assistant/rule/workflow.md +4 -4
- package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +15 -46
- package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +6 -15
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-completion-matrix.md +15 -2
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md +17 -0
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/trend_scan_playbook.md +3 -1
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/01_Context.md +4 -1
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/04_Sources.md +5 -1
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/00_index.md +4 -1
- package/assets/init/.qfai/assistant/skill/qfai-grill/SKILL.md +8 -7
- package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +15 -15
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/delegated-session.md +18 -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 -16
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +54 -12
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/red-admissibility.md +35 -0
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/test-runner-recipes.md +445 -0
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-maintain/SKILL.md +0 -1
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +2 -13
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-guide.md +8 -11
- 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 +11 -18
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +34 -3
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/handoff.md +77 -2
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/iteration-loop.md +14 -5
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +7 -5
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +32 -6
- package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +17 -18
- package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +194 -129
- package/assets/init/.qfai/assistant/skill/qfai-run/references/operator-screens.md +33 -18
- package/assets/init/.qfai/assistant/skill/qfai-run/references/plan.md +46 -22
- package/assets/init/.qfai/assistant/skill/qfai-run/references/reached-step-observations.md +2 -0
- package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +7 -4
- package/assets/init/.qfai/assistant/skill/qfai-sdd/SKILL.md +0 -13
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/concrete-abstract-cycle.md +3 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +13 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-phase-checklists.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-pre-draft-grilling.md +2 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-quality-gate.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md +83 -6
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +23 -5
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/change-request.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions/page-NNNN.md +6 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +9 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/open-questions.md +13 -0
- package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +0 -11
- package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +0 -9
- package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +15 -9
- package/assets/init/.qfai/assistant/skill/web-research/SKILL.md +19 -19
- package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +11 -9
- package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +15 -3
- package/assets/init/.qfai/assistant/step/common-policy-check/STEP.md +0 -1
- package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +48 -12
- package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +11 -5
- package/assets/init/.qfai/assistant/step/discussion-oq/STEP.md +12 -2
- package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +18 -4
- package/assets/init/.qfai/assistant/step/discussion-research/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/discussion-uiux/STEP.md +4 -2
- package/assets/init/.qfai/assistant/step/implement-acceptance/STEP.md +3 -4
- 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 +4 -4
- package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +31 -12
- package/assets/init/.qfai/assistant/step/implement-diagnose/STEP.md +12 -9
- 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 +35 -8
- package/assets/init/.qfai/assistant/step/implement-quarantine/STEP.md +0 -4
- package/assets/init/.qfai/assistant/step/implement-refactor/STEP.md +25 -9
- package/assets/init/.qfai/assistant/step/implement-regression-fix/STEP.md +0 -4
- package/assets/init/.qfai/assistant/step/implement-retire/STEP.md +26 -6
- package/assets/init/.qfai/assistant/step/implement-revert/STEP.md +0 -4
- package/assets/init/.qfai/assistant/step/implement-scaffold/STEP.md +28 -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 +23 -15
- 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 +71 -10
- package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +39 -8
- package/assets/init/.qfai/assistant/step/prototyping-handoff/STEP.md +12 -5
- package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +71 -23
- package/assets/init/.qfai/assistant/step/prototyping-preflight/STEP.md +5 -2
- package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +10 -4
- package/assets/init/.qfai/assistant/step/sdd-cycle/STEP.md +9 -6
- package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/sdd-gate/STEP.md +0 -1
- package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +22 -3
- package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +54 -20
- package/assets/init/.qfai/assistant/step/triage-answer/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/triage-close/STEP.md +7 -4
- 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 +6 -2
- package/assets/init/.qfai/assistant/step/triage-investigate/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/triage-operate/STEP.md +76 -5
- 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 +35 -12
- 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 +65 -9
- package/assets/init/root/.agents/rules/api-budget.md +8 -3
- package/assets/init/root/.agents/rules/graph-exploration.md +18 -4
- package/assets/init/root/.agents/rules/grilling.md +9 -9
- package/assets/init/root/.agents/rules/reminders.json +20 -28
- package/assets/init/root/.agents/rules/user-questions.md +21 -11
- package/assets/init/root/.gitattributes +2 -0
- package/assets/init/root/AGENTS.md +1 -1
- package/assets/mdschema/manifest.yml +3 -0
- package/assets/mdschema/story/03_contract/tech.mdschema.yml +1 -1
- package/assets/mdschema/story/decisions/page-NNNN.mdschema.yml +32 -0
- package/assets/mdschema/story/decisions.mdschema.yml +12 -0
- package/assets/schemas/workflow/extraction.schema.json +94 -2
- package/assets/schemas/workflow/plan.schema.json +34 -1
- package/assets/scripts/check-mdschema.mjs +434 -45
- package/dist/cli/index.cjs +4991 -3148
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +4780 -2929
- 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/index.cjs +4359 -3843
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +60 -21
- package/dist/index.d.ts +60 -21
- package/dist/index.mjs +3594 -3080
- 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 +1 -1
- 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/dist/process-C21nTvkT.d.cts +0 -12
- package/dist/process-C21nTvkT.d.ts +0 -12
|
@@ -1,6 +1,6 @@
|
|
|
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
5
|
## Sub-agent Delegation (MANDATORY)
|
|
6
6
|
|
|
@@ -8,43 +8,69 @@ 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.
|
|
55
|
+
- The session agent runs every step that starts a finder, griller or reviewer,
|
|
56
|
+
and starts those agents itself: `sdd-cycle`, `common-review-cycle`,
|
|
57
|
+
`prototyping-grill`, `prototyping-loop` and any step that holds a
|
|
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.
|
|
38
61
|
- A review is done by an agent that did not author what it reviews. The
|
|
39
|
-
|
|
62
|
+
session agent never judges its own work and never approves it for
|
|
40
63
|
convenience.
|
|
41
64
|
- A read-only agent never runs `git checkout` or `git switch` in a worktree it
|
|
42
65
|
shares; it reads other revisions with `git show <rev>:<path>`. Each agent
|
|
43
66
|
writes scratch files only under a path of its own.
|
|
44
|
-
- Give each
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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.
|
|
72
|
+
- A reviewer runs no suite or gate the verify stage runs; it reads their
|
|
73
|
+
results.
|
|
48
74
|
|
|
49
75
|
### Worker edit boundary
|
|
50
76
|
|
|
@@ -53,23 +79,23 @@ Before assigning write paths or handling a refused edit, read
|
|
|
53
79
|
|
|
54
80
|
### Capability Probe (MUST)
|
|
55
81
|
|
|
56
|
-
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
|
|
57
83
|
delegates only when it chooses to.
|
|
58
84
|
2. When it does, the real delegation attempt is the capability check. Do not
|
|
59
85
|
gate execution on preflight availability questions or synthetic probe-only
|
|
60
86
|
checks.
|
|
61
87
|
3. If the delegation fails, classify the failure first (see
|
|
62
88
|
`Delegation Failure Taxonomy`), then apply the response for that class.
|
|
63
|
-
Never simulate
|
|
89
|
+
Never simulate an agent.
|
|
64
90
|
|
|
65
91
|
### Delegation Failure Taxonomy (MUST)
|
|
66
92
|
|
|
67
93
|
Every delegation failure belongs to exactly one of two classes.
|
|
68
94
|
|
|
69
|
-
| Class | Meaning | Sanctioned response
|
|
70
|
-
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
71
|
-
| `unavailable` | The host has no usable delegation mechanism, the
|
|
72
|
-
| `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 |
|
|
73
99
|
|
|
74
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".
|
|
75
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.
|
|
@@ -79,40 +105,39 @@ Every delegation failure belongs to exactly one of two classes.
|
|
|
79
105
|
### Delegation Failure — `saturated` (Bounded Retry)
|
|
80
106
|
|
|
81
107
|
- Retry the identical delegation with backoff: 30s, then 60s, then 120s. Attempt cap: 3 retries per delegation.
|
|
82
|
-
- 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.
|
|
83
109
|
- Report on entering the retry loop and on its outcome:
|
|
84
110
|
- `Delegation deferred: <raw reason or concise summary>`
|
|
85
111
|
- `Failure class: saturated`
|
|
86
|
-
- `Attempted
|
|
112
|
+
- `Attempted agent: <agent>`
|
|
87
113
|
- `Attempted task: <task title>`
|
|
88
114
|
- `Retry condition: retry after <N> seconds / when a delegation slot frees`
|
|
89
115
|
- `Attempts used: <n>/3`
|
|
90
116
|
|
|
91
|
-
### Delegation Failure — `unavailable` (The
|
|
117
|
+
### Delegation Failure — `unavailable` (The Session Agent Does The Work)
|
|
92
118
|
|
|
93
|
-
- The
|
|
94
|
-
attempted
|
|
119
|
+
- The session agent does the work itself and reports it as its own, never as the
|
|
120
|
+
attempted agent's.
|
|
95
121
|
- Report all of:
|
|
96
122
|
- `Delegation failure: <raw reason or concise summary>`
|
|
97
123
|
- `Failure class: unavailable | saturated (retry budget exhausted)`
|
|
98
|
-
- `Attempted
|
|
124
|
+
- `Attempted agent: <agent>`
|
|
99
125
|
- `Attempted task: <task title>`
|
|
100
|
-
- `Done by: the
|
|
101
|
-
-
|
|
102
|
-
|
|
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.
|
|
103
129
|
|
|
104
130
|
### Delegation Failure (Hard Stop)
|
|
105
131
|
|
|
106
|
-
Applies when the failed delegation is
|
|
107
|
-
|
|
108
|
-
`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)`.
|
|
109
134
|
|
|
110
135
|
- Report all of:
|
|
111
136
|
- `Delegation failure: <raw reason or concise summary>`
|
|
112
137
|
- `Failure class: unavailable | saturated (retry budget exhausted)`
|
|
113
|
-
- `Attempted
|
|
138
|
+
- `Attempted agent: <agent>`
|
|
114
139
|
- `Attempted task: <task title>`
|
|
115
|
-
- `Why stopped: this
|
|
140
|
+
- `Why stopped: this judgement needs an agent that did not author the work.`
|
|
116
141
|
- `User action needed: <settings or tooling changes required — or "none; wait for a delegation slot to free" when the class is saturated>`
|
|
117
142
|
- `Retry condition: rerun after the review delegation succeeds`
|
|
118
143
|
|
|
@@ -120,7 +145,7 @@ has to do, and the class is `unavailable` or
|
|
|
120
145
|
|
|
121
146
|
- A delegated agent stages only the paths it declared as deliverables in its work order: `git add <path> …`.
|
|
122
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.
|
|
123
|
-
- When the agent's deliverable paths are not known up front, it hands back an unstaged diff and the
|
|
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.
|
|
124
149
|
- Isolation requirements for concurrent stages are defined once in `.qfai/assistant/rule/workflow.md#concurrency-stage-independent-mandatory`.
|
|
125
150
|
|
|
126
151
|
### Host backstops above the declared shape
|
|
@@ -131,12 +156,12 @@ Read `.qfai/assistant/rule/references/host-backstops.md` when you set or read a
|
|
|
131
156
|
|
|
132
157
|
A stage that fans work out to agents in parallel records the fan-out in this table:
|
|
133
158
|
|
|
134
|
-
| Step |
|
|
135
|
-
| ---- |
|
|
136
|
-
| 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 |
|
|
137
162
|
|
|
138
163
|
- `Output (refs)` should point to in-file anchors or relative evidence paths.
|
|
139
|
-
- `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
|
|
140
165
|
reviewer-independence violation.
|
|
141
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.
|
|
142
167
|
|
|
@@ -159,9 +184,9 @@ review its parent names
|
|
|
159
184
|
|
|
160
185
|
An **independent reviewer** is a sub-agent that did **not** author or edit any artifact under review in this run.
|
|
161
186
|
|
|
162
|
-
- 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.
|
|
163
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.
|
|
164
|
-
-
|
|
189
|
+
- A card alone never establishes independence: independence is a separate constraint the briefed agent must satisfy and attest to.
|
|
165
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.
|
|
166
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.
|
|
167
192
|
|
|
@@ -177,7 +202,7 @@ cannot accept its own output.
|
|
|
177
202
|
- Test volume ratios, floors and planning estimates are signals, not gates,
|
|
178
203
|
unless the skill explicitly says so.
|
|
179
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.
|
|
180
|
-
- 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.
|
|
181
206
|
- Every reviewer returning `REVISE` must include a concrete fix proposal.
|
|
182
207
|
|
|
183
208
|
#### A griller's recommendations, and what they disqualify
|
|
@@ -186,7 +211,7 @@ Read `.qfai/assistant/rule/references/griller-recommendations.md` when a griller
|
|
|
186
211
|
|
|
187
212
|
### Review convergence
|
|
188
213
|
|
|
189
|
-
A stage is reviewed once, and the author fixes or answers every finding
|
|
214
|
+
A stage is reviewed once, and the author fixes or answers every finding: `.qfai/assistant/rule/review-convergence.md`.
|
|
190
215
|
|
|
191
216
|
### Reviewer remit (in scope per stage)
|
|
192
217
|
|
|
@@ -205,7 +230,7 @@ What a reviewer may demand is in `.qfai/assistant/rule/references/reviewer-findi
|
|
|
205
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.
|
|
206
231
|
|
|
207
232
|
- First apply the `saturated` bounded retry. A freed slot is the preferred outcome.
|
|
208
|
-
- 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.
|
|
209
234
|
- Record the reuse in the stage report.
|
|
210
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.
|
|
211
236
|
- Never record a waived or self-performed review as `PASS`.
|
|
@@ -118,16 +118,18 @@ including its `--auto` rule. What each bucket needs inside a workflow run is
|
|
|
118
118
|
|
|
119
119
|
## Canonical qfai Launcher (Mandatory)
|
|
120
120
|
|
|
121
|
-
- **Launcher preflight — run once, before the first gate
|
|
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`.
|
|
123
123
|
- **A Plug'n'Play install.** Yarn Berry's default `nodeLinker: pnp` writes no `node_modules/.bin`, so the file check alone would report a correctly installed project as UNRUN forever. Accept it when the project has a `.pnp.cjs` / `.pnp.loader.mjs` at its root and lists `qfai` in `package.json` `dependencies` / `devDependencies`; `yarn exec qfai --help` exiting 0 is the direct
|
|
124
124
|
confirmation.
|
|
125
125
|
|
|
126
|
-
If neither proof holds, every
|
|
126
|
+
If neither proof holds, every `npx qfai` call, gates included, is UNRUN: report it as a blocker and stop. `package.json` says which fix applies:
|
|
127
127
|
- **`qfai` is listed in `dependencies` or `devDependencies`, but this checkout has no install.** A fresh clone or a new worktree has no `node_modules`, and `npx qfai` then resolves the copy of a parent directory, which may be an older version of another checkout. Run the project's install command in this checkout, then run the preflight again.
|
|
128
|
+
- **`node_modules` without `.bin/qfai`.** An interrupted install: run it again, then the preflight.
|
|
128
129
|
- **`qfai` is not listed.** Install the dependency: `npm i -D qfai`, or the pnpm / yarn equivalent. `qfai` does not add itself to `package.json` on init, so a project bootstrapped with `npx qfai init` alone has no local dependency yet.
|
|
129
130
|
|
|
130
|
-
-
|
|
131
|
+
- In a checkout whose preflight passed, install again only when its `node_modules` is gone or a merge changed the lockfile or `package.json`.
|
|
132
|
+
- Once the preflight passes, invoke every `npx qfai` call, gates included, through the launcher that proof established:
|
|
131
133
|
- local binary -> `npx qfai …`, which resolves to it. `node_modules/.bin/qfai …` is the same thing spelled out; prefer it when PATH reachability is uncertain.
|
|
132
134
|
- Plug'n'Play -> `yarn exec qfai …` (equivalently `yarn qfai …`), which sets up the PnP environment for the child process. Do **not** fall back to `npx qfai` there: outside the PnP runtime it cannot see the workspace dependency and would fetch a remote copy instead.
|
|
133
135
|
|
|
@@ -135,7 +137,7 @@ including its `--auto` rule. What each bucket needs inside a workflow run is
|
|
|
135
137
|
|
|
136
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.
|
|
137
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.
|
|
138
|
-
- If the launcher cannot be resolved at any point,
|
|
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.
|
|
139
141
|
- The project's gate commands belong in the Standard commands section of `<paths.contractsDir>/tech.md` ([Standard Commands](#standard-commands-mandatory) 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.
|
|
140
142
|
|
|
141
143
|
## Standard Commands (Mandatory)
|
|
@@ -212,10 +214,8 @@ runs only from its parent or from the plan `qfai-run` follows.
|
|
|
212
214
|
- **A parent's `requires` names the `common-*` steps its own body runs**, such
|
|
213
215
|
as `common-review-cycle` after the last step. Like a step's, it names no
|
|
214
216
|
other kind of step.
|
|
215
|
-
- **A step has no review of its own.**
|
|
216
|
-
|
|
217
|
-
- **Routing and review-profile overrides in `qfai.config.yaml` are keyed by
|
|
218
|
-
step name.**
|
|
217
|
+
- **A step has no review of its own.** The review is the one its parent or its
|
|
218
|
+
plan names.
|
|
219
219
|
|
|
220
220
|
### A parent skill invoked by name
|
|
221
221
|
|
|
@@ -36,7 +36,8 @@ A downstream skill reads the UI definition in this order.
|
|
|
36
36
|
|
|
37
37
|
4. **Prototype handoff** (`.qfai/prototype/final/handoff.json`, when a
|
|
38
38
|
prototyping loop ran): the final prototype, procurement and implementation
|
|
39
|
-
notes
|
|
39
|
+
notes, or, for a `restyle` handoff, its `liveRoutes` (compare in the running
|
|
40
|
+
app) and `entryPoints`
|
|
40
41
|
|
|
41
42
|
The supplements and structure are required input: implementation adds no text the
|
|
42
43
|
contract does not declare, and surface review compares the rendered text with them.
|
|
@@ -95,7 +95,7 @@ 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
100
|
### Concurrency (stage-independent, mandatory)
|
|
101
101
|
|
|
@@ -108,10 +108,10 @@ from the skills and baselines that cite it.
|
|
|
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,7 +123,7 @@ 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
|
|
@@ -4,16 +4,6 @@ title: QFAI Configure (Tune qfai.config.yaml)
|
|
|
4
4
|
description: "Analyze the repository and tune qfai.config.yaml test globs and project overrides. Use when asked to configure QFAI for a repository, or to fix test globs that match the wrong files or none."
|
|
5
5
|
argument-hint: "[--auto]"
|
|
6
6
|
allowed-tools: [Read, Glob, Write, Edit, TodoWrite, Task, Agent]
|
|
7
|
-
roles:
|
|
8
|
-
[
|
|
9
|
-
orchestrator,
|
|
10
|
-
delivery-planner,
|
|
11
|
-
qa-strategist,
|
|
12
|
-
devops-ci-engineer,
|
|
13
|
-
qa-gatekeeper,
|
|
14
|
-
implementation-reviewer,
|
|
15
|
-
]
|
|
16
|
-
routing-profile: runtime-heavy
|
|
17
7
|
mode: evidence-focused
|
|
18
8
|
---
|
|
19
9
|
|
|
@@ -61,7 +51,7 @@ both outlive an exhausted budget.
|
|
|
61
51
|
When unsure, read inputs in this order:
|
|
62
52
|
|
|
63
53
|
- P1: `.qfai/assistant/rule/*`
|
|
64
|
-
- P2: Read `.qfai/assistant/rule/agent-selection.md`, the
|
|
54
|
+
- P2: Read `.qfai/assistant/rule/agent-selection.md`, the cards under `.qfai/assistant/agent/`, and project context under `.qfai/spec/01_policy/` and `.qfai/spec/03_contract/`.
|
|
65
55
|
- P3: `.qfai/spec/decisions.md` (Decision Records; if no decision exists, state "not applicable").
|
|
66
56
|
- P4: the business flows, stories, contracts, tests, and evidence relevant to the configuration.
|
|
67
57
|
|
|
@@ -75,9 +65,9 @@ Use the shared schema.
|
|
|
75
65
|
|
|
76
66
|
### Stage Minimum Roles
|
|
77
67
|
|
|
78
|
-
- Author: the
|
|
79
|
-
- Integrate: the
|
|
80
|
-
- Gate: a reviewer that did not author the work returns only `PASS` or `REVISE`. The
|
|
68
|
+
- Author: the session agent writes the artifacts itself.
|
|
69
|
+
- Integrate: the session agent presents the result to the user for confirmation.
|
|
70
|
+
- Gate: a reviewer that did not author the work returns only `PASS` or `REVISE`. The session agent never approves its own work.
|
|
81
71
|
|
|
82
72
|
### Reviewer Gate
|
|
83
73
|
|
|
@@ -88,9 +78,8 @@ Use the shared schema.
|
|
|
88
78
|
- Drift Protocol enforced;
|
|
89
79
|
- test-layer policy enforced against `.qfai/assistant/rule/test-layers.md`;
|
|
90
80
|
- tool-count heuristics are signals, not gates.
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
- `qa-gatekeeper`
|
|
81
|
+
- The reviewer is `implementation-reviewer`, briefed as the delegation baseline
|
|
82
|
+
states.
|
|
94
83
|
- Do not declare DONE or handoff until every finding of its one review is fixed or answered.
|
|
95
84
|
|
|
96
85
|
### Work order template (copy/paste)
|
|
@@ -190,35 +179,17 @@ Do not create `.qfai/**/README.md` files as scaffold or format documentation; ke
|
|
|
190
179
|
- If the user mixes languages, prefer the dominant language unless explicitly instructed otherwise.
|
|
191
180
|
This rule overrides all other stylistic preferences.
|
|
192
181
|
|
|
193
|
-
##
|
|
182
|
+
## Who does the work
|
|
194
183
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
Use `.qfai/assistant/rule/agent-selection.md` as the routing SSOT.
|
|
200
|
-
|
|
201
|
-
- Routed phases, in order: `analysis` (`delivery-planner`, `qa-strategist`) -> `config` (`devops-ci-engineer`) -> `review` (`qa-gatekeeper`).
|
|
202
|
-
|
|
203
|
-
### Delegation contract (tool-neutral)
|
|
204
|
-
|
|
205
|
-
```text
|
|
206
|
-
Role: delivery-planner
|
|
207
|
-
Task title: Analyze repo and propose testFileGlobs
|
|
208
|
-
Goal: Tune qfai.config.yaml with a minimal diff
|
|
209
|
-
Inputs:
|
|
210
|
-
- relevant policy and repo layout
|
|
211
|
-
Constraints:
|
|
212
|
-
- minimal diff
|
|
213
|
-
- evidence-first
|
|
214
|
-
Return:
|
|
215
|
-
- proposed globs + rationale + evidence refs
|
|
216
|
-
```
|
|
184
|
+
The session agent analyzes the repository and writes the configuration itself.
|
|
185
|
+
The one sub-agent is `implementation-reviewer`, which reviews what the session
|
|
186
|
+
wrote; the delegation baseline says how it is briefed.
|
|
217
187
|
|
|
218
188
|
## Completion Separation (mandatory)
|
|
219
189
|
|
|
220
|
-
-
|
|
221
|
-
|
|
190
|
+
- The session agent's configuration change and its approval are separate: the
|
|
191
|
+
reviewer approves, never the session agent.
|
|
192
|
+
- The reviewer confirms the evidence sampling before approval.
|
|
222
193
|
|
|
223
194
|
## Context Refresh (mandatory for long tasks)
|
|
224
195
|
|
|
@@ -304,7 +275,6 @@ Edit:
|
|
|
304
275
|
|
|
305
276
|
- `validation.traceability.testFileGlobs`
|
|
306
277
|
- `validation.traceability.testFileExcludeGlobs` (only if needed)
|
|
307
|
-
- `routing` or `reviewProfiles` only when the user asks to change one; each matching entry replaces the shipped default as a whole
|
|
308
278
|
- `uiux.surfacePaths`: the repository-relative globs of the paths observed to render a user-visible surface, or `[]` when the repository renders none. Keep an existing value unless the user asks to change it. An absent key leaves the UI impact decision unevaluable.
|
|
309
279
|
|
|
310
280
|
Keep all other config keys unchanged. Add no key the package already defaults, `paths.specsDir` included; a value the project set stays.
|
|
@@ -340,8 +310,7 @@ Provide:
|
|
|
340
310
|
2. Updated project-owned policy and contract files (diff or summary).
|
|
341
311
|
3. A short summary of changes and rationale.
|
|
342
312
|
4. Validation checklist with sampled files.
|
|
343
|
-
5.
|
|
344
|
-
6. Open questions (blocking vs non-blocking).
|
|
313
|
+
5. Open questions (blocking vs non-blocking).
|
|
345
314
|
|
|
346
315
|
Suggest next step: `/qfai-discussion` (or rerun `/qfai-configure` if configuration is not ready).
|
|
347
316
|
|
|
@@ -404,6 +373,6 @@ The skill collapses avoidable per-session prompts to 0-1 by classifying every de
|
|
|
404
373
|
|
|
405
374
|
project_memory:
|
|
406
375
|
|
|
407
|
-
- qfai-configure is the user-facing entrypoint for editing `qfai.config.yaml
|
|
376
|
+
- qfai-configure is the user-facing entrypoint for editing `qfai.config.yaml`: the test globs, `uiux.surfacePaths` and the other values a project may override.
|
|
408
377
|
- Each agent card under `.qfai/assistant/agent/` is the sole definition of that role. Edit the card to change its mission or other role metadata.
|
|
409
378
|
- Run after every major workflow change to refresh the consuming project to the current QFAI baseline. Do NOT edit `qfai.config.yaml` directly when the skill is available.
|
|
@@ -4,18 +4,6 @@ title: QFAI Discussion (Exploration Planner)
|
|
|
4
4
|
description: "Use when invoked by name or handed a QFAI work order. Its subject is a product idea or problem whose scope is not settled yet."
|
|
5
5
|
argument-hint: "<idea-or-problem> [--auto]"
|
|
6
6
|
allowed-tools: [Read, Glob, Write, TodoWrite, Task, Agent, Bash]
|
|
7
|
-
roles:
|
|
8
|
-
[
|
|
9
|
-
orchestrator,
|
|
10
|
-
delivery-planner,
|
|
11
|
-
discovery-analyst,
|
|
12
|
-
requirements-analyst,
|
|
13
|
-
solution-architect,
|
|
14
|
-
product-experience-architect,
|
|
15
|
-
requirements-reviewer,
|
|
16
|
-
architecture-reviewer,
|
|
17
|
-
product-surface-reviewer,
|
|
18
|
-
]
|
|
19
7
|
steps: [discussion-research, discussion-interview, discussion-pack, discussion-oq, discussion-uiux]
|
|
20
8
|
requires: [common-review-cycle, common-gate-run]
|
|
21
9
|
mode: interactive-by-default
|
|
@@ -45,7 +33,7 @@ Follow `.qfai/assistant/rule/shared-skill-operating-baseline.md#user-questions-a
|
|
|
45
33
|
When unsure, read inputs in this order:
|
|
46
34
|
|
|
47
35
|
- P1: `.qfai/assistant/rule/*`, and `.qfai/assistant/skill/qfai-grilling/SKILL.md` before the interview
|
|
48
|
-
- P2: `.qfai/assistant/rule/agent-selection.md`, the
|
|
36
|
+
- P2: `.qfai/assistant/rule/agent-selection.md`, the cards under `.qfai/assistant/agent/`, and project context under `<paths.specsDir>/01_policy/**` and `<paths.specsDir>/03_contract/**`
|
|
49
37
|
- P3: the pack under work — `.qfai/discussion/discussion-YYYYMMDDhhmmssSSS/**`
|
|
50
38
|
- P4: what the project already settled (`qfai.config.yaml`, `<paths.specsDir>/01_policy/**`, `<paths.specsDir>/02_business-flow/**`, and `<paths.contractsDir>/**`)
|
|
51
39
|
|
|
@@ -77,7 +65,9 @@ before running `discussion-uiux`.
|
|
|
77
65
|
|
|
78
66
|
Every UI-bearing pack carries `uiux/00_index.md`, `uiux/40_screen_contracts.md`
|
|
79
67
|
and `uiux/50_review_input_bundle.md`. That is the whole family, on every
|
|
80
|
-
UI-bearing surface including `cli`.
|
|
68
|
+
UI-bearing surface including `cli`. A pack that keeps the current root
|
|
69
|
+
`DESIGN.md` may declare `design_direction: inherit` instead
|
|
70
|
+
(`references/ui-bearing-playbook.md#inheriting-the-current-designmd`).
|
|
81
71
|
|
|
82
72
|
A **cli-only** pack (`primary_surface: cli`, no visual `secondary_surfaces`
|
|
83
73
|
entry) keeps all three sidecars, but the brand questions do not apply to it:
|
|
@@ -135,6 +125,7 @@ inputs and uncovered human decisions retain their ordinary blocking behavior.
|
|
|
135
125
|
|
|
136
126
|
project_memory:
|
|
137
127
|
|
|
138
|
-
- The nine-file mandatory output set is fixed; the UI-bearing sidecar family (00_index.md + 40_screen_contracts.md + 50_review_input_bundle.md) is required whenever the target is UI-bearing, cli included
|
|
128
|
+
- The nine-file mandatory output set is fixed; the UI-bearing sidecar family (00_index.md + 40_screen_contracts.md + 50_review_input_bundle.md) is required whenever the target is UI-bearing, cli included, except that a pack declaring `design_direction: inherit` may omit 40/50 and the registries under the conditions of `references/ui-bearing-playbook.md#inheriting-the-current-designmd`.
|
|
129
|
+
- Root DESIGN.md is not a discussion output: `/qfai-sdd`'s `common-design-md` step authors it from this pack.
|
|
139
130
|
- Discussion is planner-first: never pick a single visual winner; carry exploration references as deviate-from inputs, not imitate-this.
|
|
140
131
|
- Completion requires Disposition: open count = 0 in 11_OQ-Register.md; each deferred row there records its Resolution and names the next point at which it is decided.
|
package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-completion-matrix.md
CHANGED
|
@@ -7,6 +7,7 @@ Use this file for the full completion logic behind `/qfai-discussion`.
|
|
|
7
7
|
- All Packs
|
|
8
8
|
- UI-bearing Packs
|
|
9
9
|
- CLI Packs
|
|
10
|
+
- Inheriting Packs
|
|
10
11
|
- Non-UI Packs
|
|
11
12
|
- Notes
|
|
12
13
|
|
|
@@ -21,8 +22,8 @@ Blocking for every pack, UI-bearing or not:
|
|
|
21
22
|
`sources` / `best_practices` / `anti_patterns` / `reflection` are non-empty, every `source_id`
|
|
22
23
|
resolves to a `sources[].id`, and at least one `reflection[]` entry records an apply decision.
|
|
23
24
|
`npx qfai validate --profile discussion --fail-on error` reports `QFAI-RESEARCH-*` until it is.
|
|
24
|
-
2.
|
|
25
|
-
with `Ended` reading an authoring ending and its conditions met:
|
|
25
|
+
2. Every row of the stage report's `## Grilling Session` table has its `Ended at` before its own
|
|
26
|
+
`Authoring began` (for a reopened row, when authoring resumed), with `Ended` reading an authoring ending and its conditions met:
|
|
26
27
|
|
|
27
28
|
| Ended | Also required |
|
|
28
29
|
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -106,6 +107,18 @@ so conditions 1 and 5 above do not apply to it:
|
|
|
106
107
|
- `primary_surface: cli` with a visual `secondary_surfaces` entry is NOT a cli-only pack —
|
|
107
108
|
conditions 1 and 2 stay blocking for it.
|
|
108
109
|
|
|
110
|
+
## Inheriting Packs
|
|
111
|
+
|
|
112
|
+
A pack whose classification declares `design_direction: inherit` keeps the current root
|
|
113
|
+
`DESIGN.md`, under the conditions the inheriting section of the UI-bearing playbook sets out:
|
|
114
|
+
it changes existing screens only and records no direction of its own.
|
|
115
|
+
|
|
116
|
+
- UI-bearing items 1 and 5 do not apply: no Trend Scan, no minimum count of competitive or
|
|
117
|
+
catalogue references, and no Design Direction. A reference it does fill in is still complete.
|
|
118
|
+
- From item 2, `uiux/00_index.md` stays required; `40_screen_contracts.md` and
|
|
119
|
+
`50_review_input_bundle.md` may be left out. A screen contract it does write keeps item 3.
|
|
120
|
+
- Items 4 and All Packs item 3 apply unchanged.
|
|
121
|
+
|
|
109
122
|
## Non-UI Packs
|
|
110
123
|
|
|
111
124
|
- No uiux sidecars required
|
|
@@ -70,6 +70,23 @@ shadows:
|
|
|
70
70
|
handoff to read for a cli-only target, leaving
|
|
71
71
|
`<paths.contractsDir>/ui/*.yaml` as its UI contract input.
|
|
72
72
|
|
|
73
|
+
### Inheriting the current DESIGN.md
|
|
74
|
+
|
|
75
|
+
A pack that changes existing screens and keeps the current root `DESIGN.md`
|
|
76
|
+
may declare `design_direction: inherit` in the classification block of
|
|
77
|
+
`01_Context.md`. It then records no Design Direction and owes no Trend Scan,
|
|
78
|
+
no minimum count of competitive or catalogue references, and no
|
|
79
|
+
`uiux/40_screen_contracts.md` or `uiux/50_review_input_bundle.md`. A reference
|
|
80
|
+
or screen contract it does write is still checked. An existing screen is one
|
|
81
|
+
whose `screen_id` equals the `screens[].id` of a UI contract under
|
|
82
|
+
`<paths.contractsDir>/ui/`. The declaration waives nothing in the Research
|
|
83
|
+
Summary of `04_Sources.md`: the research-first protocol runs for every pack.
|
|
84
|
+
|
|
85
|
+
The declaration is not allowed when the pack adds a screen or changes the
|
|
86
|
+
design direction. `npx qfai validate` reports `QFAI-CLASSIFICATION-011` when the
|
|
87
|
+
screen contracts name a `screen_id` no UI contract's `screens[].id` declares, or when
|
|
88
|
+
Design Direction records an `adopted_theme` or `brand_accent`.
|
|
89
|
+
|
|
73
90
|
### Trend Scan SSOT
|
|
74
91
|
|
|
75
92
|
Trend Scan is **not** a sidecar file. Trend Scan lives at
|
package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/trend_scan_playbook.md
CHANGED
|
@@ -60,7 +60,9 @@ Reject a trend when:
|
|
|
60
60
|
## Competitive Reference Registry Expectations
|
|
61
61
|
|
|
62
62
|
Register at least `uiux.competitive_refs_min` references (default: 3) by
|
|
63
|
-
repeating the `### Reference:` block in `04_Sources.md`.
|
|
63
|
+
repeating the `### Reference:` block in `04_Sources.md`. A pack whose
|
|
64
|
+
classification declares `design_direction: inherit` owes no count and no Trend
|
|
65
|
+
Scan, under the conditions of the inheriting section of the UI-bearing playbook. For each meaningful
|
|
64
66
|
competitor or reference pattern, capture:
|
|
65
67
|
|
|
66
68
|
- what was adopted
|
|
@@ -11,6 +11,7 @@ Classification determines whether UI/UX sidecar artifacts are required.
|
|
|
11
11
|
- secondary_surfaces:
|
|
12
12
|
- [optional]
|
|
13
13
|
- classification_rationale: [Why this classification was chosen]
|
|
14
|
+
- design_direction: [new|inherit]
|
|
14
15
|
|
|
15
16
|
Notes:
|
|
16
17
|
|
|
@@ -19,10 +20,12 @@ Notes:
|
|
|
19
20
|
- `cli` is a UI-bearing surface. When classified as `cli`, set `ui_bearing: true`. `cli` is not a visual-prototyping surface, so a **cli-only** pack — `primary_surface: cli` with no `web`/`mobile`/`desktop`/`mixed` entry in `secondary_surfaces` — gets no root `DESIGN.md` (see `references/ui-bearing-playbook.md#visual-prototyping-surfaces-vs-cli`). A visual `secondary_surfaces` entry still requires one.
|
|
20
21
|
- Prototyping **execution** surfaces (used in `prototyping.yaml`) are a strict subset: `web|mobile|desktop|mixed`.
|
|
21
22
|
- `cli` and `non-ui` are classification-only values and never appear in `prototyping.yaml`. `/qfai-prototyping` rejects them, so a cli-only pack emits none.
|
|
23
|
+
- `design_direction: inherit` declares that the pack keeps the current root `DESIGN.md`: it changes existing screens only and sets no direction of its own. Such a pack owes no Trend Scan, no minimum count of competitive or catalogue references, and no `uiux/40_screen_contracts.md` or `uiux/50_review_input_bundle.md`.
|
|
24
|
+
- `npx qfai validate` refuses `inherit` when `uiux/40_screen_contracts.md` names a `screen_id` that matches no `screens[].id` of the project's UI contracts, or when Design Direction below records an `adopted_theme` or `brand_accent`. Use `new` for anything else.
|
|
22
25
|
|
|
23
26
|
## Design Direction
|
|
24
27
|
|
|
25
|
-
Required when a classified surface is `web`, `mobile`, `desktop` or `mixed`. Omit for cli-only and non-ui
|
|
28
|
+
Required when a classified surface is `web`, `mobile`, `desktop` or `mixed`. Omit for cli-only and non-ui, and when the classification declares `design_direction: inherit`.
|
|
26
29
|
|
|
27
30
|
The user chooses this; `references/design-dna-intake.md` says how to put the choice to them. `/qfai-sdd`'s `common-design-md` step authors root `DESIGN.md` from it, and asks nothing further.
|
|
28
31
|
|