usesteady 0.1.0-alpha.52 → 0.1.0-alpha.54

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/CHANGELOG.md CHANGED
@@ -1,5 +1,261 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.54 - Onboarding quickstart and starter templates
4
+
5
+ **Released:** May 2026
6
+ **npm tag:** `alpha` - `npm install -g usesteady@alpha`
7
+
8
+ Second ship from the **Product Capability Track**. Goal: a brand-new
9
+ user can go from install to a successful, reviewed workflow in under
10
+ five minutes, without reading internal docs. Bounded scope: two new
11
+ read-only subcommands and a README walkthrough. Zero authority impact.
12
+
13
+ ### What ships
14
+
15
+ Three onboarding surfaces, all read-only:
16
+
17
+ - `usesteady quickstart` - one-screen orientation. What UseSteady is,
18
+ how to discover capabilities, how to pick a template, how to
19
+ customize and run, plain-language approval explanation, where
20
+ workflows execute, and how to stop safely. Pure text renderer;
21
+ byte-for-byte deterministic.
22
+ - `usesteady templates` - prints a list of safe starter workflows
23
+ with one-line purposes.
24
+ - `usesteady templates <name>` - prints one template in detail
25
+ (purpose, required/optional fields, example values, safety notes,
26
+ runnable JSON operations). `--output json` for machine-readable.
27
+
28
+ Five initial templates:
29
+
30
+ | Template | Operations |
31
+ |---|---|
32
+ | `append-to-file` | `append` |
33
+ | `safe-rename` | `rename` |
34
+ | `multi-file-replace` | `replace` (x3) |
35
+ | `non-destructive-cleanup` | `create_dir` + `rename` (x2) |
36
+ | `git-safe-review-flow` | `create` + `append` |
37
+
38
+ **No starter template uses `delete` or `run`.** Tests enforce this:
39
+ starter templates are deliberately non-destructive and command-free.
40
+ Every operation in every template is a member of `ALL_OPERATION_TYPES`
41
+ (`src/input/op-registry.ts`); the registry is the single source of
42
+ truth and tests assert there is no second op list to drift against.
43
+
44
+ README adds a "First 5 Minutes with UseSteady" section that walks
45
+ the exact happy path: `quickstart` -> `capabilities` -> `templates` ->
46
+ customize -> `batch` run -> approval / stop. No internal-doc
47
+ references required.
48
+
49
+ Implementation PR: `shortgigs/usesteady-core#304`.
50
+ Implementation modules: `src/shell/cli/quickstart.ts` and
51
+ `src/shell/cli/templates.ts` (pure functions only; no I/O, no
52
+ `process.exit`, no execution).
53
+
54
+ ### Friction -> Fix -> Invariant mapping
55
+
56
+ The Product Capability Track frictions are internally referenced as
57
+ F-1..F-9 in the design doc. This release closes:
58
+
59
+ | Friction (track ref) | Coverage | Invariant improved |
60
+ |---|---|---|
61
+ | F-1 Manual batch JSON loading | full | Operators can copy a complete runnable JSON operation set from any template; no hand-crafting from registry summaries. |
62
+ | F-7 Unclear first-run path | full | `usesteady quickstart` is the documented first command. README "First 5 Minutes" walks the full path without internal-doc references. |
63
+ | F-8 Command authoring friction | full | Templates surface required/optional fields, example values, and safety notes for each starter workflow before invocation. |
64
+ | F-2 Workflow scaffolding gap | partial | Five non-destructive templates cover the most common safe starting patterns. Custom workflows still require hand-authoring; that gap is deliberate. |
65
+ | F-5 Approval surprise / opaque flow | partial | Quickstart explains the approval gate, `--yes` semantics, and how to stop safely in plain language; the runtime approval surface itself is unchanged. |
66
+
67
+ ### Authority story
68
+
69
+ - Deterministic approval model: unchanged.
70
+ - No hidden execution: both new subcommands only print. Quickstart
71
+ renders static text. Templates renders static catalog data. Neither
72
+ module imports the planner, the safety gate, the executor, or any
73
+ approval surface.
74
+ - No autonomous authority expansion: no new authority granted. The
75
+ set of executable operations did NOT grow. Only inspection
76
+ surfaces grew.
77
+ - Explain-before-execute: strengthened. Operators now see a
78
+ pre-formatted, safety-noted recipe before authoring a workflow.
79
+ - Bounded execution semantics: unchanged. Templates are static data;
80
+ printing a template is not running one.
81
+ - `--yes` semantics: unchanged. `quickstart` and `templates` join
82
+ `capabilities` in the documented `--yes`-exempt list because they
83
+ never execute. Every other path still requires `--yes` for
84
+ `--output json` execution.
85
+
86
+ ### What does NOT change
87
+
88
+ - No `src/input/` change. No registry change. No IR change.
89
+ - No safety detector, drift detector, sanitizer, or canonicalizer
90
+ change. PRs #293 / #294 / #297 surfaces are untouched.
91
+ - No execution engine change. Planner, executor, and approval
92
+ surfaces are byte-identical to alpha.53.
93
+ - No new operation types. Templates compose only operations from the
94
+ existing `ALL_OPERATION_TYPES`.
95
+ - No new runtime dependencies.
96
+ - No model-insertion path change. No new prompt surfaces. No AI
97
+ workflow generation. Templates are hand-authored static data.
98
+ - No edits to ShortGigs, YODHA, StructureGuard, or SteadyHealth.
99
+
100
+ ### Tests
101
+
102
+ 73 of 73 tests pass across the three onboarding-adjacent surfaces:
103
+
104
+ - `tests/shell/capabilities.test.ts` (17, regression)
105
+ - `tests/shell/templates.test.ts` (41 new)
106
+ - `tests/shell/quickstart.test.ts` (15 new)
107
+
108
+ Key invariants enforced by tests:
109
+
110
+ - Every operation in every template uses a registered op type.
111
+ - No starter template uses `delete` or `run`.
112
+ - Quickstart text and template output are byte-for-byte deterministic.
113
+ - `--output json` works without `--yes` on all three read-only paths.
114
+ - Unknown template names exit non-zero with a helpful stderr line.
115
+ - Negative-content guarantees on quickstart: no "autonomous", no
116
+ "ai will fix", no "agent will" language anywhere in the orientation.
117
+
118
+ ### Release engineering
119
+
120
+ No changes to the release gate. `test:release` retains the `--retry=2`
121
+ flake mitigation from alpha.52. `check-stdin-ownership` runs the same
122
+ git-tracked-only scan.
123
+
124
+ ### Surface-specific monitoring
125
+
126
+ Stabilization window for the onboarding surface opens with this
127
+ release. Watch for:
128
+
129
+ - Confusion in the quickstart text (specific lines that mislead a
130
+ first-time user).
131
+ - Template copy/paste failures (JSON that doesn't parse cleanly
132
+ when pasted, escape-sequence misreads).
133
+ - Approval-flow surprises after following the quickstart (anything
134
+ the operator sees at run time that the quickstart did not prepare
135
+ them for).
136
+ - Trust/perception issues (any place where the operator cannot tell
137
+ whether something is "just printing" or "about to run").
138
+
139
+ If real friction surfaces in this window, one bounded follow-up PR
140
+ ships. No multi-candidate expansion.
141
+
142
+ ---
143
+
144
+ ## 0.1.0-alpha.53 - Capability explorer (first Product Capability Track ship)
145
+
146
+ **Released:** May 2026
147
+ **npm tag:** `alpha` - `npm install -g usesteady@alpha`
148
+
149
+ First implementation candidate from the **Product Capability Track**
150
+ (`docs/product/useability-and-guided-execution-track.md` section 3.1,
151
+ merged in shortgigs/usesteady-core#299). Bounded scope: one new
152
+ read-only subcommand. Zero authority impact.
153
+
154
+ ### What ships
155
+
156
+ `usesteady capabilities` - prints a structured catalog of every IR
157
+ operation this build supports. Reads directly from
158
+ `src/input/op-registry.ts` (`ALL_OPERATION_TYPES` +
159
+ `OPERATION_REGISTRY`); no second source of truth.
160
+
161
+ - Default output: human-readable text.
162
+ - `--output json`: deterministic single-line JSON catalog. Exempt
163
+ from the global `--output json` + `--yes` rule because the
164
+ catalog has no execution path; `--yes` is meaningless for it.
165
+ - `--help` on the subcommand: subcommand-specific usage.
166
+ - Listed in `PURE_SUBCOMMANDS` (no stdin sampling).
167
+ - Listed in `HELP_TEXT` for global discoverability.
168
+
169
+ Implementation PR: `shortgigs/usesteady-core#300`.
170
+ Implementation module: `src/shell/cli/capabilities.ts` (pure
171
+ functions only; no I/O, no `process.exit`, no execution).
172
+
173
+ ### Friction -> Fix -> Invariant mapping
174
+
175
+ The Product Capability Track frictions are internally referenced
176
+ as F-1..F-9 in the design doc (not public issue numbers, since
177
+ they were proactively identified rather than reported). This
178
+ release closes:
179
+
180
+ | Friction (track ref) | Coverage | Invariant improved |
181
+ |---|---|---|
182
+ | F-9 Weak discoverability of supported operations | full | Every operation the build supports is enumerable from inside the product itself. No external doc lookup required. |
183
+ | F-1 Manual batch JSON loading | partial | Operators can copy a public-JSON shape from the catalog instead of hand-crafting from source. Curated workflow templates (track section 3.2) remain queued. |
184
+ | F-8 Command authoring friction | partial | Required and optional fields per op surface before invocation. Authoring errors are now visible at catalog read time, not at safety-gate-rejection time. |
185
+
186
+ ### Authority story (preserved verbatim from track section 6)
187
+
188
+ - Deterministic approval model: unchanged. Catalog never approves.
189
+ - No hidden execution: catalog cannot mutate state. No side effects
190
+ on import or invocation.
191
+ - No autonomous authority expansion: no new authority granted.
192
+ - Explain-before-execute: unchanged.
193
+ - Replayability: unchanged.
194
+ - Bounded execution semantics: the set of executable operations did
195
+ NOT grow. Only the surface to **inspect** them grew. This
196
+ distinction is load-bearing (track section 6.6).
197
+
198
+ ### What does NOT change
199
+
200
+ - No `src/input/` change. No registry change. No IR change.
201
+ - No safety detector, drift detector, sanitizer, or canonicalizer
202
+ touch.
203
+ - No approval state machine change.
204
+ - No UCP envelope schema change.
205
+ - No K5 boundary change. No `MODEL_INSERTION_POLICY` touch.
206
+ - No new doctrine, ADR, or governance document.
207
+ - No NL-intake involvement. The catalog is built from the static
208
+ registry, not from any model.
209
+
210
+ ### Tests
211
+
212
+ - `tests/shell/capabilities.test.ts` (new): 17 tests covering
213
+ invariants I1..I7 (catalog coverage of `ALL_OPERATION_TYPES`,
214
+ deterministic byte-for-byte output, `--yes` not required,
215
+ `--output json` works without `--yes`, every op has a parseable
216
+ JSON example, catalog is frozen, registry fields surface
217
+ verbatim).
218
+ - No existing test modified. Governance test
219
+ (`tests/governance/input-surface-integrity.test.ts`) and registry
220
+ test (`tests/input/op-registry.test.ts`) unchanged: 141/141 pass.
221
+
222
+ Full suite: 4697 passed, 4 skipped (132 files).
223
+
224
+ ### Public demonstration
225
+
226
+ `README.md` updated with a "Discover what UseSteady can do"
227
+ section under Install, showing the command, its output, and the
228
+ `--output json` variant. The README explicitly notes the catalog
229
+ shares the same registry the executor uses (no doc drift).
230
+
231
+ ### Sequencing posture
232
+
233
+ - Product Capability Track NOW queue: section 3.1 SHIPPED in this release.
234
+ Remaining NOW: section 3.2 (curated templates), section 3.6 (execution
235
+ timeline view), section 3.11 (workflow health diagnostics). Per track
236
+ section 7, one PR per candidate; the next NOW candidate opens only
237
+ after this surface stabilizes through one monitoring window.
238
+ - Cluster B (alpha.52) monitoring window: still active through
239
+ 2026-05-18 unless triggers fire. This release does not touch
240
+ any Cluster B surface; window unaffected.
241
+ - `capabilities` opens its own observation window on landing.
242
+ Read-only surface; thresholds calibrated narrow:
243
+ - regression trigger: any deterministic-output drift, any
244
+ catalog coverage gap (op missing or extra), any exit-code
245
+ change.
246
+ - volume trigger: 3+ reports of operator confusion mapped to
247
+ F-9 / F-1 / F-8 within 14 days indicating the catalog is
248
+ surfacing the wrong information.
249
+
250
+ ### Release engineering
251
+
252
+ No changes to `scripts/check-stdin-ownership.mjs` or
253
+ `release:gate`. The alpha.52 release-engineering deltas (scanner
254
+ gitignore-respect; `vitest run --retry=2` in `release:gate`)
255
+ remain in place.
256
+
257
+ ---
258
+
3
259
  ## 0.1.0-alpha.52 - Canonicalization, Workflow Integrity, Process Lifecycle Anchor
4
260
 
5
261
  **Released:** May 2026
package/README.md CHANGED
@@ -168,6 +168,107 @@ Requires Node.js 18+. Runs fully local. Optional: set `ANTHROPIC_API_KEY` to ena
168
168
 
169
169
  ---
170
170
 
171
+ ## First 5 Minutes with UseSteady
172
+
173
+ This is the fastest path from a fresh install to a successful, reviewed change.
174
+
175
+ ### 1. Read the orientation
176
+
177
+ ```bash
178
+ npx usesteady quickstart
179
+ ```
180
+
181
+ One screen. What UseSteady is, the steps below, plain-language approval, where workflows execute, how to stop. Read-only - this command does not run anything.
182
+
183
+ ### 2. See what operations exist
184
+
185
+ ```bash
186
+ npx usesteady capabilities
187
+ ```
188
+
189
+ The full catalog of supported operations (`replace`, `append`, `rename`, `create`, etc.), with the exact JSON shape for each. Source of truth - no second list to drift against.
190
+
191
+ ### 3. Pick a starter template
192
+
193
+ ```bash
194
+ npx usesteady templates
195
+ ```
196
+
197
+ Lists five safe, non-destructive starter workflows:
198
+
199
+ | Template | What it does |
200
+ |---|---|
201
+ | `append-to-file` | Add a block to an existing file (recommended first run). |
202
+ | `safe-rename` | Rename one file with explicit approval. |
203
+ | `multi-file-replace` | Same exact-text replacement across a hand-listed file set. |
204
+ | `non-destructive-cleanup` | Move files into a new directory via rename (no deletions). |
205
+ | `git-safe-review-flow` | Capture review notes in `REVIEW.md` without touching source. |
206
+
207
+ Print a template in detail:
208
+
209
+ ```bash
210
+ npx usesteady templates append-to-file
211
+ ```
212
+
213
+ You get the purpose, required fields, example values, safety notes, and a runnable JSON operation block.
214
+
215
+ ### 4. Customize and run
216
+
217
+ Copy the JSON operations from the template into a file (e.g. `ops.json` - as a JSON array), replace the placeholder values with your real values, then:
218
+
219
+ ```bash
220
+ npx usesteady batch ops.json
221
+ ```
222
+
223
+ UseSteady prints **SYSTEM WILL** with the exact operation, waits for your approval, and only runs after you say yes. Every operation. No exceptions.
224
+
225
+ ### 5. If you change your mind
226
+
227
+ At any approval prompt, choose **Reject** (or press `Ctrl+C`). The current operation is not applied; UseSteady exits. Operations approved earlier in the workflow are filesystem changes you already authorized one at a time; undo them via your version control (`git revert`) or by reversing the operation manually.
228
+
229
+ ### Approval, in one sentence
230
+
231
+ By default UseSteady stops before every operation. Add `--yes` only when you have already read and reviewed the entire spec (typical in CI).
232
+
233
+ ---
234
+
235
+ ## Discover what UseSteady can do
236
+
237
+ Print a structured catalog of every operation this build supports - read-only, never executes anything:
238
+
239
+ ```bash
240
+ npx usesteady capabilities
241
+ ```
242
+
243
+ Or machine-readable:
244
+
245
+ ```bash
246
+ npx usesteady capabilities --output json
247
+ ```
248
+
249
+ Sample (truncated):
250
+
251
+ ```
252
+ UseSteady supported operations:
253
+
254
+ replace
255
+ Replace <from> with <to> in <file> (occurrence: first | all | { index }).
256
+ Required (IR): file, from, to
257
+ Optional (IR): occurrence
258
+ JSON example: {"type":"replace","file":"src/Button.tsx","from":"old text","to":"new text"}
259
+
260
+ rename
261
+ Rename the file at <from> to <to>.
262
+ Required (IR): from, to
263
+ Optional (IR): (none)
264
+ JSON example: {"type":"rename","from":"old.ts","to":"new.ts"}
265
+ ...
266
+ ```
267
+
268
+ The catalog is sourced from the same registry the executor uses. No second source of truth, no documentation drift. Useful for: authoring `--json` and batch payloads, discovering supported operations, scripting validation.
269
+
270
+ ---
271
+
171
272
  ## Core idea
172
273
 
173
274
  **AI proposes. You approve. Then it runs.**
@@ -0,0 +1,76 @@
1
+ /**
2
+ * usesteady capabilities -- read-only catalog of supported IR operations.
3
+ *
4
+ * Pure module. No I/O, no process.exit, no execution. Importing this module
5
+ * cannot read stdin, write the filesystem, spawn a process, or talk to a
6
+ * model. It exists to render the operator-facing catalog of operations the
7
+ * current build supports.
8
+ *
9
+ * Source of truth: src/input/op-registry.ts
10
+ * - ALL_OPERATION_TYPES (the closed set; coverage is enforced by tests)
11
+ * - OPERATION_REGISTRY (per-op required/optional/summary)
12
+ *
13
+ * This module adds presentation metadata only:
14
+ * - PUBLIC_JSON_EXAMPLES is the public --json wire shape per op, mirroring
15
+ * the HELP_TEXT "JSON op schema" block. The public JSON field names
16
+ * diverge from the IR field names for some ops (e.g. `create` uses
17
+ * JSON `file` but IR `path`); src/input/json-to-ir.ts owns that
18
+ * mapping. The catalog surfaces both views so the operator sees what
19
+ * the registry says (IR canonical) and what they actually type (JSON
20
+ * public).
21
+ *
22
+ * Design: docs/product/useability-and-guided-execution-track.md §3.1.
23
+ *
24
+ * Determinism: every exported function is pure and order-stable.
25
+ * - operations are returned in ALL_OPERATION_TYPES order;
26
+ * - JSON output is single-line with stable key order
27
+ * (operations -> [{type, required, optional, summary, jsonExample}]);
28
+ * - text output bytes are identical across runs for a given build.
29
+ *
30
+ * Authority:
31
+ * - This module does not interact with the planner, the safety gate,
32
+ * the executor, the model-insertion path, or any approval surface.
33
+ * - The output is informational. Nothing in this catalog can be approved
34
+ * or executed. To actually run an operation, the operator authors a
35
+ * --json or batch payload and goes through the existing approval flow.
36
+ */
37
+ import { type OperationType } from "../../input/op-registry.js";
38
+ /**
39
+ * Public catalog entry shape. Stable; this is the JSON output schema.
40
+ */
41
+ export type CapabilityEntry = {
42
+ readonly type: OperationType;
43
+ /** IR canonical field names (from OPERATION_REGISTRY.required). */
44
+ readonly required: readonly string[];
45
+ /** IR canonical field names (from OPERATION_REGISTRY.optional). */
46
+ readonly optional: readonly string[];
47
+ /** One-line human description (from OPERATION_REGISTRY.summary). */
48
+ readonly summary: string;
49
+ /** Public --json / batch wire-shape example. */
50
+ readonly jsonExample: Readonly<Record<string, unknown>>;
51
+ };
52
+ /**
53
+ * Top-level catalog shape. Stable; the JSON output is exactly this.
54
+ */
55
+ export type CapabilitiesCatalog = {
56
+ readonly operations: readonly CapabilityEntry[];
57
+ };
58
+ /**
59
+ * Build the catalog. Pure. Deterministic. Operations are in
60
+ * ALL_OPERATION_TYPES order (which is itself frozen).
61
+ */
62
+ export declare function buildCapabilitiesCatalog(): CapabilitiesCatalog;
63
+ /**
64
+ * Render the catalog as a single-line JSON string, terminated by exactly
65
+ * one newline. Key order is fixed by the CapabilitiesCatalog +
66
+ * CapabilityEntry shapes above, which are constructed in a fixed order in
67
+ * buildCapabilitiesCatalog. JSON.stringify preserves insertion order for
68
+ * string keys per the ECMAScript spec.
69
+ */
70
+ export declare function renderCapabilitiesJson(): string;
71
+ /**
72
+ * Render the catalog as a human-readable text block. Bytes are identical
73
+ * across runs for a given build.
74
+ */
75
+ export declare function renderCapabilitiesText(): string;
76
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/shell/cli/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,4BAA4B,CAAC;AAuBpC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,oEAAoE;IACpE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gDAAgD;IAChD,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,CAAC;CACjD,CAAC;AAEF;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,mBAAmB,CAc9D;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAoB/C"}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * usesteady capabilities -- read-only catalog of supported IR operations.
3
+ *
4
+ * Pure module. No I/O, no process.exit, no execution. Importing this module
5
+ * cannot read stdin, write the filesystem, spawn a process, or talk to a
6
+ * model. It exists to render the operator-facing catalog of operations the
7
+ * current build supports.
8
+ *
9
+ * Source of truth: src/input/op-registry.ts
10
+ * - ALL_OPERATION_TYPES (the closed set; coverage is enforced by tests)
11
+ * - OPERATION_REGISTRY (per-op required/optional/summary)
12
+ *
13
+ * This module adds presentation metadata only:
14
+ * - PUBLIC_JSON_EXAMPLES is the public --json wire shape per op, mirroring
15
+ * the HELP_TEXT "JSON op schema" block. The public JSON field names
16
+ * diverge from the IR field names for some ops (e.g. `create` uses
17
+ * JSON `file` but IR `path`); src/input/json-to-ir.ts owns that
18
+ * mapping. The catalog surfaces both views so the operator sees what
19
+ * the registry says (IR canonical) and what they actually type (JSON
20
+ * public).
21
+ *
22
+ * Design: docs/product/useability-and-guided-execution-track.md §3.1.
23
+ *
24
+ * Determinism: every exported function is pure and order-stable.
25
+ * - operations are returned in ALL_OPERATION_TYPES order;
26
+ * - JSON output is single-line with stable key order
27
+ * (operations -> [{type, required, optional, summary, jsonExample}]);
28
+ * - text output bytes are identical across runs for a given build.
29
+ *
30
+ * Authority:
31
+ * - This module does not interact with the planner, the safety gate,
32
+ * the executor, the model-insertion path, or any approval surface.
33
+ * - The output is informational. Nothing in this catalog can be approved
34
+ * or executed. To actually run an operation, the operator authors a
35
+ * --json or batch payload and goes through the existing approval flow.
36
+ */
37
+ import { ALL_OPERATION_TYPES, OPERATION_REGISTRY, } from "../../input/op-registry.js";
38
+ /**
39
+ * Public --json / batch wire-shape examples per op. Mirrors the HELP_TEXT
40
+ * "JSON op schema" block in use-steady.ts. These are the field names the
41
+ * operator actually types in --json or batch payloads.
42
+ *
43
+ * Frozen at module load. Mutation attempts fail loud in strict mode (which
44
+ * the test runner uses) -- coverage of ALL_OPERATION_TYPES is asserted by
45
+ * tests in tests/shell/capabilities.test.ts.
46
+ */
47
+ const PUBLIC_JSON_EXAMPLES = Object.freeze({
48
+ create: Object.freeze({ type: "create", file: "path/to/file.ts" }),
49
+ create_dir: Object.freeze({ type: "create_dir", path: "path/to/dir" }),
50
+ delete: Object.freeze({ type: "delete", file: "path/to/file.ts" }),
51
+ rename: Object.freeze({ type: "rename", from: "old.ts", to: "new.ts" }),
52
+ replace: Object.freeze({ type: "replace", file: "src/Button.tsx", from: "old text", to: "new text" }),
53
+ append: Object.freeze({ type: "append", file: "src/notes.md", to: "text to append" }),
54
+ prepend: Object.freeze({ type: "prepend", file: "src/notes.md", to: "text to prepend" }),
55
+ run: Object.freeze({ type: "run", to: "npm test" }),
56
+ });
57
+ /**
58
+ * Build the catalog. Pure. Deterministic. Operations are in
59
+ * ALL_OPERATION_TYPES order (which is itself frozen).
60
+ */
61
+ export function buildCapabilitiesCatalog() {
62
+ const operations = ALL_OPERATION_TYPES.map((t) => {
63
+ const schema = OPERATION_REGISTRY[t];
64
+ const example = PUBLIC_JSON_EXAMPLES[t];
65
+ const entry = Object.freeze({
66
+ type: t,
67
+ required: schema.required,
68
+ optional: schema.optional,
69
+ summary: schema.summary,
70
+ jsonExample: example,
71
+ });
72
+ return entry;
73
+ });
74
+ return Object.freeze({ operations: Object.freeze(operations) });
75
+ }
76
+ /**
77
+ * Render the catalog as a single-line JSON string, terminated by exactly
78
+ * one newline. Key order is fixed by the CapabilitiesCatalog +
79
+ * CapabilityEntry shapes above, which are constructed in a fixed order in
80
+ * buildCapabilitiesCatalog. JSON.stringify preserves insertion order for
81
+ * string keys per the ECMAScript spec.
82
+ */
83
+ export function renderCapabilitiesJson() {
84
+ return JSON.stringify(buildCapabilitiesCatalog()) + "\n";
85
+ }
86
+ /**
87
+ * Render the catalog as a human-readable text block. Bytes are identical
88
+ * across runs for a given build.
89
+ */
90
+ export function renderCapabilitiesText() {
91
+ const catalog = buildCapabilitiesCatalog();
92
+ const lines = [];
93
+ lines.push("");
94
+ lines.push(" UseSteady supported operations:");
95
+ lines.push("");
96
+ for (const entry of catalog.operations) {
97
+ lines.push(` ${entry.type}`);
98
+ lines.push(` ${entry.summary}`);
99
+ lines.push(` Required (IR): ${entry.required.length > 0 ? entry.required.join(", ") : "(none)"}`);
100
+ lines.push(` Optional (IR): ${entry.optional.length > 0 ? entry.optional.join(", ") : "(none)"}`);
101
+ lines.push(` JSON example: ${JSON.stringify(entry.jsonExample)}`);
102
+ lines.push("");
103
+ }
104
+ lines.push(" This catalog is read-only. It does not execute anything.");
105
+ lines.push(" IR field names (above) may differ from public JSON field");
106
+ lines.push(" names in the example -- the example is what you type.");
107
+ lines.push(" For the full CLI usage, run: usesteady help");
108
+ lines.push("");
109
+ return lines.join("\n");
110
+ }
111
+ //# sourceMappingURL=capabilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../../../src/shell/cli/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EACL,mBAAmB,EACnB,kBAAkB,GAEnB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,oBAAoB,GACxB,MAAM,CAAC,MAAM,CAAC;IACZ,MAAM,EAAM,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAM,IAAI,EAA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CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QACvG,KAAK,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACxE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAC;IACzE,KAAK,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAC;IACzE,KAAK,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC;IACtE,KAAK,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC;IAC5D,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * usesteady quickstart -- guided first-run onboarding text.
3
+ *
4
+ * Pure module. No I/O, no process.exit, no execution. Importing this
5
+ * module cannot read stdin, write the filesystem, spawn a process, or
6
+ * talk to a model. It exists to render a single-screen orientation that
7
+ * gets a brand-new user from install to first safe workflow in under five
8
+ * minutes.
9
+ *
10
+ * Determinism: the exported function is pure and returns identical bytes
11
+ * across runs for a given build. There is no template interpolation, no
12
+ * environment-dependent text, no clock-based output.
13
+ *
14
+ * Authority:
15
+ * - This module does not interact with the planner, the safety gate,
16
+ * the executor, the model-insertion path, or any approval surface.
17
+ * - Quickstart only PRINTS instructions. It never starts a workflow,
18
+ * never approves anything, never reads stdin, never writes files.
19
+ * - Every command suggested in the text goes through the existing
20
+ * CLI dispatcher; nothing new is granted authority by quickstart.
21
+ *
22
+ * Source of truth:
23
+ * - For the operation catalog, the text directs the user to
24
+ * `usesteady capabilities` (src/shell/cli/capabilities.ts).
25
+ * - For starter workflows, the text directs the user to
26
+ * `usesteady templates` (src/shell/cli/templates.ts).
27
+ * - For full CLI usage, the text directs the user to
28
+ * `usesteady help`.
29
+ * No content is duplicated; quickstart is a curated entry point, not
30
+ * a second source of truth.
31
+ *
32
+ * Design: docs/product/useability-and-guided-execution-track.md (Product
33
+ * Capability Track) -- onboarding clarity. Surface added in the first
34
+ * implementation slice of "first successful workflow in under 5 minutes."
35
+ */
36
+ /**
37
+ * Render the quickstart guide as a human-readable text block. Bytes are
38
+ * identical across runs for a given build. Always succeeds.
39
+ */
40
+ export declare function renderQuickstartText(): string;
41
+ //# sourceMappingURL=quickstart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quickstart.d.ts","sourceRoot":"","sources":["../../../../src/shell/cli/quickstart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAsH7C"}