@guiho/runx 0.2.0

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 (72) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/DOCS.md +118 -0
  3. package/LICENSE.md +36 -0
  4. package/README.md +79 -0
  5. package/SECURITY.md +28 -0
  6. package/devops/build-binaries.ts +99 -0
  7. package/devops/devops.xdocs.md +25 -0
  8. package/devops/install.ps1 +216 -0
  9. package/devops/install.sh +324 -0
  10. package/docs/architecture/architecture.xdocs.md +20 -0
  11. package/docs/architecture/cli-architecture.md +39 -0
  12. package/docs/decisions/alpha-boundaries.md +29 -0
  13. package/docs/decisions/decisions.xdocs.md +19 -0
  14. package/docs/docs.xdocs.md +24 -0
  15. package/docs/plans/alpha-implementation.md +27 -0
  16. package/docs/plans/plans.xdocs.md +19 -0
  17. package/docs/requirements/alpha-command-catalog.md +41 -0
  18. package/docs/requirements/requirements.xdocs.md +19 -0
  19. package/docs/todo/implement-runx-alpha.md +36 -0
  20. package/docs/todo/protect-branches-and-tag-creation.md +83 -0
  21. package/docs/todo/todo.xdocs.md +21 -0
  22. package/docs/validation/alpha-implementation-summary.md +52 -0
  23. package/docs/validation/validation.xdocs.md +21 -0
  24. package/library/agents.d.ts +11 -0
  25. package/library/agents.d.ts.map +1 -0
  26. package/library/agents.js +51 -0
  27. package/library/cli.d.ts +3 -0
  28. package/library/cli.d.ts.map +1 -0
  29. package/library/cli.js +146 -0
  30. package/library/embedded-resources.d.ts +7 -0
  31. package/library/embedded-resources.d.ts.map +1 -0
  32. package/library/embedded-resources.js +5 -0
  33. package/library/errors.d.ts +6 -0
  34. package/library/errors.d.ts.map +1 -0
  35. package/library/errors.js +12 -0
  36. package/library/executor.d.ts +3 -0
  37. package/library/executor.d.ts.map +1 -0
  38. package/library/executor.js +24 -0
  39. package/library/flags.d.ts +5 -0
  40. package/library/flags.d.ts.map +1 -0
  41. package/library/flags.js +32 -0
  42. package/library/guiho-runx-bin.d.ts +3 -0
  43. package/library/guiho-runx-bin.d.ts.map +1 -0
  44. package/library/guiho-runx-bin.js +3 -0
  45. package/library/guiho-runx-native-bin.d.ts +3 -0
  46. package/library/guiho-runx-native-bin.d.ts.map +1 -0
  47. package/library/guiho-runx-native-bin.js +5 -0
  48. package/library/guiho-runx.d.ts +4 -0
  49. package/library/guiho-runx.d.ts.map +1 -0
  50. package/library/guiho-runx.js +2 -0
  51. package/library/help.d.ts +6 -0
  52. package/library/help.d.ts.map +1 -0
  53. package/library/help.js +47 -0
  54. package/library/manifest.d.ts +41 -0
  55. package/library/manifest.d.ts.map +1 -0
  56. package/library/manifest.js +112 -0
  57. package/library/render.d.ts +6 -0
  58. package/library/render.d.ts.map +1 -0
  59. package/library/render.js +40 -0
  60. package/library/self-management.d.ts +13 -0
  61. package/library/self-management.d.ts.map +1 -0
  62. package/library/self-management.js +82 -0
  63. package/library/types.d.ts +31 -0
  64. package/library/types.d.ts.map +1 -0
  65. package/library/types.js +0 -0
  66. package/package.json +77 -0
  67. package/scripts/runx-bin.ts +18 -0
  68. package/scripts/scripts.xdocs.md +20 -0
  69. package/skills/guiho-s-runx/SKILL.md +57 -0
  70. package/skills/guiho-s-runx/agents/openai.yaml +4 -0
  71. package/skills/guiho-s-runx/guiho-s-runx.xdocs.md +22 -0
  72. package/skills/skills.xdocs.md +19 -0
