@tyroneross/build-loop 0.30.3 → 0.35.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.
Files changed (171) hide show
  1. package/.agents/plugins/marketplace.json +2 -2
  2. package/.claude-plugin/marketplace.json +4 -4
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +1 -1
  5. package/AGENTS.md +11 -2
  6. package/README.md +8 -7
  7. package/agents/advisor.md +111 -0
  8. package/agents/alignment-checker.md +11 -0
  9. package/agents/assessment-orchestrator.md +1 -1
  10. package/agents/build-orchestrator.md +28 -33
  11. package/agents/fact-checker.md +1 -1
  12. package/agents/fix-critique.md +1 -1
  13. package/agents/independent-auditor.md +1 -1
  14. package/agents/overfitting-reviewer.md +1 -1
  15. package/agents/plan-critic.md +8 -6
  16. package/agents/promotion-reviewer.md +1 -1
  17. package/agents/retrospective-synthesizer.md +20 -3
  18. package/agents/scope-auditor.md +1 -1
  19. package/agents/security-reviewer.md +1 -1
  20. package/agents/self-improvement-architect.md +1 -1
  21. package/commands/{handoff.md → compose-handoff.md} +4 -4
  22. package/commands/{optimize.md → optimize-run.md} +1 -1
  23. package/commands/{agent-rally-point.md → rally-point.md} +3 -3
  24. package/commands/{research.md → research-run.md} +1 -1
  25. package/commands/setup-memory.md +32 -0
  26. package/commands/{plan-verify.md → verify-plan.md} +1 -1
  27. package/docs/agent-surface-policy.md +38 -20
  28. package/docs/memory-setup.md +19 -14
  29. package/hooks/_resolve_python.sh +28 -0
  30. package/hooks/closeout.sh +58 -0
  31. package/hooks/git/pre-push +69 -6
  32. package/hooks/hooks.json +34 -13
  33. package/hooks/post-push-closeout.sh +73 -0
  34. package/hooks/session-start-closeout.sh +69 -0
  35. package/hooks/session-start-memory.sh +27 -0
  36. package/hooks/session-start-plugin-heal.sh +33 -0
  37. package/hooks/test_closeout.sh +124 -0
  38. package/package.json +7 -4
  39. package/plugin-artifacts/codex/.codex-plugin/plugin.json +41 -0
  40. package/plugin-artifacts/codex/AGENTS.md +507 -0
  41. package/plugin-artifacts/codex/BUILD-ARTIFACT.md +5 -0
  42. package/plugin-artifacts/codex/LICENSE +202 -0
  43. package/plugin-artifacts/codex/README.md +404 -0
  44. package/plugin-artifacts/codex/docs/agent-surface-policy.md +63 -0
  45. package/plugin-artifacts/codex/references/advisor-dispatch-ladder.md +62 -0
  46. package/plugin-artifacts/codex/references/agent-role-taxonomy.md +135 -0
  47. package/plugin-artifacts/codex/references/autonomous-and-per-commit-modes.md +161 -0
  48. package/plugin-artifacts/codex/references/autonomy-config.md +231 -0
  49. package/plugin-artifacts/codex/references/capability-routing.md +182 -0
  50. package/plugin-artifacts/codex/references/codex-subagents.md +106 -0
  51. package/plugin-artifacts/codex/references/coordination-file-template.md +181 -0
  52. package/plugin-artifacts/codex/references/coordination-rules.md +283 -0
  53. package/plugin-artifacts/codex/references/dogfood-reload-checkpoint.md +112 -0
  54. package/plugin-artifacts/codex/references/halt-and-ask-protocol.md +102 -0
  55. package/plugin-artifacts/codex/references/implementer-envelope-schema.md +302 -0
  56. package/plugin-artifacts/codex/references/intent-capability-pack.md +257 -0
  57. package/plugin-artifacts/codex/references/intent-exploration-prompts.md +96 -0
  58. package/plugin-artifacts/codex/references/leadership.md +72 -0
  59. package/plugin-artifacts/codex/references/memory-systems.md +238 -0
  60. package/plugin-artifacts/codex/references/memory.md +299 -0
  61. package/plugin-artifacts/codex/references/model-tier-mapping.md +257 -0
  62. package/plugin-artifacts/codex/references/modular-systems-pack.md +96 -0
  63. package/plugin-artifacts/codex/references/phase-1-assess.md +231 -0
  64. package/plugin-artifacts/codex/references/phase-2-plan.md +78 -0
  65. package/plugin-artifacts/codex/references/phase-3-execute.md +49 -0
  66. package/plugin-artifacts/codex/references/phase-4-review.md +322 -0
  67. package/plugin-artifacts/codex/references/phase-5-iterate.md +71 -0
  68. package/plugin-artifacts/codex/references/phase-6-learn.md +56 -0
  69. package/plugin-artifacts/codex/references/recent-design-structures.md +274 -0
  70. package/plugin-artifacts/codex/references/research-trigger-policy.md +140 -0
  71. package/plugin-artifacts/codex/references/runtime-smoke-triggers.md +42 -0
  72. package/plugin-artifacts/codex/references/self-review.md +234 -0
  73. package/plugin-artifacts/codex/references/single-writer-commit-protocol.md +90 -0
  74. package/plugin-artifacts/codex/references/task-capture-policy.md +68 -0
  75. package/plugin-artifacts/codex/references/ui-io-contract.md +116 -0
  76. package/plugin-artifacts/codex/references/ui-spotcheck-protocol.md +65 -0
  77. package/plugin-artifacts/codex/skills/build-loop/SKILL.md +372 -0
  78. package/plugin-artifacts/codex/skills/build-loop/detect-plugins.mjs +82 -0
  79. package/plugin-artifacts/codex/skills/build-loop/eval-guide.md +65 -0
  80. package/plugin-artifacts/codex/skills/build-loop/fallbacks.md +549 -0
  81. package/plugin-artifacts/codex/skills/build-loop/phases/fact-check.md +42 -0
  82. package/plugin-artifacts/codex/skills/build-loop/phases/ui-validation.md +267 -0
  83. package/plugin-artifacts/codex/skills/build-loop/references/advisor-dispatch-ladder.md +62 -0
  84. package/plugin-artifacts/codex/skills/build-loop/references/apple-native-planning.md +439 -0
  85. package/plugin-artifacts/codex/skills/build-loop/references/autonomous-and-per-commit-modes.md +161 -0
  86. package/plugin-artifacts/codex/skills/build-loop/references/capability-routing.md +182 -0
  87. package/plugin-artifacts/codex/skills/build-loop/references/codex-subagents.md +106 -0
  88. package/plugin-artifacts/codex/skills/build-loop/references/coordination.md +161 -0
  89. package/plugin-artifacts/codex/skills/build-loop/references/correction-aware-capture.md +177 -0
  90. package/plugin-artifacts/codex/skills/build-loop/references/independent-auditor.md +72 -0
  91. package/plugin-artifacts/codex/skills/build-loop/references/intent-capability-pack.md +257 -0
  92. package/plugin-artifacts/codex/skills/build-loop/references/intent-exploration-prompts.md +96 -0
  93. package/plugin-artifacts/codex/skills/build-loop/references/leadership.md +72 -0
  94. package/plugin-artifacts/codex/skills/build-loop/references/memory.md +299 -0
  95. package/plugin-artifacts/codex/skills/build-loop/references/modular-systems-pack.md +96 -0
  96. package/plugin-artifacts/codex/skills/build-loop/references/output-style.md +129 -0
  97. package/plugin-artifacts/codex/skills/build-loop/references/pay-it-forward-arch.md +98 -0
  98. package/plugin-artifacts/codex/skills/build-loop/references/phase-1-assess.md +231 -0
  99. package/plugin-artifacts/codex/skills/build-loop/references/phase-2-plan.md +78 -0
  100. package/plugin-artifacts/codex/skills/build-loop/references/phase-3-execute.md +49 -0
  101. package/plugin-artifacts/codex/skills/build-loop/references/phase-4-review.md +322 -0
  102. package/plugin-artifacts/codex/skills/build-loop/references/phase-5-iterate.md +71 -0
  103. package/plugin-artifacts/codex/skills/build-loop/references/phase-6-learn.md +56 -0
  104. package/plugin-artifacts/codex/skills/build-loop/references/recent-design-structures.md +274 -0
  105. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/ASSESSMENT.md +85 -0
  106. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/STANDALONE_TEST_RUN.md +149 -0
  107. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/01-simple-bugfix.md +32 -0
  108. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/02-ui-build-with-iteration.md +48 -0
  109. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/03-multi-failure-escalation.md +60 -0
  110. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/04-ui-build-ibr-absent.md +51 -0
  111. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/05-refactor-navgator-absent.md +71 -0
  112. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/06-recurring-bug-debugger-absent.md +52 -0
  113. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/trace-comparison.md +202 -0
  114. package/plugin-artifacts/codex/skills/build-loop/references/self-recursive-dev.md +77 -0
  115. package/plugin-artifacts/codex/skills/build-loop/references/self-review.md +234 -0
  116. package/plugin-artifacts/codex/skills/build-loop/references/ui-io-contract.md +116 -0
  117. package/plugin-artifacts/codex/skills/build-loop/scanners/audit-design-rules.mjs +476 -0
  118. package/plugin-artifacts/codex/skills/build-loop/scanners/require-visual-evidence.mjs +239 -0
  119. package/plugin-artifacts/codex/skills/build-loop/templates/backlog-item.md +35 -0
  120. package/plugin-artifacts/codex/skills/build-loop/templates/codex-worker-prompt.md +100 -0
  121. package/plugin-artifacts/codex/skills/build-loop/templates/ui-subagent-prompt.md +179 -0
  122. package/plugin-artifacts/codex/skills/build-loop/templates/ux-fix-plan.md +40 -0
  123. package/scripts/_paths.py +59 -13
  124. package/scripts/build_codex_plugin_artifact.py +314 -0
  125. package/scripts/check_cache_sync.py +1 -1
  126. package/scripts/install_memory.py +11 -3
  127. package/scripts/prune_plugin_cache.py +225 -11
  128. package/scripts/sync_navgator_lessons.py +25 -0
  129. package/scripts/sync_plugin_cache.py +66 -36
  130. package/skills/agent-rally-point/SKILL.md +1 -1
  131. package/skills/agent-rally-watcher/SKILL.md +1 -1
  132. package/skills/build-loop/SKILL.md +11 -155
  133. package/skills/build-loop/references/advisor-dispatch-ladder.md +62 -0
  134. package/skills/build-loop/references/autonomous-and-per-commit-modes.md +161 -0
  135. package/skills/build-loop/references/capability-routing.md +4 -3
  136. package/skills/build-loop/references/codex-subagents.md +8 -0
  137. package/skills/build-loop/references/coordination.md +1 -1
  138. package/skills/build-loop/references/intent-capability-pack.md +88 -1
  139. package/skills/build-loop/references/memory.md +17 -2
  140. package/skills/build-loop/references/phase-1-assess.md +13 -0
  141. package/skills/build-loop/references/phase-2-plan.md +2 -1
  142. package/skills/build-loop/references/phase-3-execute.md +4 -2
  143. package/skills/build-loop/references/phase-4-review.md +12 -0
  144. package/skills/build-loop/references/phase-6-learn.md +1 -1
  145. package/skills/build-loop/references/self-review.md +4 -2
  146. package/skills/build-loop/templates/codex-worker-prompt.md +45 -34
  147. package/skills/handoff/SKILL.md +3 -3
  148. package/skills/loop-builder/SKILL.md +98 -0
  149. package/skills/loop-builder/presets/active-project-evidence.yaml +97 -0
  150. package/skills/loop-builder/presets/generic-artifact-loop.yaml +95 -0
  151. package/skills/loop-builder/presets/presentation-audit.yaml +96 -0
  152. package/skills/loop-builder/presets/research-synthesis.yaml +96 -0
  153. package/skills/loop-builder/presets/source-ingestion-raw-data-audit.yaml +96 -0
  154. package/skills/loop-builder/references/spec-format.md +80 -0
  155. package/skills/loop-builder/scripts/loop_builder.py +346 -0
  156. package/skills/model-tiering/SKILL.md +65 -40
  157. package/skills/optimize/SKILL.md +2 -2
  158. package/skills/plan-verify/SKILL.md +1 -1
  159. package/skills/plugin-builder/references/distribution.md +8 -0
  160. package/skills/research/SKILL.md +33 -6
  161. package/skills/runtime-parity-verification/SKILL.md +51 -0
  162. package/skills/spec-writing/SKILL.md +19 -0
  163. package/templates/memory/README.md +65 -0
  164. package/templates/memory/charter.md.template +46 -0
  165. package/templates/memory/manifest.json +24 -4
  166. package/codex-skills/debug-loop/SKILL.md +0 -18
  167. package/codex-skills/handoff/SKILL.md +0 -22
  168. package/codex-skills/knowledge/SKILL.md +0 -21
  169. package/codex-skills/optimize/SKILL.md +0 -18
  170. package/codex-skills/research/SKILL.md +0 -18
  171. /package/commands/{knowledge-review.md → review-knowledge.md} +0 -0
