@pixel-point/toolcraft 0.0.13 → 0.0.14

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.
@@ -17,22 +17,24 @@ Before planning or editing app code, runtime code, controls, canvas, panels, ren
17
17
 
18
18
  Do not edit implementation files until this preflight is complete.
19
19
 
20
+ Core modules are required reading when listed by the routing table. Read each listed module fully. Do not rely on a truncated terminal excerpt; reopen the specific module or use a narrower range when a tool output is clipped.
21
+
20
22
  ## Task Routing
21
23
 
22
24
  Use the smallest reading set that covers the changed surface. If a task touches multiple surfaces, combine every matching row instead of picking only the closest one.
23
25
 
24
26
  | Task type | Read before editing |
25
27
  | --- | --- |
26
- | App assembly, route structure, generated app porting | `assembly-workflow.md`, `decision-contract.md` |
27
- | Reference app study, audit, or port | `assembly-workflow.md`, `schema-reference.md`, `acceptance-testing.md`, `decision-contract.md` |
28
- | Schema, controls, defaults, persistence, actions | `schema-reference.md`, `component-rules.md`, `acceptance-testing.md` |
29
- | Custom controls | `custom-controls.md`, `component-rules.md`, `acceptance-testing.md` |
30
- | Renderer, canvas output, visual technique | `renderer-technique.md`, `performance.md`, `acceptance-testing.md` |
31
- | Timeline, keyframes, animation transport | `decision-contract.md`, `component-rules.md`, `acceptance-testing.md`, `performance.md` |
32
- | Layers | `decision-contract.md`, `component-rules.md`, `acceptance-testing.md` |
33
- | Export, copy, media, background | `schema-reference.md`, `component-rules.md`, `acceptance-testing.md`, `performance.md` |
34
- | Broken control, visual mismatch, failed build, export bug, performance issue | `decision-contract.md`, the relevant component/runtime doc, and the failing test/log first |
35
- | Figma implementation | Use Figma MCP/design context, then `assembly-workflow.md` and the relevant component docs |
28
+ | App assembly, route structure, generated app porting | `core/runtime-boundary.md`, `assembly-workflow.md`, `decision-contract.md` |
29
+ | Reference app study, audit, or port | `core/reference-study.md`, `core/runtime-boundary.md`, `assembly-workflow.md`, `schema-reference.md`, `acceptance-testing.md`, `decision-contract.md` |
30
+ | Schema, controls, defaults, persistence, actions | `core/control-selection.md`, `core/layout.md`, `schema-reference.md`, `component-rules.md`, `acceptance-testing.md` |
31
+ | Custom controls | `core/control-selection.md`, `core/layout.md`, `custom-controls.md`, `component-rules.md`, `acceptance-testing.md` |
32
+ | Renderer, canvas output, visual technique | `core/runtime-boundary.md`, `core/performance.md`, `renderer-technique.md`, `performance.md`, `acceptance-testing.md` |
33
+ | Timeline, keyframes, animation transport | `core/timeline-animation.md`, `core/performance.md`, `decision-contract.md`, `component-rules.md`, `acceptance-testing.md` |
34
+ | Layers | `core/runtime-boundary.md`, `core/layout.md`, `decision-contract.md`, `component-rules.md`, `acceptance-testing.md` |
35
+ | Export, copy, media, background | `core/setup-export.md`, `core/media-upload.md`, `schema-reference.md`, `component-rules.md`, `acceptance-testing.md`, `performance.md` |
36
+ | Broken control, visual mismatch, failed build, export bug, performance issue | `decision-contract.md`, the relevant `core/*` module, the relevant component/runtime doc, and the failing test/log first |
37
+ | Figma implementation | Use Figma MCP/design context, then `core/reference-study.md`, `core/runtime-boundary.md`, `assembly-workflow.md`, and the relevant component docs |
36
38
 
37
39
  ## Worklog Gate
38
40
 
@@ -19,6 +19,17 @@ const requiredDocs = [
19
19
  "component-rules.md",
20
20
  ];
21
21
 
22
+ const requiredCoreDocs = [
23
+ "core/runtime-boundary.md",
24
+ "core/setup-export.md",
25
+ "core/control-selection.md",
26
+ "core/layout.md",
27
+ "core/media-upload.md",
28
+ "core/timeline-animation.md",
29
+ "core/performance.md",
30
+ "core/reference-study.md",
31
+ ];
32
+
22
33
  const requiredProjectFiles = ["LICENSE.md", "NOTICE.md"];
23
34
 
