@guiho/runx 0.2.3 → 0.2.5

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 (36) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/DOCS.md +16 -2
  3. package/README.md +6 -0
  4. package/docs/architecture/architecture.xdocs.md +3 -2
  5. package/docs/architecture/cli-architecture.md +15 -7
  6. package/docs/decisions/citty-cli-migration.md +139 -0
  7. package/docs/decisions/decisions.xdocs.md +5 -0
  8. package/docs/decisions/mirror-automatic-push.md +84 -0
  9. package/docs/plans/citty-cli-migration.md +169 -0
  10. package/docs/plans/mirror-automatic-push.md +77 -0
  11. package/docs/plans/plans.xdocs.md +6 -0
  12. package/docs/reviews/implementation/citty-cli-migration-review.md +85 -0
  13. package/docs/reviews/implementation/implementation.xdocs.md +22 -0
  14. package/docs/reviews/plans/citty-cli-migration-review.md +80 -0
  15. package/docs/reviews/plans/mirror-automatic-push-review.md +57 -0
  16. package/docs/reviews/plans/plans.xdocs.md +6 -0
  17. package/docs/reviews/reviews.xdocs.md +1 -0
  18. package/docs/validation/citty-cli-migration.md +95 -0
  19. package/docs/validation/validation.xdocs.md +3 -0
  20. package/library/cli.d.ts +8 -2
  21. package/library/cli.d.ts.map +1 -1
  22. package/library/cli.js +357 -103
  23. package/library/help.d.ts +0 -1
  24. package/library/help.d.ts.map +1 -1
  25. package/library/help.js +0 -4
  26. package/library/self-management.d.ts +2 -5
  27. package/library/self-management.d.ts.map +1 -1
  28. package/library/self-management.js +6 -5
  29. package/library/types.d.ts +5 -5
  30. package/library/types.d.ts.map +1 -1
  31. package/package.json +3 -2
  32. package/skills/guiho-s-runx/SKILL.md +16 -0
  33. package/skills/guiho-s-runx/guiho-s-runx.xdocs.md +4 -3
  34. package/library/flags.d.ts +0 -5
  35. package/library/flags.d.ts.map +0 -1
  36. package/library/flags.js +0 -32
