qfai 2.4.0 → 2.5.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 +24 -16
- package/assets/defaults/workflows/apply-settled.yml +2 -0
- package/assets/defaults/workflows/decide-design.yml +1 -6
- package/assets/defaults/workflows/decompose-epic.yml +1 -1
- package/assets/init/.claude/settings.json +1 -1
- package/assets/init/.qfai/assistant/agent/architecture-reviewer.md +1 -0
- package/assets/init/.qfai/assistant/agent/fullstack-engineer.md +6 -9
- package/assets/init/.qfai/assistant/agent/implementation-reviewer.md +9 -1
- package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +70 -4
- package/assets/init/.qfai/assistant/agent/requirements-reviewer.md +1 -0
- package/assets/init/.qfai/assistant/rule/constitution.md +3 -2
- package/assets/init/.qfai/assistant/rule/drift-protocol.md +5 -5
- package/assets/init/.qfai/assistant/rule/references/deliberation-record-template.md +23 -0
- package/assets/init/.qfai/assistant/rule/references/deliberation-record.md +36 -0
- package/assets/init/.qfai/assistant/rule/references/griller-recommendations.md +3 -3
- package/assets/init/.qfai/assistant/rule/references/launcher-preflight.md +27 -0
- package/assets/init/.qfai/assistant/rule/references/reviewer-findings.md +9 -0
- package/assets/init/.qfai/assistant/rule/references/reviewer-remit.md +23 -15
- package/assets/init/.qfai/assistant/rule/references/visual-reference-survey.md +146 -0
- package/assets/init/.qfai/assistant/rule/references/worker-edit-boundary.md +2 -0
- package/assets/init/.qfai/assistant/rule/research-first-protocol.md +49 -11
- package/assets/init/.qfai/assistant/rule/review-convergence.md +15 -16
- package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +3 -0
- package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +13 -25
- package/assets/init/.qfai/assistant/rule/test-layers.md +8 -0
- package/assets/init/.qfai/assistant/rule/thinking.md +10 -5
- package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +4 -4
- package/assets/init/.qfai/assistant/rule/ui-procurement.md +50 -10
- package/assets/init/.qfai/assistant/rule/workflow.md +4 -3
- package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +3 -1
- package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +22 -56
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/design-dna-intake.md +11 -14
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-coverage-checklist.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +6 -4
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/discussion-delegation.md +46 -0
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/glossary-check.md +23 -0
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/session-check.md +25 -0
- package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +12 -1
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +2 -3
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +47 -8
- package/assets/init/.qfai/assistant/skill/qfai-maintain/SKILL.md +2 -0
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +6 -2
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +6 -9
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +24 -15
- package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +2 -1
- package/assets/init/.qfai/assistant/skill/qfai-run/references/operator-screens.md +7 -3
- package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +4 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/business-ui-patterns.md +180 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +14 -3
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-anti-patterns.md +14 -3
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md +39 -24
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-brand-catalog.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/marketing-ui-patterns.md +194 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/requirements-decomposition.md +27 -3
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +29 -22
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-phase-checklists.md +3 -3
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-pre-draft-grilling.md +4 -4
- 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 +4 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +6 -6
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +87 -4
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-design-contract-normalization.md +6 -7
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/api-contract.sample.yaml +3 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/db-contract.sample.sql +3 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/ui-contract.sample.yaml +40 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/report/preflight_summary.md +10 -16
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/01_policy/constraint.md +10 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/01_policy/initiative.md +5 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/03_contract/tech.md +1 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +8 -2
- package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +4 -0
- package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +4 -2
- package/assets/init/.qfai/assistant/skill/qfai-verify/references/context-load.md +2 -1
- package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +4 -1
- package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +11 -8
- package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +25 -60
- package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +18 -6
- package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +45 -95
- package/assets/init/.qfai/assistant/step/discussion-research/STEP.md +11 -13
- package/assets/init/.qfai/assistant/step/implement-diagnose/STEP.md +2 -2
- package/assets/init/.qfai/assistant/step/implement-scaffold/STEP.md +52 -8
- package/assets/init/.qfai/assistant/step/implement-settled-edit/STEP.md +78 -0
- package/assets/init/.qfai/assistant/step/implement-sweep/STEP.md +3 -3
- package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +20 -2
- package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +4 -0
- package/assets/init/.qfai/assistant/step/prototyping-handoff/STEP.md +3 -2
- package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +6 -1
- package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +58 -11
- package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +41 -27
- package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +2 -1
- package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +43 -26
- package/assets/init/.qfai/assistant/step/triage-answer/STEP.md +8 -3
- package/assets/init/.qfai/assistant/step/triage-close/STEP.md +12 -6
- package/assets/init/.qfai/assistant/step/triage-decompose/STEP.md +2 -1
- package/assets/init/.qfai/assistant/step/triage-operate/STEP.md +36 -6
- package/assets/init/.qfai/assistant/step/triage-security-intake/STEP.md +2 -0
- package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +3 -1
- package/assets/init/.qfai/assistant/step/verify-context/STEP.md +3 -3
- package/assets/init/.qfai/assistant/step/verify-release-notes/STEP.md +11 -3
- package/assets/init/.qfai/assistant/step/verify-repo-gate/STEP.md +22 -0
- package/assets/init/root/.agents/rules/delegation-steering.md +4 -2
- package/assets/init/root/.agents/rules/distributed-surface.md +1 -1
- package/assets/init/root/.agents/rules/grilling.md +28 -76
- package/assets/init/root/.agents/rules/interface-clarity.md +98 -6
- package/assets/init/root/.gitattributes +7 -5
- package/assets/init/root/.github/workflows/qfai-docs.yml +1 -1
- package/assets/init/root/qfai.config.yaml +1 -1
- package/assets/mdschema/story/01_policy/constraint.mdschema.yml +46 -2
- package/assets/mdschema/story/01_policy/initiative.mdschema.yml +18 -0
- package/assets/mdschema/story/03_contract/tech.mdschema.yml +5 -2
- package/assets/uix-rev/strategy-review.md +1 -1
- package/dist/cli/index.cjs +3787 -7097
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +3647 -6970
- package/dist/cli/index.mjs.map +1 -1
- package/dist/graph/cli.cjs +966 -222
- package/dist/graph/cli.cjs.map +1 -1
- package/dist/graph/cli.mjs +942 -198
- package/dist/graph/cli.mjs.map +1 -1
- package/dist/graph/hook.cjs +999 -88
- package/dist/graph/hook.cjs.map +1 -1
- package/dist/graph/hook.mjs +996 -85
- package/dist/graph/hook.mjs.map +1 -1
- package/dist/hook/turn-end.cjs +15 -45
- package/dist/hook/turn-end.cjs.map +1 -1
- package/dist/hook/turn-end.mjs +15 -45
- package/dist/hook/turn-end.mjs.map +1 -1
- package/dist/index.cjs +15398 -18327
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -41
- package/dist/index.d.ts +32 -41
- package/dist/index.mjs +19276 -22214
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-artifact-rules.md +0 -53
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-completion-matrix.md +0 -133
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/example-mapping-guide.md +0 -18
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/oq-and-deferred-rules.md +0 -84
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md +0 -95
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/platform_baselines.md +0 -118
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/review_audit_playbook.md +0 -115
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/trend_scan_playbook.md +0 -81
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux_best_practices.md +0 -184
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/01_Context.md +0 -143
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/03_Story-Workshop.md +0 -104
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/04_Sources.md +0 -276
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/05_Scope.md +0 -36
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/06_REQ.md +0 -26
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/07_NFR.md +0 -24
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/08_Glossary.md +0 -23
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/09_Constraints.md +0 -60
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/11_OQ-Register.md +0 -38
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/prototyping.yaml +0 -8
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/00_index.md +0 -35
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/40_screen_contracts.md +0 -62
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/50_review_input_bundle.md +0 -38
- package/assets/init/.qfai/assistant/step/discussion-oq/STEP.md +0 -70
- package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +0 -199
- package/assets/init/.qfai/assistant/step/discussion-uiux/STEP.md +0 -82
- package/assets/uix-rev/contracts-review.md +0 -27
|
@@ -22,7 +22,10 @@ decision to the user through the structured question tool before
|
|
|
22
22
|
changing anything that depends on it. A decision is critical when it contradicts a
|
|
23
23
|
specification, a contract or a recorded decision, cannot be taken back, or
|
|
24
24
|
rests on product intent nothing written states. Take every other decision
|
|
25
|
-
yourself
|
|
25
|
+
yourself and ask nothing. Write each agent decision, with its reason, as an
|
|
26
|
+
Agent decisions row of the run's deliberation record; the final report does
|
|
27
|
+
not list it, except an assumption a no-question mode takes, which the final
|
|
28
|
+
report also lists.
|
|
26
29
|
|
|
27
30
|
## Branch point
|
|
28
31
|
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Business UI Patterns
|
|
2
|
+
|
|
3
|
+
What a standard business screen contains. A UI contract lists what is specific
|
|
4
|
+
to a screen; this reference lists what a screen of its type has anyway, so the
|
|
5
|
+
contract is not mistaken for the whole screen. The contract author, the
|
|
6
|
+
implementer and the screen reviewer read the same entry. It covers application
|
|
7
|
+
screens: a screen whose UI contract declares `surface: marketing` is none of
|
|
8
|
+
these types.
|
|
9
|
+
|
|
10
|
+
The parts every business application has are
|
|
11
|
+
`.agents/rules/interface-clarity.md#what-a-business-screen-always-has`; this
|
|
12
|
+
reference adds what each type of screen has. A part of a type counts as asked
|
|
13
|
+
for once the screen's UI contract names it: the contract author writes it there
|
|
14
|
+
or records why the screen leaves it out. Where a part comes from is
|
|
15
|
+
`.qfai/assistant/rule/ui-procurement.md`: most of these are a catalogue block
|
|
16
|
+
or a design-system component, not authored code.
|
|
17
|
+
|
|
18
|
+
## Contents
|
|
19
|
+
|
|
20
|
+
- Every screen
|
|
21
|
+
- List
|
|
22
|
+
- Detail
|
|
23
|
+
- Create and edit form
|
|
24
|
+
- Settings
|
|
25
|
+
- Member management
|
|
26
|
+
- Dashboard
|
|
27
|
+
- Using this reference
|
|
28
|
+
|
|
29
|
+
## Every screen
|
|
30
|
+
|
|
31
|
+
- **Place in the app.** The app shell's navigation shows which section the
|
|
32
|
+
screen is in; a screen below the top level shows the way back.
|
|
33
|
+
- **States.** `default`, `empty`, `loading`, `error` and `success` each render
|
|
34
|
+
as the screen's UI contract `states` entry describes, or carry `none` with
|
|
35
|
+
the reason.
|
|
36
|
+
- **Feedback.** Every change the user makes is confirmed where they made it,
|
|
37
|
+
and a failure says what was not done and how to retry.
|
|
38
|
+
|
|
39
|
+
Anti-patterns: a screen reachable only by typing its URL; a spinner that never
|
|
40
|
+
gives way to an error; a save that changes nothing visible.
|
|
41
|
+
|
|
42
|
+
Catalogue: an application shell or sidebar layout, a breadcrumb, a toast or
|
|
43
|
+
inline alert.
|
|
44
|
+
|
|
45
|
+
## List
|
|
46
|
+
|
|
47
|
+
Standard parts:
|
|
48
|
+
|
|
49
|
+
- a title with the primary action that creates an item;
|
|
50
|
+
- search, and filters for the attributes users narrow by;
|
|
51
|
+
- sortable columns, the column the list is sorted by by default marked as such;
|
|
52
|
+
- a total count, and pagination or incremental loading once the list can
|
|
53
|
+
outgrow one screen;
|
|
54
|
+
- each row opens the item's detail; row actions only for what users do without
|
|
55
|
+
opening it;
|
|
56
|
+
- bulk selection and bulk actions, when users act on several items at once;
|
|
57
|
+
- an empty state that says what to do next, distinct from "no results" for a
|
|
58
|
+
search or filter, which offers to clear it.
|
|
59
|
+
|
|
60
|
+
Behaviour:
|
|
61
|
+
|
|
62
|
+
- the list state (keyword, filters, sort and page) lives in the screen's
|
|
63
|
+
address, the URL query on the web, so a reload, a shared link and the way
|
|
64
|
+
back from a detail keep it;
|
|
65
|
+
- search, filters, sort and paging run where the data is: on the server for
|
|
66
|
+
any list that can outgrow one page, with the total count taken from the same
|
|
67
|
+
query;
|
|
68
|
+
- the search input and the values it is matched against are normalised the
|
|
69
|
+
same way, such as Unicode NFKC so full-width and half-width forms match;
|
|
70
|
+
- page and sort values are validated and capped, and a page past the end shows
|
|
71
|
+
the last page, not an error.
|
|
72
|
+
|
|
73
|
+
Anti-patterns: a table of every field; filters that reset when the user comes
|
|
74
|
+
back from a detail; a destructive row action with no confirmation; an empty
|
|
75
|
+
list shown as a blank table; a list that can outgrow one page loaded whole and
|
|
76
|
+
paged in memory.
|
|
77
|
+
|
|
78
|
+
Catalogue: a data table with toolbar, pagination and empty state, whose
|
|
79
|
+
search, sort and paging run on the server for a list that can outgrow one page.
|
|
80
|
+
|
|
81
|
+
## Detail
|
|
82
|
+
|
|
83
|
+
Standard parts:
|
|
84
|
+
|
|
85
|
+
- the item's name and status at the top, with the actions that apply to it;
|
|
86
|
+
- the attributes grouped as users read them, most consulted first;
|
|
87
|
+
- related items and the item's history, when users need them to decide;
|
|
88
|
+
- edit and delete reached from the item, delete confirmed;
|
|
89
|
+
- the way back to the list it was opened from, keeping that list's search,
|
|
90
|
+
filters and page.
|
|
91
|
+
|
|
92
|
+
Anti-patterns: every attribute at equal weight; actions hidden in a menu when
|
|
93
|
+
there are two of them; a deleted item whose page stays open with no notice.
|
|
94
|
+
|
|
95
|
+
Catalogue: a description list, a page header with actions, an activity feed.
|
|
96
|
+
|
|
97
|
+
## Create and edit form
|
|
98
|
+
|
|
99
|
+
Standard parts:
|
|
100
|
+
|
|
101
|
+
- fields in the order users have the information, grouped under headings when
|
|
102
|
+
there are more than a handful;
|
|
103
|
+
- required and optional fields told apart;
|
|
104
|
+
- validation at the field, in words that say how to fix the value;
|
|
105
|
+
- one primary submit action, a cancel that discards, and protection from
|
|
106
|
+
losing entered data on navigation away;
|
|
107
|
+
- submit shows progress and cannot be sent twice;
|
|
108
|
+
- on success, the user lands where the result is visible, with confirmation.
|
|
109
|
+
|
|
110
|
+
Anti-patterns: errors shown only above the form; a placeholder standing in for
|
|
111
|
+
a label; edit and create as two different layouts for the same item.
|
|
112
|
+
|
|
113
|
+
Catalogue: a form layout with field, error and button components.
|
|
114
|
+
|
|
115
|
+
## Settings
|
|
116
|
+
|
|
117
|
+
Standard parts:
|
|
118
|
+
|
|
119
|
+
- sections a user can find by name, with a navigation between them when there
|
|
120
|
+
are several;
|
|
121
|
+
- each setting labelled with what it changes, and its current value visible;
|
|
122
|
+
- an explicit save per section, or immediate save with confirmation; one of
|
|
123
|
+
the two, used throughout;
|
|
124
|
+
- dangerous settings separated and confirmed.
|
|
125
|
+
|
|
126
|
+
Anti-patterns: a setting that exposes an internal parameter; mixed save
|
|
127
|
+
behaviour on one page.
|
|
128
|
+
|
|
129
|
+
Catalogue: a settings layout with section navigation, toggles and a danger
|
|
130
|
+
zone.
|
|
131
|
+
|
|
132
|
+
## Member management
|
|
133
|
+
|
|
134
|
+
Standard parts:
|
|
135
|
+
|
|
136
|
+
- a list of members with name, role and status, searchable;
|
|
137
|
+
- invite by address, with the role chosen at invite time, and a pending state
|
|
138
|
+
that can be resent or revoked;
|
|
139
|
+
- change a member's role, and remove a member, each confirmed;
|
|
140
|
+
- the rule that keeps at least one owner or administrator, stated where it
|
|
141
|
+
blocks an action.
|
|
142
|
+
|
|
143
|
+
Anti-patterns: removing the last administrator; a role name with no
|
|
144
|
+
description of what it allows.
|
|
145
|
+
|
|
146
|
+
Catalogue: a list with avatars and role selectors, an invite dialog.
|
|
147
|
+
|
|
148
|
+
## Dashboard
|
|
149
|
+
|
|
150
|
+
Standard parts:
|
|
151
|
+
|
|
152
|
+
- the one question the screen answers: what needs this user's attention now;
|
|
153
|
+
- a few figures, each with its period and its comparison;
|
|
154
|
+
- the items waiting on the user, each a link to where it is handled;
|
|
155
|
+
- recent activity, when users come back to see what changed;
|
|
156
|
+
- an empty state for a new account that names the first thing to set up.
|
|
157
|
+
|
|
158
|
+
Anti-patterns: a chart nobody acts on; figures with no period; a dashboard
|
|
159
|
+
that repeats the navigation as tiles.
|
|
160
|
+
|
|
161
|
+
Catalogue: stat cards, a task list, an activity feed.
|
|
162
|
+
|
|
163
|
+
## Using this reference
|
|
164
|
+
|
|
165
|
+
- **Writing a UI contract.** For each screen, name its type here, then write
|
|
166
|
+
in the contract the parts this screen needs, and the reason for a part it
|
|
167
|
+
leaves out. A behaviour in its type's Behaviour list applies without being
|
|
168
|
+
named; the contract records only a behaviour the screen leaves out, with
|
|
169
|
+
the reason, such as a fixed list of a few items paged on the client.
|
|
170
|
+
- **Implementing.** Build what the contract names. A part of the screen's type
|
|
171
|
+
that the contract neither names nor excludes with a reason is drift: raise
|
|
172
|
+
it to the contract stage under `.qfai/assistant/rule/drift-protocol.md`
|
|
173
|
+
instead of building it. A behaviour of the type is built unless the contract
|
|
174
|
+
leaves it out with a reason.
|
|
175
|
+
- **Reviewing a screen.** A part of its type that is missing with no recorded
|
|
176
|
+
reason is a finding against the screen, named with the part and the type.
|
|
177
|
+
For a type with a Behaviour list, a behaviour the screen breaks with no
|
|
178
|
+
recorded reason is a finding in the same way.
|
|
179
|
+
|
|
180
|
+
A screen that fits no type here still gets the parts under "Every screen".
|
|
@@ -27,16 +27,21 @@ project adds. No other directory under `<paths.contractsDir>` holds a contract,
|
|
|
27
27
|
and `QFAI-CONTRACT-034` reports a file in one. Evaluator axes are not a contract
|
|
28
28
|
either: the review validation the QFAI CLI applies fixes them.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
A deliberation record is **non-normative** history — not upstream SSOT (`.qfai/assistant/rule/drift-protocol.md#core-rule`). `/qfai-sdd` normalizes approved decisions into `<paths.contractsDir>/**`; downstream skills read contracts, not records. A contradiction between a record and a contract is resolved in the contract, never by amending the record.
|
|
31
31
|
|
|
32
32
|
## Rules
|
|
33
33
|
|
|
34
34
|
- Keep contract files minimal: only what flows, stories, and tests actually reference.
|
|
35
|
+
- Every entry in a UI contract's `screens[]` states its `purpose` and its
|
|
36
|
+
`navigation`: the shell it renders in, its entry points and where back leads.
|
|
35
37
|
- Every entry in a UI contract's `screens[]` carries at least one
|
|
36
38
|
`primary_task`. An empty `primary_tasks` array blocks `/qfai-prototyping` at
|
|
37
39
|
the validate lane, under `QFAI-AUD-001`. The shipped `ui-contract.sample.yaml`
|
|
38
40
|
carries filled entries; replace them with the screen's own rather than
|
|
39
41
|
emptying the list.
|
|
42
|
+
- Every screen lists its `states`: `default`, `empty`, `loading`, `error` and
|
|
43
|
+
`success`, each with what renders and the next action, or `none` with the
|
|
44
|
+
reason for a state the screen cannot reach.
|
|
40
45
|
- A screen may describe its copy in the optional `supplements` and `structure`.
|
|
41
46
|
Check each proposed text against the screen's tasks and the information the
|
|
42
47
|
user needs there. A text that only repeats a heading, an action or a
|
|
@@ -64,12 +69,18 @@ Discussion UI/UX files are **non-normative** discovery / reference artifacts —
|
|
|
64
69
|
not only where the attribute is written out — a framework that builds the
|
|
65
70
|
attribute from a variable still writes the marker somewhere.
|
|
66
71
|
- **Every entry under `screens` is a screen, once.** Each UI-bearing contract declares one full `UI-NNNN` ID and a nonempty `screens[]` list. Each screen has an ID and route, unique within its contract. The prototyping cycle covers all declared UI-bearing contract IDs; filenames do not select a legacy spec tier. `QFAI-CONTRACT-042` names malformed screen entries.
|
|
72
|
+
- **A screen's `surface` is a closed word.** A screen is `application`, the
|
|
73
|
+
default when the key is left out, or `marketing`, a page a visitor sees before
|
|
74
|
+
signing in. `QFAI-CONTRACT-051` reports any other value at error.
|
|
67
75
|
- **A contract's ID comes from its directory.** `api/` holds `API` contracts,
|
|
68
76
|
`db/` `DB` and `ui/` `UI`; the QFAI repository's own `cli/` holds `CLI`
|
|
69
77
|
contracts. The ID is `<KIND>-NNNN`.
|
|
70
78
|
Its number is one more than the highest contract number of any kind, so
|
|
71
|
-
`API-0002` and `DB-0002` cannot both exist.
|
|
72
|
-
|
|
79
|
+
`API-0002` and `DB-0002` cannot both exist. Find it by reading every `ID` in
|
|
80
|
+
`contracts.md` and every file name under `api/`, `db/`, `ui/` and `cli/`
|
|
81
|
+
together, not only the directory the new contract goes in. A number is never
|
|
82
|
+
reused, even after its contract is removed. `npx qfai validate --profile sdd`
|
|
83
|
+
reports two contracts that share a number as `QFAI-CONTRACT-034`.
|
|
73
84
|
- **The file is named after the ID**: `<kind>-NNNN-<slug>.<ext>`, such as
|
|
74
85
|
`api/api-0002-orders.yaml` or `db/db-0003-orders.sql`.
|
|
75
86
|
- **The ID is declared once, in the file.** A Markdown contract declares it in
|
|
@@ -5,8 +5,8 @@ falls back on the same few defaults whatever the product is, and these are the
|
|
|
5
5
|
ones people name when they recognise a generated interface.
|
|
6
6
|
|
|
7
7
|
Each pattern suits some brief. It is a defect when it appears because it is a
|
|
8
|
-
default, not because the brand direction the
|
|
9
|
-
it. An instruction to avoid "a generic look" only swaps one default for another;
|
|
8
|
+
default, not because the brand direction the deliberation record settles asks
|
|
9
|
+
for it. An instruction to avoid "a generic look" only swaps one default for another;
|
|
10
10
|
naming the pattern is what works.
|
|
11
11
|
|
|
12
12
|
## Contents
|
|
@@ -34,9 +34,14 @@ naming the pattern is what works.
|
|
|
34
34
|
- **Writing root `DESIGN.md`.** Read the list before choosing a value. A value
|
|
35
35
|
that produces a pattern here stays only where the recorded brand direction
|
|
36
36
|
asks for it. Otherwise choose again.
|
|
37
|
-
- **Reviewing.** Check the references the
|
|
37
|
+
- **Reviewing.** Check the references the deliberation record adopted, root
|
|
38
38
|
`DESIGN.md` and each prototype screen against the list. A finding names the
|
|
39
39
|
aspect and quotes the pattern it matched.
|
|
40
|
+
- **Building and reviewing an implemented screen.** _Information
|
|
41
|
+
architecture and flow_ and _States and accessibility_ apply to every screen
|
|
42
|
+
the implementation builds, not only to root `DESIGN.md` and prototypes. The
|
|
43
|
+
implementer checks them before calling a screen done, and the implementation
|
|
44
|
+
and product-surface reviews check the built screens against them.
|
|
40
45
|
- **Replacing a pattern.** Its usual substitute is in
|
|
41
46
|
[Displacement](#displacement). Moving from one to the other is the same
|
|
42
47
|
defect.
|
|
@@ -63,6 +68,12 @@ naming the pattern is what works.
|
|
|
63
68
|
flow_ and _States and accessibility_ do, `interface-clarity.md` and the spec
|
|
64
69
|
are the rules. The entry is the form a breach of them takes on a generated
|
|
65
70
|
screen.
|
|
71
|
+
- On a screen whose UI contract declares `surface: marketing`, a part the
|
|
72
|
+
screen's UI contract names from its marketing pattern entry, such as a hero,
|
|
73
|
+
feature cards, a recommended pricing tier or text beside a labelled product
|
|
74
|
+
image, is not one of these patterns; only its default styling and its wording can be. What
|
|
75
|
+
such a screen always has is
|
|
76
|
+
`.agents/rules/interface-clarity.md#what-a-marketing-screen-always-has`.
|
|
66
77
|
- The reviewer inside the prototyping loop does not apply the sections about
|
|
67
78
|
identity. Root `DESIGN.md` locks the brand values that reviewer sees, so a
|
|
68
79
|
pattern there is caught where the design direction is reviewed and where
|
|
@@ -15,25 +15,37 @@ Applies only to a UI-bearing target — one whose classified surface set names
|
|
|
15
15
|
|
|
16
16
|
## Where the answers come from
|
|
17
17
|
|
|
18
|
-
The interview is `/qfai-discussion`'s
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
18
|
+
The interview is `/qfai-discussion`'s. Its answers are the Interview rows of
|
|
19
|
+
the deliberation record SDD consumes:
|
|
20
|
+
|
|
21
|
+
| An Interview row on | Carries |
|
|
22
|
+
| ------------------------------------ | ---------------------------------------------------------------- |
|
|
23
|
+
| the target surfaces | whether the flow is UI-bearing, as the `tech.md` `Surface` row |
|
|
24
|
+
| the brand direction | the adopted theme, what departs from it, and what stays ordinary |
|
|
25
|
+
| a competitive or component reference | its adopted points, its rejected points, its local translation |
|
|
26
|
+
| a design direction the user rejected | the anti-goal and the reason the user gave |
|
|
27
|
+
| a trend finding | the conclusion the user accepted |
|
|
28
|
+
|
|
29
|
+
The brand comes from the Interview row in which the user chose it. For initial
|
|
30
|
+
authoring of a missing file, a UI-bearing record with no row on the brand
|
|
31
|
+
direction leaves the brand unchosen — stop and ask rather than pick one, which
|
|
32
|
+
is the same rule an imported specification gets.
|
|
33
|
+
|
|
34
|
+
What the record settles becomes exploration constraints, never a chosen
|
|
35
|
+
design. `/qfai-sdd` selects no visual winner; `/qfai-prototyping` explores
|
|
36
|
+
under the constraints.
|
|
37
|
+
|
|
38
|
+
- **`# Brand Philosophy` body.** The product intent, the interactions that
|
|
39
|
+
must survive exploration, the brand signals, how the product differs from
|
|
40
|
+
the generic version of itself, and the trend conclusions the record settles.
|
|
41
|
+
- **A reference.** Each competitive or component reference the record settles:
|
|
42
|
+
its adopted points and their local translation under **Do**, its rejected
|
|
43
|
+
points under **Don't** and in `audience.do_not_look_like`. A competitive
|
|
44
|
+
reference is an input to deliberate deviation, not a template to copy
|
|
45
|
+
unchanged.
|
|
46
|
+
- **A rejected direction.** Each design direction the user rejected goes under
|
|
47
|
+
**Don't** as an anti-goal, with its reason and a concrete cue a downstream
|
|
48
|
+
reviewer uses to stop it recurring.
|
|
37
49
|
|
|
38
50
|
The questions behind those answers are in the design DNA intake reference.
|
|
39
51
|
|
|
@@ -49,16 +61,19 @@ three intent fields, so those come first.
|
|
|
49
61
|
- Brand personality → `brand.voice` (1..N short trait words) and the
|
|
50
62
|
`# Brand Philosophy` body.
|
|
51
63
|
- Audience emotion → `audience.emotion`.
|
|
52
|
-
- Rejected
|
|
64
|
+
- Rejected reference points → `audience.do_not_look_like` and the
|
|
53
65
|
**Don't** subsection of the `# Brand Philosophy` body. This field names
|
|
54
66
|
identities to avoid, not conventions.
|
|
55
|
-
-
|
|
67
|
+
- Rejected directions → the **Don't** subsection, each with its reason and
|
|
68
|
+
its review cue.
|
|
69
|
+
- Adopted reference points, with their local translation → the **Do**
|
|
70
|
+
subsection of `# Brand Philosophy`.
|
|
56
71
|
- Brand archetype → `brand.archetype`. Allowed values are the 8-archetype
|
|
57
72
|
catalog in the brand catalog
|
|
58
73
|
(`minimal | bold | corporate | playful | organic | tech | elegant | casual`).
|
|
59
|
-
Map the theme the
|
|
60
|
-
Selection Guide's scoring is the fallback for a
|
|
61
|
-
no theme, and an answer arrived at that way is the assistant's, not the
|
|
74
|
+
Map the theme the Interview row records to the archetype that describes it;
|
|
75
|
+
the Selection Guide's scoring is the fallback for a brand direction that
|
|
76
|
+
names no theme, and an answer arrived at that way is the assistant's, not the
|
|
62
77
|
user's. The archetype's `interaction` default seeds `accessibility.motion`,
|
|
63
78
|
which no theme publishes. Its `color_tendency` / `typography` / `spacing`
|
|
64
79
|
defaults seed `visual.*` only for a file with no `brand.theme`: where a theme
|
|
@@ -143,8 +143,8 @@ Picking an archetype fills a required `DESIGN.md` field. It does not settle scre
|
|
|
143
143
|
which the UI contracts own, and it does not settle the prototype's layout, which
|
|
144
144
|
`/qfai-prototyping` explores under its tokens.
|
|
145
145
|
|
|
146
|
-
1. Score each archetype against the brand intent the
|
|
147
|
-
2. Break a tie with the inputs step 1 already read, in this order: (a) the archetype whose `aesthetic_properties` contradict fewer entries of `audience.do_not_look_like`, since that field is an explicit exclusion rather than a preference; (b) alphabetical archetype name. Both are decidable from what the intake captured, so the same
|
|
146
|
+
1. Score each archetype against the brand intent the deliberation record settles (`brand.voice`, `audience.emotion`, `audience.do_not_look_like`). The score is the fit between that intent and the archetype's `representative_brand` and `aesthetic_properties` above — the only archetype facts this catalog publishes.
|
|
147
|
+
2. Break a tie with the inputs step 1 already read, in this order: (a) the archetype whose `aesthetic_properties` contradict fewer entries of `audience.do_not_look_like`, since that field is an explicit exclusion rather than a preference; (b) alphabetical archetype name. Both are decidable from what the intake captured, so the same record yields the same archetype for any agent. Do not weigh a "visual-theme weight": the catalog publishes no such number for an archetype, and a tie-break that needs one is not executable here.
|
|
148
148
|
3. Record the selected archetype in root `DESIGN.md` front-matter as `brand.archetype`.
|
|
149
149
|
4. The selected archetype's `aesthetic_properties` become the defaults for Color Palette, Typography, Spacing, and Animation sections.
|
|
150
150
|
5. Customize those defaults into project-specific values, split by destination: `color_tendency` / `typography` / `spacing` become `visual.*` tokens, while the `interaction` default becomes `accessibility.motion` — `visual.*` has no motion or interaction key.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# Marketing UI Patterns
|
|
2
|
+
|
|
3
|
+
What a standard marketing page contains. A marketing screen is one a visitor
|
|
4
|
+
sees before signing in that exists to explain, persuade or inform: a home page,
|
|
5
|
+
an audience page, how it works, pricing, a guide, an about page with a contact
|
|
6
|
+
form, a legal notice. Its UI contract declares `surface: marketing`; a screen
|
|
7
|
+
that declares no `surface` is an application screen.
|
|
8
|
+
|
|
9
|
+
A UI contract lists what is specific to a page; this reference lists what a
|
|
10
|
+
section of its kind has anyway. The contract author, the implementer and the
|
|
11
|
+
screen reviewer read the same entry. The business-screen floor in
|
|
12
|
+
`.agents/rules/interface-clarity.md#what-a-business-screen-always-has` applies
|
|
13
|
+
to application screens, not to these; what every marketing screen has is
|
|
14
|
+
`.agents/rules/interface-clarity.md#what-a-marketing-screen-always-has`. The
|
|
15
|
+
entries are kinds of section, not an order: a page has the sections its reader
|
|
16
|
+
needs, in the order that reader decides in. A part of an entry counts as asked for
|
|
17
|
+
once the page's UI contract names it: the contract author writes it there or
|
|
18
|
+
records why the page leaves it out. Where a part comes from is
|
|
19
|
+
`.qfai/assistant/rule/ui-procurement.md`.
|
|
20
|
+
|
|
21
|
+
## Contents
|
|
22
|
+
|
|
23
|
+
- Every marketing page
|
|
24
|
+
- Hero
|
|
25
|
+
- Proof
|
|
26
|
+
- Audience page
|
|
27
|
+
- Feature section
|
|
28
|
+
- How it works
|
|
29
|
+
- Pricing table
|
|
30
|
+
- FAQ
|
|
31
|
+
- Final call to action
|
|
32
|
+
- Contact form
|
|
33
|
+
- Legal pages
|
|
34
|
+
- Images
|
|
35
|
+
- Using this reference
|
|
36
|
+
|
|
37
|
+
## Every marketing page
|
|
38
|
+
|
|
39
|
+
- **Purpose.** One reader and one next step per page, named in the contract's
|
|
40
|
+
`purpose`.
|
|
41
|
+
- **Standard parts.** A site header with the sign-in and the primary call to
|
|
42
|
+
action, and a footer with the legal pages and contact.
|
|
43
|
+
- **States.** `default` for the content; `error` and `success` only where the
|
|
44
|
+
page sends something, such as a form. The page's `states` combine the states
|
|
45
|
+
of its sections.
|
|
46
|
+
|
|
47
|
+
Anti-patterns: a claim nobody verified; a page that links to the application
|
|
48
|
+
with no way back to the site; a cookie or consent banner that hides refusal.
|
|
49
|
+
|
|
50
|
+
## Hero
|
|
51
|
+
|
|
52
|
+
- **Purpose.** Say what the product does, for whom, in the visitor's words.
|
|
53
|
+
- **Standard parts.** A headline, one supporting sentence, the primary call to
|
|
54
|
+
action and at most one secondary action, and an image of the product or of
|
|
55
|
+
its use.
|
|
56
|
+
- **States.** `default` only; `none` for the others, as it loads with the page.
|
|
57
|
+
|
|
58
|
+
Anti-patterns: a headline about the company rather than the visitor; three
|
|
59
|
+
equal buttons; an unlabelled product mock-up shown as the real product.
|
|
60
|
+
|
|
61
|
+
## Proof
|
|
62
|
+
|
|
63
|
+
- **Purpose.** Show that the product is used and works.
|
|
64
|
+
- **Standard parts.** Live figures read from the product, each with the time it
|
|
65
|
+
was counted; customer names and quotes with the customer's permission
|
|
66
|
+
recorded; a link to a case study where one exists.
|
|
67
|
+
- **States.** `default`; `loading` and `error` when a figure is read at view
|
|
68
|
+
time, where an unreadable figure is left out rather than guessed.
|
|
69
|
+
|
|
70
|
+
Anti-patterns: a fake testimonial; an invented or rounded-up number; a figure
|
|
71
|
+
with no time it was counted; a logo shown without the customer's permission.
|
|
72
|
+
|
|
73
|
+
## Audience page
|
|
74
|
+
|
|
75
|
+
- **Purpose.** Answer one audience's question: is this for me, and what does it
|
|
76
|
+
change for me.
|
|
77
|
+
- **Standard parts.** The audience named in the headline, their problem in
|
|
78
|
+
their terms, the features that answer it, proof from the same audience, and
|
|
79
|
+
the call to action.
|
|
80
|
+
- **States.** `default` only.
|
|
81
|
+
|
|
82
|
+
Anti-patterns: the home page copied with the audience name swapped in; a
|
|
83
|
+
feature list no member of the audience asked about.
|
|
84
|
+
|
|
85
|
+
## Feature section
|
|
86
|
+
|
|
87
|
+
- **Purpose.** Show what one capability does for the visitor.
|
|
88
|
+
- **Standard parts.** A heading that states the outcome, a short description,
|
|
89
|
+
and an image or a demonstration of the capability, labelled as an example.
|
|
90
|
+
- **States.** `default` only.
|
|
91
|
+
|
|
92
|
+
Anti-patterns: a grid of icons with one-word labels; a capability the product
|
|
93
|
+
does not have yet shown as available; an unlabelled mock-up.
|
|
94
|
+
|
|
95
|
+
## How it works
|
|
96
|
+
|
|
97
|
+
- **Purpose.** Show the steps from sign-up to the first result.
|
|
98
|
+
- **Standard parts.** Three to five numbered steps, each with what the visitor
|
|
99
|
+
does and what they get, and the call to action after the last one.
|
|
100
|
+
- **States.** `default` only.
|
|
101
|
+
|
|
102
|
+
Anti-patterns: steps that describe the architecture; a step count that hides a
|
|
103
|
+
manual onboarding; a "takes two minutes" nobody measured.
|
|
104
|
+
|
|
105
|
+
## Pricing table
|
|
106
|
+
|
|
107
|
+
- **Purpose.** Let the visitor choose a plan and know what they will pay.
|
|
108
|
+
- **Standard parts.** Each plan's name, price, billing period and currency,
|
|
109
|
+
whether tax is included, what it includes and its limits; the plan
|
|
110
|
+
recommended for most visitors marked as such; how to cancel; a contact for a
|
|
111
|
+
plan the table does not fit.
|
|
112
|
+
- **States.** `default`; `loading` and `error` when prices are read at view
|
|
113
|
+
time.
|
|
114
|
+
|
|
115
|
+
Anti-patterns: dark patterns, such as a monthly price shown for a plan billed
|
|
116
|
+
yearly, a trial that turns into a charge with no notice of when, a
|
|
117
|
+
pre-selected add-on, or a cancel path harder than the sign-up; a recommended
|
|
118
|
+
plan chosen to maximise revenue rather than fit.
|
|
119
|
+
|
|
120
|
+
## FAQ
|
|
121
|
+
|
|
122
|
+
- **Purpose.** Answer the questions that stop a visitor from acting.
|
|
123
|
+
- **Standard parts.** Questions taken from what visitors and customers asked,
|
|
124
|
+
each with a short answer and a link to the detail.
|
|
125
|
+
- **States.** `default` only.
|
|
126
|
+
|
|
127
|
+
Anti-patterns: questions nobody asked, written to repeat the features; an
|
|
128
|
+
answer that hides a cost or a limit.
|
|
129
|
+
|
|
130
|
+
## Final call to action
|
|
131
|
+
|
|
132
|
+
- **Purpose.** Give the visitor who read to the end the one next step.
|
|
133
|
+
- **Standard parts.** A one-line restatement of the outcome and the primary
|
|
134
|
+
call to action, the same as the hero's.
|
|
135
|
+
- **States.** `default` only.
|
|
136
|
+
|
|
137
|
+
Anti-patterns: a call to action different from the hero's; urgency nobody can
|
|
138
|
+
back, such as a countdown that restarts.
|
|
139
|
+
|
|
140
|
+
## Contact form
|
|
141
|
+
|
|
142
|
+
- **Purpose.** Let a visitor reach the people behind the product.
|
|
143
|
+
- **Standard parts.** The fewest fields the reply needs, each labelled; what
|
|
144
|
+
happens to the message and when to expect a reply; consent to the privacy
|
|
145
|
+
policy where the jurisdiction requires it; protection from spam that does
|
|
146
|
+
not block people.
|
|
147
|
+
- **States.** `default`, `error` with what to fix and the entries kept, and
|
|
148
|
+
`success` with what happens next; `loading` while it sends, which cannot be
|
|
149
|
+
sent twice.
|
|
150
|
+
|
|
151
|
+
Anti-patterns: a field the reply does not need; a pre-ticked marketing
|
|
152
|
+
consent; a success message with no reply time.
|
|
153
|
+
|
|
154
|
+
## Legal pages
|
|
155
|
+
|
|
156
|
+
- **Purpose.** Publish the notices the jurisdiction requires before a visitor
|
|
157
|
+
signs up or pays.
|
|
158
|
+
- **Standard parts.** The notices the jurisdiction requires, such as the
|
|
159
|
+
specified commercial transactions notice where the business sells online in
|
|
160
|
+
Japan, a privacy policy and the
|
|
161
|
+
terms of service; each with its effective date, linked from the footer of
|
|
162
|
+
every page and from the point of sign-up or payment.
|
|
163
|
+
- **States.** `default` only.
|
|
164
|
+
|
|
165
|
+
Anti-patterns: a notice copied from another business; a policy with no
|
|
166
|
+
effective date; a notice reachable only from one page; a legal text the owner
|
|
167
|
+
has not approved.
|
|
168
|
+
|
|
169
|
+
## Images
|
|
170
|
+
|
|
171
|
+
- **Source and licence.** Each image records where it came from and the licence
|
|
172
|
+
it is used under, in the page's UI contract or beside the image file. A new image with neither is not used; one already on the page with neither
|
|
173
|
+
is put to the user, not removed.
|
|
174
|
+
- **Examples labelled.** A product image or mock-up that shows made-up data, or
|
|
175
|
+
a screen the product does not have yet, is labelled as an example where it is
|
|
176
|
+
shown.
|
|
177
|
+
- **Text alternative.** Each image that carries information has a text
|
|
178
|
+
alternative that says it; a decorative image has an empty one.
|
|
179
|
+
|
|
180
|
+
## Using this reference
|
|
181
|
+
|
|
182
|
+
- **Writing a UI contract.** For a `surface: marketing` screen, name the entry
|
|
183
|
+
for each section of the page here, then write the parts it needs into the
|
|
184
|
+
contract, with the reason for a part it leaves out.
|
|
185
|
+
- **Implementing.** Build what the contract names. A part of an entry that the
|
|
186
|
+
contract neither names nor excludes with a reason is drift: raise it to the
|
|
187
|
+
contract stage under `.qfai/assistant/rule/drift-protocol.md` instead of
|
|
188
|
+
building it.
|
|
189
|
+
- **Reviewing a page.** A part of its entry that is missing with no recorded
|
|
190
|
+
reason, an anti-pattern listed here, or an image with no source and licence
|
|
191
|
+
is a finding against the page, named with the part and the entry.
|
|
192
|
+
|
|
193
|
+
A section that fits no entry here still gets the parts under "Every marketing
|
|
194
|
+
page".
|
|
@@ -6,17 +6,41 @@ update_frequency: occasional
|
|
|
6
6
|
|
|
7
7
|
# Requirements Decomposition
|
|
8
8
|
|
|
9
|
-
Use
|
|
9
|
+
Use the answers of the deliberation record SDD consumes to write one connected, testable story tree. The record is history: it keeps the questions put to the user and the decisions agents took. The story tree and contracts hold the approved behavior.
|
|
10
10
|
|
|
11
11
|
## Source and ownership
|
|
12
12
|
|
|
13
|
-
1. Read
|
|
13
|
+
1. Read every table of the record, with the completed reviews and the explicit user requirements. Record an unanswered Interview row or an unresolved product choice in `<paths.specsDir>/open-questions.md` and stop only the write that depends on it. Never edit the record.
|
|
14
14
|
2. Reuse an existing policy, business flow, or story when it still expresses the requirement. Put an operation that is a critical decision to the user, as the triage reference says, and record the decision in `<paths.specsDir>/decisions.md` only when it passes the recording test.
|
|
15
15
|
3. Write broad intent in `01_policy/` as criteria, then each observable process in `02_business-flow/business-flow-NNNN/business-flow.md`. Keep each flow's story index and three-file story directories beneath it. Every file takes its template's shape exactly, as the `Document shapes` section of the spec traceability rules sets out.
|
|
16
16
|
4. Write one observable outcome per AC, as one named Gherkin `Scenario:` under its ID comment. Give each AC at least one concrete EX, and give each EX exactly one AC reference. Include normal, failure, boundary, and authorization paths relevant to the requirement.
|
|
17
17
|
5. Once the examples exist, write independently falsifiable BRs in the contracts that enforce them. Each BR cites at least one full EX ID; every EX has a BR. A shared BR is defined once, in the contract that enforces it, and no other contract cites it.
|
|
18
18
|
6. Derive test obligations from the completed BF → US → AC → EX ← BR graph. The SDD skill records those obligations; `/qfai-implement` writes the acceptance tests.
|
|
19
19
|
|
|
20
|
+
## Where each answer goes
|
|
21
|
+
|
|
22
|
+
Write each answer of the record into the one story-tree file that owns it:
|
|
23
|
+
|
|
24
|
+
| The record settles | Written to |
|
|
25
|
+
| ----------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
|
26
|
+
| Purpose, background, users and success | `01_policy/objective.md` |
|
|
27
|
+
| Assumptions, dependencies, milestones, size and what the work takes | `01_policy/initiative.md` |
|
|
28
|
+
| Risks | `01_policy/initiative.md` `## Risks` rows |
|
|
29
|
+
| Trade-off priorities | `01_policy/principle.md` Decision priorities |
|
|
30
|
+
| Terms | `01_policy/glossary.md` |
|
|
31
|
+
| Technical, operational and business limits | the constraint sections of `01_policy/constraint.md` |
|
|
32
|
+
| Product-wide quality targets | `01_policy/constraint.md` `## Quality targets` rows |
|
|
33
|
+
| Legal and compliance limits | `01_policy/constraint.md` `## Legal and Compliance Constraints` rows |
|
|
34
|
+
| The target surfaces | the `03_contract/tech.md` `Surface` row |
|
|
35
|
+
| Flows and examples | the business flows, their stories and the EX rows of those stories |
|
|
36
|
+
| Screens and their behaviour obligations | the UI contracts under `<paths.contractsDir>/ui/` |
|
|
37
|
+
| The brand direction, references, rejected directions and trend findings | root `DESIGN.md` |
|
|
38
|
+
| A question still open | `<paths.specsDir>/open-questions.md` |
|
|
39
|
+
|
|
40
|
+
A row takes the next ID of its section, which is its place in the table. It
|
|
41
|
+
keeps only the columns its template has, in plain words. Each answer has one
|
|
42
|
+
home: write it once, and point to it from nowhere else.
|
|
43
|
+
|
|
20
44
|
## Item size
|
|
21
45
|
|
|
22
46
|
- A BF is one end-to-end business process with a distinct outcome, drawn as one Mermaid diagram.
|
|
@@ -37,4 +61,4 @@ Allocate each ID as the highest ID of its kind in its defined scope plus one, co
|
|
|
37
61
|
## Ambiguity
|
|
38
62
|
|
|
39
63
|
Leave unresolved choices in `open-questions.md` with an owner and a next action in Approach. Append decisions and questions once; a decision row keeps its ID and is never removed, though its wording may be restated, and a question row is never edited; delete a question row when a decision settles it.
|
|
40
|
-
Do not silently turn
|
|
64
|
+
Do not silently turn an option the user did not choose into a requirement, or duplicate a fact across policy, story, and contract files.
|