24
35
  const requiredRuleIds = [
@@ -43,17 +54,21 @@ const requiredRuleIds = [
43
54
  "workflow-required",
44
55
  ];
45
56
 
46
- const requiredAgentsLinks = [
57
+ const requiredAgentsEntryLinks = [
47
58
  "workflow.md",
59
+ "core/",
60
+ ];
61
+
62
+ const requiredWorkflowLinks = [
63
+ ...requiredCoreDocs,
48
64
  "assembly-workflow.md",
49
65
  "decision-contract.md",
50
66
  "schema-reference.md",
67
+ "component-rules.md",
51
68
  "acceptance-testing.md",
52
69
  "performance.md",
53
70
  "renderer-technique.md",
54
- "agent-worklog.md",
55
71
  "custom-controls.md",
56
- "component-rules.md",
57
72
  ];
58
73
 
59
74
  const requiredWorkflowTerms = [
@@ -90,7 +105,7 @@ async function fileExists(relativePath) {
90
105
 
91
106
  const failures = [];
92
107
 
93
- for (const fileName of requiredDocs) {
108
+ for (const fileName of [...requiredDocs, ...requiredCoreDocs]) {
94
109
  const relativePath = `docs/toolcraft/${fileName}`;
95
110
 
96
111
  if (!(await fileExists(relativePath))) {
@@ -118,12 +133,13 @@ for (const ruleId of requiredRuleIds) {
118
133
  }
119
134
  }
120
135
 
121
- for (const fileName of requiredDocs) {
136
+ for (const fileName of [...requiredDocs, ...requiredCoreDocs]) {
122
137
  const source = await readText(`docs/toolcraft/${fileName}`);
123
138
  docsSources.push(source);
124
139
  }
125
140
 
126
141
  const combinedSource = docsSources.join("\n");
142
+ const workflowSource = await readText("docs/toolcraft/workflow.md");
127
143
 
128
144
  for (const pattern of forbiddenTextPatterns) {
129
145
  if (pattern.test(combinedSource)) {
@@ -131,12 +147,18 @@ for (const pattern of forbiddenTextPatterns) {
131
147
  }
132
148
  }
133
149
 
134
- for (const localDoc of requiredAgentsLinks) {
150
+ for (const localDoc of requiredAgentsEntryLinks) {
135
151
  if (!agentsSource.includes(`docs/toolcraft/${localDoc}`)) {
136
152
  failures.push(`AGENTS.md must link docs/toolcraft/${localDoc}`);
137
153
  }
138
154
  }
139
155
 
156
+ for (const localDoc of requiredWorkflowLinks) {
157
+ if (!workflowSource.includes(localDoc)) {
158
+ failures.push(`docs/toolcraft/workflow.md must route to ${localDoc}`);
159
+ }
160
+ }
161
+
140
162
  for (const term of requiredWorkflowTerms) {
141
163
  if (!agentsSource.includes(term)) {
142
164
  failures.push(`AGENTS.md must mention "${term}"`);
@@ -3190,19 +3190,20 @@ describe("Toolcraft template app acceptance coverage", () => {
3190
3190
  });
3191
3191
 
3192
3192
  it("documents control selection inventory and custom built-in fit checks", () => {
3193
- const schemaReference = readToolcraftDoc("schema-reference.md");
3193
+ const coreControlSelection = readToolcraftDoc("core/control-selection.md");
3194
3194
  const componentRules = readToolcraftDoc("component-rules.md");
3195
3195
  const acceptanceTesting = readToolcraftDoc("acceptance-testing.md");
3196
3196
 
3197
- expect(schemaReference).toContain("Control Selection Inventory");
3198
- expect(schemaReference).toContain("Product need:");
3199
- expect(schemaReference).toContain("Candidate built-ins checked:");
3200
- expect(schemaReference).toContain("Rejected alternatives:");
3197
+ expect(coreControlSelection).toContain("Control Selection Inventory");
3198
+ expect(coreControlSelection).toContain("Product need:");
3199
+ expect(coreControlSelection).toContain("Candidate built-ins checked:");
3200
+ expect(coreControlSelection).toContain("Best built-in:");
3201
+ expect(coreControlSelection).toContain("Rejected alternatives:");
3202
+ expect(coreControlSelection).toContain("Target:");
3203
+ expect(coreControlSelection).toContain("Custom Control Gate");
3201
3204
 
3202
3205
  expect(componentRules).toContain("Control Decision Catalog");
3203
- expect(componentRules).toContain("Exact owner");
3204
- expect(componentRules).toContain("Best fit");
3205
- expect(componentRules).toContain("Custom escape hatch");
3206
+ expect(componentRules).toContain("core/control-selection.md");
3206
3207
 
3207
3208
  expect(acceptanceTesting).toContain("wrong-substitution");
3208
3209
  expect(acceptanceTesting).toContain("built-in fit check");