@@ -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.
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: RunX Citty CLI Migration Plan Review
3
+ purpose: Verify that the full Citty migration plan is safe, complete, testable, and ready for execution.
4
+ description: Reviews command compatibility, safety invariants, native packaging, protected delivery, documentation, and Mirror release sequencing.
5
+ created: 2026-07-14
6
+ flags:
7
+ - approved
8
+ tags:
9
+ - reviews
10
+ - plans
11
+ - cli
12
+ keywords:
13
+ - runx
14
+ - citty
15
+ - plan review
16
+ - native executable
17
+ owner: runx-plan-reviews
18
+ ---
19
+
20
+ # RunX Citty CLI Migration Plan Review
21
+
22
+ ## Verdict
23
+
24
+ Ready for execution.
25
+
26
+ ## Findings
27
+
28
+ - No blocker or high-severity findings remain.
29
+ - The plan explicitly removes both handwritten parsing and manual top-level
30
+ routing, so the result cannot quietly retain a second parser behind Citty.
31
+ - The root-selector shorthand is treated as a compatibility path with known
32
+ Citty commands taking precedence, preventing command names from being
33
+ reinterpreted as manifest selectors.
34
+ - `-h` and `-v` are tested outside a configured project, directly covering the
35
+ failure that motivated the migration.
36
+ - Manifest parsing, selectors, subprocess execution, upgrades, installers, and
37
+ JSON payloads stay within their current domain modules; the migration is
38
+ bounded to CLI ownership.
39
+ - No data, authentication, authorization, or cache migrations are involved.
40
+
41
+ ## Safety and Compatibility Review
42
+
43
+ - The no-spawn invariant covers listing, describing, checking, help, version,
44
+ and dry runs.
45
+ - Missing arguments and unknown options are usage failures, while RunX domain
46
+ failures preserve their existing error contract.
47
+ - Every public command, nested route, alias, positional selector, and applicable
48
+ option has an explicit test requirement.
49
+ - Citty must bundle into both npm output and Bun native executables without a
50
+ Node.js runtime dependency.
51
+
52
+ ## Delivery and Release Review
53
+
54
+ - Complete Bun and native validation precedes protected-branch delivery.
55
+ - The implementation reaches `main` before Mirror plans and applies patch
56
+ `0.2.4`.
57
+ - The Mirror-managed release commit reaches protected `main` before its tag is
58
+ pushed.
59
+ - The plan preserves the `production` environment's manual approval gate and
60
+ observes npm and GitHub distribution after approval.
61
+
62
+ ## Documentation and TODO Review
63
+
64
+ - README, detailed docs, the bundled RunX skill, and affected XDocs descriptors
65
+ are named explicitly.
66
+ - The work is authorized for continuous execution in this session, so a second
67
+ TODO artifact would duplicate the decision, plan, and review without adding a
68
+ durable scheduling boundary.
69
+
70
+ ## First Executable Unit
71
+
72
+ Execute Unit 1 in
73
+ [RunX Citty CLI Migration Plan](../../plans/citty-cli-migration.md): add Citty
74
+ with Bun and verify its installed command API before replacing production
75
+ routing.
76
+
77
+ ## References
78
+
79
+ - [RunX Citty CLI Migration Plan](../../plans/citty-cli-migration.md)
80
+ - [Full Citty CLI Migration](../../decisions/citty-cli-migration.md)
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: RunX Mirror Automatic Push Plan Review
3
+ purpose: Verify that the automatic-push configuration plan is safe, bounded, and ready for execution.
4
+ description: Reviews synchronized-main safeguards, read-only validation, protected delivery, and release side effects.
5
+ created: 2026-07-14
6
+ flags:
7
+ - approved
8
+ tags:
9
+ - reviews
10
+ - plans
11
+ - release
12
+ keywords:
13
+ - runx
14
+ - mirror push
15
+ - plan review
16
+ - protected main
17
+ owner: runx-plan-reviews
18
+ ---
19
+
20
+ # RunX Mirror Automatic Push Plan Review
21
+
22
+ ## Verdict
23
+
24
+ Ready for execution.
25
+
26
+ ## Findings
27
+
28
+ - No blocker or high-severity findings remain.
29
+ - The clean, synchronized `main` precondition is explicit and prevents a
30
+ release tag from pointing at an unmerged feature or stale commit.
31
+ - Unit 1 uses only read-only Mirror validation and explicitly prohibits another
32
+ version apply, so the current `0.2.4` release remains unchanged.
33
+ - The plan documents that `push = true` makes every future Mirror apply an
34
+ externally visible release mutation.
35
+ - No application data, authentication, authorization, or cache behavior is
36
+ affected. GitHub credentials, rulesets, environment approval, and npm OIDC
37
+ remain external enforcement layers.
38
+
39
+ ## Delivery Review
40
+
41
+ - The configuration change must pass the protected pull-request workflow
42
+ before reaching `main`.
43
+ - Post-merge verification checks the resolved configuration on synchronized
44
+ `main` and confirms that no `0.2.5` tag was created.
45
+ - A CI failure, protection failure, or unexpected version mutation is an
46
+ explicit stop condition.
47
+
48
+ ## First Executable Unit
49
+
50
+ Execute Unit 1 in
51
+ [RunX Mirror Automatic Push Plan](../../plans/mirror-automatic-push.md): set and
52
+ document the resolved automatic-push policy without applying a release.
53
+
54
+ ## References
55
+
56
+ - [RunX Mirror Automatic Push Plan](../../plans/mirror-automatic-push.md)
57
+ - [RunX Mirror Automatic Release Push](../../decisions/mirror-automatic-push.md)
@@ -4,8 +4,12 @@ description: Execution-readiness reviews for RunX implementation and release pla
4
4
  parent: runx-reviews
5
5
  children: []
6
6
  files:
7
+ citty-cli-migration-review.md: Reviews completeness, compatibility, safety invariants, native packaging, and release sequencing for the Citty migration.
8
+ mirror-automatic-push-review.md: Reviews synchronized-main safeguards, read-only validation, protected delivery, and release side effects.
7
9
  npm-trusted-publishing-release-review.md: Reviews sequencing, acceptance criteria, safety gates, and validation for the RunX 0.2.1 trusted-publishing plan.
