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
|
@@ -3,12 +3,6 @@ name: implement-diagnose
|
|
|
3
3
|
owner: qfai-implement
|
|
4
4
|
purpose: "Reproduce a reported failure in one business flow, find its cause and give the one verdict that decides what the run does next. On a fix route the reproduction is a failing test."
|
|
5
5
|
requires: [common-gate-run]
|
|
6
|
-
roles:
|
|
7
|
-
- test-design-analyst
|
|
8
|
-
- frontend-engineer
|
|
9
|
-
- backend-engineer
|
|
10
|
-
- devops-ci-engineer
|
|
11
|
-
routing-profile: default
|
|
12
6
|
---
|
|
13
7
|
|
|
14
8
|
# implement-diagnose
|
|
@@ -71,8 +65,15 @@ test that should have caught it, before any production code changes:
|
|
|
71
65
|
`implement-tdd`, which appends the EX and annotates the test.
|
|
72
66
|
2. Run that test alone and observe its assertion fail for the reported
|
|
73
67
|
behaviour (Red). A load error, a missing dependency or a broken fixture is
|
|
74
|
-
not a Red.
|
|
75
|
-
|
|
68
|
+
not a Red. Where the Test entry of the Standard commands is
|
|
69
|
+
`CI only: <check name>`, or the user's instruction for this run delegates
|
|
70
|
+
that gate to a named CI check, do not run it: record `red: ci-deferred`,
|
|
71
|
+
quoting that instruction, as
|
|
72
|
+
`.qfai/assistant/skill/qfai-implement/references/red-admissibility.md#ci-only-test-gate`
|
|
73
|
+
states, and the route's code review reads the test against the code
|
|
74
|
+
before the fix.
|
|
75
|
+
3. Record the test path, the command and the failure in the stage report. For
|
|
76
|
+
a `ci-deferred` Red, record the test path, its selector and the check name.
|
|
76
77
|
|
|
77
78
|
A verdict that moves the work to another route leaves no new test behind:
|
|
78
79
|
remove the test written here.
|
|
@@ -125,5 +126,7 @@ Inside a workflow run, the result carries:
|
|
|
125
126
|
|
|
126
127
|
The step is done when one verdict is recorded with the observation that
|
|
127
128
|
supports it, and no tracked file changed but the failing test. That
|
|
128
|
-
observation is the reproduction: on a `fix` route the test's observed Red,
|
|
129
|
+
observation is the reproduction: on a `fix` route the test's observed Red, or
|
|
130
|
+
its `ci-deferred` Red where the Test entry is `CI only: <check name>` or the
|
|
131
|
+
user's instruction for this run delegates that gate to a named CI check, and
|
|
129
132
|
for `needs-info` the attempts that could not reproduce it.
|
|
@@ -3,11 +3,6 @@ name: implement-minimize
|
|
|
3
3
|
owner: qfai-implement
|
|
4
4
|
purpose: "Shrink the input that makes a program crash to the smallest one that still crashes the same way, without changing any tracked file."
|
|
5
5
|
requires: [common-gate-run]
|
|
6
|
-
roles:
|
|
7
|
-
- devops-ci-engineer
|
|
8
|
-
- frontend-engineer
|
|
9
|
-
- backend-engineer
|
|
10
|
-
routing-profile: default
|
|
11
6
|
---
|
|
12
7
|
|
|
13
8
|
# implement-minimize
|
|
@@ -3,12 +3,6 @@ name: implement-oracle-parity
|
|
|
3
3
|
owner: qfai-implement
|
|
4
4
|
purpose: "Build a check that runs the same inputs through the project and through the outside reference it should match, and lists every difference."
|
|
5
5
|
requires: [common-gate-run]
|
|
6
|
-
roles:
|
|
7
|
-
- test-design-analyst
|
|
8
|
-
- frontend-engineer
|
|
9
|
-
- backend-engineer
|
|
10
|
-
- devops-ci-engineer
|
|
11
|
-
routing-profile: default
|
|
12
6
|
---
|
|
13
7
|
|
|
14
8
|
# implement-oracle-parity
|
|
@@ -3,8 +3,6 @@ name: implement-procedure
|
|
|
3
3
|
owner: qfai-implement
|
|
4
4
|
purpose: Write an authorized operational procedure within existing policy.
|
|
5
5
|
requires: [common-gate-run]
|
|
6
|
-
roles: [doc-steward]
|
|
7
|
-
routing-profile: default
|
|
8
6
|
---
|
|
9
7
|
|
|
10
8
|
# implement-procedure
|
|
@@ -13,7 +11,8 @@ routing-profile: default
|
|
|
13
11
|
|
|
14
12
|
Write instructions a person can follow within the project's existing policy.
|
|
15
13
|
Do not invent a business flow, code, tests, specifications or contracts to
|
|
16
|
-
support this document.
|
|
14
|
+
support this document. The one exception is a script the document itself names
|
|
15
|
+
for the operator to run: edit it as `## Named scripts` says.
|
|
17
16
|
|
|
18
17
|
## Reads
|
|
19
18
|
|
|
@@ -22,6 +21,8 @@ support this document.
|
|
|
22
21
|
- The existing policy and procedures governing the actions: preserve their
|
|
23
22
|
authority limits and required checks.
|
|
24
23
|
- For every document edit, read `.agents/rules/documentation-clarity.md`.
|
|
24
|
+
- For a named script the change requires, read the script and the tests or
|
|
25
|
+
checks that cover it.
|
|
25
26
|
|
|
26
27
|
## Before writing
|
|
27
28
|
|
|
@@ -32,19 +33,39 @@ confer ownership of those surfaces.
|
|
|
32
33
|
If required facts or values are missing, stop the dependent work and report
|
|
33
34
|
what is needed to resume. Never invent values, commands or permission.
|
|
34
35
|
|
|
36
|
+
## Named scripts
|
|
37
|
+
|
|
38
|
+
Edit a script only when the document names it for the operator to run and the
|
|
39
|
+
procedure change requires the edit, and only as far as the change requires.
|
|
40
|
+
Keep that script's existing tests and checks passing, and add coverage for the
|
|
41
|
+
change where the repository has tests for the script. Any other code, a new
|
|
42
|
+
script, or a script change the procedure does not need belongs to another
|
|
43
|
+
stage: stop before writing and name it. Editing a script does not run it.
|
|
44
|
+
|
|
35
45
|
## Procedure
|
|
36
46
|
|
|
37
47
|
1. Identify the inputs, actions, commands, required values, order, failure
|
|
38
48
|
conditions and recovery steps the request needs.
|
|
39
49
|
2. Check them against existing policy and actual known facts. Write only the
|
|
40
|
-
authorized documents within the work order's scope
|
|
50
|
+
authorized documents within the work order's scope, and a named
|
|
51
|
+
script only as `## Named scripts` allows.
|
|
41
52
|
3. Keep the instructions usable: name the actor, prerequisites, expected
|
|
42
53
|
result, stop conditions and recovery for each action.
|
|
43
54
|
4. Run the applicable document lint and link checks through
|
|
44
|
-
`.qfai/assistant/step/common-gate-run/STEP.md`.
|
|
55
|
+
`.qfai/assistant/step/common-gate-run/STEP.md`. A check applies when a
|
|
56
|
+
Standard commands entry (normally `Lint` or `Format`) runs a checker over
|
|
57
|
+
the changed files' type; where you cannot tell, run the entry and record its
|
|
58
|
+
result. Where no entry does, record "no applicable checker" in the stage
|
|
59
|
+
report: it is neither a pass nor UNRUN, and it is not required. A defined
|
|
60
|
+
check that reports it checked none of the changed files is recorded with its
|
|
61
|
+
output as run; it is not a pass for those files, and it is not "no
|
|
62
|
+
applicable checker". This does not narrow the gate set under
|
|
63
|
+
`common-gate-run` step 1; it covers only a check that does not exist. Keep
|
|
64
|
+
actual evidence;
|
|
45
65
|
unavailable required checks remain UNRUN with their blocker and resume
|
|
46
66
|
condition. Follow the plan's existing independent code review and closing
|
|
47
|
-
verification stages.
|
|
67
|
+
verification stages. When a named script changed, also run its existing
|
|
68
|
+
tests and checks through `common-gate-run` and keep their results.
|
|
48
69
|
|
|
49
70
|
## Action authority
|
|
50
71
|
|
|
@@ -55,7 +76,9 @@ facts to verify, not authority to act.
|
|
|
55
76
|
|
|
56
77
|
## Stage report
|
|
57
78
|
|
|
58
|
-
Report the changed paths, the procedure authored
|
|
79
|
+
Report the changed paths, the procedure authored, each named script changed
|
|
80
|
+
with why the procedure needed it and the coverage added, or that the
|
|
81
|
+
repository has no tests for it, and the checks actually
|
|
59
82
|
performed with their evidence. State that the documented actions were not
|
|
60
83
|
executed; their outcome is unobserved. Record unavailable checks as UNRUN,
|
|
61
84
|
with the blocker, owner and condition for resuming. Static instructions do not
|
|
@@ -65,5 +88,9 @@ prove an adopter's operation succeeded.
|
|
|
65
88
|
|
|
66
89
|
The authorized document is complete and consistent with existing policy.
|
|
67
90
|
Applicable lint and link checks have actual results through
|
|
68
|
-
`common-gate-run`; failures and unavailable checks prevent completion.
|
|
91
|
+
`common-gate-run`; failures and unavailable checks prevent completion. Where
|
|
92
|
+
no checker covers the changed files, the stage report records "no applicable
|
|
93
|
+
checker", which neither passes nor blocks the gate.
|
|
94
|
+
A changed named script passes its existing tests and checks, with coverage
|
|
95
|
+
added where the repository has tests for it.
|
|
69
96
|
Protected edits and uncovered actions were stopped before writing or acting.
|
|
@@ -3,10 +3,6 @@ name: implement-quarantine
|
|
|
3
3
|
owner: qfai-implement
|
|
4
4
|
purpose: "Take a test that passes and fails on the same code out of the gating suite, with a record of why and of what lets it back in."
|
|
5
5
|
requires: [common-gate-run]
|
|
6
|
-
roles:
|
|
7
|
-
- devops-ci-engineer
|
|
8
|
-
- qa-strategist
|
|
9
|
-
routing-profile: default
|
|
10
6
|
---
|
|
11
7
|
|
|
12
8
|
# implement-quarantine
|
|
@@ -4,16 +4,14 @@ owner: qfai-implement
|
|
|
4
4
|
purpose: "Move code into a better structure while every test stays green, adding no example and changing no behaviour."
|
|
5
5
|
requires:
|
|
6
6
|
- common-gate-run
|
|
7
|
-
roles:
|
|
8
|
-
- frontend-engineer
|
|
9
|
-
- backend-engineer
|
|
10
|
-
routing-profile: default
|
|
11
7
|
---
|
|
12
8
|
|
|
13
9
|
# implement-refactor
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
the story tree changes, so the step
|
|
11
|
+
Outside the `rename-concept` route, the request changes how the code is
|
|
12
|
+
arranged, not what it does. Nothing in the story tree changes, so the step
|
|
13
|
+
adds no example and runs no RED. In that route,
|
|
14
|
+
[Renaming a concept](#renaming-a-concept) says what changes.
|
|
17
15
|
|
|
18
16
|
## Reads
|
|
19
17
|
|
|
@@ -28,10 +26,27 @@ the story tree changes, so the step adds no example and runs no RED.
|
|
|
28
26
|
behaviour that was already broken.
|
|
29
27
|
2. Move in small steps: rename, extract, inline, move a file. Run the suite
|
|
30
28
|
after each one.
|
|
31
|
-
3.
|
|
32
|
-
import path. What a test asserts does not
|
|
29
|
+
3. Outside the `rename-concept` route, a test may change only where it names
|
|
30
|
+
something that moved, such as an import path. What a test asserts does not
|
|
31
|
+
change. In that route, [Renaming a concept](#renaming-a-concept) says how a
|
|
32
|
+
test changes.
|
|
33
33
|
4. Delete code nothing calls and nothing declares.
|
|
34
34
|
|
|
35
|
+
## Renaming a concept
|
|
36
|
+
|
|
37
|
+
In the `rename-concept` route, the user asked to rename a concept across the
|
|
38
|
+
project, and the specification stage before this step already renamed it in
|
|
39
|
+
the glossary, business-flow documents, stories, examples and contract rules,
|
|
40
|
+
keeping every ID. This step renames
|
|
41
|
+
it to match everywhere else: code identifiers, file names, user-visible text,
|
|
42
|
+
configuration and documents, in the small steps of the procedure. A test
|
|
43
|
+
changes only where it names the concept: an identifier, an import, a test
|
|
44
|
+
title or an expected string that carries the old name takes the new name, and
|
|
45
|
+
nothing else in it changes. No test is added or deleted, and no example
|
|
46
|
+
annotation changes. A name the specification did not rename keeps its old
|
|
47
|
+
name. When the rename would change anything beyond the name, stop as
|
|
48
|
+
[When behaviour has to change](#when-behaviour-has-to-change) says.
|
|
49
|
+
|
|
35
50
|
## When behaviour has to change
|
|
36
51
|
|
|
37
52
|
When finishing the move would change what the code does, stop before
|
|
@@ -51,4 +66,5 @@ changing it and report a branch:
|
|
|
51
66
|
## Gate
|
|
52
67
|
|
|
53
68
|
The step is done when the suite passed before and after every move, no
|
|
54
|
-
assertion changed
|
|
69
|
+
assertion changed except to carry a renamed concept's new name in the
|
|
70
|
+
`rename-concept` route.
|
|
@@ -4,10 +4,6 @@ owner: qfai-implement
|
|
|
4
4
|
purpose: "Fix the production code behind a regression that an existing, correct test catches, and confirm the fix by that test turning GREEN again."
|
|
5
5
|
requires:
|
|
6
6
|
- common-gate-run
|
|
7
|
-
roles:
|
|
8
|
-
- frontend-engineer
|
|
9
|
-
- backend-engineer
|
|
10
|
-
routing-profile: default
|
|
11
7
|
---
|
|
12
8
|
|
|
13
9
|
# implement-regression-fix
|
|
@@ -4,12 +4,6 @@ owner: qfai-implement
|
|
|
4
4
|
purpose: "Delete a mechanism the project decided to retire: its code, its tests, its configuration and its documents, with no test added to prove it is gone."
|
|
5
5
|
requires:
|
|
6
6
|
- common-gate-run
|
|
7
|
-
roles:
|
|
8
|
-
- frontend-engineer
|
|
9
|
-
- backend-engineer
|
|
10
|
-
- devops-ci-engineer
|
|
11
|
-
- doc-steward
|
|
12
|
-
routing-profile: default
|
|
13
7
|
---
|
|
14
8
|
|
|
15
9
|
# implement-retire
|
|
@@ -39,6 +33,32 @@ This step carries it out.
|
|
|
39
33
|
story or contract through its own route.
|
|
40
34
|
5. Run the relevant suite. It passes.
|
|
41
35
|
|
|
36
|
+
## Retiring a feature
|
|
37
|
+
|
|
38
|
+
In the `retire-feature` route, the user asked to remove a feature, or a concept
|
|
39
|
+
across the project's surfaces, and the specification stage before this step
|
|
40
|
+
already removed or rewrote the stories, examples and contract rules that stated
|
|
41
|
+
it. That rewritten specification is the recorded decision. When a contract rule
|
|
42
|
+
still cites an example that stage removed, the step changes nothing: it returns
|
|
43
|
+
`needs_repair` naming the rule, with `qfai-sdd` as its owner.
|
|
44
|
+
|
|
45
|
+
The step removes the feature from code, configuration and documents as the
|
|
46
|
+
procedure says, and rewords what still names it to match the specification.
|
|
47
|
+
In this route, step 2 of the procedure is narrowed:
|
|
48
|
+
|
|
49
|
+
- A test is deleted only when every example its example annotations name was
|
|
50
|
+
removed in the specification stage's diff. The stage report lists each
|
|
51
|
+
deleted test with the example IDs it was deleted for.
|
|
52
|
+
- A test that annotates any example the specification keeps stays. The step
|
|
53
|
+
changes its assertions to what the rewritten specification states, and
|
|
54
|
+
moves its example annotation to the rewritten example.
|
|
55
|
+
Before it moves an annotation, it reads the test's body and confirms that it
|
|
56
|
+
asserts the rewritten example's observable outcome.
|
|
57
|
+
- A test that refers to the feature but annotates no removed example is not
|
|
58
|
+
deleted. The stage report lists it.
|
|
59
|
+
|
|
60
|
+
No test is added, neither for the removal nor for the new wording.
|
|
61
|
+
|
|
42
62
|
## What it writes
|
|
43
63
|
|
|
44
64
|
- The deleted and changed files, listed in the stage report.
|
|
@@ -3,10 +3,6 @@ name: implement-revert
|
|
|
3
3
|
owner: qfai-implement
|
|
4
4
|
purpose: "Undo the change a bisection named as the cause of a failure, and confirm the failure is gone and nothing else broke."
|
|
5
5
|
requires: [common-gate-run]
|
|
6
|
-
roles:
|
|
7
|
-
- frontend-engineer
|
|
8
|
-
- backend-engineer
|
|
9
|
-
routing-profile: default
|
|
10
6
|
---
|
|
11
7
|
|
|
12
8
|
# implement-revert
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implement-scaffold
|
|
3
3
|
owner: qfai-implement
|
|
4
|
-
purpose: "Write, with `npx qfai atdd scaffold
|
|
4
|
+
purpose: "Write, with `npx qfai atdd scaffold` or, in a project with purpose-named test files, by hand, the E2E test of each business flow and the integration test of each acceptance criterion the flow lacks, each with an empty body."
|
|
5
5
|
requires: [common-gate-run]
|
|
6
|
-
roles: [test-design-analyst]
|
|
7
|
-
routing-profile: default
|
|
8
6
|
---
|
|
9
7
|
|
|
10
8
|
# implement-scaffold
|
|
@@ -28,6 +26,8 @@ the system's shape has settled.
|
|
|
28
26
|
## Writes
|
|
29
27
|
|
|
30
28
|
- The empty acceptance tests `npx qfai atdd scaffold` writes.
|
|
29
|
+
- In a project that names its test files by purpose, the empty tests and
|
|
30
|
+
annotation lines this step adds to those files instead.
|
|
31
31
|
|
|
32
32
|
## Procedure
|
|
33
33
|
|
|
@@ -35,10 +35,10 @@ the system's shape has settled.
|
|
|
35
35
|
`common-gate-run` says, and list the BF and AC items no test annotates.
|
|
36
36
|
Drop from that list each item a `Test exception:` row at DONE names: it is
|
|
37
37
|
owed no test.
|
|
38
|
-
2.
|
|
39
|
-
`npx qfai atdd scaffold --flow BF-NNNN`. It writes
|
|
38
|
+
2. Unless § Purpose-named test files applies, when the flow is still on that
|
|
39
|
+
list, run `npx qfai atdd scaffold --flow BF-NNNN`. It writes
|
|
40
40
|
`<testsDir>/e2e/<BF-ID>.test.<ext>`.
|
|
41
|
-
3.
|
|
41
|
+
3. Under the same condition, for each story with an acceptance criterion still on that list, run
|
|
42
42
|
`npx qfai atdd scaffold --story US-NNNN-NNNN`. It writes one test per
|
|
43
43
|
criterion under `<testsDir>/integration/<US-ID>/`, so delete each test it
|
|
44
44
|
reports as created for a criterion the list dropped.
|
|
@@ -47,11 +47,32 @@ the system's shape has settled.
|
|
|
47
47
|
|
|
48
48
|
The command never overwrites an existing test. A destination the configured
|
|
49
49
|
globs would not collect is a refusal: fix the globs or the layout, not the
|
|
50
|
-
command's output.
|
|
50
|
+
command's output. So is a JS/TS project where no `package.json` above the
|
|
51
|
+
tests names vitest or a `node --test` script: declare the runner there.
|
|
51
52
|
|
|
52
53
|
Unit and component tests are not scaffolded. `implement-tdd` writes them test
|
|
53
54
|
first, one example at a time.
|
|
54
55
|
|
|
56
|
+
## Purpose-named test files
|
|
57
|
+
|
|
58
|
+
Where the flow's existing acceptance tests are purpose-named files, each
|
|
59
|
+
carrying its `QFAI:` annotations, run no `npx qfai atdd scaffold` for the
|
|
60
|
+
flow. Write each listed item's test, with an empty body, into an existing or a
|
|
61
|
+
new purpose-named file instead. Where they are not, run the scaffold as
|
|
62
|
+
§ Procedure items 2 and 3 say.
|
|
63
|
+
|
|
64
|
+
- A `QFAI:AC-NNNN-NNNN-NN` test goes in a file under `<testsDir>/integration/`
|
|
65
|
+
or `<testsDir>/api/`, and a `QFAI:BF-NNNN` test in one under
|
|
66
|
+
`<testsDir>/e2e/`, as `.qfai/assistant/rule/test-layers.md` routes them. The file must be one
|
|
67
|
+
the configured globs select.
|
|
68
|
+
- An AC or BF annotation counts anywhere in such a file. Put it on the comment
|
|
69
|
+
line directly before the test it marks, so the pass can name that test.
|
|
70
|
+
- Change no existing test in the file: add no assertion, and move or remove no
|
|
71
|
+
annotation already there.
|
|
72
|
+
|
|
73
|
+
The step then passes as Passes when states. Procedure items 1 and 4 still
|
|
74
|
+
apply.
|
|
75
|
+
|
|
55
76
|
## Passes when
|
|
56
77
|
|
|
57
78
|
Read first: the BF and AC items of the flow that no `Test exception:` row
|
|
@@ -3,10 +3,6 @@ name: implement-seam
|
|
|
3
3
|
owner: qfai-implement
|
|
4
4
|
purpose: "Land the minimal connection an acceptance test needs to reach its assertion, and leave that test failing at the assertion."
|
|
5
5
|
requires: [common-gate-run]
|
|
6
|
-
roles:
|
|
7
|
-
- frontend-engineer
|
|
8
|
-
- backend-engineer
|
|
9
|
-
routing-profile: default
|
|
10
6
|
---
|
|
11
7
|
|
|
12
8
|
# implement-seam
|
|
@@ -3,11 +3,6 @@ name: implement-stress-harness
|
|
|
3
3
|
owner: qfai-implement
|
|
4
4
|
purpose: "Build a harness that makes an intermittent failure appear on demand, under load or under a controlled schedule, and record how often it appears."
|
|
5
5
|
requires: [common-gate-run]
|
|
6
|
-
roles:
|
|
7
|
-
- devops-ci-engineer
|
|
8
|
-
- frontend-engineer
|
|
9
|
-
- backend-engineer
|
|
10
|
-
routing-profile: default
|
|
11
6
|
---
|
|
12
7
|
|
|
13
8
|
# implement-stress-harness
|
|
@@ -4,11 +4,6 @@ owner: qfai-implement
|
|
|
4
4
|
purpose: "Run a widened check over the whole tree and either fix each new finding or record it in the check's baseline with its reason."
|
|
5
5
|
requires:
|
|
6
6
|
- common-gate-run
|
|
7
|
-
roles:
|
|
8
|
-
- devops-ci-engineer
|
|
9
|
-
- frontend-engineer
|
|
10
|
-
- backend-engineer
|
|
11
|
-
routing-profile: default
|
|
12
7
|
---
|
|
13
8
|
|
|
14
9
|
# implement-sweep
|
|
@@ -4,14 +4,6 @@ owner: qfai-implement
|
|
|
4
4
|
purpose: "Take each example of one business flow that no test annotates through an observed Red, Green and Refactor cycle, appending the one example a diagnosed missing test needs, and align every surface that does not own the truth."
|
|
5
5
|
requires:
|
|
6
6
|
- common-gate-run
|
|
7
|
-
roles:
|
|
8
|
-
- delivery-planner
|
|
9
|
-
- test-design-analyst
|
|
10
|
-
- qa-strategist
|
|
11
|
-
- frontend-engineer
|
|
12
|
-
- backend-engineer
|
|
13
|
-
- devops-ci-engineer
|
|
14
|
-
routing-profile: default
|
|
15
7
|
---
|
|
16
8
|
|
|
17
9
|
# implement-tdd
|
|
@@ -141,8 +133,9 @@ See `.qfai/assistant/skill/qfai-implement/references/cross-spec-ownership.md`
|
|
|
141
133
|
for changes that touch another flow and
|
|
142
134
|
`.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md`
|
|
143
135
|
for independently owned
|
|
144
|
-
|
|
145
|
-
|
|
136
|
+
story units. Work one EX at a time by default. Stories with no test yet may
|
|
137
|
+
run in parallel only when the parallel-unit gate passes, which the session
|
|
138
|
+
agent decides and records.
|
|
146
139
|
|
|
147
140
|
## Red, Green, Refactor
|
|
148
141
|
|
|
@@ -158,7 +151,9 @@ the smallest useful seam and a falsifiable assertion.
|
|
|
158
151
|
|
|
159
152
|
Where `implement-diagnose` already wrote the failing test for the example, do
|
|
160
153
|
not write another: annotate that test with the EX ID and run it to confirm it
|
|
161
|
-
still fails.
|
|
154
|
+
still fails. Where the Test entry is `CI only: <check name>`, or the user's
|
|
155
|
+
instruction for this run delegates that gate to a named CI check, keep that
|
|
156
|
+
test's `ci-deferred` Red and do not run it.
|
|
162
157
|
|
|
163
158
|
While implementing, run only the selected test. The full suite, Lint,
|
|
164
159
|
Typecheck, Build and `npx qfai validate` run once, in the verify stage.
|
|
@@ -188,7 +183,12 @@ ordinary success. Existing approved alternative RED routes remain available.
|
|
|
188
183
|
not an admissible RED. Record command, selector and failure. Follow
|
|
189
184
|
`.qfai/assistant/skill/qfai-implement/references/red-admissibility.md` and
|
|
190
185
|
`.qfai/assistant/skill/qfai-implement/references/red-not-observable.md`
|
|
191
|
-
when existing behavior prevents an ordinary RED.
|
|
186
|
+
when existing behavior prevents an ordinary RED. Where the Test entry is
|
|
187
|
+
`CI only: <check name>`, or the user's instruction for this run delegates
|
|
188
|
+
that gate to a named CI check, run nothing locally: record Red, Green and
|
|
189
|
+
Refactor `ci-deferred`, quoting that instruction, as
|
|
190
|
+
`.qfai/assistant/skill/qfai-implement/references/red-admissibility.md#ci-only-test-gate`
|
|
191
|
+
states.
|
|
192
192
|
2. **Green:** Write the minimum production code that makes this test pass.
|
|
193
193
|
Do not generalize to an untested case. Minimal is measured against the
|
|
194
194
|
example's obligation, not the test's inputs: a value hard-coded to match
|
|
@@ -201,8 +201,12 @@ ordinary success. Existing approved alternative RED routes remain available.
|
|
|
201
201
|
|
|
202
202
|
For UI-affecting work, follow
|
|
203
203
|
`.qfai/assistant/skill/qfai-implement/references/ui-affecting.md`; source code
|
|
204
|
-
alone does not prove the user-visible result.
|
|
205
|
-
|
|
204
|
+
alone does not prove the user-visible result. A component test carries only
|
|
205
|
+
`QFAI:EX` annotations: a UI acceptance criterion's `QFAI:AC` annotation goes in
|
|
206
|
+
an integration or API test, and a flow's `QFAI:BF` annotation in an E2E test, as
|
|
207
|
+
`.qfai/assistant/rule/test-layers.md#annotation-routing` states. The route's
|
|
208
|
+
code review reads the recorded Red and Green results, and reads each
|
|
209
|
+
`ci-deferred` test against the code before the fix. Classify its findings as
|
|
206
210
|
`.qfai/assistant/skill/qfai-implement/references/finding-classification.md`
|
|
207
211
|
says. A record correction follows `.qfai/assistant/rule/drift-protocol.md`.
|
|
208
212
|
|
|
@@ -230,11 +234,15 @@ the obligation, test path and selector,
|
|
|
230
234
|
RED, GREEN, and Refactor commands and observed results, and open findings.
|
|
231
235
|
For each focused phase, include the selected-case execution receipt above;
|
|
232
236
|
command, exit and aggregate counts alone do not establish behavior execution.
|
|
237
|
+
For a `ci-deferred` phase, the test path, its selector and the check name take
|
|
238
|
+
the place of the command, the observed result and the receipt.
|
|
233
239
|
Evidence without a command and result pair does not prove a gate.
|
|
234
240
|
A failing or unrun gate cannot be reported as PASS.
|
|
235
241
|
|
|
236
242
|
## Gate
|
|
237
243
|
|
|
238
244
|
The step is done for an example when its RED, GREEN and Refactor results are
|
|
239
|
-
observed and recorded
|
|
245
|
+
observed and recorded, or recorded `ci-deferred` where the Test entry is
|
|
246
|
+
`CI only: <check name>` or the user's instruction for this run delegates that
|
|
247
|
+
gate to a named CI check. It is done for the flow when every example the
|
|
240
248
|
selection listed is done.
|
|
@@ -4,11 +4,6 @@ owner: qfai-implement
|
|
|
4
4
|
purpose: "Repair a defective test, at whatever layer, so that it checks what its business flow, criterion or example states and nothing else."
|
|
5
5
|
requires:
|
|
6
6
|
- common-gate-run
|
|
7
|
-
roles:
|
|
8
|
-
- frontend-engineer
|
|
9
|
-
- backend-engineer
|
|
10
|
-
- acceptance-test-engineer
|
|
11
|
-
routing-profile: default
|
|
12
7
|
---
|
|
13
8
|
|
|
14
9
|
# implement-test-fix
|
|
@@ -3,9 +3,6 @@ name: implement-tooling
|
|
|
3
3
|
owner: qfai-implement
|
|
4
4
|
purpose: "Change a workflow, a script or a development tool, record whether the change reaches the CI the project ships to others, and record any release-path check that has to wait for the next release."
|
|
5
5
|
requires: [common-gate-run]
|
|
6
|
-
roles:
|
|
7
|
-
- devops-ci-engineer
|
|
8
|
-
routing-profile: default
|
|
9
6
|
---
|
|
10
7
|
|
|
11
8
|
# implement-tooling
|
|
@@ -3,8 +3,6 @@ name: maintain-edit
|
|
|
3
3
|
owner: qfai-maintain
|
|
4
4
|
purpose: "Change wording, a typo, a code comment or document prose inside the write scope, with no behaviour change, and stop before any edit that has a semantic effect."
|
|
5
5
|
requires: [common-gate-run]
|
|
6
|
-
roles: [doc-steward]
|
|
7
|
-
routing-profile: default
|
|
8
6
|
---
|
|
9
7
|
|
|
10
8
|
# maintain-edit
|
|
@@ -17,7 +15,8 @@ agent does: wording, a typo, a code comment, prose in a document.
|
|
|
17
15
|
## Non-goals
|
|
18
16
|
|
|
19
17
|
- A behaviour change of any size. That is another route's work.
|
|
20
|
-
- A story-tree file, a contract, or a row of `decisions.md` or `open-questions.md
|
|
18
|
+
- A story-tree file, a contract, or a row of `decisions.md` or `open-questions.md`,
|
|
19
|
+
except as [Resolving conflicts](#resolving-conflicts) allows.
|
|
21
20
|
- A file outside the write scope the request or the work order gives.
|
|
22
21
|
|
|
23
22
|
## Never a maintenance edit
|
|
@@ -28,7 +27,7 @@ as [A semantic effect](#a-semantic-effect) says:
|
|
|
28
27
|
- dependency updates;
|
|
29
28
|
- workflow and CI files;
|
|
30
29
|
- authorization conditions and environment settings;
|
|
31
|
-
- SQL
|
|
30
|
+
- SQL, generated files and lockfiles;
|
|
32
31
|
- a command a README states as the way to do something;
|
|
33
32
|
- QFAI's own skills, steps and rules.
|
|
34
33
|
|
|
@@ -38,6 +37,61 @@ A procedure's actions, required values, commands and order govern what a person
|
|
|
38
37
|
does. Changing any of them has a semantic effect, even when only Markdown
|
|
39
38
|
changes.
|
|
40
39
|
|
|
40
|
+
## Resolving conflicts
|
|
41
|
+
|
|
42
|
+
In the `resolve-conflicts` route, the step merges the named base into the
|
|
43
|
+
branch and keeps every record's meaning. `verify-commit` concludes the merge.
|
|
44
|
+
|
|
45
|
+
1. Fetch the base (`git fetch`), then on a clean tree, before the merge,
|
|
46
|
+
renumber every `decisions.md` row the branch added, from the lowest one
|
|
47
|
+
whose ID the fetched base now declares upward, lowest first, by the
|
|
48
|
+
`npx qfai sdd renumber-decision` procedure in
|
|
49
|
+
`.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md` (two branches
|
|
50
|
+
taking the same ID), and commit after each run. The union merge of
|
|
51
|
+
`decisions.md` duplicates a colliding ID without a conflict, so this runs
|
|
52
|
+
first. When a merge has already stopped with conflicts, run
|
|
53
|
+
`git merge --abort`, renumber, and merge again.
|
|
54
|
+
2. Start or resume the merge with `git merge --no-commit <base>`.
|
|
55
|
+
3. Resolve each conflict. The base's item keeps its ID; never rename it. An
|
|
56
|
+
item the branch added whose ID collides takes the next free ID of its scope,
|
|
57
|
+
with every citation of it. Every other edit only keeps what one side already
|
|
58
|
+
had: what each side added to a conflicting block.
|
|
59
|
+
|
|
60
|
+
Stop before the edit, as [A semantic effect](#a-semantic-effect) says, on any
|
|
61
|
+
of these:
|
|
62
|
+
|
|
63
|
+
- Content neither side had is a semantic effect.
|
|
64
|
+
- When both sides changed the same record, keeping both is a semantic effect:
|
|
65
|
+
stop.
|
|
66
|
+
- An ID that two records already share on one history before this merge,
|
|
67
|
+
carried in by an earlier merge, is a semantic effect: stop.
|
|
68
|
+
- A conflict in code, or in a file listed under
|
|
69
|
+
[Never a maintenance edit](#never-a-maintenance-edit), such as a generated
|
|
70
|
+
file or a lockfile, stops: its owner route resolves or regenerates it.
|
|
71
|
+
- A conflict in a pin or digest file, or in a file with an owner marker or a
|
|
72
|
+
CODEOWNERS entry, stops.
|
|
73
|
+
- After the merge, check each union-merged register, such as `decisions.md`,
|
|
74
|
+
for an ID declared twice. A duplicate is a semantic effect: stop.
|
|
75
|
+
|
|
76
|
+
### Several branches
|
|
77
|
+
|
|
78
|
+
When the user names several branches to take one base into, each branch is its
|
|
79
|
+
own run of this route, one branch at a time, with every rule above.
|
|
80
|
+
|
|
81
|
+
- Take the base in by merge, never by rebase. Never force-push a branch.
|
|
82
|
+
- On a stop, abort that branch's merge with `git merge --abort`, or keep each
|
|
83
|
+
branch in its own worktree, report the branch at its commit before the merge,
|
|
84
|
+
and go on with the next branch.
|
|
85
|
+
- The verify block repairs no failure on such a branch: a failing gate undoes
|
|
86
|
+
the merge and holds the branch.
|
|
87
|
+
- The route pushes nothing. A push the user's instruction names is planned
|
|
88
|
+
after the run as an order. A branch with a failed or UNRUN gate is not
|
|
89
|
+
pushed. A gate DELEGATED to CI may be pushed under the user's push
|
|
90
|
+
instruction once every gate that runs locally has passed, and the branch is
|
|
91
|
+
not merged until that CI check is green.
|
|
92
|
+
- Report each branch's result: merged locally, pushed, stopped on the named
|
|
93
|
+
file and hunk, or held by the named gate.
|
|
94
|
+
|
|
41
95
|
## Reads
|
|
42
96
|
|
|
43
97
|
- The write scope the request or the work order gives.
|
|
@@ -46,12 +100,12 @@ changes.
|
|
|
46
100
|
|
|
47
101
|
## The edit
|
|
48
102
|
|
|
49
|
-
|
|
50
|
-
itself.
|
|
103
|
+
The session agent makes the edit and runs the checks itself.
|
|
51
104
|
|
|
52
105
|
1. Read the write scope. Edit nothing outside it.
|
|
53
106
|
2. Before editing, judge whether each planned edit has a semantic effect: a
|
|
54
|
-
changed command, value, identifier, condition or rule
|
|
107
|
+
changed command, value, identifier, condition or rule, except a renumber
|
|
108
|
+
[Resolving conflicts](#resolving-conflicts) allows. If one has, stop before
|
|
55
109
|
editing as [A semantic effect](#a-semantic-effect) says. Do not make the edit.
|
|
56
110
|
3. Make the edit.
|
|
57
111
|
4. Run the applicable lint and link checks over the changed files through
|
|
@@ -68,12 +122,12 @@ so the run is `blocked`, naming the finding and the owner skill to invoke by nam
|
|
|
68
122
|
The session report records:
|
|
69
123
|
|
|
70
124
|
- the semantic effect, affected paths and the review or command that found it;
|
|
71
|
-
- that nothing was edited and
|
|
125
|
+
- that nothing was edited and this run binds no flow;
|
|
72
126
|
- the owner skill to invoke by name: `qfai-implement` for code or configuration,
|
|
73
127
|
or `qfai-sdd` for a story or contract;
|
|
74
128
|
- the authorized owner route needed before work can resume.
|
|
75
129
|
|
|
76
|
-
Do not treat a stage of
|
|
130
|
+
Do not treat a stage of this route's plan as the owner of this repair.
|
|
77
131
|
|
|
78
132
|
## Passes when
|
|
79
133
|
|
|
@@ -92,10 +146,17 @@ edit changes none. Any other entry under
|
|
|
92
146
|
- The no-behaviour-change judgement, with its reason.
|
|
93
147
|
- The independent review's verdict and who gave it.
|
|
94
148
|
- The lint and link checks run, and their results.
|
|
149
|
+
- In the `resolve-conflicts` route: the base, each renumber as old → new, and
|
|
150
|
+
the combined diff of each resolved path, taken with `git diff` before it is
|
|
151
|
+
staged, and `git diff` of every path the renumbers touched. Every added line
|
|
152
|
+
is inside one side's text, except the ID changes that list names.
|
|
95
153
|
|
|
96
154
|
## Gate
|
|
97
155
|
|
|
98
156
|
The diff stays inside the write scope, the no-behaviour-change judgement names
|
|
99
157
|
its reason, and every check run over the changed files exited 0. The review that
|
|
100
158
|
follows (`implementation-reviewer`) confirms the diff changes no behaviour; the
|
|
101
|
-
reviewer is never the agent that made the edit.
|
|
159
|
+
reviewer is never the agent that made the edit. In the `resolve-conflicts`
|
|
160
|
+
route, that review runs as `common-review-cycle` says: a resolution that
|
|
161
|
+
touches no story-tree file, contract or register row gets no reviewer. The
|
|
162
|
+
combined diff passes the added-line check before `verify-commit` commits.
|