@timurproko/a1 0.1.8-dev.182 → 0.1.8-dev.218

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 (143) hide show
  1. package/bin/cli.js +2 -2
  2. package/bin/sync-pi-tui-proxy.js +1 -1
  3. package/bin/ui.js +1 -1
  4. package/dist/cli/dispatch.js +3 -3
  5. package/dist/cli/packages.js +1 -1
  6. package/dist/cli/version-stats.js +3 -3
  7. package/dist/composition/owned-ui.js +1 -1
  8. package/dist/composition/settings-route-host.js +6 -4
  9. package/dist/features/launch/development-launch.js +1 -1
  10. package/dist/features/owned-ui/customization.d.ts +2 -0
  11. package/dist/features/owned-ui/customization.js +2 -0
  12. package/dist/features/owned-ui/diagnostics.d.ts +1 -0
  13. package/dist/features/owned-ui/diagnostics.js +1 -0
  14. package/dist/features/owned-ui/project-trust-prompt.d.ts +11 -6
  15. package/dist/features/owned-ui/project-trust-prompt.js +134 -17
  16. package/dist/features/owned-ui/settings-app.js +47 -50
  17. package/dist/features/workspace/reducer.d.ts +1 -0
  18. package/dist/features/workspace/reducer.js +1 -0
  19. package/dist/features/workspace/router.d.ts +1 -0
  20. package/dist/features/workspace/router.js +1 -0
  21. package/dist/features/workspace/store.d.ts +1 -0
  22. package/dist/features/workspace/store.js +1 -0
  23. package/dist/foundation/launch-guardian/main.js +1 -1
  24. package/dist/foundation/native-host-protocol/codec.d.ts +2 -0
  25. package/dist/foundation/native-host-protocol/codec.js +2 -0
  26. package/dist/foundation/process-containment/linux-process-inspector.d.ts +1 -0
  27. package/dist/foundation/process-containment/linux-process-inspector.js +1 -0
  28. package/dist/foundation/process-containment/native-guardian-containment.d.ts +1 -0
  29. package/dist/foundation/process-containment/native-guardian-containment.js +1 -0
  30. package/dist/foundation/process-containment/windows-process-inspector.d.ts +1 -0
  31. package/dist/foundation/process-containment/windows-process-inspector.js +1 -0
  32. package/dist/foundation/protocol/client.d.ts +1 -0
  33. package/dist/foundation/protocol/client.js +1 -0
  34. package/dist/foundation/protocol/messages.d.ts +1 -0
  35. package/dist/foundation/protocol/messages.js +1 -0
  36. package/dist/foundation/release/bootstrap.js +6 -6
  37. package/dist/foundation/release/cohort-state.d.ts +1 -0
  38. package/dist/foundation/release/cohort-state.js +1 -0
  39. package/dist/foundation/release/release-gc.js +1 -1
  40. package/dist/foundation/release/release.js +1 -1
  41. package/dist/foundation/release/update-transaction.d.ts +1 -0
  42. package/dist/foundation/release/update-transaction.js +1 -0
  43. package/dist/foundation/release/update.js +12 -12
  44. package/dist/foundation/storage/control-store.d.ts +1 -0
  45. package/dist/foundation/storage/control-store.js +1 -0
  46. package/dist/foundation/structured-agent-runtime/backpressure.d.ts +1 -0
  47. package/dist/foundation/structured-agent-runtime/backpressure.js +1 -0
  48. package/dist/foundation/structured-agent-runtime/commands.d.ts +1 -0
  49. package/dist/foundation/structured-agent-runtime/commands.js +1 -0
  50. package/dist/foundation/structured-agent-runtime/reconnection.d.ts +1 -0
  51. package/dist/foundation/structured-agent-runtime/reconnection.js +1 -0
  52. package/dist/foundation/structured-agent-runtime/state.d.ts +1 -0
  53. package/dist/foundation/structured-agent-runtime/state.js +1 -0
  54. package/dist/foundation/supervision/main.js +1 -1
  55. package/dist/foundation/supervision/server.d.ts +1 -0
  56. package/dist/foundation/supervision/server.js +4 -6
  57. package/dist/integrations/pi/components/conformance.d.ts +1 -0
  58. package/dist/integrations/pi/components/conformance.js +1 -0
  59. package/dist/integrations/pi/components/shell-footer-status.d.ts +1 -1
  60. package/dist/integrations/pi/components/shell-footer-status.js +8 -7
  61. package/dist/integrations/pi/components/shell-shared-facade.js +1 -1
  62. package/dist/integrations/pi/engine/adapter.d.ts +7 -0
  63. package/dist/integrations/pi/engine/adapter.js +37 -35
  64. package/dist/integrations/pi/engine/conformance.d.ts +2 -0
  65. package/dist/integrations/pi/engine/conformance.js +2 -0
  66. package/dist/integrations/pi/engine/http-dispatcher.js +1 -1
  67. package/dist/integrations/pi/engine/model-auth-integration.d.ts +1 -0
  68. package/dist/integrations/pi/engine/model-auth-integration.js +1 -0
  69. package/dist/integrations/pi/engine/package-integration.js +1 -1
  70. package/dist/integrations/pi/engine/project-trust-preflight.js +1 -1
  71. package/dist/integrations/pi/engine/resource-extension-integration.d.ts +1 -0
  72. package/dist/integrations/pi/engine/resource-extension-integration.js +1 -0
  73. package/dist/integrations/pi/engine/session-integration.d.ts +1 -0
  74. package/dist/integrations/pi/engine/session-integration.js +2 -1
  75. package/dist/integrations/pi/engine/settings-effects.d.ts +13 -2
  76. package/dist/integrations/pi/engine/settings-effects.js +62 -42
  77. package/dist/integrations/pi/engine/settings-integration.js +4 -4
  78. package/dist/integrations/pi/engine/workflow-controllers.d.ts +1 -0
  79. package/dist/integrations/pi/engine/workflow-controllers.js +1 -0
  80. package/dist/integrations/pi/session-ui/index.d.ts +1 -0
  81. package/dist/integrations/pi/session-ui/index.js +1 -0
  82. package/dist/integrations/pi/session-ui/prompt-chips.js +1 -1
  83. package/dist/integrations/pi/session-ui/session-shell-root.d.ts +30 -2
  84. package/dist/integrations/pi/session-ui/session-shell-root.js +133 -72
  85. package/dist/integrations/pi/session-ui/session-shell.d.ts +9 -2
  86. package/dist/integrations/pi/session-ui/session-shell.js +112 -37
  87. package/dist/integrations/pi/session-ui/session-viewport-controller.d.ts +5 -0
  88. package/dist/integrations/pi/session-ui/session-viewport-controller.js +44 -11
  89. package/dist/integrations/pi/session-ui/stream-presentation-coalescer.d.ts +29 -0
  90. package/dist/integrations/pi/session-ui/stream-presentation-coalescer.js +79 -0
  91. package/dist/integrations/pi/session-ui/system-clipboard.js +6 -6
  92. package/dist/integrations/pi/tui-runtime/adapter.d.ts +2 -0
  93. package/dist/integrations/pi/tui-runtime/adapter.js +138 -8
  94. package/dist/integrations/pi/tui-runtime/contracts.d.ts +25 -0
  95. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +63 -0
  96. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +240 -0
  97. package/dist/integrations/pi/tui-runtime/index.d.ts +2 -0
  98. package/dist/integrations/pi/tui-runtime/index.js +2 -0
  99. package/dist/integrations/pi/tui-runtime/input-presentation-coordinator.d.ts +39 -0
  100. package/dist/integrations/pi/tui-runtime/input-presentation-coordinator.js +139 -0
  101. package/dist/native/darwin-arm64/manifest.json +3 -3
  102. package/dist/native/darwin-arm64/process-guardian +0 -0
  103. package/dist/native/linux-x64/manifest.json +1 -1
  104. package/dist/native/win32-x64/manifest.json +2 -2
  105. package/dist/native/win32-x64/process-guardian.exe +0 -0
  106. package/dist/ui/apps/host.js +5 -9
  107. package/dist/ui/apps/registry.d.ts +1 -0
  108. package/dist/ui/apps/registry.js +1 -0
  109. package/dist/ui/components/dialog-panel.js +5 -3
  110. package/dist/ui/components/frame.d.ts +1 -0
  111. package/dist/ui/components/frame.js +1 -0
  112. package/dist/ui/components/index.d.ts +1 -0
  113. package/dist/ui/components/index.js +1 -0
  114. package/dist/ui/components/line-input.d.ts +1 -6
  115. package/dist/ui/components/line-input.js +4 -9
  116. package/dist/ui/components/list-view.d.ts +0 -6
  117. package/dist/ui/components/list-view.js +14 -7
  118. package/dist/ui/components/progress-status.d.ts +2 -0
  119. package/dist/ui/components/progress-status.js +4 -0
  120. package/dist/ui/components/scrollbar.js +1 -1
  121. package/dist/ui/components/shortcuts.d.ts +1 -0
  122. package/dist/ui/components/shortcuts.js +1 -0
  123. package/dist/ui/components/spans.d.ts +0 -5
  124. package/dist/ui/components/spans.js +3 -8
  125. package/dist/ui/components/surface.d.ts +0 -5
  126. package/dist/ui/components/surface.js +1 -5
  127. package/dist/ui/components/text-selection.d.ts +10 -1
  128. package/dist/ui/components/text-selection.js +96 -29
  129. package/dist/ui/components/text.js +3 -3
  130. package/dist/ui/components/transcript-viewport.d.ts +42 -0
  131. package/dist/ui/components/transcript-viewport.js +287 -39
  132. package/dist/ui/settings/sections.d.ts +0 -2
  133. package/dist/ui/settings/sections.js +10 -16
  134. package/dist/ui/settings/session.js +5 -4
  135. package/dist/ui/settings/store.d.ts +1 -0
  136. package/dist/ui/settings/store.js +2 -1
  137. package/docs/architecture/code-documentation.md +77 -0
  138. package/docs/architecture/project-structure.md +1 -1
  139. package/docs/architecture/ui-reference-provenance.md +23 -3
  140. package/docs/ci-release-runbook.md +48 -4
  141. package/docs/manual-owned-ui-checkpoint.md +28 -1
  142. package/docs/manual-terminal-colour-check.md +4 -3
  143. package/package.json +7 -2