8
10
  documents:
11
+ citty-cli-migration-review.md: Ready-for-execution review of the full Citty CLI migration plan.
12
+ mirror-automatic-push-review.md: Ready-for-execution review of the Mirror automatic-push configuration plan.
9
13
  npm-trusted-publishing-release-review.md: Ready-for-execution review of the npm trusted-publishing release plan.
10
14
  tags:
11
15
  - reviews
@@ -13,6 +17,8 @@ tags:
13
17
  keywords:
14
18
  - runx
15
19
  - plan review
20
+ - citty
21
+ - mirror push
16
22
  - trusted publishing
17
23
  flags: []
18
24
  status: stable
@@ -3,6 +3,7 @@ subject: runx-reviews
3
3
  description: Structured reviews of RunX architecture, plans, implementation, and release readiness.
4
4
  parent: runx-docs
5
5
  children:
6
+ - runx-implementation-reviews
6
7
  - runx-plan-reviews
7
8
  files: {}
8
9
  documents: {}
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: RunX Citty CLI Migration Validation
3
+ purpose: Preserve verification evidence for the full Citty CLI migration before protected delivery and release.
4
+ description: Records TypeScript, tests, library, native binaries, npm packaging, CLI behavior, XDocs, failures, and residual distribution risk.
5
+ created: 2026-07-14
6
+ flags:
7
+ - validated
8
+ tags:
9
+ - validation
10
+ - cli
11
+ - release
12
+ keywords:
13
+ - runx
14
+ - citty
15
+ - native matrix
16
+ - npm pack
17
+ owner: runx-validation
18
+ ---
19
+
20
+ # RunX Citty CLI Migration Validation
21
+
22
+ ## Summary
23
+
24
+ The complete Citty migration passes the local merge and release gate. Source,
25
+ package, and native executable behavior agree on version `0.2.3` before the
26
+ planned Mirror patch to `0.2.4`.
27
+
28
+ ## Scope
29
+
30
+ - Citty dependency and command definitions.
31
+ - Root, catalog, agent, upgrade, and uninstall routing.
32
+ - Help, version, errors, aliases, selector shorthand, options, output formats,
33
+ confirmation, and dry-run safety.
34
+ - TypeScript library, local native executable, twelve release assets, npm
35
+ tarball, packed launcher, bundled skill, and XDocs metadata.
36
+
37
+ ## Commands Run
38
+
39
+ | Check | Result | Evidence |
40
+ | --- | --- | --- |
41
+ | `bun run typecheck` | passed | TypeScript emitted no diagnostics. |
42
+ | `bun test` | passed | 13 tests, 0 failures, 125 assertions. |
43
+ | `bun run build` | passed | TypeScript library output completed. |
44
+ | `bun run binary` | passed | Local Windows executable compiled with Citty bundled. |
45
+ | `bin/runx.exe -v` | passed | Printed `0.2.3` without manifest discovery. |
46
+ | `bin/runx.exe --help` | passed | Printed the Citty root command tree and options. |
47
+ | `bun run binaries` | passed | All 12 configured native assets compiled and were non-empty. |
48
+ | `npm pack --dry-run --json` | passed | Reported 78 package files. |
49
+ | `npm pack --json` | passed | Produced a 39,749-byte validation tarball with 78 files. |
50
+ | packed `scripts/runx-bin.ts -v` | passed | Printed `0.2.3` outside a manifest. |
51
+ | packed `scripts/runx-bin.ts --help` | passed | Printed Citty usage outside a manifest. |
52
+ | `xdocs tree` | passed | Included the complete RunX documentation tree. |
53
+ | `xdocs scan` | passed | Found 16 valid descriptors before adding this validation/review scope. |
54
+ | `xdocs doctor .` | passed | 0 errors and 0 warnings. |
55
+
56
+ ## Package Checks
57
+
58
+ - Packed `package.json` declares `citty: ^0.2.2` under runtime dependencies.
59
+ - Packed `package.json` has no `postinstall` script.
60
+ - The launcher selected the compiled `library/guiho-runx-bin.js` path and
61
+ returned successful version/help output.
62
+
63
+ ## Manual Behavior Checks
64
+
65
+ - Source and native `-v`/help worked outside a configured project.
66
+ - Citty usage displayed command-specific arguments and only applicable flags.
67
+ - Unknown options and missing selectors returned usage errors rather than a
68
+ missing-manifest error.
69
+ - A valid manifest selector named `constructor` executed through the root
70
+ shorthand, proving the compatibility map is prototype-safe.
71
+
72
+ ## Failures Or Blockers
73
+
74
+ No implementation blocker remains. Two environment-only validation attempts
75
+ failed before the successful package check: the sandbox denied `C:\tmp`, and
76
+ npm's default user cache was not writable. Re-running with repository-local
77
+ ignored `.temp` paths and npm cache completed successfully without changing the
78
+ artifact.
79
+
80
+ ## Skipped Checks
81
+
82
+ No plan-required local check was skipped. Public CI, protected merge, Mirror
83
+ patch application, protected tag push, manual environment approval, GitHub
84
+ Release assets, and npm provenance are pending Unit 5.
85
+
86
+ ## Readiness
87
+
88
+ Ready for protected implementation delivery and the Mirror-managed `0.2.4`
89
+ patch release.
90
+
91
+ ## References
92
+
93
+ - [Citty CLI Migration Decision](../decisions/citty-cli-migration.md)
94
+ - [Citty CLI Migration Plan](../plans/citty-cli-migration.md)
95
+ - [Citty CLI Migration Implementation Review](../reviews/implementation/citty-cli-migration-review.md)
@@ -5,13 +5,16 @@ parent: runx-docs
5
5
  children: []
