refacil-sdd-ai 5.1.0 → 5.1.1

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 (2) hide show
  1. package/README.md +36 -24
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -89,10 +89,10 @@ npm uninstall -g refacil-sdd-ai
89
89
 
90
90
  | Command | Description |
91
91
  |---|---|
92
- | `refacil-sdd-ai init` | Install skills and hooks in the current repo |
93
- | `refacil-sdd-ai update` | Re-copy skills and hooks to the latest version |
92
+ | `refacil-sdd-ai init` | Install skills and hooks into global IDE user directories |
93
+ | `refacil-sdd-ai update` | Re-copy skills and hooks to the latest version (global) |
94
94
  | `refacil-sdd-ai migration-pending [--json]` | Same detection as hooks/`notify-update`; exit 1 if migration is pending; on exit 0 also deletes obsolete `.refacil-pending-update` (same as at the start of `check-update`) |
95
- | `refacil-sdd-ai clean` | Remove SDD-AI skills and hooks from the repo |
95
+ | `refacil-sdd-ai clean` | Remove SDD-AI skills and hooks from global IDE user directories |
96
96
  | `refacil-sdd-ai help` | Show help |
97
97
 
98
98
  ### Internal hooks (invoked automatically — not for manual use)
@@ -184,7 +184,7 @@ refacil-sdd-ai sdd config --json
184
184
 
185
185
  > The `join/leave/say/ask/reply/attend/inbox` subcommands also exist as **IDE skills** (`/refacil:join`, etc.). In most cases use the skills; the CLI commands are for scripting or debugging.
186
186
  >
187
- > **Cross-repo coordination** (ask requests, room agreements, `/refacil:propose`, closing to the requester): after `init`, the file **`BUS-CROSS-REPO.md`** is available in `.claude/skills/refacil-prereqs/` and `.cursor/skills/refacil-prereqs/`.
187
+ > **Cross-repo coordination** (ask requests, room agreements, `/refacil:propose`, closing to the requester): after `init`, the file **`BUS-CROSS-REPO.md`** is available in `~/.claude/skills/refacil-prereqs/` and `~/.cursor/skills/refacil-prereqs/`.
188
188
 
189
189
  ---
190
190
 
@@ -320,7 +320,7 @@ Installed during `init` / `update` for each selected IDE. The same four behavior
320
320
 
321
321
  | Behavior | Claude Code | Cursor | OpenCode |
322
322
  |---|---|---|---|
323
- | **check-update** | `SessionStart` hook in `.claude/settings.json` | `SessionStart` hook in `.cursor/settings.json` | `session.created` handler in `.opencode/plugins/refacil-hooks.js` |
323
+ | **check-update** | `SessionStart` hook in `~/.claude/settings.json` | `SessionStart` hook in `~/.cursor/hooks.json` | `session.created` handler in the global OpenCode plugin |
324
324
  | **notify-update** | `UserPromptSubmit` hook | `beforeSubmitPrompt` hook | `tui.prompt.append` handler |
325
325
  | **compact-bash** | `PreToolUse` (Bash) hook | `PreToolUse` (Bash) hook | `tool.execute.before` handler for bash tool |
326
326
  | **check-review** | `PreToolUse` (Bash) hook | `PreToolUse` (Bash) hook | `tool.execute.before` handler for bash tool |
@@ -332,7 +332,7 @@ Installed during `init` / `update` for each selected IDE. The same four behavior
332
332
  | `compact-bash` | Silently rewrites bare Bash commands. No extra turns, the IDE does not see the change. Requires Claude Code >= 2.1.89 for the `updatedInput` path. |
333
333
  | `check-review` | Intercepts `git push` and blocks if `.review-passed` is missing in any active change. |
334
334
 
335
- > **OpenCode plugin**: a single file (`.opencode/plugins/refacil-hooks.js`) implements all four behaviors. It loads `lib/compact/rules.js` from the package to reuse the same rewrite rules — no duplicated logic. If the rules file is not resolvable, compact-bash is disabled gracefully with a warning to stderr; the plugin never crashes the session.
335
+ > **OpenCode plugin**: a single file installed in the global OpenCode plugins directory implements all four behaviors. It loads `lib/compact/rules.js` from the package to reuse the same rewrite rules — no duplicated logic. If the rules file is not resolvable, compact-bash is disabled gracefully with a warning to stderr; the plugin never crashes the session.
336
336
 
337
337
  > **Why two hooks for updates?** `SessionStart` does the silent sync when opening the session without user interaction. `notify-update` on `UserPromptSubmit` / `beforeSubmitPrompt` injects the instruction just before the agent processes the next user message, ensuring it is not ignored.
338
338
 
@@ -470,31 +470,41 @@ Local bus (WebSocket over `127.0.0.1`) so agents across different repos can comm
470
470
 
471
471
  ---
472
472
 