@@ -0,0 +1,77 @@
1
+ # Code documentation
2
+
3
+ A1 treats source documentation as a contract, not as a coverage target. Names, types, and decomposition explain ordinary behavior. Comments remain only where removing them would hide a public responsibility, invariant, rationale, security property, platform constraint, compatibility boundary, protocol rule, concurrency rule, performance decision, or provenance fact.
4
+
5
+ ## Public class contracts
6
+
7
+ Every first-party TypeScript class exposed through a production owner's public entry has exactly one JSDoc description at its declaration. The description states what the class owns and includes its material lifecycle or safety boundary when one exists.
8
+
9
+ Do not add JSDoc solely because a function, type, constructor, property, or method is exported. Do not document a class by repeating its name or listing its methods. Private and protected members never use JSDoc.
10
+
11
+ ```ts
12
+ /** Persists complete workspace views and recovery references through the control-store boundary. */
13
+ export class WorkspaceStore {
14
+ ```
15
+
16
+ ## Implementation comments
17
+
18
+ A retained implementation comment starts with the reason it exists:
19
+
20
+ | Intent | Use |
21
+ | --- | --- |
22
+ | `Invariant:` | State or ordering that every implementation path must preserve |
23
+ | `Rationale:` | A non-obvious choice among plausible alternatives |
24
+ | `Security:` | Trust, ownership, cleanup, disclosure, or failure-safety boundary |
25
+ | `Platform:` | Operating-system, terminal, filesystem, or toolchain behavior |
26
+ | `Compatibility:` | Behavior intentionally matching or accepting another version or surface |
27
+ | `Protocol:` | Wire, framing, input, encoding, or externally defined semantic rule |
28
+ | `Concurrency:` | Race, serialization, cancellation, or event-loop ordering |
29
+ | `Performance:` | Bounded work, caching, coalescing, or resource decision |
30
+ | `Provenance:` | Source, generated authority, or adaptation origin |
31
+
32
+ ```ts
33
+ // Security: an uncertain process identity never authorizes termination.
34
+ // Platform: Windows Terminal encodes Ctrl+Backspace as a raw backspace byte.
35
+ // Performance: finalized blocks cache by revision and width; live blocks always render.
36
+ ```
37
+
38
+ A continuation line does not repeat the label. If no intent applies, remove the comment and make the code explain itself.
39
+
40
+ ## Forbidden forms
41
+
42
+ The repository gate rejects:
43
+
44
+ - missing or multiple contracts on owner-public first-party classes;
45
+ - `<summary>` and `@summary` tags;
46
+ - boilerplate class descriptions and method inventories;
47
+ - JSDoc on private or protected members;
48
+ - uncategorized implementation comments;
49
+ - obvious commented-out code or control-flow narration;
50
+ - `TODO` or `FIXME` without an issue number, issue URL, or tracker identifier;
51
+ - `@ts-ignore` and suppression directives without a reason;
52
+ - an unclassified tracked code path or synchronized source without provenance.
53
+
54
+ Follow-up and suppression forms include their authority inline:
55
+
56
+ ```ts
57
+ // TODO(#321): remove the compatibility path after the pinned upgrade.
58
+ // @ts-expect-error -- the shipped JavaScript module has no declaration file
59
+ ```
60
+
61
+ ## Source roles
62
+
63
+ The full style policy applies to first-party production TypeScript and to applicable comments in first-party tests, tooling, and native source. Native source does not receive TypeScript declaration requirements.
64
+
65
+ Synchronized Pi source, native vendor trees, generated source, build output, and runtime artifacts are not rewritten to match first-party style. Their exclusion comes from the repository source-role classifier, not from a list of accepted violations. Synchronized source must remain covered by its source ledger or explicit provenance header.
66
+
67
+ ## Validation
68
+
69
+ Run the focused check with:
70
+
71
+ ```sh
72
+ npm run check:code-documentation
73
+ ```
74
+
75
+ The check scans the complete tracked baseline and reports stable rule identifiers with path, line, column, and declaration symbol when available. It has no accepted-violation count or grandfather file. Fast pull-request validation runs the check, and full release validation inherits it through the fast tier.
76
+
77
+ Focused governance tests use valid and invalid virtual sources to preserve each rule independently from the clean repository-baseline assertion. The gate validates deterministic structure and high-confidence anti-patterns; review remains responsible for the factual accuracy of retained prose.
@@ -107,7 +107,7 @@ The primary worktree stays on `develop` for integration and must not be used for
107
107
  - `docs/features` explains maintained user-facing behavior.
