Skip to content

Add author sync, carry failures as data, render CLI output through Blocks, and simplify exit statuses - #128

Merged
timhanlon merged 14 commits into
devfrom
stack/failures-and-blocks
Nov 11, 2026
Merged

timhanlon merged 14 commits into
devfrom
stack/failures-and-blocks

Conversation

@timhanlon

@timhanlon timhanlon commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Behavior changes to review first

  • Breaking: process exit statuses are now 0, 1 and 2. 0 is success, 1 is failure or partial failure, 2 is invalid usage. Per-command status inventories and numeric result overrides are gone, and update errors no longer carry a per-item numeric exitCode. Signal termination is unchanged.
  • Setup no longer updates managed Skills. That is left to update.
  • update imports installed edits with --from <path>.
  • Setup accepts equivalent GitHub lock sources.
  • The enable, enable.plan, disable and disable.plan output contracts each describe only their own action. No version bumps.

Problem and behavior

Two things land together because the second fixes tests the first needs.

Author sync. Authors had no CLI path to keep an authored Skill workspace in step with the Registry.

  • Expose the experimental author commands in the CLI.
  • Add a foreground sync watcher that reports the changes it makes and stays quiet when idle.
  • Checkpoint automatic updates so an interrupted sync resumes from recorded state.
  • Share authored updates between devices, with explicit authority for removals.
  • Complete manual removal confirmation and installation of authored Skills.

Failures as data and Blocks rendering. Failure wording was written where failures were raised, so the core carried sentences, frontends could not word things for their own surface, and CLI output was assembled ad hoc per command.

  • Failures carry facts. The core, Library and author code raise typed failures with data; the CLI and TUI word them. Original errors are preserved until the serialization boundary.
  • Presenters return Blocks, and one terminal renderer draws them. Colour is confined to terminal/, enforced by lint.
  • CLI text follows CONTEXT.md. A new skit/banned-terms lint rule rejects the avoided terms in names and user-facing strings; architecture/terms.mjs records existing occurrences as debt that may only shrink.
  • The CLI's stories and recorded journeys (author sync, author watch, doctor) and their fixtures live under packages/cli/src/; the fixture world owns the filesystem scenarios the journeys use.
  • The public ./storybook declarations are self-contained: public types live in storybook/contracts.ts and internal modules import them.
  • The mutually recursive operation-failure schemas are defined together in store/operation-failures.ts, removing two import cycles with state-schema.ts. Stored shapes are unchanged.
  • Contract JSON is regenerated; most of this diff's line count is packages/cli/contracts/.

Scope

Replaces #127, which was the author sync half on its own. That tree could not pass CI alone: its failing tests are fixed by later commits that are part of this PR.

The Atlas app that reads these stories is not included and follows separately.

Validation

Locally at this tip: pnpm format:check, pnpm lint, pnpm typecheck, pnpm test:e2e and the CLI package test pass, along with the CLI tests that failed in the first CI run. The full CLI and workspace suites were not run locally; CI is the full run.

@timhanlon
timhanlon added this pull request to stack #129 November 11, 2026 23:14
@timhanlon
timhanlon removed this pull request from stack #129 November 11, 2026 23:14
@timhanlon
timhanlon added this pull request to stack #130 November 11, 2026 23:14
@timhanlon
timhanlon removed this pull request from stack #130 November 11, 2026 23:42
@timhanlon
timhanlon changed the base branch from stack/author-sync to dev November 11, 2026 23:42
@timhanlon timhanlon changed the title Carry failures as data, render CLI output through Blocks, and simplify exit statuses Add author sync, carry failures as data, render CLI output through Blocks, and simplify exit statuses Nov 11, 2026
@timhanlon
timhanlon merged commit e030245 into dev Nov 11, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant