selfish-pipeline 1.2.0 → 1.2.2

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.
@@ -6,14 +6,14 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Automated pipeline for Claude Code — spec → plan → tasks → implement → review → clean",
9
- "version": "1.2.0"
9
+ "version": "1.2.2"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "selfish",
14
14
  "source": "./",
15
15
  "description": "Automated pipeline for Claude Code. Automates the full development cycle: spec → plan → tasks → implement → review → clean.",
16
- "version": "1.2.0",
16
+ "version": "1.2.2",
17
17
  "category": "automation",
18
18
  "tags": ["pipeline", "automation", "spec", "plan", "implement", "review", "critic-loop"]
19
19
  }
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "selfish",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Automated pipeline for Claude Code. Automates the full development cycle: spec → plan → tasks → implement → review → clean.",
5
5
  "author": { "name": "jhlee0409", "email": "relee6203@gmail.com" },
6
6
  "homepage": "https://github.com/jhlee0409/selfish-pipeline",
7
7
  "repository": "https://github.com/jhlee0409/selfish-pipeline",
8
8
  "license": "MIT",
9
9
  "keywords": ["pipeline", "automation", "spec", "plan", "implement", "review", "critic-loop"],
10
- "commands": "./commands/"
10
+ "commands": "./commands/",
11
+ "hooks": "./hooks/hooks.json"
11
12
  }
@@ -3,6 +3,7 @@ name: selfish-architect
3
3
  description: "Architecture analysis agent — remembers ADR decisions and architecture patterns across sessions to provide consistent design guidance."
4
4
  tools:
5
5
  - Read
6
+ - Write
6
7
  - Grep
7
8
  - Glob
8
9
  - Bash
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: selfish:architect
3
- description: "Architecture analysis and design advice (read-only)"
3
+ description: "Architecture analysis and design advice"
4
4
  argument-hint: "[analysis target or design question]"
5
5
  disable-model-invocation: true
6
6
  context: fork
7
7
  agent: selfish-architect
8
8
  allowed-tools:
9
9
  - Read
10
+ - Write
10
11
  - Grep
11
12
  - Glob
12
13
  - Bash
@@ -18,7 +19,7 @@ model: sonnet
18
19
  # /selfish:architect — Architecture Analysis and Design Advice
19
20
 
20
21
  > Analyzes the codebase architecture and records design decisions.
21
- > Ensures design quality through convergence-based Critic Loop. **Read-only** — does not modify code.
22
+ > Ensures design quality through convergence-based Critic Loop. Does not modify source code. May write ADR files to `memory/decisions/`.
22
23
 
23
24
  ## Arguments
24
25
 
@@ -91,7 +92,7 @@ Structure analysis results and **print to console**:
91
92
 
92
93
  ### 4. Critic Loop
93
94
 
94
- > **Always** read `docs/critic-loop-rules.md` first and follow it.
95
+ > **Always** read `${CLAUDE_PLUGIN_ROOT}/docs/critic-loop-rules.md` first and follow it.
95
96
 
96
97
  Run the critic loop until convergence. Safety cap: 7 passes.
97
98
 
@@ -135,7 +136,7 @@ Architecture analysis complete
135
136
 
136
137
  ## Notes
137
138
 
138
- - **Read-only**: Does not modify code. Performs analysis and suggestions only.
139
+ - **No source modification**: Does not modify project source code. May write ADR files to `memory/decisions/`.
139
140
  - **Based on actual code**: Explore the actual codebase, not assumptions.
140
141
  - **Architecture first**: All suggestions respect {config.architecture} rules.
141
142
  - **Incremental changes**: Prefer incremental improvements over big-bang refactoring.
package/commands/auto.md CHANGED
@@ -34,7 +34,7 @@ If config file is missing: print "`.claude/selfish.config.md` not found. Create
34
34
 
35
35
  ## Critic Loop Rules (common to all phases)
36
36
 
37
- > **Always** read `docs/critic-loop-rules.md` first and follow it.
37
+ > **Always** read `${CLAUDE_PLUGIN_ROOT}/docs/critic-loop-rules.md` first and follow it.
38
38
  > Core: minimum 1 concern per criterion + mandatory Adversarial failure scenario each pass + quantitative evidence required. "PASS" as a single word is prohibited. Uses convergence-based termination with 4 verdicts (PASS/FAIL/ESCALATE/DEFER). On ESCALATE: pause and present options to user even in auto mode.
39
39
 
40
40
  ---
@@ -171,7 +171,7 @@ Execute `/selfish:implement` logic inline with **dependency-aware orchestration*
171
171
  // 5. Read all worker results before proceeding to gate
172
172
  ```
173
173
 
174
- 6. Perform **3-step gate** on each Implementation Phase completion — **always** read `docs/phase-gate-protocol.md` first. Cannot advance to next phase without passing the gate.
174
+ 6. Perform **3-step gate** on each Implementation Phase completion — **always** read `${CLAUDE_PLUGIN_ROOT}/docs/phase-gate-protocol.md` first. Cannot advance to next phase without passing the gate.
175
175
  - On gate pass: create phase rollback point `"${CLAUDE_PLUGIN_ROOT}/scripts/selfish-pipeline-manage.sh" phase-tag {phase_number}`
176
176
  7. Real-time `[x]` updates in tasks.md
177
177
  8. After full completion, run `{config.ci}` final verification
package/commands/debug.md CHANGED
@@ -61,7 +61,7 @@ Verify starting from highest probability.
61
61
 
62
62
  ### 5. Critic Loop
63
63
 
64
- > **Always** read `docs/critic-loop-rules.md` first and follow it.
64
+ > **Always** read `${CLAUDE_PLUGIN_ROOT}/docs/critic-loop-rules.md` first and follow it.
65
65
 
66
66
  Run the critic loop until convergence. Safety cap: 5 passes.
67
67
 
@@ -60,7 +60,7 @@ Run ALL checks regardless of earlier failures. Do not short-circuit.
60
60
  |-------|-----|------|------|
61
61
  | Global CLAUDE.md exists | Read `~/.claude/CLAUDE.md` | File exists | ⚠ Warning: no global CLAUDE.md. Selfish skills won't auto-trigger from intent. Fix: run `/selfish:init` |
62
62
  | SELFISH block present | Grep for `<!-- SELFISH:START -->` and `<!-- SELFISH:END -->` in `~/.claude/CLAUDE.md` | Both markers found | Fix: run `/selfish:init` to inject SELFISH block |
63
- | SELFISH block version | Extract version from `<!-- SELFISH:VERSION:X.Y.Z -->` | Version matches or is newer than plugin version | ⚠ Warning: SELFISH block is outdated (found {old}, current {new}). Fix: run `/selfish:init` to update |
63
+ | SELFISH block version | Extract version from `<!-- SELFISH:VERSION:X.Y.Z -->` in CLAUDE.md. Then read `${CLAUDE_PLUGIN_ROOT}/package.json` to get the actual plugin version. Compare the two. | Block version ≥ plugin version | ⚠ Warning: SELFISH block is outdated (found {block_version}, current {plugin_version}). Fix: run `/selfish:init` to update |
64
64
  | No conflicting routing | Grep for conflicting agent patterns (`executor`, `deep-executor`, `debugger`, `code-reviewer`) outside SELFISH block that could intercept selfish intents | No conflicts or conflicts are inside other tool blocks | ⚠ Warning: found agent routing that may conflict with selfish skills. Review `~/.claude/CLAUDE.md` |
65
65
 
66
66
  ### Category 4: Pipeline State
@@ -149,7 +149,7 @@ Pipeline State
149
149
 
150
150
  Hook Health
151
151
  ✓ hooks.json valid
152
- ✓ All 17 scripts exist
152
+ ✓ All scripts exist
153
153
  ✓ All scripts executable
154
154
 
155
155
  ─────────────────────────
@@ -145,7 +145,7 @@ When a worker agent exits with error (non-zero return or timeout):
145
145
 
146
146
  #### Phase Completion Gate (3 steps)
147
147
 
148
- > **Always** read `docs/phase-gate-protocol.md` first and perform the 3 steps (CI gate → Mini-Review → Auto-Checkpoint) in order.
148
+ > **Always** read `${CLAUDE_PLUGIN_ROOT}/docs/phase-gate-protocol.md` first and perform the 3 steps (CI gate → Mini-Review → Auto-Checkpoint) in order.
149
149
  > Cannot advance to the next phase without passing the gate. Abort and report to user after 3 consecutive CI failures.
150
150
 
151
151
  After passing the gate, create a phase rollback point:
package/commands/init.md CHANGED
@@ -155,6 +155,8 @@ Based on choice:
155
155
 
156
156
  #### Step 4. Inject SELFISH Block
157
157
 
158
+ **Version resolution**: Read `${CLAUDE_PLUGIN_ROOT}/package.json` and extract the `"version"` field. Use this value as `{PLUGIN_VERSION}` in the template below.
159
+
158
160
  Add the following block at the **very end** of the file (later-positioned directives have higher priority).
159
161
 
160
162
  Replace existing SELFISH block if present, otherwise append.
@@ -162,7 +164,7 @@ If legacy block (`## Selfish Auto-Trigger Rules` etc.) exists, remove it then ap
162
164
 
163
165
  ```markdown
164
166
  <!-- SELFISH:START -->
165
- <!-- SELFISH:VERSION:1.1.1 -->
167
+ <!-- SELFISH:VERSION:{PLUGIN_VERSION} -->
166
168
  <selfish-pipeline>
167
169
  IMPORTANT: For requests matching the selfish skill routing table below, always invoke the corresponding skill via the Skill tool. Do not substitute with other agents or tools.
168
170
 
@@ -186,6 +188,9 @@ User-only (not auto-triggered — inform user on request):
186
188
  - `selfish:doctor` — inform user when health check is requested
187
189
  - `selfish:architect` — inform user when architecture review is requested
188
190
  - `selfish:security` — inform user when security scan is requested
191
+ - `selfish:checkpoint` — inform user when session save is requested
192
+ - `selfish:resume` — inform user when session restore is requested
193
+ - `selfish:principles` — inform user when project principles management is requested
189
194
 
190
195
  ## Pipeline
191
196
 
package/commands/plan.md CHANGED
@@ -141,7 +141,7 @@ Create `specs/{feature}/plan.md`. **Must** follow the structure below:
141
141
 
142
142
  ### 5. Critic Loop
143
143
 
144
- > **Always** read `docs/critic-loop-rules.md` first and follow it.
144
+ > **Always** read `${CLAUDE_PLUGIN_ROOT}/docs/critic-loop-rules.md` first and follow it.
145
145
 
146
146
  Run the critic loop until convergence. Safety cap: 7 passes.
147
147
 
@@ -4,6 +4,7 @@ description: "Code review (read-only)"
4
4
  argument-hint: "[scope: file path, PR number, or staged]"
5
5
  allowed-tools:
6
6
  - Read
7
+ - Write
7
8
  - Grep
8
9
  - Glob
9
10
  - Bash
@@ -139,7 +140,7 @@ If `memory/retrospectives/` directory exists, load retrospective files and check
139
140
 
140
141
  ### 6. Critic Loop
141
142
 
142
- > **Always** read `docs/critic-loop-rules.md` first and follow it.
143
+ > **Always** read `${CLAUDE_PLUGIN_ROOT}/docs/critic-loop-rules.md` first and follow it.
143
144
 
144
145
  Run the critic loop until convergence. Safety cap: 5 passes.
145
146
 
package/commands/spec.md CHANGED
@@ -78,7 +78,7 @@ Create `specs/{feature-name}/spec.md`:
78
78
  - **NFR-001**: {performance/security/accessibility etc.}
79
79
 
80
80
  ### Auto-Suggested NFRs
81
- {Load `docs/nfr-templates.md` and select 3-5 relevant NFRs based on the project type detected from selfish.config.md}
81
+ {Load `${CLAUDE_PLUGIN_ROOT}/docs/nfr-templates.md` and select 3-5 relevant NFRs based on the project type detected from selfish.config.md}
82
82
  - **NFR-A01** [AUTO-SUGGESTED]: {suggestion from matching project type template}
83
83
  - **NFR-A02** [AUTO-SUGGESTED]: {suggestion}
84
84
  - **NFR-A03** [AUTO-SUGGESTED]: {suggestion}
@@ -112,7 +112,7 @@ If `memory/retrospectives/` directory exists, load retrospective files and check
112
112
 
113
113
  ### 5. Critic Loop
114
114
 
115
- > **Always** read `docs/critic-loop-rules.md` first and follow it.
115
+ > **Always** read `${CLAUDE_PLUGIN_ROOT}/docs/critic-loop-rules.md` first and follow it.
116
116
 
117
117
  Run the critic loop until convergence. Safety cap: 5 passes.
118
118
 
package/commands/tasks.md CHANGED
@@ -86,7 +86,7 @@ If `memory/retrospectives/` directory exists, load retrospective files and check
86
86
 
87
87
  ### 4. Critic Loop
88
88
 
89
- > **Always** read `docs/critic-loop-rules.md` first and follow it.
89
+ > **Always** read `${CLAUDE_PLUGIN_ROOT}/docs/critic-loop-rules.md` first and follow it.
90
90
 
91
91
  Run the critic loop until convergence. Safety cap: 5 passes.
92
92
 
package/commands/test.md CHANGED
@@ -75,7 +75,7 @@ Confirm strategy with user before proceeding.
75
75
 
76
76
  ### 4. Critic Loop
77
77
 
78
- > **Always** read `docs/critic-loop-rules.md` first and follow it.
78
+ > **Always** read `${CLAUDE_PLUGIN_ROOT}/docs/critic-loop-rules.md` first and follow it.
79
79
 
80
80
  Run the critic loop until convergence. Safety cap: 5 passes.
81
81
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "selfish-pipeline",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Claude Code plugin that automates the full dev cycle — spec, plan, tasks, implement, review, clean. 18 commands, 15 hooks, 5 presets.",
5
5
  "bin": {
6
6
  "selfish-pipeline": "./bin/cli.mjs"