108
108
  - Operational and manual procedures live in focused runbooks under `docs`.
109
109
  - OpenSpec and Git carry planning and implementation history.
110
- - Source comments explain only non-obvious rationale, safety/security invariants, platform constraints, or public semantic contracts. Names, types, and decomposition explain normal control flow.
110
+ - Source documentation follows the focused [code-documentation policy](code-documentation.md): owner-public class contracts are consistent, retained implementation comments state their intent, and names, types, and decomposition explain ordinary control flow.
111
111
 
112
112
  ## Terminal capability boundary
113
113
 
@@ -29,7 +29,7 @@ its own `core` facade layer; A1 is a product, so the port adapts imports and kee
29
29
  | `ui-components/list-block.ts` — sticky scroll | `settings/impl.ts` — `stickyHeaderGroup`, `topPaddingRows`, `visibleRowCountAt`, `clampScrollForView` | Same reservation arithmetic and two-pass reveal. |
30
30
  | `ui-components/mouse.ts` | `core/panes/sgr-mouse.ts` | Same SGR decoding and per-call regex reset; A1 emits its own event shape. |
31
31
  | `ui-components/mouse.ts` — tracking sequences | `core/host/pi/providers/host-bridge-surface.ts` | Mouse modes only. A1 does not take the alternate screen, because the Pi TUI owns the screen A1 renders through. |