@@ -0,0 +1,274 @@
1
+ <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
2
+
3
+ # Recent Design Structures
4
+
5
+ Runtime reference for `design-contract-specialist` when choosing UI design direction. This file is a compact structure library, not a style mandate.
6
+
7
+ ## Use Rule
8
+
9
+ Pick the structure that fits the current product job, workflow frequency, information density, data shape, platform, and risk. Do not apply a structure because it is recent, rated well, visually attractive, or available in this file.
10
+
11
+ Every Phase 2 `## Design Direction` should record:
12
+
13
+ 1. `selected_structure`
14
+ 2. `why_it_fits`
15
+ 3. `rejected_structure`
16
+ 4. `why_rejected`
17
+ 5. `source_refs`
18
+ 6. `validation_implications`
19
+
20
+ ## Selection Axes
21
+
22
+ Classify the surface before choosing structure:
23
+
24
+ | Axis | Questions |
25
+ |---|---|
26
+ | Product job | Is the user operating, deciding, conversing, building, analyzing, configuring, recovering, or learning? |
27
+ | Workflow frequency | Is this a repeated work surface, a one-time onboarding path, or an occasional settings/detail surface? |
28
+ | Data shape | Is the core object a message, list, table, step sequence, chart, document, graph, timeline, or media artifact? |
29
+ | Density | Does the user need scan, compare, decide, or deeply read? |
30
+ | Platform | Web desktop, mobile web, native iOS, macOS, watchOS, or cross-platform? |
31
+ | Risk | Could a wrong click, fake affordance, hidden source, or misleading chart cause harm? |
32
+
33
+ ## Structures
34
+
35
+ ### 1. Conversational Command Surface
36
+
37
+ Use when the product starts from user intent in natural language but must produce a concrete artifact, decision, skill, or task output.
38
+
39
+ Structure:
40
+ - Header with product identity and one primary action.
41
+ - Two-lane layout: conversation/input lane plus outcome/status lane.
42
+ - Composer is prominent but not the whole product when outputs matter.
43
+ - Suggested prompts are subordinate; they are accelerators, not competing primary actions.
44
+ - Output cards show concrete value, feasibility, or next step.
45
+
46
+ Good fit:
47
+ - AI assistants that build artifacts.
48
+ - Intake-to-plan flows.
49
+ - "Tell me the problem, then ship the output" products.
50
+
51
+ Reject when:
52
+ - The user primarily monitors many standing objects.
53
+ - The user needs direct table/list management more than conversation.
54
+
55
+ Recent refs:
56
+ - `UI Guidance/mockups/evaluation-workbench--v2-01-sunrise-hero.html`
57
+ - `UI Guidance/mockups/evaluation-workbench--v2-02-electric-mint.html`
58
+ - `UI Guidance/mockups/evaluation-workbench--v2-05-bloom-organic.html`
59
+
60
+ ### 2. Bento Operating Dashboard
61
+
62
+ Use when the product is a repeated home base with multiple live objects, one central creation/ask action, and several scannable operational tiles.
63
+
64
+ Structure:
65
+ - Hero ask/action tile dominates.
66
+ - Secondary tiles show ledger, active objects, queue, and quick decisions.
67
+ - Use a 12-column grid on desktop; cards span according to importance.
68
+ - Keep the chat/action as one tile, not the whole app.
69
+ - The dashboard should answer: what is active, what changed, what is next, what can I do now?
70
+
71
+ Good fit:
72
+ - Personal operating systems.
73
+ - Product home screens where the user returns often.
74
+ - Workflow dashboards with useful standing state.
75
+
76
+ Reject when:
77
+ - The user has one linear task.
78
+ - The product has no real standing data.
79
+
80
+ Recent refs:
81
+ - `UI Guidance/mockups/evaluation-workbench--v2-04-bento-dashboard.html` (rated yay)
82
+
83
+ ### 3. Pipeline Wizard
84
+
85
+ Use when a multi-step process needs visible progress, traceable decisions, and contextual input for each step.
86
+
87
+ Structure:
88
+ - Top stepper with 3-5 named steps.
89
+ - Current step panel owns the main content.
90
+ - Contextual chat/input lives beside or below the current step.
91
+ - Each step exposes criteria, intermediate output, and next action.
92
+ - Final step produces a concrete artifact or decision.
93
+
94
+ Good fit:
95
+ - MCDA, evaluation, diagnosis, onboarding, build pipelines.
96
+ - Workflows where the user should understand why the next step exists.
97
+
98
+ Reject when:
99
+ - Steps are decorative or could be one form.
100
+ - The user needs fast repeated scanning instead of guidance.
101
+
102
+ Recent refs:
103
+ - `UI Guidance/mockups/evaluation-workbench--v2-03-pipeline-wizard.html`
104
+
105
+ ### 4. Outcome Ledger List
106
+
107
+ Use when the user needs to scan a collection of prior decisions, jobs, skills, or outcomes and understand value quickly.
108
+
109
+ Structure:
110
+ - Summary/ledger hero at top.
111
+ - Filter chips directly below the hero.
112
+ - List cards include title, category/status, primary outcome metric, and next affordance.
113
+ - Rows must be scannable in about 2 seconds.
114
+ - Empty state preserves layout height and names what will appear.
115
+
116
+ Good fit:
117
+ - Decision history, saved automations, skill libraries, task queues, project ledgers.
118
+
119
+ Reject when:
120
+ - The collection has no reliable outcome metric.
121
+ - Detail reading is more important than list scanning.
122
+
123
+ Recent refs:
124
+ - `UI Guidance/mockups/evaluation-workbench--v2-06-decisions-list-fun.html`
125
+
126
+ ### 5. Pyramid Detail Page
127
+
128
+ Use when a detail view must replace a wall of text with a decision-first hierarchy.
129
+
130
+ Structure:
131
+ - Hero states the primary outcome in plain language.
132
+ - Three MECE supporting cards explain why.
133
+ - This-week/current-impact section makes near-term value concrete.
134
+ - Paired paths section shows viable alternatives without nudging.
135
+ - MCDA/math/provenance sit under disclosure.
136
+ - Keep no more than 5 major chunks visible at once.
137
+
138
+ Good fit:
139
+ - Decision details, recommendation details, audit explanations, strategy outputs.
140
+
141
+ Reject when:
142
+ - The user needs raw source review as the primary job.
143
+ - There is no actual decision, outcome, or rationale to explain.
144
+
145
+ Recent refs:
146
+ - `UI Guidance/mockups/evaluation-workbench--v2-07-detail-fun.html`
147
+
148
+ ### 6. Glass Workspace
149
+
150
+ Use for data-rich professional tools where the user manages structured information and needs craft without losing density.
151
+
152
+ Structure:
153
+ - Sidebar or stable navigation when object count is high.
154
+ - Left-border accent as category/status signal.
155
+ - Source dot plus text metadata, not separate badge clutter.
156
+ - Card grid uses `repeat(auto-fill, minmax(300-320px, 1fr))` at desktop.
157
+ - Optional third detail pane at 280-320px for focused review.
158
+
159
+ Good fit:
160
+ - Developer tools, knowledge bases, dashboards, pipeline monitors.
161
+
162
+ Reject when:
163
+ - The surface is mobile-first, reading-heavy, or calm/clinical.
164
+ - Glass effects would reduce contrast or obscure content.
165
+
166
+ Recent refs:
167
+ - `UI Guidance/cross-platform-design-patterns.md`
168
+ - `UI Guidance/aurora-deep.md`
169
+ - `UI Guidance/aurora-glass.md`
170
+
171
+ ### 7. Warm Craft Workbench
172
+
173
+ Use for reflective writing, document work, knowledge organization, or human-feeling tools where warmth helps trust and comprehension.
174
+
175
+ Structure:
176
+ - Warm neutral base with restrained amber/coral accents.
177
+ - Left accent bar connects cards, navigation, and section headers.
178
+ - Sectioned sidebar or grouped content blocks.
179
+ - Generous but structured spacing.
180
+ - Texture is enhancement only; content structure must work without it.
181
+
182
+ Good fit:
183
+ - Writing tools, personal knowledge systems, review surfaces, human-in-the-loop planning.
184
+
185
+ Reject when:
186
+ - The user needs dense operational monitoring.
187
+ - Warm palette could make risk, status, or urgency ambiguous.
188
+
189
+ Recent refs:
190
+ - `UI Guidance/warm-craft.md`
191
+ - `UI Guidance/cross-platform-design-patterns.md`
192
+
193
+ ### 8. Data Narrative
194
+
195
+ Use when the UI presents research, trends, news, benchmarks, or evidence and needs to tell the user what matters before showing the raw data.
196
+
197
+ Structure:
198
+ - Decision-first title or subtitle above every chart.
199
+ - Dark atmospheric hero is allowed only when it introduces the domain; dense content should move to a readable light or neutral area.
200
+ - Bento/grid sections can organize evidence, but every chart needs a reason to exist.
201
+ - Source attribution is visible near the chart or section.
202
+
203
+ Good fit:
204
+ - Market research, briefing, analytics, trend reporting, intelligence products.
205
+
206
+ Reject when:
207
+ - The data is too sparse or unreliable.
208
+ - A sentence would communicate the answer better than a chart.
209
+
210
+ Recent refs:
211
+ - `UI Guidance/data-visualization-patterns.md`
212
+ - `UI Guidance/cross-platform-design-patterns.md`
213
+
214
+ ### 9. Native Mobile Action System
215
+
216
+ Use for native or mobile-web surfaces where touch certainty, safe areas, and progressive disclosure matter more than desktop density.
217
+
218
+ Structure:
219
+ - One hero CTA per home screen.
220
+ - Touch targets: 44pt/px minimum; primary capture actions can be larger.
221
+ - Every mobile-web touchable has a visible resting container; do not rely on hover/cursor.
222
+ - Expandable cards beat sheets/modals when comparison and context retention matter.
223
+ - Design tokens cover colors, radius, elevation, and typography; raw numbers are exceptions.
224
+ - Haptics, button spring physics, and elevation communicate action feedback on native platforms.
225
+ - Liquid Glass belongs on navigation-layer controls only, availability-gated for iOS 26+, not stacked on content cards.
226
+
227
+ Good fit:
228
+ - Native iOS/macOS companion apps, mobile web tools, timer/voice/drill/session surfaces.
229
+
230
+ Reject when:
231
+ - The app is desktop-primary and comparison density is the core job.
232
+ - Touch affordance choices would add visual noise to a pointer-first surface.
233
+
234
+ Recent refs:
235
+ - `interface-built-right/mobile-ui/patterns/expandable-card-pattern.md`
236
+ - `interface-built-right/mobile-ui/patterns/design-token-architecture.md`
237
+ - `interface-built-right/mobile-ui/patterns/liquid-glass-ios26.md`
238
+ - `interface-built-right/mobile-ui/lessons/mobile-web-action-affordance.md`
239
+ - `interface-built-right/mobile-ui/lessons/home-screen-simplification.md`
240
+
241
+ ### 10. AI Artifact Canvas
242
+
243
+ Use when the user is generating or editing a durable artifact, not just receiving a chat answer.
244
+
245
+ Structure:
246
+ - Split input/control lane from artifact canvas.
247
+ - Artifact gets stable identity, autosave, status, and version/undo affordance.
248
+ - Regeneration is scoped per section/block when possible.
249
+ - Loading states preserve layout and show phase, not generic spinners.
250
+ - Source/citation/provenance spine stays visible when claims matter.
251
+
252
+ Good fit:
253
+ - Document generation, research briefs, reports, code/spec generation, design drafts.
254
+
255
+ Reject when:
256
+ - Output is disposable or single-turn.
257
+ - The product has no artifact lifecycle.
258
+
259
+ Recent refs:
260
+ - UI-guidance memory family: AI-generation UX additions, source-grounded trust, semantic zoom.
261
+
262
+ ## Cross-Cutting Rules
263
+
264
+ - Typography and text hierarchy come before surface treatment.
265
+ - Color tokens come before gradients, shadows, texture, or glass.
266
+ - Left-border accents are useful categorical structure, but not mandatory on every product.
267
+ - Status should not be a decorative pill by default; use text, weight, and placement unless a platform/system component requires a badge.
268
+ - Charts require a confidence gate: at least 3 comparable points, trustworthy source, and a pattern/comparison/trend that text alone would not communicate as well.
269
+ - Motion is final polish and must respect reduced-motion settings.
270
+ - Empty, loading, error, disabled, success, permission, and overflow states are part of the structure, not afterthoughts.
271
+
272
+ ## Long-Term Memory Boundary
273
+
274
+ This file is the short-horizon runtime reference. Durable cross-project lessons, rating history, and changes over time live in `build-loop-memory`, especially decisions under `decisions/build-loop/`. Update build-loop-memory when a new structure is repeatedly used, explicitly selected/rejected, or materially changes build-loop's design-selection policy.
@@ -0,0 +1,140 @@
1
+ <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
2
+
3
+ # Research Trigger Policy
4
+
5
+ Build-loop uses Research deliberately when a task depends on current,
6
+ external, novel, reusable, or decision-grade information. The classifier of
7
+ record is:
8
+
9
+ ```bash
10
+ python3 scripts/research_trigger.py \
11
+ --workdir "$PWD" \
12
+ --task "<goal text>" \
13
+ --effort "<XS|S|M|L|XL>" \
14
+ --cache-into-state \
15
+ --json
16
+ ```
17
+
18
+ The output is written to `.build-loop/state.json.researchGate` when
19
+ `--cache-into-state` is passed.
20
+
21
+ ## When It Fires
22
+
23
+ Run the classifier during Phase 1 Assess, after memory load and before the
24
+ plan is accepted. Research is required when the task includes any of these
25
+ signals:
26
+
27
+ - Explicit research language: research, investigate, evaluate, compare, latest,
28
+ current, look up, should I, recommendation.
29
+ - A new API, provider, package, model, framework, standard, deployment target,
30
+ database, webhook, auth provider, or external service.
31
+ - Current external claims: versions, pricing, release notes, deprecations,
32
+ laws/regulations/standards, official-doc behavior.
33
+ - Architecture boundary decisions where prior art matters: persistence,
34
+ protocol, schema, deployment, security, memory/retrieval, Rally, plugin/hook,
35
+ or cross-layer behavior.
36
+ - Reusable findings that should become a packet in `.build-loop/research/` or
37
+ durable memory.
38
+
39
+ No trigger means no Research plugin run by default. A large T-shirt size alone
40
+ does not make a local mechanical edit research-worthy.
41
+
42
+ ## Source tiering & claim verification
43
+
44
+ When a packet makes external claims, the host LLM tiers its sources and grades
45
+ corroboration before stating anything as fact — self-contained, no external
46
+ tool required. The rubric lives with packet generation in
47
+ `skills/research/SKILL.md` § Confidence: tier each source T1–T4, classify each
48
+ claim's corroboration (✅ ≥2 independent T1/T2 · ⚠️ one T1/T2 or T3/T4-only ·
49
+ ❓ single/T4/inferred), and never let a claim's confidence exceed its
50
+ corroboration. High-risk and `max_accuracy` packets decompose claims into
51
+ atomic facts and verify each before stating it. This is the cite-or-block rule
52
+ below applied claim-by-claim.
53
+
54
+ ## Depth Rules
55
+
56
+ The Research plugin's own depth classifier remains authoritative when
57
+ available. `research_trigger.py` is the deterministic lower-bound and state
58
+ contract for the orchestrator.
59
+
60
+ | Effort | Default if a trigger fires | Memory recall depth |
61
+ |---|---|---|
62
+ | `XS` | `light` | compact |
63
+ | `S` | `light`, or `standard` for current/external work | focused |
64
+ | `M` | `standard` | standard |
65
+ | `L` | `standard`; `deep` for architecture/decision-grade work | deep |
66
+ | `XL` | `standard`; `deep` for architecture/decision-grade work | deep |
67
+
68
+ Risk and currentness override effort. Security, auth, privacy, payment,
69
+ billing, compliance, legal, medical, finance, production, and deep/thorough
70
+ user wording escalate to `deep` unless the work is explicitly scoped to a
71
+ local mechanical check.
72
+
73
+ Depth maps to build-loop research modes:
74
+
75
+ | Depth | Research mode | Expected output |
76
+ |---|---|---|
77
+ | `light` | `quick` | Local/source-of-truth scan; 0-2 sources; persist only if reusable |
78
+ | `standard` | `balanced` | Local plus official docs/web as needed; 2-5 sources; packet path required |
79
+ | `deep` | `max_accuracy` | Decision-grade multi-source work; 4-10 sources; persist by default |
80
+
81
+ ## Enforcement
82
+
83
+ If `researchGate.blocks_final_claims == true` or
84
+ `researchGate.requires_citations_or_unavailable_note == true`, the final report
85
+ must not state current/external/API/package claims as facts until one of these
86
+ is true:
87
+
88
+ - The report cites the research packet and the packet cites source paths/URLs.
89
+ - The report says the current/external evidence was unavailable and labels the
90
+ claim as unverified.
91
+ - The claim is removed from the final report.
92
+
93
+ If `researchGate.packet_path` is non-null, Phase 2 records it in the plan under
94
+ `## Research Context`, and Phase 4-G cites whether it was created, reused, or
95
+ explicitly skipped with rationale.
96
+
97
+ ## Reference Capture (default-on corpus)
98
+
99
+ Whenever build-loop fetches external information **in any phase or mode** —
100
+ WebSearch, WebFetch, Context7, api-registry, or an official-docs read — and that
101
+ information **informs a decision in the run**, capture the EXTRACTED findings as a
102
+ dated reference file. This is not gated to research-run mode; it fires in normal
103
+ build/fix/refactor runs the moment a web/doc fetch feeds a decision.
104
+
105
+ Capture is routed through the canonical memory writer, never an ad-hoc Write:
106
+
107
+ ```bash
108
+ python3 scripts/reference_capture.py capture \
109
+ --workdir "$PWD" --run-id "$RUN_ID" \
110
+ --topic "<short topic>" \
111
+ --findings "<distilled findings — not raw HTML>" \
112
+ --source "<url>|<T1|T2|T3|T4>" \
113
+ --decision "<what this informed>" --json
114
+ ```
115
+
116
+ This writes `<YYYY-MM-DD>-reference-<slug>.md` into the central store's
117
+ project `research` lane with `retrieved_at`, a per-content-class `refresh_after`
118
+ horizon (api-docs/pricing age in days; ecosystem surveys hold for a quarter;
119
+ specs for half a year), `content_class`, `source_urls` (each tier-tagged), and
120
+ `informed_decision`. The store stays uncommitted by default — the corpus grows
121
+ without touching the consumer repo's git.
122
+
123
+ **When to capture (do, not ask):**
124
+
125
+ - A `researchGate.research_required == true` run that actually consulted an
126
+ external source → capture each distinct finding that fed a decision.
127
+ - Any phase that ran WebSearch/WebFetch/Context7/api-registry and used the result
128
+ (method signature, pricing, version/release fact, library syntax, model ID).
129
+
130
+ **Freshness on read:** `context_bootstrap.py` scans the reference lane at Phase 1
131
+ and flags any reference past its horizon as `stale-needs-refresh` in the agent
132
+ brief (`packet.reference_freshness`). This is advisory — it routes to the run
133
+ report/notes, never an `AskUserQuestion` and never a block. A stale reference is
134
+ a signal to re-fetch when the topic is back in scope, not a gate.
135
+
136
+ **Anti-dormancy:** capture is a default behavior, not a dormant feature. The
137
+ activation test (`scripts/reference_capture/test_reference_capture.py` +
138
+ `scripts/test_context_bootstrap.py::ReferenceFreshnessTests`) proves the default
139
+ path writes a dated reference with the required fields and that the read path
140
+ flags a backdated one as stale.
@@ -0,0 +1,42 @@
1
+ <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
2
+
3
+ # Runtime Smoke Triggers
4
+
5
+ ## What triggers a runtime smoke and why
6
+
7
+ A runtime smoke test fires when a build changes a file that is directly responsible for rendering a user-facing route, handling an API request, or booting a server. The test catches the class of failure that static analysis misses: a component that imports cleanly but throws at mount time, a page that returns HTTP 200 with an Application Error body, or a dev-server that refuses to start after a middleware change. It is placed **after** code-based graders (type-check, lint, unit tests) and **before** LLM judges, so it acts as a cheap binary gate on the most common live-render failure mode.
8
+
9
+ ## Trigger patterns
10
+
11
+ | Pattern | Match | Reason |
12
+ |---|---|---|
13
+ | `app/**/page.{tsx,jsx,ts,js}` | App Router page | Renders to user — verify mount |
14
+ | `app/**/route.{ts,js}` | App Router API handler | Verify handler responds |
15
+ | `pages/**/*.{tsx,jsx,ts,js}` | Pages Router page | Same as App Router page |
16
+ | `app/**/middleware.{ts,js}` and `middleware.{ts,js}` | Routing middleware | Edge runtime; verify no middleware crash |
17
+ | `**/server.{ts,js}` | Custom Express/Fastify/Node server entry | Verify boot |
18
+ | `**/sse-*.{ts,js}` and any file containing `EventSource` or `text/event-stream` | SSE producer/consumer | Verify event taxonomy parses |
19
+ | `app/**/layout.{tsx,jsx,ts,js}` | Layout component | Affects all child routes — verify hydration |
20
+ | Files containing `'use client'` directive on line 1 | Client component | Verify hydration |
21
+
22
+ **Note on content-based patterns**: the `'use client'` and `EventSource`/`text/event-stream` patterns require reading file contents, not just matching paths. The current implementation in `scripts/runtime_smoke.py` handles path-based patterns only; content-based detection is deferred to the adapter layer or a future enhancement.
23
+
24
+ ## Future adapter slots
25
+
26
+ | Adapter | Status | Triggered by | Maintainer notes |
27
+ |---|---|---|---|
28
+ | `nextjs` | shipped | App/Pages Router files, root layout, root middleware | `scripts/runtime_smoke_adapters/nextjs.py` |
29
+ | `sse_consumer` | **shipped 2026-05-09** | `state.json.triggers.runtimeServer == true` AND `runtimeServerInfo.sse_route` non-null AND diff touches `server_module` / `embedded_ui_module` | `scripts/runtime_smoke_adapters/sse_consumer.py`. Implements the 5-step procedure (restart → wait → curl 5s → parse handlers → fail on missing arm). Closes silent-server / ignored-client bug class observed in example-app 2026-05-08. Stack-agnostic — uses `runtimeServerInfo.start_command` if present, else `uv run <package> --serve --port` from pyproject, else `python3 -m <module>`. |
30
+ | `fastapi` | TODO | `app/main.py` with `FastAPI()` import; route decorators (`@app.get`, etc.) | Skip cleanly when uvicorn unavailable; return `status: skipped, reason: uvicorn_not_installed` |
31
+ | `express` | TODO | `package.json` has `express`; `**/server.{ts,js}` pattern | Detect port from server source or default to 3000; verify `/` returns non-5xx |
32
+
33
+ ## When to add an adapter
34
+
35
+ An adapter is worth shipping when all of the following hold:
36
+
37
+ 1. The project stack hits a runtime-smoke trigger at least 3 times across build history (i.e., the gate would have fired repeatedly for this stack).
38
+ 2. The adapter can detect the live-render failure class that static analysis misses for that stack.
39
+ 3. A clean skip path exists for environments where the server tooling is unavailable (no hard failure on missing binaries).
40
+ 4. The user explicitly requests coverage for this stack, OR the build history shows a repeated "tests passed, page broken" failure pattern for it.
41
+
42
+ A new adapter should return `status: skipped` with a descriptive `reason` when its required runtime is missing — it must never return `status: fail` solely because the adapter's own tooling is absent.