project-tiny-context-harness 0.7.4 → 0.7.6
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 +25 -7
- package/assets/README.md +25 -7
- package/assets/README.zh-CN.md +26 -4
- package/assets/agents/AGENTS_CORE.md +5 -3
- package/assets/context_templates/product-surface-contract.md +7 -0
- package/assets/context_templates/screen-contract.md +180 -0
- package/assets/skills/context_development_engineer/SKILL.md +3 -1
- package/assets/skills/context_product_plan/SKILL.md +3 -2
- package/assets/skills/context_surface_contract/SKILL.md +15 -0
- package/assets/skills/context_uiux_design/SKILL.md +27 -10
- package/assets/skills/design-resource-authoring/SKILL.md +65 -0
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +126 -0
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +112 -0
- package/assets/skills/design-resource-authoring/references/resource-selection.md +124 -0
- package/assets/skills/long-task-workflow/SKILL.md +3 -2
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +2 -0
- package/assets/skills/long-task-workflow/references/contract-authoring.md +6 -2
- package/assets/skills/long-task-workflow/references/evidence-design.md +2 -0
- package/assets/skills/source-plan-authoring/SKILL.md +3 -0
- package/dist/lib/design-md.d.ts +7 -0
- package/dist/lib/design-md.js +47 -6
- package/dist/lib/doctor.js +19 -4
- package/dist/lib/long-task-authority-material-diff.js +28 -0
- package/dist/lib/long-task-authority-materials.js +14 -0
- package/dist/lib/long-task-authority-policy.d.ts +14 -0
- package/dist/lib/long-task-authority-policy.js +14 -0
- package/dist/lib/long-task-authority-types.d.ts +14 -0
- package/dist/lib/long-task-claim-definitions.js +14 -0
- package/dist/lib/long-task-contract-types.d.ts +14 -0
- package/dist/lib/long-task-product-shape.js +28 -0
- package/dist/lib/long-task-source-target-index.js +14 -0
- package/dist/lib/profiles.js +1 -0
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +1 -1
- package/package.json +1 -1
|
@@ -53,11 +53,13 @@ Standard frozen Playwright verifier content is trusted. Weak-observability Outco
|
|
|
53
53
|
|
|
54
54
|
## Visual UI Evidence
|
|
55
55
|
|
|
56
|
+
- When external design resources are Source, prove only selected exact-target/constraint conditions that the Contract explicitly adopts. Candidate comparison, a Figma link or an isolated prototype run is authoring/review material and cannot become product acceptance. Resolve each acceptance-affecting resource through a stable locator plus immutable path/version/hash and declared condition coverage before Compile.
|
|
56
57
|
- Use Playwright for every declared `ui_browser` visual AC and bind each independently falsifiable AC to its own `[ac:<assertion-key>]` Test Instance. A broad screenshot or one passing page case does not silently prove separate viewport, theme, state, content-stress, layout or accessibility claims.
|
|
57
58
|
- Make the test environment deterministic enough for its claim: freeze the relevant browser/project, viewport, theme/mode, locale/timezone, font loading, fixtures/data and animation/motion policy in declared verifier inputs or configuration.
|
|
58
59
|
- Any reviewed screenshot baseline that affects pass/fail must exist for the accepting Compile and be included in `verification_inputs`. Generated screenshots, diffs and reports are Artifacts and review material; they are not editable acceptance authority. Creating or replacing a baseline after Authority Lock is verifier-material revision and must never be silently auto-updated to make a failure pass.
|
|
59
60
|
- Confirm that each baseline is a selected `exact-target` for the named surface/viewport/theme/state or implements a named `constraint`; an inspiration reference cannot become a fidelity oracle merely because it is available. The implementation's current screenshot is never its own target.
|
|
60
61
|
- Screenshot comparison proves only the named visual similarity claim. Pair it with explicit DOM/layout/accessibility assertions when the Contract separately claims no overflow, action visibility, focus behavior, target size, semantic state, reduced motion or other observable behavior.
|
|
62
|
+
- Keep evidence aligned with stable surface/control/target keys. Visual similarity, interaction/navigation, validation/recovery, permission behavior, accessibility and target-runtime conformance are independently failing claims and need their own Assertions/capabilities when declared; one broad screenshot or UI pass cannot prove all Control fields.
|
|
61
63
|
- Run checks against production components or real product routes. A detached kit/mock harness is acceptable only when the Contract explicitly makes that artifact the product surface; otherwise it cannot substitute for the production carrier.
|
|
62
64
|
- Keep subjective visual quality and approval external. A new visual direction or baseline that needs human judgment remains an explicit external confirmation even when all machine checks pass.
|
|
63
65
|
- `ui_browser` proves browser UI only. When a native/mobile/desktop UI can fail independently, browser output is proxy evidence; require a project-owned live target-runtime Check that truthfully fits an existing proof surface or keep the device/simulator review external.
|
|
@@ -26,10 +26,12 @@ Record every product, technical and acceptance meaning that later work must not
|
|
|
26
26
|
## Relationship To Other Skills
|
|
27
27
|
|
|
28
28
|
- Keep `source-plan-authoring` focused on high-fidelity Source expression and traceability.
|
|
29
|
+
- For material UI, preserve stable surface/control/target keys and enough independent Control meaning for later UI Authority Closure. Do not assume a coarse product flow, `DESIGN.md` configuration or inspiration reference already supplies missing visibility, availability, validation, recovery, permission or accessibility semantics.
|
|
29
30
|
- This Skill authors Source, not a Contract Draft.
|
|
30
31
|
- It does not replace Contract Draft authoring inside `long-task-workflow`.
|
|
31
32
|
- Its recommended structure is optional input guidance.
|
|
32
33
|
- Use `context_product_plan` separately when a Tiny Context project needs product decisions classified and written as durable facts in `project_context/**`. This Skill does not replace or invoke that responsibility.
|
|
34
|
+
- `design-resource-authoring` may consume the same raw inputs independently or consume an existing Source Plan to commission low/high-fidelity targets, visual candidates, a conditional Figma handoff or an isolated interaction prototype. Neither Skill invokes the other. When explicitly requested after design selection, this Skill may instead consume both a separately revised initial proposal and selected immutable design resources as ordinary inputs; it still does not generate or select those resources.
|
|
33
35
|
- Use `long-task-workflow` later to read ordinary Source or a Source Plan with real Context/repository evidence, author one Delivery Contract, bind owners/paths/runners/proof, implement and run the Live Final Gate.
|
|
34
36
|
|
|
35
37
|
## Intake Modes And Source Coverage
|
|
@@ -477,6 +479,7 @@ Do not create:
|
|
|
477
479
|
- a Source Plan CLI, Preflight or Compile step;
|
|
478
480
|
- a Source Plan Receipt, Coverage Cache, Authority or state file;
|
|
479
481
|
- a Delivery Contract, runner, verification input or Assertion observation;
|
|
482
|
+
- a low/high-fidelity artifact, visual candidate, Figma handoff or design prototype;
|
|
480
483
|
- a Context update, implementation, verification run or completion judgment.
|
|
481
484
|
|
|
482
485
|
The Source Plan improves the quality of declared Source. It cannot prove that the user has expressed every real requirement.
|
package/dist/lib/design-md.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
export declare const DESIGN_MD_PATH = "DESIGN.md";
|
|
2
2
|
export declare const UNCONFIGURED_DESIGN_AUTHORITY_MARKER = "Design authority status: `unconfigured`";
|
|
3
3
|
export type DesignAuthorityStatus = "missing" | "unconfigured" | "configured";
|
|
4
|
+
export interface DesignAuthorityInspection {
|
|
5
|
+
status: DesignAuthorityStatus;
|
|
6
|
+
has_authority_index: boolean;
|
|
7
|
+
token_source_selected: boolean;
|
|
8
|
+
classified_reference_count: number;
|
|
9
|
+
}
|
|
4
10
|
export declare function createDesignMdIfMissing(projectRoot: string): Promise<boolean>;
|
|
5
11
|
export declare function inspectDesignAuthorityStatus(projectRoot: string): Promise<DesignAuthorityStatus>;
|
|
12
|
+
export declare function inspectDesignAuthority(projectRoot: string): Promise<DesignAuthorityInspection>;
|
package/dist/lib/design-md.js
CHANGED
|
@@ -10,16 +10,57 @@ export async function createDesignMdIfMissing(projectRoot) {
|
|
|
10
10
|
return writeTextIfChanged(target, designMdTemplate());
|
|
11
11
|
}
|
|
12
12
|
export async function inspectDesignAuthorityStatus(projectRoot) {
|
|
13
|
+
return (await inspectDesignAuthority(projectRoot)).status;
|
|
14
|
+
}
|
|
15
|
+
export async function inspectDesignAuthority(projectRoot) {
|
|
13
16
|
const target = path.join(projectRoot, DESIGN_MD_PATH);
|
|
14
|
-
if (!(await pathExists(target)))
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
if (!(await pathExists(target))) {
|
|
18
|
+
return {
|
|
19
|
+
status: "missing",
|
|
20
|
+
has_authority_index: false,
|
|
21
|
+
token_source_selected: false,
|
|
22
|
+
classified_reference_count: 0,
|
|
23
|
+
};
|
|
19
24
|
}
|
|
25
|
+
const content = await readText(target);
|
|
20
26
|
const legacyStarter = content.includes('name: "Starter Design System"') &&
|
|
21
27
|
content.includes('description: "Neutral baseline design guidance for projects that have not defined their own visual system."');
|
|
22
|
-
|
|
28
|
+
const status = content.includes(UNCONFIGURED_DESIGN_AUTHORITY_MARKER) || legacyStarter
|
|
29
|
+
? "unconfigured"
|
|
30
|
+
: "configured";
|
|
31
|
+
const index = designAuthorityIndex(content);
|
|
32
|
+
return {
|
|
33
|
+
status,
|
|
34
|
+
has_authority_index: index !== null,
|
|
35
|
+
token_source_selected: index ? tokenSourceSelected(index) : false,
|
|
36
|
+
classified_reference_count: index ? classifiedReferenceCount(index) : 0,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function designAuthorityIndex(content) {
|
|
40
|
+
const match = /^###\s+Design Authority Index\s*$/imu.exec(content);
|
|
41
|
+
if (!match)
|
|
42
|
+
return null;
|
|
43
|
+
const remainder = content.slice(match.index + match[0].length);
|
|
44
|
+
const nextSection = /^#{1,3}\s+/mu.exec(remainder);
|
|
45
|
+
return nextSection ? remainder.slice(0, nextSection.index) : remainder;
|
|
46
|
+
}
|
|
47
|
+
function tokenSourceSelected(index) {
|
|
48
|
+
const line = index
|
|
49
|
+
.split(/\r?\n/u)
|
|
50
|
+
.find((candidate) => /authored(?: exact-value)? token source\s*:/iu.test(candidate));
|
|
51
|
+
if (!line)
|
|
52
|
+
return false;
|
|
53
|
+
const value = line.slice(line.indexOf(":") + 1).trim();
|
|
54
|
+
return (value.length > 0 &&
|
|
55
|
+
!/(?:not selected|unselected|none|n\/a|tbd|todo|unknown)/iu.test(value));
|
|
56
|
+
}
|
|
57
|
+
function classifiedReferenceCount(index) {
|
|
58
|
+
return index.split(/\r?\n/u).filter((line) => {
|
|
59
|
+
if (/(?:none|not) selected/iu.test(line))
|
|
60
|
+
return false;
|
|
61
|
+
const matches = line.match(/\b(?:exact-target|constraint|inspiration)\b/giu);
|
|
62
|
+
return matches?.length === 1;
|
|
63
|
+
}).length;
|
|
23
64
|
}
|
|
24
65
|
function designMdTemplate() {
|
|
25
66
|
return [
|
package/dist/lib/doctor.js
CHANGED
|
@@ -4,7 +4,7 @@ import os from "node:os";
|
|
|
4
4
|
import { readdir } from "node:fs/promises";
|
|
5
5
|
import { DEFAULT_CONTEXT_FILE_SOFT_BUDGET_BYTES, DEFAULT_CONTEXT_TOTAL_SOFT_BUDGET_BYTES, inspectDefaultContextFootprint, } from "./context-default-footprint.js";
|
|
6
6
|
import { readConfig } from "./config.js";
|
|
7
|
-
import {
|
|
7
|
+
import { inspectDesignAuthority } from "./design-md.js";
|
|
8
8
|
import { harnessConfigPath, harnessRoot } from "./harness-root.js";
|
|
9
9
|
import { pathExists } from "./fs.js";
|
|
10
10
|
import { unsupportedSchemaMessage } from "./schema-guard.js";
|
|
@@ -63,13 +63,28 @@ export async function runDoctor(projectRoot) {
|
|
|
63
63
|
catch (error) {
|
|
64
64
|
report.warnings.push(`default Context footprint unavailable: ${error instanceof Error ? error.message : String(error)}`);
|
|
65
65
|
}
|
|
66
|
-
const designAuthority = await
|
|
67
|
-
if (designAuthority === "unconfigured") {
|
|
66
|
+
const designAuthority = await inspectDesignAuthority(projectRoot);
|
|
67
|
+
if (designAuthority.status === "unconfigured") {
|
|
68
68
|
report.info.push("design authority: unconfigured; DESIGN.md is a starter scaffold and does not authorize material production UI until project-specific tokens and exact-target/constraint/inspiration references are selected");
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
71
|
-
report.info.push(`design authority: ${designAuthority}`);
|
|
71
|
+
report.info.push(`design authority: ${designAuthority.status}${designAuthority.status === "configured" ? "; project-level visual-system configuration only" : ""}`);
|
|
72
72
|
}
|
|
73
|
+
if (designAuthority.status === "configured") {
|
|
74
|
+
report.info.push(`design authority signals: index=${designAuthority.has_authority_index ? "present" : "missing"}, token_source=${designAuthority.token_source_selected ? "selected" : "missing-or-unselected"}, classified_references=${designAuthority.classified_reference_count}`);
|
|
75
|
+
if (!designAuthority.has_authority_index) {
|
|
76
|
+
report.warnings.push("configured DESIGN.md has no Design Authority Index; add the authored token source/generation direction and classified exact-target/constraint/inspiration references when material UI depends on them");
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
if (!designAuthority.token_source_selected) {
|
|
80
|
+
report.warnings.push("Design Authority Index has no selected authored token source; generated tokens or current CSS must not become competing visual authority");
|
|
81
|
+
}
|
|
82
|
+
if (designAuthority.classified_reference_count === 0) {
|
|
83
|
+
report.warnings.push("Design Authority Index has no classified durable design references; inspiration, constraints and exact targets remain undeclared for material surfaces");
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
report.info.push("surface implementation readiness: not inferred; inspect owning Product Surface/Screen/Control Context, selected target or constraints, authored token source and project-owned verification for each material surface");
|
|
73
88
|
for (const location of await findUserSuperpowersSkills()) {
|
|
74
89
|
report.warnings.push(`user-level using-superpowers Skill detected at ${location}. Tiny Context workflows do not depend on it and doctor will not modify global configuration. To disable it explicitly for Codex, remove/disable that plugin or add a matching [[skills.config]] entry with enabled = false in ${path.join(os.homedir(), ".codex", "config.toml")}.`);
|
|
75
90
|
}
|
|
@@ -66,14 +66,28 @@ function productClaimSemantics(contract) {
|
|
|
66
66
|
});
|
|
67
67
|
for (const control of outcome.product.controls)
|
|
68
68
|
for (const [field, value] of [
|
|
69
|
+
["surface", control.surface],
|
|
70
|
+
["region", control.region],
|
|
69
71
|
["location", control.location],
|
|
72
|
+
["control_type", control.control_type],
|
|
73
|
+
["label_content", control.label_content],
|
|
74
|
+
["user_task", control.user_task],
|
|
75
|
+
["visibility", control.visibility],
|
|
76
|
+
["availability", control.availability],
|
|
70
77
|
["trigger", control.trigger],
|
|
71
78
|
["input", control.input],
|
|
79
|
+
["validation", control.validation],
|
|
80
|
+
["default_value", control.default_value],
|
|
81
|
+
["interaction", control.interaction],
|
|
82
|
+
["navigation_result", control.navigation_result],
|
|
72
83
|
["loading", control.loading_state],
|
|
73
84
|
["empty", control.empty_state],
|
|
74
85
|
["success", control.success_state],
|
|
75
86
|
["failure", control.failure_state],
|
|
87
|
+
["recovery", control.recovery],
|
|
88
|
+
["permission", control.permission],
|
|
76
89
|
["feedback", control.feedback],
|
|
90
|
+
["accessibility", control.accessibility],
|
|
77
91
|
])
|
|
78
92
|
if (value.trim())
|
|
79
93
|
result.set(`${outcome.key}.control.${control.key}.${field}`, value);
|
|
@@ -130,14 +144,28 @@ function flattenProductSemantics(projection) {
|
|
|
130
144
|
}
|
|
131
145
|
for (const control of outcome.controls)
|
|
132
146
|
for (const field of [
|
|
147
|
+
"surface",
|
|
148
|
+
"region",
|
|
133
149
|
"location",
|
|
150
|
+
"control_type",
|
|
151
|
+
"label_content",
|
|
152
|
+
"user_task",
|
|
153
|
+
"visibility",
|
|
154
|
+
"availability",
|
|
134
155
|
"trigger",
|
|
135
156
|
"input",
|
|
157
|
+
"validation",
|
|
158
|
+
"default_value",
|
|
159
|
+
"interaction",
|
|
160
|
+
"navigation_result",
|
|
136
161
|
"loading_state",
|
|
137
162
|
"empty_state",
|
|
138
163
|
"success_state",
|
|
139
164
|
"failure_state",
|
|
165
|
+
"recovery",
|
|
166
|
+
"permission",
|
|
140
167
|
"feedback",
|
|
168
|
+
"accessibility",
|
|
141
169
|
])
|
|
142
170
|
fields.set(`${prefix}.controls.${control.key}.${field}`, control[field]);
|
|
143
171
|
for (const item of outcome.non_completing_outcomes)
|
|
@@ -54,14 +54,28 @@ export function projectProductSemantics(contract) {
|
|
|
54
54
|
})),
|
|
55
55
|
controls: [...outcome.product.controls].sort(keyOrder).map((control) => ({
|
|
56
56
|
key: control.key,
|
|
57
|
+
surface: control.surface,
|
|
58
|
+
region: control.region,
|
|
57
59
|
location: control.location,
|
|
60
|
+
control_type: control.control_type,
|
|
61
|
+
label_content: control.label_content,
|
|
62
|
+
user_task: control.user_task,
|
|
63
|
+
visibility: control.visibility,
|
|
64
|
+
availability: control.availability,
|
|
58
65
|
trigger: control.trigger,
|
|
59
66
|
input: control.input,
|
|
67
|
+
validation: control.validation,
|
|
68
|
+
default_value: control.default_value,
|
|
69
|
+
interaction: control.interaction,
|
|
70
|
+
navigation_result: control.navigation_result,
|
|
60
71
|
loading_state: control.loading_state,
|
|
61
72
|
empty_state: control.empty_state,
|
|
62
73
|
success_state: control.success_state,
|
|
63
74
|
failure_state: control.failure_state,
|
|
75
|
+
recovery: control.recovery,
|
|
76
|
+
permission: control.permission,
|
|
64
77
|
feedback: control.feedback,
|
|
78
|
+
accessibility: control.accessibility,
|
|
65
79
|
})),
|
|
66
80
|
non_completing_outcomes: keyedStatements(outcome.product.non_completing_outcomes),
|
|
67
81
|
})),
|
|
@@ -79,14 +79,28 @@ export declare const AUTHORITY_FIELD_POLICY_REGISTRIES: {
|
|
|
79
79
|
};
|
|
80
80
|
readonly control: {
|
|
81
81
|
key: "identity";
|
|
82
|
+
surface: "semantic_user_review";
|
|
83
|
+
region: "semantic_user_review";
|
|
82
84
|
location: "semantic_user_review";
|
|
85
|
+
control_type: "semantic_user_review";
|
|
86
|
+
label_content: "semantic_user_review";
|
|
87
|
+
user_task: "semantic_user_review";
|
|
88
|
+
visibility: "semantic_user_review";
|
|
89
|
+
availability: "semantic_user_review";
|
|
83
90
|
trigger: "semantic_user_review";
|
|
84
91
|
input: "semantic_user_review";
|
|
92
|
+
validation: "semantic_user_review";
|
|
93
|
+
default_value: "semantic_user_review";
|
|
94
|
+
interaction: "semantic_user_review";
|
|
95
|
+
navigation_result: "semantic_user_review";
|
|
85
96
|
loading_state: "semantic_user_review";
|
|
86
97
|
empty_state: "semantic_user_review";
|
|
87
98
|
success_state: "semantic_user_review";
|
|
88
99
|
failure_state: "semantic_user_review";
|
|
100
|
+
recovery: "semantic_user_review";
|
|
101
|
+
permission: "semantic_user_review";
|
|
89
102
|
feedback: "semantic_user_review";
|
|
103
|
+
accessibility: "semantic_user_review";
|
|
90
104
|
};
|
|
91
105
|
readonly outcome_technical: {
|
|
92
106
|
obligations: "semantic_user_review";
|
|
@@ -62,14 +62,28 @@ const OWNER_AUTHORITY_POLICY = {
|
|
|
62
62
|
};
|
|
63
63
|
const CONTROL_AUTHORITY_POLICY = {
|
|
64
64
|
key: "identity",
|
|
65
|
+
surface: "semantic_user_review",
|
|
66
|
+
region: "semantic_user_review",
|
|
65
67
|
location: "semantic_user_review",
|
|
68
|
+
control_type: "semantic_user_review",
|
|
69
|
+
label_content: "semantic_user_review",
|
|
70
|
+
user_task: "semantic_user_review",
|
|
71
|
+
visibility: "semantic_user_review",
|
|
72
|
+
availability: "semantic_user_review",
|
|
66
73
|
trigger: "semantic_user_review",
|
|
67
74
|
input: "semantic_user_review",
|
|
75
|
+
validation: "semantic_user_review",
|
|
76
|
+
default_value: "semantic_user_review",
|
|
77
|
+
interaction: "semantic_user_review",
|
|
78
|
+
navigation_result: "semantic_user_review",
|
|
68
79
|
loading_state: "semantic_user_review",
|
|
69
80
|
empty_state: "semantic_user_review",
|
|
70
81
|
success_state: "semantic_user_review",
|
|
71
82
|
failure_state: "semantic_user_review",
|
|
83
|
+
recovery: "semantic_user_review",
|
|
84
|
+
permission: "semantic_user_review",
|
|
72
85
|
feedback: "semantic_user_review",
|
|
86
|
+
accessibility: "semantic_user_review",
|
|
73
87
|
};
|
|
74
88
|
const OUTCOME_TECHNICAL_AUTHORITY_POLICY = {
|
|
75
89
|
obligations: "semantic_user_review",
|
|
@@ -36,14 +36,28 @@ export interface ProductSemanticProjectionV2 {
|
|
|
36
36
|
}>;
|
|
37
37
|
controls: Array<{
|
|
38
38
|
key: string;
|
|
39
|
+
surface: string;
|
|
40
|
+
region: string;
|
|
39
41
|
location: string;
|
|
42
|
+
control_type: string;
|
|
43
|
+
label_content: string;
|
|
44
|
+
user_task: string;
|
|
45
|
+
visibility: string;
|
|
46
|
+
availability: string;
|
|
40
47
|
trigger: string;
|
|
41
48
|
input: string;
|
|
49
|
+
validation: string;
|
|
50
|
+
default_value: string;
|
|
51
|
+
interaction: string;
|
|
52
|
+
navigation_result: string;
|
|
42
53
|
loading_state: string;
|
|
43
54
|
empty_state: string;
|
|
44
55
|
success_state: string;
|
|
45
56
|
failure_state: string;
|
|
57
|
+
recovery: string;
|
|
58
|
+
permission: string;
|
|
46
59
|
feedback: string;
|
|
60
|
+
accessibility: string;
|
|
47
61
|
}>;
|
|
48
62
|
non_completing_outcomes: Array<{
|
|
49
63
|
key: string;
|
|
@@ -5,14 +5,28 @@ export function generateClaims(outcome) {
|
|
|
5
5
|
claims.push(claim(outcome.key, `requirement.${requirement.key}`, "requirement", requirement.required_proof_surfaces));
|
|
6
6
|
for (const control of outcome.product.controls) {
|
|
7
7
|
const fields = [
|
|
8
|
+
["surface", control.surface],
|
|
9
|
+
["region", control.region],
|
|
8
10
|
["location", control.location],
|
|
11
|
+
["control_type", control.control_type],
|
|
12
|
+
["label_content", control.label_content],
|
|
13
|
+
["user_task", control.user_task],
|
|
14
|
+
["visibility", control.visibility],
|
|
15
|
+
["availability", control.availability],
|
|
9
16
|
["trigger", control.trigger],
|
|
10
17
|
["input", control.input],
|
|
18
|
+
["validation", control.validation],
|
|
19
|
+
["default_value", control.default_value],
|
|
20
|
+
["interaction", control.interaction],
|
|
21
|
+
["navigation_result", control.navigation_result],
|
|
11
22
|
["loading", control.loading_state],
|
|
12
23
|
["empty", control.empty_state],
|
|
13
24
|
["success", control.success_state],
|
|
14
25
|
["failure", control.failure_state],
|
|
26
|
+
["recovery", control.recovery],
|
|
27
|
+
["permission", control.permission],
|
|
15
28
|
["feedback", control.feedback],
|
|
29
|
+
["accessibility", control.accessibility],
|
|
16
30
|
];
|
|
17
31
|
for (const [field, value] of fields)
|
|
18
32
|
if (value.trim())
|
|
@@ -102,14 +102,28 @@ export interface DeliveryCheckV2 {
|
|
|
102
102
|
}
|
|
103
103
|
export interface DeliveryControlV2 {
|
|
104
104
|
key: string;
|
|
105
|
+
surface: string;
|
|
106
|
+
region: string;
|
|
105
107
|
location: string;
|
|
108
|
+
control_type: string;
|
|
109
|
+
label_content: string;
|
|
110
|
+
user_task: string;
|
|
111
|
+
visibility: string;
|
|
112
|
+
availability: string;
|
|
106
113
|
trigger: string;
|
|
107
114
|
input: string;
|
|
115
|
+
validation: string;
|
|
116
|
+
default_value: string;
|
|
117
|
+
interaction: string;
|
|
118
|
+
navigation_result: string;
|
|
108
119
|
loading_state: string;
|
|
109
120
|
empty_state: string;
|
|
110
121
|
success_state: string;
|
|
111
122
|
failure_state: string;
|
|
123
|
+
recovery: string;
|
|
124
|
+
permission: string;
|
|
112
125
|
feedback: string;
|
|
126
|
+
accessibility: string;
|
|
113
127
|
}
|
|
114
128
|
interface DeliveryRequirementV2 extends KeyedStatementV2 {
|
|
115
129
|
required_proof_surfaces: ProofSurface[];
|
|
@@ -24,24 +24,52 @@ export function parseControls(value, label) {
|
|
|
24
24
|
return array(value, label).map((item, index) => {
|
|
25
25
|
const itemLabel = `${label}[${index}]`;
|
|
26
26
|
const row = object(item, itemLabel, ["key", "location"], [
|
|
27
|
+
"surface",
|
|
28
|
+
"region",
|
|
29
|
+
"control_type",
|
|
30
|
+
"label_content",
|
|
31
|
+
"user_task",
|
|
32
|
+
"visibility",
|
|
33
|
+
"availability",
|
|
27
34
|
"trigger",
|
|
28
35
|
"input",
|
|
36
|
+
"validation",
|
|
37
|
+
"default_value",
|
|
38
|
+
"interaction",
|
|
39
|
+
"navigation_result",
|
|
29
40
|
"loading_state",
|
|
30
41
|
"empty_state",
|
|
31
42
|
"success_state",
|
|
32
43
|
"failure_state",
|
|
44
|
+
"recovery",
|
|
45
|
+
"permission",
|
|
33
46
|
"feedback",
|
|
47
|
+
"accessibility",
|
|
34
48
|
]);
|
|
35
49
|
return {
|
|
36
50
|
key: key(row.key, `${itemLabel}.key`),
|
|
51
|
+
surface: optionalText(row, "surface", itemLabel),
|
|
52
|
+
region: optionalText(row, "region", itemLabel),
|
|
37
53
|
location: string(row.location, `${itemLabel}.location`),
|
|
54
|
+
control_type: optionalText(row, "control_type", itemLabel),
|
|
55
|
+
label_content: optionalText(row, "label_content", itemLabel),
|
|
56
|
+
user_task: optionalText(row, "user_task", itemLabel),
|
|
57
|
+
visibility: optionalText(row, "visibility", itemLabel),
|
|
58
|
+
availability: optionalText(row, "availability", itemLabel),
|
|
38
59
|
trigger: optionalText(row, "trigger", itemLabel),
|
|
39
60
|
input: optionalText(row, "input", itemLabel),
|
|
61
|
+
validation: optionalText(row, "validation", itemLabel),
|
|
62
|
+
default_value: optionalText(row, "default_value", itemLabel),
|
|
63
|
+
interaction: optionalText(row, "interaction", itemLabel),
|
|
64
|
+
navigation_result: optionalText(row, "navigation_result", itemLabel),
|
|
40
65
|
loading_state: optionalText(row, "loading_state", itemLabel),
|
|
41
66
|
empty_state: optionalText(row, "empty_state", itemLabel),
|
|
42
67
|
success_state: optionalText(row, "success_state", itemLabel),
|
|
43
68
|
failure_state: optionalText(row, "failure_state", itemLabel),
|
|
69
|
+
recovery: optionalText(row, "recovery", itemLabel),
|
|
70
|
+
permission: optionalText(row, "permission", itemLabel),
|
|
44
71
|
feedback: optionalText(row, "feedback", itemLabel),
|
|
72
|
+
accessibility: optionalText(row, "accessibility", itemLabel),
|
|
45
73
|
};
|
|
46
74
|
});
|
|
47
75
|
}
|
|
@@ -59,14 +59,28 @@ function target(ref, kind, text, outcomeKey, scope) {
|
|
|
59
59
|
}
|
|
60
60
|
function controlFields(control) {
|
|
61
61
|
return [
|
|
62
|
+
["surface", control.surface],
|
|
63
|
+
["region", control.region],
|
|
62
64
|
["location", control.location],
|
|
65
|
+
["control_type", control.control_type],
|
|
66
|
+
["label_content", control.label_content],
|
|
67
|
+
["user_task", control.user_task],
|
|
68
|
+
["visibility", control.visibility],
|
|
69
|
+
["availability", control.availability],
|
|
63
70
|
["trigger", control.trigger],
|
|
64
71
|
["input", control.input],
|
|
72
|
+
["validation", control.validation],
|
|
73
|
+
["default_value", control.default_value],
|
|
74
|
+
["interaction", control.interaction],
|
|
75
|
+
["navigation_result", control.navigation_result],
|
|
65
76
|
["loading", control.loading_state],
|
|
66
77
|
["empty", control.empty_state],
|
|
67
78
|
["success", control.success_state],
|
|
68
79
|
["failure", control.failure_state],
|
|
80
|
+
["recovery", control.recovery],
|
|
81
|
+
["permission", control.permission],
|
|
69
82
|
["feedback", control.feedback],
|
|
83
|
+
["accessibility", control.accessibility],
|
|
70
84
|
];
|
|
71
85
|
}
|
|
72
86
|
export function sourceKindForTarget(target) {
|
package/dist/lib/profiles.js
CHANGED
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"type": "object",
|
|
197
197
|
"additionalProperties": false,
|
|
198
198
|
"required": ["key", "location"],
|
|
199
|
-
"properties": { "key": { "$ref": "#/$defs/key" }, "location": { "$ref": "#/$defs/nonEmpty" }, "trigger": { "type": "string", "default": "" }, "input": { "type": "string", "default": "" }, "loading_state": { "type": "string", "default": "" }, "empty_state": { "type": "string", "default": "" }, "success_state": { "type": "string", "default": "" }, "failure_state": { "type": "string", "default": "" }, "feedback": { "type": "string", "default": "" } }
|
|
199
|
+
"properties": { "key": { "$ref": "#/$defs/key" }, "surface": { "type": "string", "default": "" }, "region": { "type": "string", "default": "" }, "location": { "$ref": "#/$defs/nonEmpty" }, "control_type": { "type": "string", "default": "" }, "label_content": { "type": "string", "default": "" }, "user_task": { "type": "string", "default": "" }, "visibility": { "type": "string", "default": "" }, "availability": { "type": "string", "default": "" }, "trigger": { "type": "string", "default": "" }, "input": { "type": "string", "default": "" }, "validation": { "type": "string", "default": "" }, "default_value": { "type": "string", "default": "" }, "interaction": { "type": "string", "default": "" }, "navigation_result": { "type": "string", "default": "" }, "loading_state": { "type": "string", "default": "" }, "empty_state": { "type": "string", "default": "" }, "success_state": { "type": "string", "default": "" }, "failure_state": { "type": "string", "default": "" }, "recovery": { "type": "string", "default": "" }, "permission": { "type": "string", "default": "" }, "feedback": { "type": "string", "default": "" }, "accessibility": { "type": "string", "default": "" } }
|
|
200
200
|
},
|
|
201
201
|
"technical": {
|
|
202
202
|
"type": "object",
|