32
- | `features/owned-ui/settings-app.ts` — layout | `settings/impl.ts` — `settingsValueColumn`, `renderFieldLine`, footer and search rendering | Setting discovery is A1's own section model; presentation follows the reference. |
32
+ | `features/owned-ui/settings-app.ts` — section layout, pointer controls, and scrolling | `settings/impl.ts` — `settingsValueColumn`, block navigation, sticky sections, and pointer hit regions | Setting discovery is A1's own A1/Agent section model. Section navigation and pointer-only numeric controls follow the A1 reference; explicit `/` search, ruled shared input, shortcut-derived hints, hidden description rows, configured wheel cadence, and distinct floating scalar menus are reviewed owned interactions. |
33
33
 
34
34
  ## Ported from the pinned engine
35
35
 
@@ -37,16 +37,36 @@ its own `core` facade layer; A1 is a product, so the port adapts imports and kee
37
37
  | --- | --- | --- |
38
38
  | `pi-engine-adapter/settings-integration.ts` — `SETTING_LABELS` | pinned Pi settings selector | Labels and descriptions transcribed so an owned screen reads as the vanilla route words it. Ids are mapped from the selector kebab-case to the exposed camelCase keys. |
39
39
  | `pi-engine/session-integration.ts` and `pi-components/shell-footer-status.ts` — steering queue | pinned Pi interactive mode `onSubmit` and `updatePendingMessagesDisplay` | Steering/follow-up uses `prompt(..., { streamingBehavior })`, allowing Pi to emit the accepted user row, while remaining steering rows preserve Pi's opening spacer, dim `Steering:` labels, dequeue hint, and order before `Working`. |