@@ -0,0 +1,324 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Install GUIHO RunX as a native CLI binary from GitHub Releases.
4
+ #
5
+ set -Eeuo pipefail
6
+
7
+ REPO="${RUNX_REPO:-CGuiho/runx}"
8
+ VERSION="${RUNX_VERSION:-latest}"
9
+ INSTALL_DIR="${RUNX_INSTALL_DIR:-$HOME/.local/bin}"
10
+ ARCH_OVERRIDE=""
11
+ VARIANT_OVERRIDE=""
12
+ OS=""
13
+ ARCH=""
14
+ CANDIDATES=()
15
+ TMP=""
16
+
17
+ cleanup() {
18
+ if [[ -n "$TMP" ]]; then
19
+ rm -rf -- "$TMP"
20
+ fi
21
+ }
22
+
23
+ trap cleanup EXIT
24
+
25
+ usage() {
26
+ cat <<EOF
27
+ Install GUIHO RunX as a native CLI binary from GitHub Releases.
28
+
29
+ Usage: install.sh [flags]
30
+
31
+ Flags:
32
+ -v, --version VERSION Version to install (default: latest).
33
+ Examples: latest, 0.1.1, @guiho/runx@0.1.1
34
+ --arch ARCH Force architecture: x64 | arm64 (default: auto-detect)
35
+ --variant VARIANT Force x64 variant: baseline | default | modern (default: baseline)
36
+ --install-dir DIR Install directory (default: \$HOME/.local/bin)
37
+ -h, --help Show this help
38
+
39
+ Environment variables:
40
+ RUNX_VERSION Same as --version
41
+ RUNX_REPO GitHub repo (default: CGuiho/runx)
42
+ RUNX_INSTALL_DIR Same as --install-dir
43
+ EOF
44
+ }
45
+
46
+ fail() {
47
+ printf 'error: %s\n' "$*" >&2
48
+ exit 1
49
+ }
50
+
51
+ require_command() {
52
+ command -v "$1" >/dev/null 2>&1 || fail "required command not found: $1"
53
+ }
54
+
55
+ require_value() {
56
+ local option="$1"
57
+ local value="${2:-}"
58
+
59
+ [[ -n "$value" ]] || fail "$option requires a value"
60
+ }
61
+
62
+ parse_args() {
63
+ while [[ $# -gt 0 ]]; do
64
+ case "$1" in
65
+ -v | --version)
66
+ require_value "$1" "${2:-}"
67
+ VERSION="$2"
68
+ shift 2
69
+ ;;
70
+ --version=*)
71
+ VERSION="${1#*=}"
72
+ shift
73
+ ;;
74
+ --arch)
75
+ require_value "$1" "${2:-}"
76
+ ARCH_OVERRIDE="$2"
77
+ shift 2
78
+ ;;
79
+ --arch=*)
80
+ ARCH_OVERRIDE="${1#*=}"
81
+ shift
82
+ ;;
83
+ --variant)
84
+ require_value "$1" "${2:-}"
85
+ VARIANT_OVERRIDE="$2"
86
+ shift 2
87
+ ;;
88
+ --variant=*)
89
+ VARIANT_OVERRIDE="${1#*=}"
90
+ shift
91
+ ;;
92
+ --install-dir)
93
+ require_value "$1" "${2:-}"
94
+ INSTALL_DIR="$2"
95
+ shift 2
96
+ ;;
97
+ --install-dir=*)
98
+ INSTALL_DIR="${1#*=}"
99
+ shift
100
+ ;;
101
+ -h | --help)
102
+ usage
103
+ exit 0
104
+ ;;
105
+ *)
106
+ fail "unknown flag: $1. Run with --help for usage."
107
+ ;;
108
+ esac
109
+ done
110
+ }
111
+
112
+ detect_os() {
113
+ case "$(uname -s)" in
114
+ Linux) printf 'linux\n' ;;
115
+ Darwin) printf 'macos\n' ;;
116
+ *) fail "unsupported OS: $(uname -s)" ;;
117
+ esac
118
+ }
119
+
120
+ detect_arch() {
121
+ if [[ -n "$ARCH_OVERRIDE" ]]; then
122
+ case "$ARCH_OVERRIDE" in
123
+ x64 | arm64) printf '%s\n' "$ARCH_OVERRIDE" ;;
124
+ *) fail "invalid --arch '$ARCH_OVERRIDE'. Must be x64 or arm64." ;;
125
+ esac
126
+ return
127
+ fi
128
+
129
+ case "$(uname -m)" in
130
+ x86_64 | amd64) printf 'x64\n' ;;
131
+ arm64 | aarch64) printf 'arm64\n' ;;
132
+ *) fail "unsupported architecture: $(uname -m)" ;;
133
+ esac
134
+ }
135
+
136
+ build_candidates() {
137
+ local variant="${VARIANT_OVERRIDE:-baseline}"
138
+
139
+ if [[ "$ARCH" == "arm64" ]]; then
140
+ [[ -z "$VARIANT_OVERRIDE" ]] || fail "--variant is only valid for x64 installs"
141
+ CANDIDATES=("runx-${OS}-arm64")
142
+ return
143
+ fi
144
+
145
+ case "$variant" in
146
+ baseline)
147
+ CANDIDATES=("runx-${OS}-x64-baseline" "runx-${OS}-x64" "runx-${OS}-x64-modern")
148
+ ;;
149
+ default)
150
+ CANDIDATES=("runx-${OS}-x64" "runx-${OS}-x64-baseline" "runx-${OS}-x64-modern")
151
+ ;;
152
+ modern)
153
+ CANDIDATES=("runx-${OS}-x64-modern" "runx-${OS}-x64" "runx-${OS}-x64-baseline")
154
+ ;;
155
+ *)
156
+ fail "invalid --variant '$variant'. Must be baseline, default, or modern."
157
+ ;;
158
+ esac
159
+ }
160
+
161
+ build_url() {
162
+ local asset="$1"
163
+
164
+ if [[ "$VERSION" == "latest" ]]; then
165
+ printf 'https://github.com/%s/releases/latest/download/%s\n' "$REPO" "$asset"
166
+ return
167
+ fi
168
+
169
+ local tag
170
+ case "$VERSION" in
171
+ @guiho/runx@*) tag="$VERSION" ;;
172
+ @*) tag="$VERSION" ;;
173
+ *) tag="@guiho/runx@${VERSION}" ;;
174
+ esac
175
+
176
+ local encoded_tag="${tag//@/%40}"
177
+ encoded_tag="${encoded_tag//\//%2F}"
178
+ printf 'https://github.com/%s/releases/download/%s/%s\n' "$REPO" "$encoded_tag" "$asset"
179
+ }
180
+
181
+ verify_native_binary() {
182
+ local path="$1"
183
+ local magic2
184
+ local magic4
185
+
186
+ magic2="$(LC_ALL=C head -c 2 "$path" 2>/dev/null || true)"
187
+ magic4="$(LC_ALL=C head -c 4 "$path" 2>/dev/null || true)"
188
+
189
+ case "$magic4" in
190
+ $'\177ELF' | $'\xcf\xfa\xed\xfe' | $'\xce\xfa\xed\xfe' | $'\xca\xfe\xba\xbe') return 0 ;;
191
+ '<!DO' | '<htm') return 1 ;;
192
+ esac
193
+
194
+ case "$magic2" in
195
+ MZ) return 0 ;;
196
+ '#!') return 1 ;;
197
+ esac
198
+
199
+ return 2
200
+ }
201
+
202
+ shell_profile_path() {
203
+ local shell_name="${SHELL##*/}"
204
+
205
+ case "$shell_name" in
206
+ fish) printf '%s/.config/fish/config.fish\n' "$HOME" ;;
207
+ zsh) printf '%s/.zshrc\n' "$HOME" ;;
208
+ bash)
209
+ if [[ "$OS" == "macos" && -f "$HOME/.bash_profile" ]]; then
210
+ printf '%s/.bash_profile\n' "$HOME"
211
+ else
212
+ printf '%s/.bashrc\n' "$HOME"
213
+ fi
214
+ ;;
215
+ *) printf '%s/.profile\n' "$HOME" ;;
216
+ esac
217
+ }
218
+
219
+ path_contains_install_dir() {
220
+ case ":$PATH:" in
221
+ *:"$INSTALL_DIR":*) return 0 ;;
222
+ *) return 1 ;;
223
+ esac
224
+ }
225
+
226
+ append_path_to_profile() {
227
+ local profile="$1"
228
+ local shell_name="${SHELL##*/}"
229
+
230
+ if [[ "$shell_name" == "fish" ]]; then
231
+ mkdir -p "$HOME/.config/fish"
232
+ if [[ -f "$profile" ]] && grep -Fq "$INSTALL_DIR" "$profile"; then
233
+ return 0
234
+ fi
235
+ printf '\n# Added by runx installer\nfish_add_path %q\n' "$INSTALL_DIR" >>"$profile"
236
+ return 0
237
+ fi
238
+
239
+ if [[ -f "$profile" ]] && grep -Fq "$INSTALL_DIR" "$profile"; then
240
+ return 0
241
+ fi
242
+
243
+ printf '\n# Added by runx installer\nexport PATH=%q:\$PATH\n' "$INSTALL_DIR" >>"$profile"
244
+ }
245
+
246
+ ensure_path() {
247
+ export PATH="$INSTALL_DIR:$PATH"
248
+
249
+ if path_contains_install_dir; then
250
+ printf 'runx: %s is available in PATH for this installer process.\n' "$INSTALL_DIR"
251
+ fi
252
+
253
+ local profile
254
+ profile="$(shell_profile_path)"
255
+ append_path_to_profile "$profile"
256
+
257
+ printf 'runx: ensured %s is added to PATH in %s\n' "$INSTALL_DIR" "$profile"
258
+ printf 'runx: restart your terminal, or run this for the current shell:\n'
259
+ printf ' export PATH=%q:\$PATH\n' "$INSTALL_DIR"
260
+ }
261
+
262
+ check_shadowing() {
263
+ local installed="$INSTALL_DIR/runx"
264
+ local resolved
265
+
266
+ resolved="$(command -v runx 2>/dev/null || true)"
267
+ [[ -n "$resolved" ]] || return 0
268
+ [[ "$resolved" == "$installed" ]] && return 0
269
+
270
+ printf '\nwarning: another runx appears earlier in PATH:\n' >&2
271
+ printf ' %s\n' "$resolved" >&2
272
+ printf 'The newly installed binary is at:\n' >&2
273
+ printf ' %s\n' "$installed" >&2
274
+ }
275
+
276
+ install_binary() {
277
+ TMP="$(mktemp -d)"
278
+
279
+ for asset in "${CANDIDATES[@]}"; do
280
+ local url
281
+ url="$(build_url "$asset")"
282
+ printf ' Trying %s\n' "$url"
283
+
284
+ if curl --fail --location --silent --show-error --proto '=https' --tlsv1.2 "$url" --output "$TMP/runx"; then
285
+ if ! verify_native_binary "$TMP/runx"; then
286
+ printf ' %s was not a native binary, trying next candidate...\n' "$asset" >&2
287
+ continue
288
+ fi
289
+
290
+ mkdir -p "$INSTALL_DIR"
291
+ install -m 0755 "$TMP/runx" "$INSTALL_DIR/runx"
292
+ printf 'Installed runx to %s/runx\n' "$INSTALL_DIR"
293
+ ensure_path
294
+ check_shadowing
295
+ printf 'Run: runx --help\n'
296
+ return 0
297
+ fi
298
+
299
+ printf ' not available, trying next...\n'
300
+ done
301
+
302
+ fail "no compatible runx binary found. Check available assets at: https://github.com/${REPO}/releases"
303
+ }
304
+
305
+ main() {
306
+ parse_args "$@"
307
+ require_command curl
308
+ require_command grep
309
+ require_command head
310
+ require_command install
311
+ require_command mktemp
312
+ require_command uname
313
+
314
+ OS="$(detect_os)"
315
+ ARCH="$(detect_arch)"
316
+ build_candidates
317
+
318
+ local variant_label=""
319
+ [[ -z "$VARIANT_OVERRIDE" ]] || variant_label=" variant=${VARIANT_OVERRIDE}"
320
+ printf 'runx: %s os=%s arch=%s%s\n' "$VERSION" "$OS" "$ARCH" "$variant_label"
321
+ install_binary
322
+ }
323
+
324
+ main "$@"
@@ -0,0 +1,20 @@
1
+ ---
2
+ subject: runx-architecture
3
+ description: Technical architecture for the RunX manifest, CLI, agent skill, and native distribution.
4
+ parent: runx-docs
5
+ children: []
6
+ files:
7
+ cli-architecture.md: Documents RunX component boundaries and execution flow.
8
+ documents:
9
+ cli-architecture.md: Technical architecture for the first RunX CLI release.
10
+ tags:
11
+ - architecture
12
+ keywords:
13
+ - runx
14
+ - bun
15
+ - cli
16
+ flags: []
17
+ status: stable
18
+ ---
19
+
20
+ Architecture records for the independently distributed RunX CLI.
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: RunX CLI Architecture
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.
5
+ created: 2026-07-12
6
+ flags:
7
+ - approved
8
+ tags:
9
+ - architecture
10
+ - cli
11
+ keywords:
12
+ - runx
13
+ - typebox
14
+ - bun
15
+ owner: runx-architecture
16
+ ---
17
+
18
+ # RunX CLI Architecture
19
+
20
+ ## Flow
21
+
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.
26
+
27
+ ## Boundaries
28
+
29
+ - Inspection paths never call the executor.
30
+ - `agents.ts` copies the embedded or packaged skill into the requested standard
31
+ or Claude-compatible skill location.
32
+ - `self-management.ts` queries GitHub Releases and only replaces/removes a
33
+ native executable, never a Bun development process.
34
+ - Native builds register `embedded-resources.ts`, which includes the skill.
35
+
36
+ ## Distribution
37
+
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.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: RunX Alpha Boundaries
3
+ purpose: Preserve the accepted product and technical decisions that constrain the first RunX implementation.
4
+ description: Records the manifest-first, local-only, safety, distribution, and public licensing decisions for the alpha.
5
+ created: 2026-07-12
6
+ flags:
7
+ - accepted
8
+ tags:
9
+ - decisions
10
+ keywords:
11
+ - runx
12
+ - yaml
13
+ - safety
14
+ owner: runx-decisions
15
+ ---
16
+
17
+ # RunX Alpha Boundaries
18
+
19
+ - Use one versioned YAML manifest named `runx.yaml`; do not merge manifests.
20
+ - RunX is implemented in Bun/TypeScript but consumes commands from any project
21
+ language through a configured local shell.
22
+ - Default `runx` behavior is a home page; `runx list` is explicit discovery.
23
+ - Keep `runx r` as an alias for explicit `runx run`.
24
+ - Treat manifests as trusted executable code and keep secret storage outside
25
+ the manifest.
26
+ - Use explicit confirmation fields rather than guessing safety from groups.
27
+ - Start as MIT-licensed open source with CI only and no npm publishing job.
28
+ - Keep task graphs, variables, remote execution, caching, and automatic imports
29
+ out of the alpha.
@@ -0,0 +1,19 @@
1
+ ---
2
+ subject: runx-decisions
3
+ description: Durable product and technical decisions for RunX.
4
+ parent: runx-docs
5
+ children: []
6
+ files:
7
+ alpha-boundaries.md: Captures accepted alpha scope, safety, distribution, and compatibility decisions.
8
+ documents:
9
+ alpha-boundaries.md: Decision record for RunX alpha boundaries.
10
+ tags:
11
+ - decisions
12
+ keywords:
13
+ - runx
14
+ - decisions
15
+ flags: []
16
+ status: stable
17
+ ---
18
+
19
+ Accepted decisions that later RunX work must preserve or intentionally supersede.
@@ -0,0 +1,24 @@
1
+ ---
2
+ subject: runx-docs
3
+ description: Durable requirements, architecture, decisions, plans, task specifications, and validation records for RunX.
4
+ parent: runx
5
+ children:
6
+ - runx-requirements
7
+ - runx-architecture
8
+ - runx-decisions
9
+ - runx-plans
10
+ - runx-todo
11
+ - runx-validation
12
+ files: {}
13
+ documents: {}
14
+ tags:
15
+ - documentation
16
+ keywords:
17
+ - runx
18
+ - requirements
19
+ - architecture
20
+ flags: []
21
+ status: stable
22
+ ---
23
+
24
+ The documentation tree records the approved alpha direction and its verification evidence.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: RunX Alpha Implementation Plan
3
+ purpose: Record the approved implementation sequence for the first RunX release.
4
+ description: Sequences package setup, manifest behavior, safety, native distribution, documentation, and validation.
5
+ created: 2026-07-12
6
+ flags:
7
+ - executed
8
+ tags:
9
+ - plans
10
+ keywords:
11
+ - runx
12
+ - alpha
13
+ - implementation
14
+ owner: runx-plans
15
+ ---
16
+
17
+ # RunX Alpha Implementation Plan
18
+
19
+ 1. Initialize Bun, XDocs, Mirror, task tracking, and the open-source baseline.
20
+ 2. Implement strict YAML discovery, validation, grouping, and selector rules.
21
+ 3. Implement listing, describe, check, run, `r`, dry-run, and confirmation.
22
+ 4. Add help surfaces, agent-skill installation, upgrade, uninstall, native
23
+ compilation, and direct installers.
24
+ 5. Add unit tests, CI, canonical user documentation, XDocs descriptors, and
25
+ parent GUIHO coordination links.
26
+ 6. Validate, record the implementation summary, and apply a Mirror minor
27
+ version transition without publishing or pushing.
@@ -0,0 +1,19 @@
1
+ ---
2
+ subject: runx-plans
3
+ description: Executable implementation plans for RunX milestones.
4
+ parent: runx-docs
5
+ children: []
6
+ files:
7
+ alpha-implementation.md: Breaks the accepted alpha into implementation and validation units.
8
+ documents:
9
+ alpha-implementation.md: Plan used for the initial RunX implementation.
10
+ tags:
11
+ - plans
12
+ keywords:
13
+ - runx
14
+ - implementation
15
+ flags: []
16
+ status: stable
17
+ ---
18
+
19
+ Plans that sequence RunX delivery work without replacing requirements or architecture.
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: RunX Alpha Command Catalog Requirements
3
+ purpose: Define the approved first-release outcome and acceptance criteria for RunX.
4
+ description: Captures the user-visible command catalog, safety, agent, installer, and CI requirements.
5
+ created: 2026-07-12
6
+ flags:
7
+ - approved
8
+ tags:
9
+ - requirements
10
+ - cli
11
+ keywords:
12
+ - runx
13
+ - runx.yaml
14
+ - command catalog
15
+ owner: runx-requirements
16
+ ---
17
+
18
+ # RunX Alpha Command Catalog Requirements
19
+
20
+ ## Outcome
21
+
22
+ RunX must provide a language-agnostic local command catalog in `runx.yaml` so
23
+ project operations no longer need to be hidden in `package.json` scripts.
24
+
25
+ ## Acceptance Criteria
26
+
27
+ - `runx` shows a home page and usage; `runx list` lists catalog commands.
28
+ - Each command has a stable UID, group-scoped ID, summary, description, and
29
+ shell command; validation rejects malformed or ambiguous manifests.
30
+ - `runx run` and `runx r` execute a selector, while `--dry-run` is read-only.
31
+ - Text and JSON inspection output support humans and agents.
32
+ - `confirm: always` blocks execution until `--yes` is supplied.
33
+ - The CLI provides help, help tree, help docs, native upgrade, uninstall, and
34
+ skill-install commands.
35
+ - Windows and macOS/Linux direct-install scripts, CI, MIT licensing, and a
36
+ bundled `guiho-s-runx` skill are present.
37
+
38
+ ## Non-goals
39
+
40
+ The alpha does not publish to npm, orchestrate task graphs, manage secrets,
41
+ run commands remotely, or perform automatic package-script migration.
@@ -0,0 +1,19 @@
1
+ ---
2
+ subject: runx-requirements
3
+ description: Product requirements and acceptance criteria for RunX releases.
4
+ parent: runx-docs
5
+ children: []
6
+ files:
7
+ alpha-command-catalog.md: Defines the accepted first-release scope and observable outcomes.
8
+ documents:
9
+ alpha-command-catalog.md: Requirements for the RunX alpha command catalog.
10
+ tags:
11
+ - requirements
12
+ keywords:
13
+ - runx
14
+ - command catalog
15
+ flags: []
16
+ status: stable
17
+ ---
18
+
19
+ Requirements that drive RunX implementation and validation.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: Implement RunX Alpha Command Catalog
3
+ purpose: Define the expected outcome, constraints, and completion signals for task 1 in TODO.md.
4
+ description: Describes the first RunX CLI release and the safety, documentation, and validation constraints that govern it.
5
+ created: 2026-07-12
6
+ flags:
7
+ - implementation
8
+ tags:
9
+ - todo
10
+ - cli
11
+ keywords:
12
+ - runx
13
+ - alpha
14
+ owner: runx-todo
15
+ ---
16
+
17
+ # Implement RunX Alpha Command Catalog
18
+
19
+ ## Todo Index
20
+
21
+ - Task: `1. Implement RunX Alpha Command Catalog`
22
+ - Status: completed
23
+ - Index: [TODO.md](../../TODO.md)
24
+
25
+ ## Outcome
26
+
27
+ Deliver a documented, locally executable RunX alpha that meets the approved
28
+ command-catalog acceptance criteria without publishing a package.
29
+
30
+ ## Watch-outs
31
+
32
+ - Preserve read-only behavior for list, describe, check, and dry run paths.
33
+ - Never place secrets in a manifest or run confirmation-gated commands without
34
+ `--yes`.
35
+ - Keep every new module and document represented by XDocs metadata.
36
+ - Use Mirror for the version transition and keep commits one file at a time.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: Protect RunX Branches and Tag Creation
3
+ purpose: Define the expected outcome, constraints, and completion signals for the highest-priority RunX repository protection task in TODO.md.
4
+ description: Describes the branch protection and tag creation safeguards needed before release activity continues.
5
+ created: 2026-07-12
6
+ flags:
7
+ - repository-security
8
+ tags:
9
+ - todo
10
+ - security
11
+ - release
12
+ keywords:
13
+ - runx
14
+ - branch protection
15
+ - protected branches
16
+ - tag creation
17
+ - release tags
18
+ owner: runx-todo
19
+ ---
20
+
21
+ # Protect RunX Branches and Tag Creation
22
+
23
+ ## Todo Index
24
+
25
+ - Task: `0. Protect RunX Branches and Tag Creation`
26
+ - Status: completed
27
+ - Priority: highest
28
+ - Index: [TODO.md](../../TODO.md)
29
+
30
+ ## Outcome
31
+
32
+ RunX has repository rules that protect important branches and restrict tag creation so release history cannot be changed or created without the intended review and authorization controls.
33
+
34
+ ## Scope
35
+
36
+ ### In Scope
37
+
38
+ - Protect the default branch and any release-maintained branches that RunX uses.
39
+ - Restrict creation of release tags and other protected tag patterns.
40
+ - Confirm the protections match the RunX release and Mirror workflow before release work continues.
41
+
42
+ ### Out of Scope
43
+
44
+ - Publishing packages, pushing tags, or changing release versions.
45
+ - Bypassing repository protections for local convenience.
46
+
47
+ ## Acceptance Signals
48
+
49
+ - The RunX repository has branch protection or repository rulesets active for the default branch and any selected release branches.
50
+ - Tag creation is restricted for the relevant release tag patterns.
51
+ - Required maintainers or administrators can verify that the rules are active before the next release/tagging step.
52
+
53
+ ## Active GitHub Rulesets
54
+
55
+ - [`Protect main`](https://github.com/CGuiho/runx/rules/18933230) - active branch ruleset `18933230` for `refs/heads/main` and `~DEFAULT_BRANCH`; blocks deletion and non-fast-forward updates, requires pull requests, and enables Copilot review on pushes and draft pull requests.
56
+ - [`Protect release tags`](https://github.com/CGuiho/runx/rules/18933243) - active tag ruleset `18933243` for `refs/tags/@guiho*/*@*`; restricts creation, updates, deletion, and non-fast-forward changes and requires linear history.
57
+
58
+ ## Verification Evidence
59
+
60
+ - GitHub CLI authenticated as repository owner `CGuiho` with the required repository scope.
61
+ - Both rulesets were created with `gh api` using the same active conditions and rule parameters used by the Mirror and XDocs repositories.
62
+ - Both RunX rulesets were read back from the GitHub API after creation and confirmed active.
63
+ - No release tag was created or pushed, and no package was published while configuring the protections.
64
+
65
+ ## Watch-outs
66
+
67
+ - Do not push tags or publish packages while configuring protections.
68
+ - Coordinate with GitHub permissions and GUIHO release ownership before locking down rules that could block maintainers.
69
+ - Keep Mirror-managed versioning and tag workflows intact; protections should guard the workflow, not replace it.
70
+
71
+ ## Before Starting
72
+
73
+ - Confirm the GitHub repository, default branch, release branch names, tag patterns, and required approvers.
74
+ - Confirm whether protections should be implemented with classic branch protection rules, repository rulesets, or both.
75
+
76
+ ## After Finishing
77
+
78
+ - Record the active rules, protected patterns, and any remaining manual verification needed.
79
+ - Update this task status only after the rules are confirmed in GitHub.
80
+
81
+ ## References
82
+
83
+ - [TODO.md](../../TODO.md)