qfai 2.2.1 → 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 +14 -17
- 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 +73 -1
- package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +2 -2
- 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/drift-protocol.md +1 -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/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 +1 -1
- package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +76 -60
- package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +2 -4
- 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 +1 -13
- 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 +0 -14
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +52 -20
- 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 +1 -9
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/iteration-loop.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +4 -4
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +1 -2
- package/assets/init/.qfai/assistant/skill/qfai-run/references/operator-screens.md +4 -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 +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +12 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-pre-draft-grilling.md +2 -2
- 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/web-research/SKILL.md +18 -18
- package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +0 -1
- package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +0 -1
- package/assets/init/.qfai/assistant/step/common-policy-check/STEP.md +0 -1
- package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +2 -3
- package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/discussion-oq/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +0 -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 +0 -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 +0 -4
- package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +0 -5
- 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 +0 -2
- 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 +0 -4
- 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 +0 -2
- 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 +3 -10
- 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 +1 -4
- package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +3 -5
- package/assets/init/.qfai/assistant/step/prototyping-handoff/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +17 -19
- package/assets/init/.qfai/assistant/step/prototyping-preflight/STEP.md +0 -2
- package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +2 -4
- package/assets/init/.qfai/assistant/step/sdd-cycle/STEP.md +1 -3
- 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 +0 -2
- package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +7 -9
- 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 +0 -2
- 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 +0 -2
- 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/grilling.md +9 -9
- package/dist/cli/index.cjs +324 -1147
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +309 -1132
- 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 +983 -1975
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -19
- package/dist/index.d.ts +2 -19
- package/dist/index.mjs +878 -1869
- 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,50 +8,67 @@ 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
|
|
|
@@ -62,23 +79,23 @@ Before assigning write paths or handling a refused edit, read
|
|
|
62
79
|
|
|
63
80
|
### Capability Probe (MUST)
|
|
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
91
|
### Delegation Failure Taxonomy (MUST)
|
|
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,7 +145,7 @@ 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
|
|
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.
|
|
133
149
|
- Isolation requirements for concurrent stages are defined once in `.qfai/assistant/rule/workflow.md#concurrency-stage-independent-mandatory`.
|
|
134
150
|
|
|
135
151
|
### Host backstops above the declared shape
|
|
@@ -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
|
|
|
@@ -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
|
|
@@ -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`.
|
|
@@ -214,10 +214,8 @@ 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
|
|
|
@@ -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
|
|
|
@@ -85,12 +85,13 @@ When unsure, read inputs in this order:
|
|
|
85
85
|
## Sub-agent Delegation (MANDATORY)
|
|
86
86
|
|
|
87
87
|
Follow `.qfai/assistant/rule/shared-skill-delegation-baseline.md`. The
|
|
88
|
-
primitive's delegation rules apply unchanged: one thing
|
|
89
|
-
|
|
88
|
+
primitive's delegation rules apply unchanged: one thing may be delegated,
|
|
89
|
+
reading facts the environment holds as parallel lookups under the baseline's
|
|
90
|
+
gate, and the questions are never delegated.
|
|
90
91
|
|
|
91
|
-
###
|
|
92
|
+
### Session Agent Protocol
|
|
92
93
|
|
|
93
|
-
- The
|
|
94
|
+
- The session agent reads the primitive, puts each round and reads the answers.
|
|
94
95
|
- It must not decide a frontier question on the user's behalf, and must not
|
|
95
96
|
self-approve the session's end condition.
|
|
96
97
|
|
|
@@ -119,9 +120,9 @@ table to the user. Use the shared schema from
|
|
|
119
120
|
the `Agent instance` column. It is reported, not written: this skill produces no
|
|
120
121
|
file.
|
|
121
122
|
|
|
122
|
-
| Step |
|
|
123
|
-
| ---- |
|
|
124
|
-
| 1 |
|
|
123
|
+
| Step | Agent (sub-agent) | Agent instance | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE/PENDING) |
|
|
124
|
+
| ---- | -------------------- | --------------- | ------------------------------- | ------------------------------- | ------------------------------- | ---------------------------- |
|
|
125
|
+
| 1 | `fullstack-engineer` | `<instance id>` | Read the facts a round waits on | Decision and what it depends on | The fact, and where it was read | PASS/REVISE |
|
|
125
126
|
|
|
126
127
|
### Reviewer Gate
|
|
127
128
|
|
|
@@ -26,7 +26,7 @@ where its stage's gate reads it.
|
|
|
26
26
|
|
|
27
27
|
**The invoking stage picks the session.** A stage whose work is the
|
|
28
28
|
interview holds a user session; any other holds a delegated one, where a griller
|
|
29
|
-
interviews the
|
|
29
|
+
interviews the session agent and only a critical decision reaches the user, and only
|
|
30
30
|
for a decision the repository cannot settle (`.agents/rules/grilling.md` § When
|
|
31
31
|
a session is held). Without one, no griller starts. A stage that says nothing
|
|
32
32
|
holds a delegated session where one is held. Read
|
|
@@ -149,10 +149,10 @@ host that cannot show it whole; it never makes two rounds, and
|
|
|
149
149
|
|
|
150
150
|
## Facts are not asked
|
|
151
151
|
|
|
152
|
-
| Kind | Who settles it | How
|
|
153
|
-
| ---------------------------------------- | -------------- |
|
|
154
|
-
| A fact the environment holds | The agent | Read it, or
|
|
155
|
-
| A decision about what is wanted or worth | The user | Ask it, and wait
|
|
152
|
+
| Kind | Who settles it | How |
|
|
153
|
+
| ---------------------------------------- | -------------- | ----------------------------------------- |
|
|
154
|
+
| A fact the environment holds | The agent | Read it, or run reads as parallel lookups |
|
|
155
|
+
| A decision about what is wanted or worth | The user | Ask it, and wait |
|
|
156
156
|
|
|
157
157
|
Asking the user for a fact the repository already states spends the one thing a
|
|
158
158
|
round is spending, which is the user's attention.
|
|
@@ -292,22 +292,22 @@ Follow `.qfai/assistant/rule/shared-skill-delegation-baseline.md`. The
|
|
|
292
292
|
sections below add only what is specific to a session; where they and the
|
|
293
293
|
baseline overlap, the baseline governs.
|
|
294
294
|
|
|
295
|
-
One thing
|
|
296
|
-
|
|
295
|
+
One thing may be delegated: reading facts the environment holds, as parallel
|
|
296
|
+
lookups under the baseline's gate. The questions are
|
|
297
|
+
never delegated — a round is put by the agent that holds the
|
|
297
298
|
session, to whoever is answering it.
|
|
298
299
|
|
|
299
300
|
Who that is depends on the mode. In a session with a user, it is the user, and
|
|
300
301
|
the agent they are talking to is the one that asks. In a session between agents
|
|
301
|
-
there is no user to reach, so the griller puts the round to the
|
|
302
|
-
|
|
303
|
-
nothing hands the asking to a third agent
|
|
304
|
-
nothing itself.
|
|
302
|
+
there is no user to reach, so the griller puts the round to the session agent,
|
|
303
|
+
the one author of the draft. That is a different answerer, not a delegated
|
|
304
|
+
question: nothing hands the asking to a third agent.
|
|
305
305
|
|
|
306
306
|
### Rounds between agents
|
|
307
307
|
|
|
308
|
-
Read `references/delegated-session.md` when a griller puts the round to
|
|
309
|
-
instead of a user. It holds how
|
|
310
|
-
|
|
308
|
+
Read `references/delegated-session.md` when a griller puts the round to the session agent
|
|
309
|
+
instead of a user. It holds how the round is held, which
|
|
310
|
+
agent puts the round, why a fact only the user holds goes to the user, and when
|
|
311
311
|
the griller's recommendation settles a decision. A session with a user does not
|
|
312
312
|
need it.
|
|
313
313
|
|
|
@@ -365,7 +365,7 @@ rather than an entry added to the prototype.
|
|
|
365
365
|
|
|
366
366
|
The buckets are the method, not a tuning surface. Moving a frontier decision to
|
|
367
367
|
`auto-decide` is the agent answering its own question without the rounds. A
|
|
368
|
-
delegated session's adoption is not that: the griller interviewed the
|
|
368
|
+
delegated session's adoption is not that: the griller interviewed the session agent
|
|
369
369
|
first, and the record carries why.
|
|
370
370
|
|
|
371
371
|
## Related
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
# Delegated session
|
|
2
2
|
|
|
3
3
|
How the session agent runs a round between agents: who is asked, how the
|
|
4
|
-
answers are held, and which
|
|
4
|
+
answers are held, and which agent puts the round.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## The author
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The session agent authors every draft, so a round between agents has one
|
|
9
|
+
author: the session agent. The griller is a `requirements-reviewer`, or an
|
|
10
|
+
`architecture-reviewer` where the decision is a contract or architecture
|
|
11
|
+
decision, started from a fresh context and a black-box brief.
|
|
10
12
|
|
|
11
|
-
- The round
|
|
12
|
-
|
|
13
|
-
an author shown only its own share cannot say so.
|
|
13
|
+
- The round shows the author **the whole round**. A decision reads differently
|
|
14
|
+
beside the ones next to it.
|
|
14
15
|
- **Every answer is collected before the frontier is recomputed.** Recomputing
|
|
15
16
|
on the first reply settles the rest against a tree that moved under them.
|
|
16
|
-
- **
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- **An addition an author proposes is asked what part of the request needs
|
|
17
|
+
- **An author answer that differs from the griller's recommendation is kept**,
|
|
18
|
+
with both positions recorded. If the budget ends with it open, it takes the
|
|
19
|
+
griller's recommendation like any other non-critical decision.
|
|
20
|
+
- **An addition the author proposes is asked what part of the request needs
|
|
21
21
|
it.** One nobody can point to is dropped, not adopted.
|
|
22
|
-
- **A fact only the user holds goes to the user, not to
|
|
22
|
+
- **A fact only the user holds goes to the user, not to the author.** No author
|
|
23
23
|
can answer an unpublished constraint or an intention nobody wrote down, and
|
|
24
24
|
the convergence rules escalate decisions rather than facts — so without this
|
|
25
25
|
the fact sits on the frontier until the budget ends, taking every decision
|
|
@@ -32,13 +32,13 @@ decisions belonging to different drafting roles.
|
|
|
32
32
|
beside the open question, which is the ordinary no-question path. Stopping on
|
|
33
33
|
every user-held fact would block a run over a defaultable date.
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## Session agent protocol
|
|
36
36
|
|
|
37
|
-
- The
|
|
37
|
+
- The session agent computes the frontier and reads the answers. It does not
|
|
38
38
|
decide a frontier question on anyone's behalf.
|
|
39
39
|
- **Who puts the round depends on the mode, and exactly one role does.** With a
|
|
40
|
-
user, the
|
|
41
|
-
|
|
40
|
+
user, the session agent puts it. Between agents, the griller puts it and the
|
|
41
|
+
session agent does not — a session where both do is one where an author is
|
|
42
42
|
asked twice and the two answers have no tie-break.
|
|
43
43
|
- It must not record an answer **as the user's** that the user did not give, and
|
|
44
44
|
must not self-approve the session's end condition. An author's answer in an
|
|
@@ -47,7 +47,7 @@ decisions belonging to different drafting roles.
|
|
|
47
47
|
escalation cannot carry the positions to the user unless the answers are
|
|
48
48
|
held.
|
|
49
49
|
- **In a delegated session the griller's recommendation settles a decision that
|
|
50
|
-
is not critical.** Where the
|
|
50
|
+
is not critical.** Where the session agent and the griller land on one answer, or
|
|
51
51
|
the budget ends first, the recommendation is taken and the stage records it as
|
|
52
52
|
`agents`, with the reason and every disagreeing position. The stage's final
|
|
53
53
|
report lists it; nothing waits for the user to read it.
|