40
+ | `ui-components/list-view.ts`, `dialog-panel.ts`, `value-menu.ts`, and `features/owned-ui/settings-app.ts` — setting presentation | pinned Pi `SettingsSelectorComponent`, Pi TUI `SettingsList`, `SelectList`, and `Input` at `0.84.2` | Cursor, selected label/value accents, unselected muted values, the 30-column label cap, dialog styling, notices, and narrow-width geometry retain pinned semantics. Scalar-menu placement and input remain shared, while A1/Agent grouping, pointer steppers, explicit `/` search, ruled shared input, shortcut-derived status hints, suppressed selected descriptions, `scrollbarSpeed`-driven wheel movement, and the dark floating menu with lighter active row and effective-value check mark are declared product-owned differences. Independent row evidence: `test/features/owned-ui/pinned-settings-presentation-parity.test.ts`; owned interaction evidence: `test/features/owned-ui/settings-app.test.ts`, `test/ui/components/value-menu.test.ts`, and `test/composition/settings-route-host.test.ts`. |
41
+ | `features/owned-ui/project-trust-prompt.ts` — pre-resource selector | pinned Pi `cli/startup-ui.ts`, `cli/project-trust.ts`, and `core/project-trust.ts` at commit `914cf1472e715297caa30db4b9535d534a9eb718` | Uses a fixed, dependency-bounded A1 startup selector rather than importing private CLI modules. It preserves selected-option accent, navigation/accept/reject/cancel semantics, fail-closed behavior, raw-mode restoration, clearing, cursor restoration, and parent-screen restoration before diagnostics. |
42
+ | `pi-session-ui/session-shell-root.ts` and `session-shell.ts` — fullscreen exit | pinned Pi `InteractiveMode.formatResumeCommand()` and shutdown output at commit `914cf1472e715297caa30db4b9535d534a9eb718` | Re-renders authoritative transcript components with semantic SGR intact, excludes inline-image control payloads and fullscreen-only chrome, restores the terminal first, then emits pinned dim `To resume this session:` wording with `a1`, compact session id, and conditional quoted `--session-dir`. |
43
+ | `pi-tui-runtime/input-presentation-coordinator.ts` and custom-viewport dock reuse | pinned Pi TUI `TuiBase` input dispatch and immediate-render pending guard at `0.84.2` | Preserves each original terminal delivery and invokes the existing Pi handlers exactly once in order. Bare A1 alone drains finite-grammar text/edit/navigation bursts in one immediate event-loop opportunity so Pi's existing pending guard paints the newest state once; effectful, unknown, protocol, paste, and extension-owned input remains an immediate barrier. Geometry-stable dock frames reuse A1's established transcript viewport, while uncertain geometry and replacement-surface damage still fail closed. Independent evidence is under `test/support/input-responsiveness/`. |
44
+ | `test/features/owned-ui/pi-raw-terminal-parity.ts` — parity normalization | pinned Pi public components/runtime at `0.84.2` | Only synchronized-output envelopes, absolute hyperlink targets, declared product/path substitutions, and nondeterministic timing may normalize. SGR roles/reset boundaries, rows, cursor operations, clearing, restoration, and write order remain authoritative; A1-generated JSON captures are diagnostics and cannot serve as pinned evidence. |
40
45
 
41
46
  ## Deliberate differences
42
47
 
43
- - **No alternate screen.** The reference owns its surface and can switch screens; A1 renders
44
- through the pinned Pi TUI, so an owned screen is a full-viewport overlay instead.
48
+ - **Owned in-session routes are overlays.** The A1 UI reference owns its surface and can switch screens; A1 renders in-session owned routes through the pinned Pi TUI as full-viewport overlays. The pre-resource trust selector is separate and uses a bounded alternate startup surface solely so every completion path can restore the untouched parent terminal before engine activation or a fail-closed diagnostic.
45
49
  - **Colour is a port, not an import.** The reference takes a Pi `Theme` directly. A1 defines
46
50
  `UiTheme` so the component layer never imports a Pi adapter and can be rendered plainly in
47
51
  tests.
48
52
  - **Settings content.** The reference aggregates per-extension settings files; A1 has one
49
53
  section for its own settings and one for the agent's, read through the engine settings port.
54
+ - **Settings scalar-menu contrast.** The shared menu keeps reviewed placement, clipping, and
55
+ input behavior, but A1 uses its prior dark floating panel, lighter white-text active row,
56
+ and independent effective-value check mark because physical review rejected a menu that
57
+ blended into the settings rows.
58
+ - **Spinner-backed progress punctuation.** Bare A1 resolves built-in and extension working
59
+ labels through `ui-components/progress-status.ts`, injected by
60
+ `pi-session-ui/session-shell-root.ts` into the shared `pi-components/shell-footer-status.ts`
61
+ spinner factory. The factory canonicalizes the visible progress marker once, to three ASCII
62
+ periods, without importing across the component-adapter boundary. Engine producers remain
63
+ semantic and the source-synchronized Pi status indicators, installed packages, `a1 pi`, and
64
+ vanilla Pi remain untouched.
65
+ - **Keyboard presentation scheduling.** Pinned components, semantic key handling, and the
66
+ comparison profiles stay unchanged. Bare A1 adds one A1-owned event-loop-turn coordinator
67
+ before its fullscreen root and may omit only superseded visual states after every delivery
68
+ has already been applied in order. It does not debounce by wall clock, combine strings,
69
+ patch Pi TUI, or classify unknown extension/terminal data as safe.
50
70
  - **No viewport prototype or child-tree patches.** `ui/agent-view/user-prompt.ts` and the
51
71
  private-child traversal in `ui/agent-view/render.ts` were analyzed only for behavior. The
52
72
  destination renders source timestamps through an owned transcript adapter and derives sticky
@@ -46,12 +46,56 @@ effect of stable publication, not a trigger.
46
46
 
47
47
  | Trigger | Validation and outcome |
48
48
  | --- | --- |
49
- | Pull request into `develop` | Fast required validation; docs-only changes use lightweight governance consistency and OpenSpec changes also use strict OpenSpec validation |
49
+ | Pull request into `develop` | Modular fast validation; changed/new source documentation is checked once, and rendering runs as `none`, `smoke`, or `full` from the exact impact |
50
50
  | `npm run develop` | Preview package gates on Windows, Linux, and macOS; an existing numbered preview is an early successful no-op |
51
- | Nightly at `03:17 UTC` | Complete non-physical suite on Windows, Linux, and macOS, every night |
51
+ | Nightly at `03:17 UTC` | One full documentation review plus the complete non-physical suite on Windows, Linux, and macOS, every night |
52
52
  | `npm run release -- ...` | Complete exact-byte stable gates, then npm `latest`, tag, GitHub Release, and `master` |
53
53
  | `.github/workflows/full-regression.yml` | Additional on-demand complete regression without publication authority |
54
54
 
55
+ ## Impact-aware development validation
56
+
57
+ `scripts/release/select-validation-impact.mjs` is the single pull-request selector. It records the complete merge-base-to-head name-status diff, changed/new documentation inputs, rendering dependency reasons, conservative fallbacks, and the exact head SHA in a machine-readable artifact. Missing history, unresolved rendering dependencies, unknown relevant inputs, or classifier failure select full rendering rather than silently skipping it.
58
+
59
+ Ordinary type, architecture, unit/contract, and dist checks always run for code changes. Changed-file documentation and rendering run as independent parallel jobs. Rendered shell/component changes select `smoke`; viewport, scheduler, terminal adapter, evidence harness, package identity, and selector changes select `full`; unrelated changes select `none`. The aggregate accepts a skipped modular job only when the current selector requested the skip.
60
+
61
+ Inspect local committed and worktree impact without running tests:
62
+
63
+ ```sh
64
+ npm run select:validation-impact -- --include-worktree
65
+ ```
66
+
67
+ Check documentation only for modified, added, copied, and renamed-to policy files:
68
+
69
+ ```sh
70
+ npm run check:code-documentation:changed
71
+ ```
72
+
73
+ Run the explicit complete documentation review used by nightly and complete regression:
74
+
75
+ ```sh
76
+ npm run check:code-documentation
77
+ ```
78
+
79
+ Rendering evidence captures each selected producer/mode/workload matrix once and reuses it for semantic, paint, parity, and damage assertions. A deliberate second `streamed-prose` capture remains only for determinism. Workflow summaries separate repository-gate timing from runner setup; wall-clock values diagnose runner/cache variance, while selected scopes, matrix captures, producer launches, documentation file counts, and full-scan counts are structural gates.
80
+
81
+ ## Resource-sensitive fast validation
82
+
83
+ The authoritative fast-tier declaration identifies tests that repeatedly create temporary repositories, launch child processes, mutate storage, or coordinate release cohorts. The planner removes those files from the parallel remainder and runs them exactly once as `vitest-fast-resource-sensitive` with file parallelism disabled. Pull-request, development-package, and complete release plans use the same partition on every platform.
84
+
85
+ The partition retains Vitest's five-second default test timeout. It does not add a test, suite, platform, or workflow timeout, and a failure is not retried or converted to success. If a serialized test still approaches five seconds, use `scripts/release/report-resource-sensitive-validation.mjs` to record repeated per-file and test-body timing, then optimize repository setup, subprocess count, storage operations, or release fixtures. Do not increase a timeout to create margin.
86
+
87
+ Inspect the partition without running tests:
88
+
89
+ ```sh
90
+ node scripts/release/run-validation-tier.mjs fast --plan
91
+ ```
92
+
93
+ Record three focused serialized executions without running the complete fast tier:
94
+
95
+ ```sh
96
+ node scripts/release/report-resource-sensitive-validation.mjs --repeats 3 --output .artifacts/validation/resource-sensitive-focused.json
97
+ ```
98
+
55
99
  ## Pull request integration
56
100
 
57
101
  `Development validation required` remains the merge gate for every pull request.
@@ -98,8 +142,7 @@ already exists it reports that version without dispatching package work. Otherwi
98
142
  it dispatches GitHub Actions, waits, and reports the published version. It never
99
143
  builds or uploads npm bytes from the workstation.
100
144
 
101
- Nightly resolves the same current `origin/develop` source. It always runs complete
102
- verification even if source has not changed. For a new number it packs once and
145
+ Nightly resolves the same current `origin/develop` source. It runs one platform-independent full documentation review before the platform matrix, and the matrix records that prerequisite instead of repeating the scan four times. It always runs complete verification even if source has not changed. For a new number it packs once and
103
146
  runs the suite against that final-version tarball before publication. For an
104
147
  existing number it downloads the exact npm tarball and runs package/update gates
105
148
  against those registry bytes; publication is then a successful no-op.
@@ -155,6 +198,7 @@ Rules that do not bend:
155
198
  delete an advanced or protected ref merely because its name matches an old PR.
156
199
  - **Repository governance drifts:** run the read-only checker, review every reported
157
200
  path, and use the confirmed apply mode only for an accepted mutable policy change.
201
+ - **Nightly documentation review fails:** inspect the reported paths and rules, identify the introducing merge from the nightly interval, and repair the invariant before unrelated work proceeds.
158
202
  - **Development publication fails:** fix the cause and rerun `npm run develop`; an npm version that already exists is never overwritten.
159
203
  - **Stable publication fails before npm accepts bytes:** no tag, release, or moved branch exists. Fix the cause and release the next version.
160
204
  - **Stable publication is uncertain after npm accepted bytes:** stop and inspect registry version, digest, tag, and release. Never republish immutable bytes.
@@ -4,6 +4,8 @@ This checkpoint is user-controlled. Tests and coding agents must not launch or f
4
4
 
5
5
  ## Prepare an exact candidate
6
6
 
7
+ For a checkout smoke test in Git Bash, build once and launch with `./scripts/dev` or `./scripts/dev pi`. Do not invoke `node scripts/development/dev-launch.mjs` or `node scripts/development/start-local.mjs` directly: that bypasses the color-preserving shell `exec` shape and can collapse the pinned 24-bit palette to Git Bash's 16 terminal colors. Run `node scripts/check-terminal-colour.mjs` first when color fidelity is in doubt; the first color block must differ from the terminal-palette cyan block.
8
+
7
9
  From the candidate checkout, pack once and install that tarball into a disposable prefix:
8
10
 