6
6
  files:
7
7
  alpha-implementation-summary.md: Records the completed alpha implementation, checks, and release boundaries.
8
+ citty-cli-migration.md: Records the complete local validation gate for the Citty command-tree migration.
8
9
  documents:
9
10
  alpha-implementation-summary.md: Validation summary for the first RunX implementation.
11
+ citty-cli-migration.md: Validation evidence for TypeScript, tests, native assets, npm packaging, CLI behavior, and XDocs.
10
12
  npm-trusted-publishing-0.2.2.md: Validation evidence for the blocked 0.2.2 npm trusted-publishing retry.
11
13
  tags:
12
14
  - validation
13
15
  keywords:
14
16
  - runx
17
+ - citty
15
18
  - tests
16
19
  - summary
17
20
  flags: []
package/library/cli.d.ts CHANGED
@@ -1,3 +1,9 @@
1
- export declare const runCli: (rawArgs?: string[]) => Promise<void>;
2
- export declare const runCliWithErrorHandling: (rawArgs?: string[]) => Promise<void>;
1
+ /**
2
+ * @copyright Copyright © 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
+ */
4
+ import type { CommandDef } from 'citty';
5
+ export { runCli, runCliWithErrorHandling, runxCommand, };
6
+ declare const runxCommand: CommandDef<any>;
7
+ declare function runCli(rawArgs?: string[]): Promise<void>;
8
+ declare function runCliWithErrorHandling(rawArgs?: string[]): Promise<void>;
3
9
  //# sourceMappingURL=cli.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../source/cli.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,MAAM,aAAmB,MAAM,EAAE,KAA2B,OAAO,CAAC,IAAI,CAyBpF,CAAA;AAED,eAAO,MAAM,uBAAuB,aAAoB,MAAM,EAAE,KAAG,OAAO,CAAC,IAAI,CAY9E,CAAA"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../source/cli.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,OAAO,KAAK,EAAkB,UAAU,EAAkB,MAAM,OAAO,CAAA;AAGvE,OAAO,EACL,MAAM,EACN,uBAAuB,EACvB,WAAW,GACZ,CAAA;AAqPD,QAAA,MAAiB,WAAW,iBAAwB,CAAA;AAEpD,iBAAe,MAAM,CAAC,OAAO,GAAE,MAAM,EAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAY9E;AAED,iBAAe,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBxE"}