473
- ## What Gets Installed in Your Repo
473
+ ## What Gets Installed
474
474
 
475
- Only the IDEs selected during `init` (or detected during `update`) receive files. The three IDE targets are independent — selecting only `.opencode` does not create `.claude/` or `.cursor/` directories.
475
+ ### Global user directories (once, shared across all repos)
476
+
477
+ Skills, sub-agents, and hooks are installed into the user's global IDE directories — not into any project repo. Only the IDEs selected during `init` receive files.
476
478
 
477
479
  ```
478
480
  # Claude Code (if selected)
479
- .claude/skills/refacil-*/ # Skills (includes refacil-prereqs: METHODOLOGY-CONTRACT.md, BUS-CROSS-REPO.md, …)
480
- .claude/agents/refacil-*.md # Read-only sub-agents: auditor, investigator, validator
481
- # Write sub-agents: tester, implementer, debugger, proposer
482
- .claude/settings.json # Hooks: check-update + notify-update + check-review + compact-bash
483
- .claude/.sdd-version # Installed methodology version (used by check-update)
481
+ ~/.claude/skills/refacil-*/ # Skills (includes refacil-prereqs: METHODOLOGY-CONTRACT.md, BUS-CROSS-REPO.md, …)
482
+ ~/.claude/agents/refacil-*.md # Read-only sub-agents: auditor, investigator, validator
483
+ # Write sub-agents: tester, implementer, debugger, proposer
484
+ ~/.claude/settings.json # SDD hooks merged in: check-update, notify-update, check-review, compact-bash
484
485
 
485
486
  # Cursor (if selected)
486
- .cursor/skills/refacil-*/ # Cursor skills (equivalent)
487
- .cursor/agents/refacil-*.md # Cursor sub-agents (readonly:true/false + model:inherit, auto-generated)
488
- .cursor/settings.json # Hooks: check-update + notify-update + check-review + compact-bash
489
- .cursor/.sdd-version # Installed methodology version
490
-
491
- # OpenCode (if selected)
492
- .opencode/skills/refacil-*/ # OpenCode skills (byte-for-byte copy same spec as Claude Code)
493
- .opencode/agents/refacil-*.md # OpenCode sub-agents (permission block + mode:subagent, auto-generated)
494
- .opencode/plugins/refacil-hooks.js # Embedded plugin: session.created + tui.prompt.append + tool.execute.before
495
- .opencode/opencode.json # Created/merged with $schema (user keys preserved)
496
- .opencode/.sdd-version # Installed methodology version
487
+ ~/.cursor/skills/refacil-*/ # Cursor skills (auto-transformed frontmatter: readonly + model:inherit)
488
+ ~/.cursor/agents/refacil-*.md # Cursor sub-agents (readonly:true/false + model:inherit, auto-generated)
489
+ ~/.cursor/hooks.json # SDD hooks merged in (same four behaviors)
490
+
491
+ # OpenCode (if selected) — macOS/Linux: ~/.config/opencode/ Windows: %APPDATA%\opencode
492
+ ~/.config/opencode/skills/refacil-*/ # OpenCode skills
493
+ ~/.config/opencode/agents/refacil-*.md # OpenCode sub-agents (permission block + mode:subagent)
494
+ ~/.config/opencode/plugins/refacil-hooks.js # Plugin: session.created + tui.prompt.append + tool.execute.before
495
+
496
+ # refacil-sdd-ai state
497
+ ~/.refacil-sdd-ai/
498
+ selected-ides.json # IDE selection saved on init, reused by update
499
+ config.yaml # Global config: baseBranch, protectedBranches, artifactLanguage
500
+ sdd-version # Installed methodology version (used by check-update)
501
+ ```
502
+
503
+ ### Per repo (generated by `/refacil:setup`)
497
504
 
505
+ The only per-repo step is running `/refacil:setup` once per project. It generates the project index — no IDE skills or hooks are written to the repo.
506
+
507
+ ```
498
508
  # Shared (IDE-agnostic)
499
509
  CLAUDE.md # Minimal index → points to AGENTS.md
500
510
  .cursorrules # Cursor format equivalent of CLAUDE.md
@@ -512,6 +522,8 @@ refacil-sdd/ # SDD artifacts store
512
522
  specs/ # Persistent specifications synced from archived changes
513
523
  ```
514
524
 
525
+ > **Migration from project-level installs**: the `check-update` hook (SessionStart) automatically detects and removes any leftover project-level `refacil-*` skills, agents, hooks, and empty IDE directories from older versions.
526
+
515
527
  ---
516
528
 
517
529
  ## Technologies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "refacil-sdd-ai",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "SDD-AI: Specification-Driven Development with AI — development methodology using AI with Claude Code, Cursor and OpenCode",
5
5
  "bin": {
6
6
  "refacil-sdd-ai": "./bin/cli.js"