9
11
  ```powershell
@@ -46,6 +48,31 @@ Use the same terminal, working directory, dimensions, environment, and equivalen
46
48
  - [ ] Normal and error exits return a usable parent prompt.
47
49
  - [ ] Parent typing, cursor movement, Backspace, Delete, and submission work after exit.
48
50
 
49
- Report failures with bare-versus-comparison behavior, platform and terminal versions, exact command, reproducibility, and optional manually captured evidence.
51
+ ### Setting-controlled visual matrix
52
+
53
+ Use equivalent values in bare A1 and the Pi comparison profile. Exercise both a wide frame and a narrow frame that forces wrapping/clipping.
54
+
55
+ - [ ] `/settings`: selected cursor, label and value accent; unselected values muted; descriptions and hints dim; search uses `> ` with inverse cursor; scalar menus, numeric controls, warning-parts dialog, deferred notice, failed write, section spacing, clipping, and hidden-entry absence match their pinned semantic roles.
56
+ - [ ] Transcript: toggle images and image width, thinking level/visibility, Mermaid mode, output padding, cache notices, warnings, auto-compaction, queue modes, command autocomplete, provider timeout/retry/error, and changelog collapse. Existing and streaming blocks must re-render without focus, selection, scroll, or queued-work loss.
57
+ - [ ] Trust startup: from an undecided project, compare selected Trust/Do not trust rows, arrow navigation, Enter, Escape/Ctrl+C, clearing, cursor state, and restoration. No project extension/theme/prompt/skill may run before selection, and a fail-closed diagnostic must appear once on the restored parent rather than above a blank fullscreen frame.
58
+ - [ ] Terminal lifecycle: toggle hardware cursor, clear-on-shrink, and terminal progress; resize smaller/larger; open/close selectors; select and copy transcript text; verify no duplicate rows, stale OSC progress, leaked mouse mode, misplaced cursor, or broken parent input.
59
+ - [ ] Images: in Kitty or iTerm2 verify inline width and clipping; in Windows Terminal verify the textual fallback and absence of image protocol bytes without hiding `showImages`.
60
+ - [ ] Fullscreen exit `transcript`: verify the parent is restored before styled user, assistant Markdown, thinking, tool, notice, warning, error, and spacing rows are printed. No overlay, draft, animation, scrollbar, or inline-image payload may appear.
61
+ - [ ] Fullscreen exit `resume-hint`: verify only dim `To resume this session:` plus `a1 --session <compact-id>` is printed for the default directory. A custom directory must place quoted `--session-dir <dir>` before `--session`; the raw default `.jsonl` path must never print.
62
+
63
+ Record acceptance with:
64
+
65
+ ```text
66
+ A1 commit/tarball:
67
+ Pi package: @earendil-works/pi-coding-agent 0.84.2
68
+ OS/version:
69
+ Terminal/version:
70
+ Terminal dimensions (wide/narrow):
71
+ Image protocol result:
72
+ Settings values exercised:
73
+ Outcome and any declared substitutions:
74
+ ```
75
+
76
+ Report failures with bare-versus-comparison behavior, platform and terminal versions, exact command, dimensions, settings values, reproducibility, and optional manually captured evidence.
50
77
 
51
78
  For recovery, use `a1 pi`; do not use the removed `a1 ui` command. Manual acceptance can authorize an exact uncertified development preview after non-desktop gates pass. It does not certify stable presentation parity or platform support.
@@ -29,9 +29,10 @@ leave the launch without a terminal on its input; the launcher says so and stops
29
29
  rather than opening a session that closes as it starts. Running `scripts/dev`
30
30
  from the shell is the direct path.
31
31
 
32
- A directly launched `node scripts/development/start-local.mjs` under Git Bash does not, and
33
- neither does a directly launched `node …/pi/dist/cli.js`: the collapse belongs to
34
- the launch, not to either application.
32
+ A directly launched `node scripts/development/dev-launch.mjs` or
33
+ `node scripts/development/start-local.mjs` under Git Bash does not, and neither
34
+ does a directly launched `node …/pi/dist/cli.js`: the collapse belongs to the
35
+ launch, not to either application.
35
36
 
36
37
  ## Checking a terminal
37
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timurproko/a1",
3
- "version": "0.1.8-dev.182",
3
+ "version": "0.1.8-dev.218",
4
4
  "description": "Standalone terminal workspace for supervised native and managed agents",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.13.0",
@@ -27,6 +27,9 @@
27
27
  "build:process-guardian": "node scripts/development/build-process-guardian.mjs",
28
28
  "typecheck": "tsgo -p tsconfig.json --noEmit",
29
29
  "check:architecture": "node scripts/governance/check-architecture.mjs && node scripts/governance/product-identifier-policy.mjs --check && node scripts/governance/check-product-identity-boundaries.mjs && node scripts/governance/check-package-identity.mjs && node scripts/governance/check-pinned-pi-source-ledger.mjs && node scripts/governance/check-terminal-host-provenance.mjs",
30
+ "check:code-documentation": "node scripts/governance/check-code-documentation.mjs --mode full",
31
+ "check:code-documentation:changed": "node scripts/release/run-changed-documentation.mjs",
32
+ "select:validation-impact": "node scripts/release/select-validation-impact.mjs",
30
33
  "check:customization-ready": "node scripts/governance/check-owned-ui-customization-prerequisites.mjs",
31
34
  "check:deprecated": "node scripts/governance/check-deprecated-dependencies.mjs",
32
35
  "check:docs-governance": "node scripts/governance/check-docs-governance.mjs",
@@ -36,13 +39,15 @@
36
39
  "develop": "node scripts/development/develop.mjs",
37
40
  "release": "node scripts/release/release.mjs",
38
41
  "test": "npm run test:fast",
39
- "test:fast": "node scripts/release/run-validation-tier.mjs typecheck fast",
42
+ "test:fast": "node scripts/release/run-validation-tier.mjs typecheck documentation-changed fast",
40
43
  "test:scope": "node scripts/release/run-validation-tier.mjs",
41
44
  "test:full": "node scripts/release/run-validation-tier.mjs full-release",
42
45
  "test:release": "node scripts/release/run-release-gates.mjs",
43
46
  "test:terminal-host": "node scripts/development/run-terminal-host-probe.mjs",
44
47
  "test:pi-engine-conformance": "vitest run test/integrations/pi/engine/conformance.test.ts test/integrations/pi/engine/runtime-integration.test.ts test/integrations/pi/engine/session-integration.test.ts",
45
48
  "report:pi-engine-conformance": "npm run build --silent && node scripts/pi/run-pi-engine-conformance.mjs",
49
+ "report:rendering-stability": "tsx scripts/pi/report-rendering-stability.ts",
50
+ "report:input-responsiveness": "tsx scripts/pi/report-input-responsiveness.ts",
46
51
  "sync:pi-ui": "npm run update:pi-component-parity && npm run update:pi-event-frame-parity && npm run update:pi-settings-metadata",
47
52
  "update:pi-component-parity": "tsx scripts/pi/update-pi-component-parity.ts",
48
53
  "update:pi-event-frame-parity": "tsx scripts/pi/update-pi-event-frame-parity.ts",