@lifeaitools/rdc-skills 0.35.3 → 0.35.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/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +26 -0
  3. package/commands/build.md +19 -0
  4. package/commands/deploy.md +20 -1
  5. package/commands/fixit.md +17 -0
  6. package/commands/flow.md +94 -0
  7. package/commands/mode.md +6 -0
  8. package/commands/release.md +11 -0
  9. package/guides/agent-bootstrap.md +248 -204
  10. package/hooks/foreground-process-gate.js +22 -64
  11. package/package.json +2 -2
  12. package/scripts/install-rdc-skills.js +11 -3
  13. package/skills/architecture-reviewer/SKILL.md +1 -0
  14. package/skills/behavior-audit/SKILL.md +1 -0
  15. package/skills/brochure/SKILL.md +1 -0
  16. package/skills/brochurify/SKILL.md +1 -0
  17. package/skills/clean-code-analyzer/SKILL.md +1 -0
  18. package/skills/convert/SKILL.md +1 -0
  19. package/skills/edit/SKILL.md +12 -0
  20. package/skills/env/SKILL.md +1 -0
  21. package/skills/extract-verifier-rules/SKILL.md +1 -0
  22. package/skills/fs-mcp/SKILL.md +1 -0
  23. package/skills/help/SKILL.md +1 -0
  24. package/skills/lifeai-brochure-author/SKILL.md +1 -0
  25. package/skills/new-model/SKILL.md +1 -0
  26. package/skills/package-design/SKILL.md +1 -0
  27. package/skills/pattern-advisor/SKILL.md +1 -0
  28. package/skills/pattern-refactoring-guide/SKILL.md +1 -0
  29. package/skills/refactor/SKILL.md +1 -0
  30. package/skills/regen-media/SKILL.md +1 -0
  31. package/skills/solid-validator/SKILL.md +1 -0
  32. package/skills/terminal-config/SKILL.md +1 -0
  33. package/skills/testing-strategy/SKILL.md +1 -0
  34. package/tests/foreground-process-gate.test.mjs +114 -0
  35. package/tests/harness-gates.test.mjs +9 -27
  36. package/tests/install-rdc-skills.test.mjs +91 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdc",
