@guiho/runx 0.2.2 → 0.2.4

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
@@ -15,6 +15,29 @@ owner: runx
15
15
 
16
16
  # Changelog
17
17
 
18
+ ## 0.2.4 - 2026-07-14
19
+
20
+ ### Added
21
+
22
+ - Added Citty as the runtime CLI builder for typed commands, nested routing,
23
+ aliases, and generated usage.
24
+ - Added end-to-end command-contract coverage for help, version, catalog,
25
+ agents, self-management, selector shorthand, and native/package behavior.
26
+
27
+ ### Changed
28
+
29
+ - Replaced RunX's handwritten argument parser and top-level router with the
30
+ complete Citty command tree while preserving `runx r` and `runx <selector>`.
31
+ - Updated public documentation, architecture, AGENTS instructions, and the
32
+ bundled RunX skill for the Citty-owned interface.
33
+
34
+ ### Fixed
35
+
36
+ - Fixed `runx -v` and `runx -h` so they work outside configured projects
37
+ without attempting to discover `runx.yaml`.
38
+ - Unknown options and missing required selectors now report relevant command
39
+ usage instead of unrelated manifest errors.
40
+
18
41
  ## 0.2.2 - 2026-07-14
19
42
 
20
43
  ### Changed
package/DOCS.md CHANGED
@@ -26,6 +26,8 @@ lists its commands, and runs exactly one selected command.
26
26
  | Command | Purpose |
27
27
  | --- | --- |
28
28
  | `runx` | Show the home page and usage without loading a manifest. |
29
+ | `runx -h`, `runx --help` | Show Citty-generated usage without loading a manifest. Append help to a command for command-specific usage. |
30
+ | `runx -v`, `runx --version` | Show the installed version without loading a manifest. |
29
31
  | `runx list` | List all manifest commands. Add `--format json` for structured output. |
30
32
  | `runx describe <selector>` | Show one command's description and operational metadata. |
31
33
  | `runx check` | Validate discovery and the manifest without execution. |
@@ -34,11 +36,21 @@ lists its commands, and runs exactly one selected command.
34
36
  | `runx <selector>` | Human shorthand for `runx run <selector>` when no built-in name conflicts. |
35
37
  | `runx agents install <local|global>` | Install `guiho-s-runx`; add `--tool agents|claude|all` when needed. |
36
38
  | `runx agents instructions` | Add or refresh the managed RunX section in `AGENTS.md`. |
37
- | `runx upgrade [check|list]` | Check releases, list releases, or replace a native installed executable. |
39
+ | `runx upgrade` | Replace a native installed executable when a newer release is available. |
40
+ | `runx upgrade check` | Check whether a newer release is available. |
41
+ | `runx upgrade list` | List recent release versions. |
38
42
  | `runx uninstall [--dry-run]` | Remove a native installed executable. |
39
43
 
40
44
  Global flags: `--cwd <path>`, `--file <path>`, `--format <text|json>`,
41
- `--verbose`, `--version`, `--help`, `--help-tree`, and `--help-docs`.
45
+ `--verbose`, `-v`/`--version`, `-h`/`--help`, `--help-tree`, and
46
+ `--help-docs`. Applicable command flags include `--dry-run`, `--yes`, and
47
+ `--tool <agents|claude|all>`. Options may appear before or after their command.
48
+ Unknown options and missing required arguments produce command usage instead
49
+ of falling through to manifest discovery.
50
+
51
+ Citty is the CLI parser, command router, alias registry, and ordinary usage
52
+ renderer. RunX keeps its home page, extended command tree, and manifest guide
53
+ as the explicit `runx`, `--help-tree`, and `--help-docs` surfaces.
42
54
 
43
55
  ## Manifest
44
56
 
@@ -114,6 +126,8 @@ macOS/Linux assets from GitHub Releases into the user's local bin directory.
114
126
  on Windows replacement is scheduled after RunX exits. `runx uninstall` removes
115
127
  the same native executable and supports `--dry-run`.
116
128
 
129
+ When the latest GitHub Release matches the installed version, `runx upgrade` prints `Already up to date.` and exits successfully without downloading or scheduling executable replacement. JSON output reports `upToDate: true`.
130
+
117
131
  CI validates code and compiles the local executable plus the native release
118
132
  matrix. Protected `@guiho/runx@*` tags run the `production` publish workflow,
119
133
  which uploads twelve native assets to GitHub Releases and publishes the public
package/README.md CHANGED
@@ -61,15 +61,21 @@ Then use RunX:
61
61
 
62
62
  ```text
63
63
  runx Show the home page and usage.
64
+ runx -h Show Citty-generated command help.
65
+ runx -v Show the installed version without loading a manifest.
64
66
  runx list List commands in the nearest manifest.
65
67
  runx describe app-dev Explain one command without execution.
66
68
  runx run app-dev --dry-run Inspect the execution plan.
67
69
  runx run app-dev Execute the command.
68
70
  runx r app-dev Use the short run alias.
71
+ runx app-dev Use the human selector shorthand.
69
72
  ```
70
73
 
71
74
  Use `confirm: always` for commands that should require an explicit `--yes`.
72
75
  Use `runx list --format json` and stable UIDs for agent automation.
76
+ RunX uses Citty for argument parsing, aliases, command routing, and ordinary
77
+ usage text, so conventional `-h`/`--help` and `-v`/`--version` work outside a
78
+ configured project.
73
79
 
74
80
  ## Documentation
75
81
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  subject: runx-architecture
3
- description: Technical architecture for the RunX manifest, CLI, agent skill, and native distribution.
3
+ description: Technical architecture for the RunX manifest, Citty command tree, agent skill, and native distribution.
4
4
  parent: runx-docs
5
5
  children: []
6
6
  files:
7
- cli-architecture.md: Documents RunX component boundaries and execution flow.
7
+ cli-architecture.md: Documents Citty routing, RunX domain boundaries, safety invariants, and native distribution.
8
8
  documents:
9
9
  cli-architecture.md: Technical architecture for the first RunX CLI release.
10
10
  tags:
@@ -13,6 +13,7 @@ keywords:
13
13
  - runx
14
14
  - bun
15
15
  - cli
16
+ - citty
16
17
  flags: []
17
18
  status: stable
18
19
  ---
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: RunX CLI Architecture
3
3
  purpose: Describe the component boundaries and data flow of the RunX alpha CLI.
4
- description: Explains manifest discovery, TypeBox validation, selector resolution, execution, agent installation, and native distribution.
4
+ description: Explains Citty routing, manifest discovery, TypeBox validation, selector resolution, execution, agent installation, and native distribution.
5
5
  created: 2026-07-12
6
6
  flags:
7
7
  - approved
@@ -10,6 +10,7 @@ tags:
10
10
  - cli
11
11
  keywords:
12
12
  - runx
13
+ - citty
13
14
  - typebox
14
15
  - bun
15
16
  owner: runx-architecture
@@ -19,14 +20,20 @@ owner: runx-architecture
19
20
 
20
21
  ## Flow
21
22
 
22
- `cli.ts` parses a command and global flags. Manifest commands use `manifest.ts`
23
- to discover the nearest `runx.yaml`, parse YAML, validate a strict TypeBox
24
- schema, and resolve a selector. `render.ts` presents text or JSON. `executor.ts`
25
- spawns exactly one configured shell command only for a real run.
23
+ `cli.ts` defines a Citty command tree. Citty parses options and positionals,
24
+ resolves nested commands and aliases, and renders ordinary usage. A bounded
25
+ command-map adapter preserves the legacy `runx <selector>` shorthand while
26
+ known Citty commands retain precedence. Manifest commands use `manifest.ts` to
27
+ discover the nearest `runx.yaml`, parse YAML, validate a strict TypeBox schema,
28
+ and resolve a selector. `render.ts` presents text or JSON. `executor.ts` spawns
29
+ exactly one configured shell command only for a real run.
26
30
 
27
31
  ## Boundaries
28
32
 
29
33
  - Inspection paths never call the executor.
34
+ - Help, version, and CLI usage failures do not discover a manifest.
35
+ - `source/flags.ts` no longer exists; RunX has no second token parser or manual
36
+ execution router behind Citty.
30
37
  - `agents.ts` copies the embedded or packaged skill into the requested standard
31
38
  or Claude-compatible skill location.
32
39
  - `self-management.ts` queries GitHub Releases and only replaces/removes a
@@ -35,5 +42,6 @@ spawns exactly one configured shell command only for a real run.
35
42
 
36
43
  ## Distribution
37
44
 
38
- Bun compiles standalone binaries. Direct installers select a GitHub Release
39
- asset; CI validates source and a native build but does not publish artifacts.
45
+ Bun bundles Citty and compiles standalone binaries without a Node.js runtime.
46
+ Direct installers select a GitHub Release asset; CI validates source and the
47
+ native release matrix, while protected tags publish release artifacts.
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: RunX Citty CLI Migration
3
+ purpose: Define the accepted replacement of RunX's handwritten argument parser and router with Citty.
4
+ description: Records the full Citty command-tree migration, compatibility requirements, error behavior, validation scope, and patch-release boundary.
5
+ created: 2026-07-14
6
+ flags:
7
+ - accepted
8
+ - implemented
9
+ tags:
10
+ - decisions
11
+ - cli
12
+ - typescript
13
+ keywords:
14
+ - runx
15
+ - citty
16
+ - argument parsing
17
+ - command routing
18
+ - short flags
19
+ owner: runx-decisions
20
+ ---
21
+
22
+ # RunX Citty CLI Migration
23
+
24
+ ## Context
25
+
26
+ RunX currently parses arguments and routes commands with repository-owned loops
27
+ and conditionals. The parser recognizes only long options beginning with `--`,
28
+ so conventional aliases such as `runx -v` and `runx -h` are treated as command
29
+ selectors. That incorrect fallback causes global CLI operations to search for a
30
+ `runx.yaml` manifest.
31
+
32
+ Mirror and XDocs provide useful command semantics and help conventions, but
33
+ both also maintain handwritten parsers. RunX will instead use Citty as the
34
+ single parser, command router, alias registry, and usage generator.
35
+
36
+ ## Decision
37
+
38
+ - Add `citty` as a runtime dependency and bundle it into native RunX builds.
39
+ - Replace the handwritten parser in `source/flags.ts` and the manual routing in
40
+ `source/cli.ts` with a complete Citty command tree.
41
+ - Do not introduce Commander, yargs, oclif, Clipanion, or a second parsing
42
+ abstraction around Citty.
43
+ - Keep Bun as the development, test, build, and native-compilation toolchain.
44
+ - Do not add a Node.js runtime dependency or an npm `postinstall` hook.
45
+ - Release the completed migration as the next Mirror-managed patch after all
46
+ validation passes.
47
+
48
+ ## Command Tree
49
+
50
+ The Citty tree must preserve the current public commands:
51
+
52
+ ```text
53
+ runx
54
+ |- list
55
+ |- describe <selector>
56
+ |- run <selector>
57
+ |- r <selector>
58
+ |- check
59
+ |- agents
60
+ | |- install <local|global>
61
+ | `- instructions
62
+ |- upgrade
63
+ | |- check
64
+ | `- list
65
+ `- uninstall
66
+ ```
67
+
68
+ `r` remains an alias of `run`. The human shorthand `runx <selector>` remains
69
+ supported through the root command's positional selector compatibility path.
70
+ Known Citty subcommands always take precedence over selector fallback.
71
+
72
+ ## Arguments and Help
73
+
74
+ - Citty owns `-h`/`--help` and `-v`/`--version`.
75
+ - Version and help must return without reading or discovering `runx.yaml`.
76
+ - Preserve `--cwd`, `--file`, `--format`, `--verbose`, `--dry-run`, `--yes`,
77
+ `--help-tree`, and `--help-docs` where they apply.
78
+ - Preserve `--tool agents|claude|all` for agent-skill installation.
79
+ - Preserve JSON output contracts for successful commands and self-management
80
+ results.
81
+ - Use Citty metadata and argument definitions as the source of ordinary command
82
+ usage text. Keep RunX's extended help tree and documentation guidance as
83
+ explicit custom outputs rather than duplicating Citty's ordinary help.
84
+
85
+ ## Implementation Boundaries
86
+
87
+ - `source/cli.ts` owns the root Citty command and CLI entry function.
88
+ - Command definitions may be grouped into focused modules for catalog,
89
+ agent, and self-management commands when that keeps `source/cli.ts` small.
90
+ - Existing manifest parsing, selector resolution, execution, agent
91
+ installation, upgrade, and uninstall functions remain the business-logic
92
+ implementations. The migration changes their CLI adapters, not their domain
93
+ behavior.
94
+ - Remove `source/flags.ts` after all consumers migrate to Citty.
95
+ - Keep entrypoints thin: they register embedded native resources when needed
96
+ and invoke the Citty-backed CLI.
97
+
98
+ ## Error Behavior
99
+
100
+ - Unknown options fail as CLI usage errors and never trigger manifest discovery.
101
+ - Unknown explicit subcommands show relevant Citty usage.
102
+ - A root positional that is not a known command is treated as the intentional
103
+ selector shorthand and may discover a manifest.
104
+ - Missing command arguments show the specific command's usage.
105
+ - Domain failures continue to use `RunXError` messages and non-zero exit codes.
106
+ - Verbose mode may expose additional diagnostics, but normal errors remain
107
+ concise and actionable.
108
+
109
+ ## Testing
110
+
111
+ Automated coverage must include:
112
+
113
+ - `runx -v` and `runx --version` outside a configured project.
114
+ - `runx -h` and `runx --help` outside a configured project.
115
+ - Help and missing-argument behavior for each command group.
116
+ - `runx run <selector>`, `runx r <selector>`, and `runx <selector>` compatibility.
117
+ - Unknown flags and unknown explicit commands.
118
+ - Existing global flags, JSON output, confirmation gates, and dry runs.
119
+ - Agent install/instructions routing.
120
+ - Upgrade check/list/apply and uninstall routing.
121
+ - Typecheck, unit tests, library build, local native build, and the twelve-target
122
+ native binary matrix.
123
+
124
+ ## Documentation and Release
125
+
126
+ Update public command documentation, the bundled `guiho-s-runx` skill, source
127
+ descriptors, and release notes to match the Citty command tree. Validate the
128
+ affected XDocs scopes before delivery. Use Mirror to plan and apply the next
129
+ patch; never hand-edit the package version or create the release tag manually.
130
+
131
+ ## Acceptance Criteria
132
+
133
+ - No RunX-owned argument-token loop or manual top-level command router remains.
134
+ - `-v`, `--version`, `-h`, and `--help` work without a manifest.
135
+ - Current commands and selector shorthand remain compatible.
136
+ - Invalid CLI input produces usage errors rather than unrelated manifest errors.
137
+ - The npm package and native executables expose the same Citty-backed behavior.
138
+ - The implementation adds no `postinstall` hook and no Node.js runtime
139
+ requirement.
@@ -5,9 +5,11 @@ parent: runx-docs
5
5
  children: []
6
6
  files:
7
7
  alpha-boundaries.md: Captures accepted alpha scope, safety, distribution, and compatibility decisions.
8
+ citty-cli-migration.md: Defines the accepted full migration from handwritten parsing and routing to Citty.
8
9
  npm-trusted-publishing.md: Defines the accepted npm OIDC publishing workflow and protected-branch patch-release trial.
9
10
  documents:
10
11
  alpha-boundaries.md: Decision record for RunX alpha boundaries.
12
+ citty-cli-migration.md: Decision record for the complete Citty CLI parser and router migration.
11
13
  npm-trusted-publishing.md: Decision record for GitHub Actions npm trusted publishing and the first automated patch release.
12
14
  tags:
13
15
  - decisions
@@ -0,0 +1,169 @@
1
+ ---
2
+ name: RunX Citty CLI Migration Plan
3
+ purpose: Execute the accepted full migration from RunX handwritten argument parsing and routing to Citty.
4
+ description: Sequences dependency verification, command-tree migration, compatibility tests, documentation, protected delivery, and the next Mirror-managed patch release.
5
+ created: 2026-07-14
6
+ flags:
7
+ - approved
8
+ - in-progress
9
+ tags:
10
+ - plans
11
+ - cli
12
+ - citty
13
+ keywords:
14
+ - runx
15
+ - citty
16
+ - argument parsing
17
+ - command routing
18
+ - patch release
19
+ owner: runx-plans
20
+ ---
21
+
22
+ # RunX Citty CLI Migration Plan
23
+
24
+ ## Source Decision
25
+
26
+ - [Full Citty CLI Migration](../decisions/citty-cli-migration.md)
27
+
28
+ ## Unit 1: Add and Verify Citty
29
+
30
+ - Goal: Add Citty as the only CLI parser/router dependency and verify its Bun,
31
+ TypeScript, and native-executable interfaces before replacing production
32
+ routing.
33
+ - Dependencies: Accepted Citty migration decision.
34
+ - Files:
35
+ - `package.json`
36
+ - `bun.lock`
37
+ - Data, auth, and cache: No persisted data, authentication, or cache behavior
38
+ changes.
39
+ - Checks:
40
+ - Install `citty` with Bun as a runtime dependency.
41
+ - Inspect its locally installed types for command definitions, aliases,
42
+ positional arguments, raw argument execution, help, and version handling.
43
+ - Run a bounded native compile after integration begins to confirm Citty is
44
+ bundled without a Node.js runtime dependency.
45
+ - Acceptance: Citty is declared once as a production dependency and exposes
46
+ the interfaces needed for a testable RunX command tree.
47
+ - Stop conditions: Stop if Citty requires Node.js at runtime, cannot be bundled
48
+ by Bun, or cannot express the accepted command and alias contract.
49
+
50
+ ## Unit 2: Replace Parsing and Routing
51
+
52
+ - Goal: Make Citty own all CLI parsing, help, version handling, subcommands,
53
+ aliases, and dispatch while retaining RunX domain behavior.
54
+ - Dependencies: Unit 1 complete.
55
+ - Files:
56
+ - `source/cli.ts`
57
+ - `source/flags.ts` (remove)
58
+ - supporting source modules only when separation materially improves the
59
+ command definitions
60
+ - Command tree:
61
+ - `runx`
62
+ - `runx list`
63
+ - `runx describe <selector>`
64
+ - `runx run <selector>` and alias `runx r <selector>`
65
+ - `runx check`
66
+ - `runx agents install <local|global>`
67
+ - `runx agents instructions`
68
+ - `runx upgrade`, `runx upgrade check`, and `runx upgrade list`
69
+ - `runx uninstall`
70
+ - Compatibility:
71
+ - Preserve root `runx <selector>` as a compatibility shorthand after known
72
+ Citty subcommands take precedence.
73
+ - Preserve `--cwd`, `--file`, `--format`, `--verbose`, `--dry-run`, `--yes`,
74
+ `--help-tree`, `--help-docs`, and `--tool` on their applicable paths.
75
+ - Citty owns `-h`/`--help` and `-v`/`--version`; neither may discover a
76
+ manifest.
77
+ - Unknown options are usage failures; manifest and execution failures remain
78
+ `RunXError` domain failures.
79
+ - Data, auth, and cache: Manifest parsing, selectors, subprocess behavior,
80
+ installer destinations, upgrade metadata, and output payloads remain
81
+ unchanged.
82
+ - Acceptance: No handwritten token parser or top-level manual command router
83
+ remains, and all accepted command paths dispatch through Citty.
84
+ - Stop conditions: Stop if listing, describing, checking, help, version, or dry
85
+ runs spawn a configured command, or if JSON output contracts drift.
86
+
87
+ ## Unit 3: Prove and Document the Public Contract
88
+
89
+ - Goal: Lock the migrated command tree with tests and align every public
90
+ reference with the Citty-owned interface.
91
+ - Dependencies: Unit 2 complete.
92
+ - Files:
93
+ - CLI tests under `source/`
94
+ - `README.md`
95
+ - `DOCS.md`
96
+ - `skills/guiho-s-runx/SKILL.md`
97
+ - affected named `*.xdocs.md` descriptors
98
+ - `AGENTS.md` only if its durable command contract needs correction
99
+ - Tests:
100
+ - Root help, `-h`, `--help`, `-v`, and `--version` outside a RunX project.
101
+ - Every command, nested command, alias, positional selector, applicable flag,
102
+ and root-selector shorthand.
103
+ - Unknown option, missing argument, manifest/domain error, JSON, dry-run, and
104
+ no-spawn safety behavior.
105
+ - Upgrade and agent paths retain their existing business behavior.
106
+ - Documentation: Explain the Citty command tree and generated help without
107
+ exposing an obsolete parser implementation.
108
+ - Acceptance: Tests cover all public paths and aliases; the bundled skill and
109
+ XDocs metadata describe the same contract as the executable.
110
+ - Stop conditions: Stop on contradictory docs, missing command coverage, or a
111
+ safety regression.
112
+
113
+ ## Unit 4: Validate and Deliver Through Protected Main
114
+
115
+ - Goal: Demonstrate package and native-executable correctness, then merge the
116
+ implementation without bypassing repository protections.
117
+ - Dependencies: Unit 3 complete.
118
+ - Checks:
119
+ - `bun run typecheck`
120
+ - `bun test`
121
+ - `bun run build`
122
+ - `bun run binary`
123
+ - `bun run binaries`
124
+ - package dry-run and packed-launcher `-v`/help checks outside a manifest
125
+ - native executable `-v`/help checks outside a manifest
126
+ - targeted strict XDocs metadata and doctor checks
127
+ - `git diff --check`
128
+ - Delivery:
129
+ - Commit only understood migration changes on the current `codex/` branch.
130
+ - Push, open a pull request, wait for required CI, and merge through protected
131
+ `main`.
132
+ - Synchronize local `main` after the merge.
133
+ - Acceptance: CI passes and remote `main` contains the complete migration.
134
+ - Stop conditions: Stop on validation failure, unexpected worktree changes,
135
+ unresolved review, or branch-protection failure.
136
+
137
+ ## Unit 5: Publish the Next Mirror-Managed Patch
138
+
139
+ - Goal: Release the merged migration as patch `0.2.4` and verify both npm and
140
+ native GitHub distribution.
141
+ - Dependencies: Unit 4 merged; user authorization in this task to complete the
142
+ patch release.
143
+ - Sequence:
144
+ - Load the Mirror workflow and inspect `mirror.config.toml`.
145
+ - Confirm a clean, synchronized base and run the full release validation.
146
+ - Run `mirror version plan patch` and require `0.2.4`.
147
+ - Prepare the allowed changelog/XDocs updates and commit them.
148
+ - Apply the patch with Mirror; do not hand-edit managed versions.
149
+ - Deliver the release commit through protected `main`, then push the protected
150
+ tag only after the tagged commit is in `main` history.
151
+ - Monitor the `production` workflow while the user performs its manual
152
+ environment approval.
153
+ - Verify the GitHub Release assets and npm version/provenance.
154
+ - Acceptance: `package.json`, the Mirror release commit, protected tag,
155
+ successful Publish run, GitHub Release, and npm registry all agree on
156
+ `0.2.4`.
157
+ - Stop conditions: Stop before tagging if Mirror plans another version or
158
+ validation fails. If publication fails after tagging, preserve the tag and
159
+ capture the exact failure before deciding any follow-up release.
160
+
161
+ ## TODO Alignment
162
+
163
+ This is a single authorized execution session with a durable decision, plan,
164
+ and review. It does not require a separate long-running TODO entry.
165
+
166
+ ## First Executable Unit
167
+
168
+ Unit 1: add Citty with Bun and verify the installed API against the accepted
169
+ RunX command contract.
@@ -5,15 +5,18 @@ parent: runx-docs
5
5
  children: []
6
6
  files:
7
7
  alpha-implementation.md: Breaks the accepted alpha into implementation and validation units.
8
+ citty-cli-migration.md: Executes the full Citty command-tree migration, compatibility validation, protected delivery, and patch release.
8
9
  npm-trusted-publishing-release.md: Sequences workflow implementation, protected delivery, Mirror patching, and public trusted-publishing verification.
9
10
  documents:
10
11
  alpha-implementation.md: Plan used for the initial RunX implementation.
12
+ citty-cli-migration.md: Active plan for replacing handwritten CLI parsing and routing with Citty and delivering its patch release.
11
13
  npm-trusted-publishing-release.md: Approved executable plan for the RunX 0.2.1 trusted-publishing release trial.
12
14
  tags:
13
15
  - plans
14
16
  keywords:
15
17
  - runx
16
18
  - implementation
19
+ - citty
17
20
  flags: []
18
21
  status: stable
19
22
  ---
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: RunX Citty CLI Migration Implementation Review
3
+ purpose: Review the completed Citty migration against its accepted decision, executable plan, architecture, and public contract.
4
+ description: Records findings, acceptance checks, verification evidence, documentation alignment, and residual risk before protected delivery.
5
+ created: 2026-07-14
6
+ flags:
7
+ - accepted
8
+ tags:
9
+ - reviews
10
+ - implementation
11
+ - cli
12
+ keywords:
13
+ - runx
14
+ - citty
15
+ - command routing
16
+ - native executable
17
+ owner: runx-implementation-reviews
18
+ ---
19
+
20
+ # RunX Citty CLI Migration Implementation Review
21
+
22
+ ## Verdict
23
+
24
+ Accepted for protected delivery.
25
+
26
+ ## Findings
27
+
28
+ No open blocker, high-severity, or medium-severity findings remain.
29
+
30
+ Two review findings were corrected before this verdict:
31
+
32
+ - The selector-compatible command map now has a null prototype, so valid
33
+ selector names such as `constructor` cannot collide with inherited object
34
+ properties.
35
+ - Root, catalog, run, agent-install, and self-management argument definitions
36
+ are separated, so Citty help shows only applicable flags while the root still
37
+ accepts options before or after commands.
38
+
39
+ ## Acceptance Criteria Check
40
+
41
+ - Citty is the only argument parser, alias registry, command router, and
42
+ ordinary usage renderer.
43
+ - `source/flags.ts` is removed and no RunX-owned token parsing loop remains.
44
+ - `-h`, `--help`, `-v`, and `--version` work outside a configured project.
45
+ - All catalog, nested agent, nested upgrade, uninstall, alias, and selector
46
+ shorthand paths dispatch through Citty command definitions.
47
+ - Unknown options and missing positionals produce relevant usage without
48
+ manifest discovery.
49
+ - Manifest, selector, execution, agent, upgrade, uninstall, text, and JSON
50
+ domain behavior remains in the existing modules.
51
+ - Inspection, help, version, and dry-run paths do not execute a configured
52
+ command.
53
+ - Citty bundles into the local native executable and all twelve release targets
54
+ without adding a Node.js runtime requirement.
55
+ - The npm package declares Citty as a runtime dependency and has no
56
+ `postinstall` script.
57
+
58
+ ## Verification Evidence
59
+
60
+ - Typecheck, thirteen tests, library build, local native compile, twelve-target
61
+ native matrix, npm pack dry-run, packed launcher, and strict XDocs checks
62
+ passed.
63
+ - Tests cover root and nested help, short and long version/help flags, all
64
+ public command routes, aliases, options before and after commands, JSON,
65
+ safety gates, usage errors, agent installation, self-management routing, and
66
+ selector prototype-name compatibility.
67
+
68
+ ## Docs And TODO Check
69
+
70
+ - README, canonical docs, architecture, AGENTS instructions, bundled skill,
71
+ decision, plan, and affected XDocs descriptors align with the implementation.
72
+ - No standalone TODO was needed because the accepted plan was executed in this
73
+ authorized session.
74
+
75
+ ## Residual Risk
76
+
77
+ The remaining risk is distribution-only: GitHub CI, protected merge, tag
78
+ creation, manual `production` environment approval, and public npm/GitHub
79
+ publication must still complete. Unit 5 owns that evidence.
80
+
81
+ ## References
82
+
83
+ - [Citty CLI Migration Decision](../../decisions/citty-cli-migration.md)
84
+ - [Citty CLI Migration Plan](../../plans/citty-cli-migration.md)
85
+ - [Citty CLI Migration Validation](../../validation/citty-cli-migration.md)
@@ -0,0 +1,22 @@
1
+ ---
2
+ subject: runx-implementation-reviews
3
+ description: Delivery-readiness reviews of implemented RunX plans and behavior changes.
4
+ parent: runx-reviews
5
+ children: []
6
+ files:
7
+ citty-cli-migration-review.md: Reviews the implemented Citty command tree, compatibility adapter, tests, documentation, packaging, and release readiness.
8
+ documents:
9
+ citty-cli-migration-review.md: Accepted implementation review for the full Citty CLI migration.
10
+ tags:
11
+ - reviews
12
+ - implementation
13
+ keywords:
14
+ - runx
15
+ - citty
16
+ - implementation review
17
+ flags: []
18
+ status: stable
19
+ ---
20
+
21
+ Implementation reviews compare delivered RunX behavior with accepted decisions,
22
+ plans, architecture, tests, and validation evidence.