3
- "version": "0.35.3",
3
+ "version": "0.35.5",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code — plan, build, review, overnight unattended builds with work-item tracking and TDD enforcement.",
5
5
  "author": {
6
6
  "name": "LIFEAI",
package/CHANGELOG.md CHANGED
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## v0.35.4 — marketplace sync false-positive: untracked file blocked it forever
11
+
12
+ ### Fixed
13
+ - `syncMarketplaceCheckout()`'s dirty-check used plain `git status --porcelain`,
14
+ which also reports untracked files. A single harmless untracked file in a
15
+ marketplace clone (e.g. a stray local scratch file) made the check treat the
16
+ clone as "has local changes" and permanently refuse to sync it, on every
17
+ single install run, forever — even though `git reset --hard` never touches
18
+ untracked files and there was no real edit to preserve. This is the
19
+ confirmed root cause of the marketplace checkout sitting stale for over a
20
+ week despite repeated installer runs. Fixed to `--untracked-files=no`, which
21
+ checks only tracked-file modifications — genuine local edits still block the
22
+ sync exactly as before (PRESERVE-DIRTY intact); a stray untracked file no
23
+ longer does.
24
+ - Regression test added: a real temp git origin+clone pair reproduces both the
25
+ untracked-cruft case (must sync) and the genuine-local-edit case (must still
26
+ block), so this cannot silently regress.
27
+ - `tests/install-rdc-skills.test.mjs` also had two stale fixtures caught while
28
+ fixing this: `package-lock.json` version drifted from `package.json`
29
+ (0.35.2 vs 0.35.3+), and a hardcoded `skillCount === 36` assertion had rotted
30
+ against the real, current 43 skill directories. The count assertion now
31
+ compares against the actual `skills/*/SKILL.md` directories on disk instead
32
+ of a hardcoded number, so it can't go stale the same way again.
33
+
34
+ ---
35
+
10
36
  ## v0.35.3 — coding standards wired into plan/preplan/build/fixit/review
11
37
 
12
38
  ### Fixed
package/commands/build.md CHANGED
@@ -69,6 +69,25 @@ Read the task title and description, then:
69
69
  - Mentions visualization, chart, diagram, SVG → `viz`
70
70
  - Multiple types? Dispatch multiple agents, each with its guide.
71
71
 
72
+ ### Execution primitive for create/open/build/deploy checklist rows
73
+
74
+ When a dispatched agent's checklist row is to materialize a product shape,
75
+ open a signed edit session, run a target's declared build gates, or deploy
76
+ to dev-PM2/npm-registry, it uses the real, tested `rdc-harness` CLI instead
77
+ of hand-rolled bash/curl:
78
+
79
+ ```bash
80
+ node C:/Dev/rdc-harness/bin/rdc-harness.mjs <create|open|edit|build|deploy> <slug> --monorepo-root <the dispatched agent's own worktree>
81
+ ```
82
+
83
+ One JSON receipt per call, exit 0/1 — tick the checklist row with the parsed
84
+ receipt as evidence, not the raw dump. No Coolify awareness (production
85
+ deploy stays `/rdc:deploy`'s own path) and no live co-editing surface
86
+ outside `site-html`/`site-ts` (other classes get file-boundary save only —
87
+ real, currently-unbuilt gap for other product classes, not something to
88
+ paper over here). `open`/`edit` require `RDC_HARNESS_ISSUER_SECRET` set
89
+ explicitly per-session — never a default.
90
+
72
91
  ## Procedure
73
92
 
74
93
  1. **Load the epic and its durable admission decisions:**
@@ -27,11 +27,30 @@ No raw MCP dumps. No UUIDs unless asked.
27
27
  - `rdc:deploy audit` — fleet-wide scan for missed failures
28
28
  - `rdc:deploy audit --fix` — fleet scan + auto-remediate safe issues
29
29
  - `rdc:deploy maintenance <service>` — create, update, or verify a template-declared private service; no public domain or host port
30
+ - `rdc:deploy dev <slug>` — deploy to PM2 dev (Vultr), not Coolify — see Mode 0
30
31
  - `rdc:deploy` (no args) — print mode menu, ask which
31
32
 
32
33
  ## Modes
33
34
 
34
- ### Mode 1deploy <slug> [build-id]
35
+ ### Mode 0dev <slug> (PM2 development, not Coolify)
36
+
37
+ PM2 dev deploys route through the real, tested `rdc-harness` CLI instead of
38
+ raw PM2/curl — it already implements this path (`shipRoute: pm2-development`,
39
+ via `@lifeaitools/regen-deploy-mgr` on loopback :52438, never raw PM2):
40
+
41
+ ```
42
+ rdc:deploy dev: <slug>
43
+ [ ] node C:/Dev/rdc-harness/bin/rdc-harness.mjs deploy <slug> --monorepo-root <caller's own worktree>
44
+ [ ] JSON receipt parsed — shipRoute confirmed "pm2-development" (else: not this product's route, see receipt.reason)
45
+ [ ] Receipt reports ok / the specific refusal, reported verbatim — not narrated
46
+ ✅ rdc:deploy dev: <slug> — <receipt outcome in one line>
47
+ ```
48
+
49
+ A receipt with `applicable: false, reason: 'not_pm2_shipped'` means this slug
50
+ ships a different way (registry, static, or Coolify) — report that plainly,
51
+ do not retry as Coolify without confirming that's actually the right route.
52
+
53
+ ### Mode 1 — deploy <slug> [build-id] (Coolify — staging/production)
35
54
 
36
55
  ```
37
56
  rdc:deploy: <slug> → <domain>
package/commands/fixit.md CHANGED
@@ -70,6 +70,23 @@ This signals the Stop hook that fixit is handling its own documentation.
70
70
 
71
71
  ### 4. Make the fix
72
72
 
73
+ If the fix is a create/open/build/deploy step against a real fleet
74
+ repository (materialize a product shape, open a signed edit session, run a
75
+ target's declared build gates, or deploy to dev-PM2/npm-registry), use the
76
+ real, tested `rdc-harness` CLI instead of hand-rolled bash/curl:
77
+
78
+ ```bash
79
+ node C:/Dev/rdc-harness/bin/rdc-harness.mjs <create|open|edit|build|deploy> <slug> --monorepo-root <your own worktree, never the shared checkout>
80
+ ```
81
+
82
+ One JSON receipt on stdout, exit 0/1 — use it as the evidence for whichever
83
+ checklist/commit step it satisfies. It has no Coolify awareness (deploy here
84
+ means PM2 dev or npm publish only — Coolify stays this skill's own §5.5 path)
85
+ and no live co-editing surface outside `site-html`/`site-ts` targets (other
86
+ classes get boundary-checked file save only). `open`/`edit` need
87
+ `RDC_HARNESS_ISSUER_SECRET` set explicitly — no default exists or should.
88
+ For anything not create/open/build/deploy shaped, edit files directly as below.
89
+
73
90
  Do the minimal work, conforming to `docs/CODING-STANDARDS.md` where present
74
91
  (regen-root; skip if absent). Scope creep rule: if you discover the fix requires more than originally scoped, **stop immediately**:
75
92
  1. Close the work item: `update_work_item_status('<id>', 'blocked', '["Escalated — scope exceeded fixit threshold"]')`
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: flow
3
+ description: >-
4
+ Usage `rdc:flow [status|<state> ["<reason>"]|normal]` — show or set the current flow state. Flow is the single FSM surface for both work-shape (plan/design/collab/build/refactor/overnight/harness-testing) and ceremony relaxation (hotfix/maintenance). Supersedes `rdc:mode` — hotfix/maintenance are flow values now, not a separate system.
5
+ ---
6
+
7
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
8
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
9
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
10
+
11
+ # rdc:flow — the one FSM surface
12
+
13
+ ## When to Use
14
+ - Starting a turn — declare what kind of work this is (`build` needs a work item, `plan`/`design`/`collab` don't)
15
+ - A production incident where process ceremony is costing minutes that matter (`hotfix`)
16
+ - Routine upkeep that needs the same relaxation, without calling it an incident (`maintenance`)
17
+ - Checking what's currently declared, and why
18
+
19
+ ## The one thing to understand first
20
+
21
+ **There used to be two systems — mode (safety relaxation) and flow (work-shape declaration) — kept deliberately separate.** Operator instruction, 2026-08-25/26, direct and live: *"no special modes -- flow states only -- move hotfix to a flow state -- move env-bypass to a flow state -- the fsm will set what is enabled."*
22
+
23
+ `hotfix` and `maintenance` are now real flow values, carrying the exact same safety guarantee they always did as modes: a reason is required to enter either, and only the named ceremony allowlist (`HOTFIX_DISABLES`/`HOTFIX_RELAXES_GATES` in `$LIFEAI_ENV/hooks/lib/rdc-flow.mjs` and `C:/Dev/rdc-harness/fsm-daemon/src/matrix.js`) is ever relaxed — never a safety guard (`execution-scope`, `rm-rf-danger`, `push-force`, credential-exposure, etc.).
24
+
25
+ `rdc:mode` still exists for backward compatibility — the old mode axis is untouched, working code — but new work should use `rdc:flow` for everything, including what used to be a mode change.
26
+
27
+ ## States
28
+
29
+ | State | Meaning | Requires a reason | Work item required |
30
+ |---|---|---|---|
31
+ | `plan` / `design` / `collab` | Conversational — nothing shipping | no | no |
32
+ | `build` / `refactor` / `overnight` | Shipping code | no | **yes** |
33
+ | `harness-testing` | Proving/testing rdc-harness's own binding guard | no | yes |
34
+ | `hotfix` | Incident — ceremony relaxed for a bounded reason | **yes** | no |
35
+ | `maintenance` | Routine upkeep — same relaxation power as hotfix, different label | **yes** | no |
36
+
37
+ ## Usage
38
+
39
+ ```
40
+ rdc:flow # status — the default
41
+ rdc:flow status
42
+ rdc:flow build # declare shipping work — no reason needed
43
+ rdc:flow hotfix "prod checkout 500s" # relax ceremony — reason required
44
+ rdc:flow normal # clear — back to no flow declared
45
+ ```
46
+
47
+ ## Steps
48
+
49
+ ### 1. Read the current state
50
+
51
+ ```bash
52
+ node -e "import('file:///C:/Dev/lifeai-env/hooks/lib/rdc-flow.mjs').then(m=>console.log(JSON.stringify(m.currentState(),null,2)))"
53
+ ```
54
+
55
+ `currentState()` reads BOTH axes at once — the declared flow AND any live `rdc-mode.mjs` hotfix/maintenance window — because a relaxed mode overrides a required flow (loosest state wins) and a status check that only showed flow would miss that override entirely. Report `flow` (or `null` if nothing declared — the fail-closed default), `flowReason`/`flowSetBy`/`flowSetAt` when set, and `mode` (`normal` unless a hotfix/maintenance window is open), with `modeReason`/`modeMinutesLeft` when it isn't.
56
+
57
+ ### 2. Setting a plain work-shape flow — no reason required
58
+
59
+ ```bash
60
+ node -e "import('file:///C:/Dev/lifeai-env/hooks/lib/rdc-flow.mjs').then(m=>console.log(JSON.stringify(m.setFlow(process.argv[1],{setBy:process.argv[2]}),null,2)))" "<flow>" "<session-id>"
61
+ ```
62
+
63
+ ### 3. Setting hotfix or maintenance — a reason is REQUIRED
64
+
65
+ Refuse to proceed without one — `setFlow` throws on an empty reason for these two values, by design, same as `setMode` always did: an unexplained disarm is how a temporary state becomes permanent.
66
+
67
+ ```bash
68
+ node -e "import('file:///C:/Dev/lifeai-env/hooks/lib/rdc-flow.mjs').then(m=>console.log(JSON.stringify(m.setFlow('hotfix',{reason:process.argv[1],setBy:process.argv[2]}),null,2)))" "<reason>" "<session-id>"
69
+ ```
70
+
71
+ Then state plainly, in the checklist: **which guards are now relaxed, that the safety set is still armed, and that this stays active until explicitly cleared (no TTL — active management, not a silent timer).**
72
+
73
+ ### 4. Returning to normal
74
+
75
+ ```bash
76
+ node -e "import('file:///C:/Dev/lifeai-env/hooks/lib/rdc-flow.mjs').then(m=>{m.clearFlow();console.log('cleared')})"
77
+ ```
78
+
79
+ Do this **as soon as the incident is over**, or the moment the declared work-shape changes.
80
+
81
+ ## Rules
82
+
83
+ - **A reason is mandatory for `hotfix`/`maintenance`.** Every other flow value is a plain, reason-free declaration.
84
+ - **No TTL, ever, by default.** A flow — including `hotfix`/`maintenance` — stays active until explicitly cleared or replaced. Never a silent expiry.
85
+ - **Fail-closed.** No flow declared, an unreadable daemon, or a malformed response all read as `{flow: null}` — same behavior a work-shipping turn always had before this mechanism existed.
86
+ - **Never widen the relaxation set to unblock yourself.** A guard blocking a hotfix flow is information. Editing the allowlist to get past a red guard is the same violation as editing code to satisfy a failing gate (`.claude/rules/debugging-protocol.md` Rule 10).
87
+ - **hotfix/maintenance flow is not a bypass of review.** Work done under it still needs its work item, its evidence, and its close.
88
+
89
+ ## Verification
90
+
91
+ ```bash
92
+ node --test $LIFEAI_ENV/tests/rdc-flow.test.mjs
93
+ node --test C:/Dev/rdc-harness/fsm-daemon/tests/matrix.test.js
94
+ ```
package/commands/mode.md CHANGED
@@ -8,6 +8,12 @@ description: >-
8
8
  > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
9
9
  > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
10
10
 
11
+ > **Superseded by `rdc:flow`, 2026-08-26.** `hotfix`/`maintenance` are now
12
+ > flow values (same reason-required, same relaxation allowlist, no TTL by
13
+ > default) — one FSM surface instead of two. This skill's underlying code
14
+ > (`rdc-mode.mjs`) is untouched and still works; new work should use
15
+ > `rdc:flow hotfix "<reason>"` instead of `rdc:mode hotfix ...`.
16
+
11
17
  # rdc:mode — operating mode
12
18
 
13
19
  ## When to Use
@@ -39,6 +39,17 @@ rdc:release: <repo> vX.Y.Z -> vA.B.C
39
39
  - Never force push or bypass hooks.
40
40
  - Never declare success without verifying the installed or deployed version.
41
41
 
42
+ For a `package`-class target that already resolves through `rdc-harness`
43
+ (a real monorepo subtree, not a standalone repo like this one), its
44
+ `packages/deploy/src/runners/registry-release.mjs` runner already proves the
45
+ "Tests/self-test passed" through "Local install/update executed" steps
46
+ safely — real `npm pack`, isolated-prefix install (never the real global
47
+ store), real verify, and `--live` explicitly gates the actual publish. Where
48
+ applicable, `node C:/Dev/rdc-harness/bin/rdc-harness.mjs deploy <slug>
49
+ [--live]` can supply those checklist rows' evidence directly instead of
50
+ hand-rolling the same pack/install/verify cycle. This does not replace
51
+ version bump/tag/push — the harness CLI does neither.
52
+
42
53
  ## RDC Skills Package
43
54
 
44
55
  After publishing this package to npm, a clean-box install should use: