all-for-claudecode 2.0.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 (56) hide show
  1. package/.claude-plugin/marketplace.json +21 -0
  2. package/.claude-plugin/plugin.json +12 -0
  3. package/LICENSE +21 -0
  4. package/MIGRATION.md +180 -0
  5. package/README.md +216 -0
  6. package/agents/afc-architect.md +49 -0
  7. package/agents/afc-security.md +49 -0
  8. package/bin/cli.mjs +111 -0
  9. package/commands/analyze.md +126 -0
  10. package/commands/architect.md +142 -0
  11. package/commands/auto.md +304 -0
  12. package/commands/checkpoint.md +88 -0
  13. package/commands/clarify.md +78 -0
  14. package/commands/debug.md +126 -0
  15. package/commands/doctor.md +179 -0
  16. package/commands/implement.md +206 -0
  17. package/commands/init.md +272 -0
  18. package/commands/plan.md +195 -0
  19. package/commands/principles.md +107 -0
  20. package/commands/research.md +109 -0
  21. package/commands/resume.md +81 -0
  22. package/commands/review.md +205 -0
  23. package/commands/security.md +131 -0
  24. package/commands/spec.md +149 -0
  25. package/commands/tasks.md +137 -0
  26. package/commands/test.md +123 -0
  27. package/docs/critic-loop-rules.md +104 -0
  28. package/docs/nfr-templates.md +40 -0
  29. package/docs/phase-gate-protocol.md +44 -0
  30. package/hooks/hooks.json +211 -0
  31. package/package.json +62 -0
  32. package/scripts/afc-auto-format.sh +70 -0
  33. package/scripts/afc-bash-guard.sh +85 -0
  34. package/scripts/afc-config-change.sh +58 -0
  35. package/scripts/afc-failure-hint.sh +78 -0
  36. package/scripts/afc-notify.sh +64 -0
  37. package/scripts/afc-parallel-validate.sh +158 -0
  38. package/scripts/afc-permission-request.sh +91 -0
  39. package/scripts/afc-pipeline-manage.sh +186 -0
  40. package/scripts/afc-preflight-check.sh +195 -0
  41. package/scripts/afc-session-end.sh +45 -0
  42. package/scripts/afc-stop-gate.sh +78 -0
  43. package/scripts/afc-subagent-context.sh +65 -0
  44. package/scripts/afc-subagent-stop.sh +60 -0
  45. package/scripts/afc-task-completed-gate.sh +66 -0
  46. package/scripts/afc-teammate-idle.sh +49 -0
  47. package/scripts/afc-timeline-log.sh +97 -0
  48. package/scripts/afc-user-prompt-submit.sh +35 -0
  49. package/scripts/pre-compact-checkpoint.sh +112 -0
  50. package/scripts/session-start-context.sh +80 -0
  51. package/scripts/track-afc-changes.sh +48 -0
  52. package/templates/afc.config.express-api.md +99 -0
  53. package/templates/afc.config.monorepo.md +98 -0
  54. package/templates/afc.config.nextjs-fsd.md +107 -0
  55. package/templates/afc.config.react-spa.md +96 -0
  56. package/templates/afc.config.template.md +90 -0
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "all-for-claudecode",
3
+ "owner": {
4
+ "name": "jhlee0409",
5
+ "email": "relee6203@gmail.com"
6
+ },
7
+ "metadata": {
8
+ "description": "Automated pipeline for Claude Code — spec → plan → tasks → implement → review → clean",
9
+ "version": "2.0.0"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "afc",
14
+ "source": "./",
15
+ "description": "Automated pipeline for Claude Code. Automates the full development cycle: spec → plan → tasks → implement → review → clean.",
16
+ "version": "2.0.0",
17
+ "category": "automation",
18
+ "tags": ["pipeline", "automation", "spec", "plan", "implement", "review", "critic-loop"]
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "afc",
3
+ "version": "2.0.0",
4
+ "description": "Automated pipeline for Claude Code. Automates the full development cycle: spec → plan → tasks → implement → review → clean.",
5
+ "author": { "name": "jhlee0409", "email": "relee6203@gmail.com" },
6
+ "homepage": "https://github.com/jhlee0409/all-for-claudecode",
7
+ "repository": "https://github.com/jhlee0409/all-for-claudecode",
8
+ "license": "MIT",
9
+ "keywords": ["pipeline", "automation", "spec", "plan", "implement", "review", "critic-loop"],
10
+ "commands": "./commands/",
11
+ "hooks": "./hooks/hooks.json"
12
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 jhlee0409
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/MIGRATION.md ADDED
@@ -0,0 +1,180 @@
1
+ # Migration Guide
2
+
3
+ ## v2.0 — Rebrand: selfish-pipeline → all-for-claudecode
4
+
5
+ > All-for-ClaudeCode v2.0 renames the package, plugin prefix, scripts, agents, and state files from `selfish` to `afc`.
6
+
7
+ ### What Changed
8
+
9
+ | Item | Before (v1.x) | After (v2.0) |
10
+ |------|---------------|--------------|
11
+ | Package name | `selfish-pipeline` | `all-for-claudecode` |
12
+ | Plugin name | `selfish` | `afc` |
13
+ | Command prefix | `/selfish:spec` | `/afc:spec` |
14
+ | Script prefix | `selfish-*.sh` | `afc-*.sh` |
15
+ | Agent names | `selfish-architect`, `selfish-security` | `afc-architect`, `afc-security` |
16
+ | State files | `.selfish-active`, `.selfish-phase`, etc. | `.afc-active`, `.afc-phase`, etc. |
17
+ | Config file | `selfish.config.md` | `afc.config.md` |
18
+ | Git tags | `selfish/pre-auto` | `afc/pre-auto` |
19
+ | CLAUDE.md block | `SELFISH:START` / `SELFISH:END` | `AFC:START` / `AFC:END` |
20
+ | Artifact dir | `.claude/selfish/` | `.claude/afc/` |
21
+ | GitHub repo | `jhlee0409/selfish-pipeline` | `jhlee0409/all-for-claudecode` |
22
+
23
+ ### Migration Steps
24
+
25
+ #### 1. Uninstall old plugin
26
+
27
+ ```bash
28
+ claude plugin uninstall selfish@selfish-pipeline
29
+ claude plugin marketplace remove jhlee0409/selfish-pipeline
30
+ ```
31
+
32
+ #### 2. Install new plugin
33
+
34
+ ```bash
35
+ npx all-for-claudecode
36
+ ```
37
+
38
+ Or manually:
39
+
40
+ ```bash
41
+ claude plugin marketplace add jhlee0409/all-for-claudecode
42
+ claude plugin install afc@all-for-claudecode --scope user
43
+ ```
44
+
45
+ #### 3. Update CLAUDE.md
46
+
47
+ Replace the `SELFISH:START` / `SELFISH:END` block in your project's CLAUDE.md:
48
+
49
+ - Change `<!-- SELFISH:START -->` → `<!-- AFC:START -->`
50
+ - Change `<!-- SELFISH:END -->` → `<!-- AFC:END -->`
51
+ - Change `<!-- SELFISH:VERSION:x.x.x -->` → `<!-- AFC:VERSION:2.0.0 -->`
52
+ - Change `<selfish-pipeline>` → `<afc-pipeline>`
53
+ - Change all `selfish:` command references → `afc:`
54
+ - Change `selfish-architect` / `selfish-security` → `afc-architect` / `afc-security`
55
+
56
+ Or simply run `/afc:init` to regenerate the block.
57
+
58
+ #### 4. Rename state files (if pipeline was active)
59
+
60
+ ```bash
61
+ cd .claude
62
+ for f in .selfish-*; do
63
+ [ -f "$f" ] && mv "$f" "${f/.selfish-/.afc-}"
64
+ done
65
+ [ -d selfish ] && mv selfish afc
66
+ [ -f selfish.config.md ] && mv selfish.config.md afc.config.md
67
+ ```
68
+
69
+ #### 5. Update git tags
70
+
71
+ ```bash
72
+ git tag -d selfish/pre-auto 2>/dev/null
73
+ # Phase tags are cleaned up automatically on pipeline end
74
+ ```
75
+
76
+ ---
77
+
78
+ ## v1.0 — Migration: install.sh → Plugin
79
+
80
+ > A guide for migrating from the `git clone` + `install.sh` approach to the Claude Code plugin system.
81
+
82
+ ## Summary of Changes
83
+
84
+ | Item | Before | After |
85
+ |------|--------|-------|
86
+ | Installation | `git clone` + `./install.sh` | `/plugin install <url>` |
87
+ | Command separator | `.` (`/afc-legacy.spec`) | `:` (`/afc:spec`) |
88
+ | Command location | `~/.claude/commands/afc-legacy.*.md` | `commands/*.md` inside the plugin |
89
+ | Hook scripts | `<project>/.claude/hooks/*.sh` | `scripts/*.sh` inside the plugin |
90
+ | Hook config | `<project>/.claude/settings.json` | `hooks/hooks.json` inside the plugin |
91
+ | Config file | `.claude/afc.config.md` (unchanged) | `.claude/afc.config.md` (unchanged) |
92
+
93
+ ## Migration Steps
94
+
95
+ ### 1. Clean Up Existing Files
96
+
97
+ ```bash
98
+ # Remove existing command files (user level)
99
+ rm -f ~/.claude/commands/afc-legacy.*.md
100
+
101
+ # Remove existing hook scripts (project level)
102
+ rm -f .claude/hooks/session-start-context.sh
103
+ rm -f .claude/hooks/pre-compact-checkpoint.sh
104
+ rm -f .claude/hooks/track-afc-changes.sh
105
+ rm -f .claude/hooks/afc-stop-gate.sh
106
+ rm -f .claude/hooks/afc-pipeline-manage.sh
107
+ ```
108
+
109
+ ### 2. Remove legacy hooks from settings.json
110
+
111
+ Remove afc-related hook entries from `.claude/settings.json`.
112
+ Since the plugin registers hooks via its own `hooks.json`, manual configuration in settings.json is no longer needed.
113
+
114
+ Items to remove (from settings.json):
115
+ - `SessionStart` → `session-start-context.sh`
116
+ - `PreCompact` → `pre-compact-checkpoint.sh`
117
+ - `PostToolUse` → `track-afc-changes.sh`
118
+ - `Stop` → `afc-stop-gate.sh`
119
+
120
+ > If you have other project-specific hooks in settings.json, keep those as they are.
121
+
122
+ ### 3. Install the Plugin
123
+
124
+ ```bash
125
+ npx all-for-claudecode
126
+ ```
127
+
128
+ Or manually:
129
+
130
+ ```bash
131
+ claude plugin marketplace add jhlee0409/all-for-claudecode
132
+ claude plugin install afc@all-for-claudecode --scope user
133
+ ```
134
+
135
+ The equivalent of `install.sh --commands-only` is the **User** scope; for team sharing, use the **Project** scope.
136
+
137
+ ### 4. Command Name Changes
138
+
139
+ The separator for all commands has changed from `.` to `:`:
140
+
141
+ ```text
142
+ # Before
143
+ /afc-legacy.auto "feature description"
144
+ /afc-legacy.spec "feature description"
145
+ /afc-legacy.plan
146
+
147
+ # After
148
+ /afc:auto "feature description"
149
+ /afc:spec "feature description"
150
+ /afc:plan
151
+ ```
152
+
153
+ ### 5. Verify Config File
154
+
155
+ `.claude/afc.config.md` can be **used as-is without any changes**.
156
+
157
+ For new projects, you can auto-generate it with `/afc:init`.
158
+
159
+ ## What Stays the Same
160
+
161
+ - `.claude/afc.config.md` file format and path
162
+ - `.afc-*` state file paths
163
+ - `git tag afc/pre-*` safety tags
164
+ - Internal logic of hook scripts
165
+
166
+ ## What Changed (v1.2.2+)
167
+
168
+ - `specs/{feature}/` → `.claude/afc/specs/{feature}/`
169
+ - `memory/` → `.claude/afc/memory/` (checkpoint, principles, research, decisions)
170
+
171
+ ## FAQ
172
+
173
+ **Q: Do I need to recreate `.claude/afc.config.md` for existing projects?**
174
+ A: No. The config file format is the same. Use it as-is.
175
+
176
+ **Q: I'm using this across multiple projects. Do I need to migrate each one?**
177
+ A: You only need to install the plugin once. For each project, just clean up the existing `.claude/hooks/*.sh` files and legacy hook entries in settings.json.
178
+
179
+ **Q: Can I use the old version and the plugin at the same time?**
180
+ A: This is not recommended. Since the command names differ (`/afc-legacy.spec` vs `/afc:spec`), there are no conflicts, but hooks may get registered twice.
package/README.md ADDED
@@ -0,0 +1,216 @@
1
+ # All-for-ClaudeCode
2
+
3
+ **Claude Code plugin that automates the full development cycle — spec → plan → tasks → implement → review → clean.**
4
+
5
+ [![npm version](https://img.shields.io/npm/v/all-for-claudecode)](https://www.npmjs.com/package/all-for-claudecode)
6
+ [![license](https://img.shields.io/github/license/jhlee0409/all-for-claudecode)](./LICENSE)
7
+ [![test](https://img.shields.io/badge/tests-161%20passed-brightgreen)](#how-it-works)
8
+ [![hooks](https://img.shields.io/badge/hooks-15%20events-blue)](#15-hook-events)
9
+ [![commands](https://img.shields.io/badge/commands-18-orange)](#18-slash-commands)
10
+
11
+ > Zero-dependency automation pipeline for Claude Code. One command (`/afc:auto`) runs the entire cycle: write specs, design plans, break into tasks, implement code, review quality, and clean up — all with built-in CI gates and critic loops.
12
+
13
+ ## What is All-for-ClaudeCode?
14
+
15
+ All-for-ClaudeCode is a **Claude Code plugin** that transforms your development workflow into a fully automated pipeline. Instead of manually prompting Claude through each development phase, you run a single command and the pipeline handles everything — from writing feature specifications to final code review.
16
+
17
+ - **18 slash commands** for every phase of development
18
+ - **15 hook events** with 3 handler types (shell scripts, LLM prompts, subagents)
19
+ - **5 project presets** for popular stacks (Next.js, React SPA, Express API, Monorepo)
20
+ - **Persistent memory agents** that learn across sessions
21
+ - **Built-in CI gates** that physically prevent skipping quality checks
22
+
23
+ ## Quick Start
24
+
25
+ ### Option A: Inside Claude Code (`/plugin`)
26
+
27
+ ```
28
+ /plugin marketplace add jhlee0409/all-for-claudecode
29
+ /plugin install afc@all-for-claudecode
30
+ ```
31
+
32
+ Or use the interactive UI: type `/plugin` → Manage → Add marketplace → `jhlee0409/all-for-claudecode` → Discover → install **afc**.
33
+
34
+ ### Option B: One-line install (via npx)
35
+
36
+ ```bash
37
+ npx all-for-claudecode
38
+ ```
39
+
40
+ Interactive installer — choose scope (user / project / local) and done.
41
+
42
+ ### Option C: Claude Code CLI
43
+
44
+ ```bash
45
+ claude plugin marketplace add jhlee0409/all-for-claudecode
46
+ claude plugin install afc@all-for-claudecode --scope user
47
+ ```
48
+
49
+ ### Then, inside Claude Code:
50
+
51
+ ```
52
+ /afc:init # Detect your stack, generate config
53
+ /afc:auto "Add user authentication" # Run the full pipeline
54
+ ```
55
+
56
+ That's it. The pipeline will:
57
+ 1. Write a feature spec with acceptance criteria
58
+ 2. Design an implementation plan with file change map
59
+ 3. Break the plan into parallelizable tasks
60
+ 4. Implement each task with CI verification
61
+ 5. Run a code review with security scan
62
+ 6. Clean up artifacts and prepare for commit
63
+
64
+ ## Features
65
+
66
+ ### Full Auto Pipeline
67
+
68
+ ```
69
+ /afc:auto "feature description"
70
+ ```
71
+
72
+ Runs all 6 phases automatically with **Critic Loop** quality checks at each gate:
73
+
74
+ ```
75
+ Spec (1/6) → Plan (2/6) → Tasks (3/6) → Implement (4/6) → Review (5/6) → Clean (6/6)
76
+ ```
77
+
78
+ ### 18 Slash Commands
79
+
80
+ **User and model (unrestricted):**
81
+
82
+ | Command | Description |
83
+ |---|---|
84
+ | `/afc:auto` | Full Auto pipeline — runs all 6 phases |
85
+ | `/afc:spec` | Write feature specification with acceptance criteria |
86
+ | `/afc:plan` | Design implementation plan with file change map |
87
+ | `/afc:implement` | Execute code implementation with CI gates |
88
+ | `/afc:test` | Test strategy planning and test writing |
89
+ | `/afc:review` | Code review with security scanning |
90
+ | `/afc:research` | Technical research with persistent storage |
91
+ | `/afc:debug` | Bug diagnosis and fix |
92
+
93
+ **User-only** (`disable-model-invocation: true`):
94
+
95
+ | Command | Description |
96
+ |---|---|
97
+ | `/afc:init` | Project setup — detects stack and generates config |
98
+ | `/afc:doctor` | Diagnose project health and plugin setup |
99
+ | `/afc:architect` | Architecture analysis (persistent memory) |
100
+ | `/afc:security` | Security scan (persistent memory, isolated worktree) |
101
+ | `/afc:principles` | Project principles management |
102
+ | `/afc:checkpoint` | Save session state |
103
+ | `/afc:resume` | Restore session state |
104
+
105
+ **Model-only** (`user-invocable: false`):
106
+
107
+ | Command | Description |
108
+ |---|---|
109
+ | `/afc:tasks` | Break plan into parallelizable tasks |
110
+ | `/afc:analyze` | Verify artifact consistency |
111
+ | `/afc:clarify` | Resolve spec ambiguities |
112
+
113
+ ### 15 Hook Events
114
+
115
+ Every hook fires automatically — no configuration needed after install.
116
+
117
+ | Hook | What it does |
118
+ |---|---|
119
+ | `SessionStart` | Restores pipeline state on session resume |
120
+ | `PreCompact` | Auto-checkpoints before context compression |
121
+ | `PreToolUse` | Blocks dangerous commands (`push --force`, `reset --hard`) |
122
+ | `PostToolUse` | Tracks file changes + auto-formats code |
123
+ | `SubagentStart` | Injects pipeline context into subagents |
124
+ | `Stop` | CI gate (shell) + code completeness check (AI agent) |
125
+ | `SessionEnd` | Warns about unfinished pipeline |
126
+ | `PostToolUseFailure` | Diagnostic hints for known error patterns |
127
+ | `Notification` | Desktop alerts (macOS/Linux) |
128
+ | `TaskCompleted` | CI gate (shell) + acceptance criteria verification (LLM) |
129
+ | `SubagentStop` | Tracks subagent completion in pipeline log |
130
+ | `UserPromptSubmit` | Injects Phase/Feature context per prompt |
131
+ | `PermissionRequest` | Auto-allows CI commands during implement/review |
132
+ | `ConfigChange` | Audits/blocks settings changes during active pipeline |
133
+ | `TeammateIdle` | Prevents Agent Teams idle during implement/review |
134
+
135
+ ### 3 Hook Handler Types
136
+
137
+ | Type | Description | Use Case |
138
+ |---|---|---|
139
+ | `command` | Shell script execution (deterministic) | All 15 events |
140
+ | `prompt` | LLM single-turn evaluation (haiku) | TaskCompleted |
141
+ | `agent` | Subagent with file access tools | Stop |
142
+
143
+ ### Persistent Memory Agents
144
+
145
+ Two custom agents that **learn across sessions**:
146
+
147
+ | Agent | Role | Memory |
148
+ |---|---|---|
149
+ | `afc-architect` | Architecture analysis — remembers ADR decisions and patterns | `.claude/agent-memory/afc-architect/` |
150
+ | `afc-security` | Security scan — remembers vulnerability patterns and false positives | `.claude/agent-memory/afc-security/` |
151
+
152
+ ### Project Presets
153
+
154
+ | Preset | Stack |
155
+ |---|---|
156
+ | `template` | Generic (manual config) |
157
+ | `nextjs-fsd` | Next.js + FSD + Zustand + React Query |
158
+ | `react-spa` | Vite + React 18 + Zustand + Tailwind |
159
+ | `express-api` | Express + TypeScript + Prisma + Jest |
160
+ | `monorepo` | Turborepo + pnpm workspace |
161
+
162
+ ## How It Works
163
+
164
+ ```
165
+ ┌─────────────────────────────────────────────┐
166
+ │ /afc:auto "Add feature X" │
167
+ ├─────────────────────────────────────────────┤
168
+ │ Phase 1: Spec → Critic Loop → Gate ✓ │
169
+ │ Phase 2: Plan → Critic Loop → Gate ✓ │
170
+ │ Phase 3: Tasks → Critic Loop → Gate ✓ │
171
+ │ Phase 4: Implement → CI Gate → Gate ✓ │
172
+ │ Phase 5: Review → Security Scan → Gate ✓ │
173
+ │ Phase 6: Clean → Artifacts removed │
174
+ ├─────────────────────────────────────────────┤
175
+ │ 15 hooks run automatically at each step │
176
+ │ Stop/TaskCompleted gates block if CI fails │
177
+ └─────────────────────────────────────────────┘
178
+ ```
179
+
180
+ ## Configuration
181
+
182
+ Initialize your project:
183
+
184
+ ```bash
185
+ /afc:init
186
+ ```
187
+
188
+ This detects your tech stack and generates `.claude/afc.config.md` with:
189
+ - CI/lint/test commands
190
+ - Architecture style and layers
191
+ - Framework-specific settings
192
+ - Code style conventions
193
+
194
+ ## FAQ
195
+
196
+ ### What is all-for-claudecode?
197
+ A Claude Code plugin that automates the entire development cycle (spec → plan → tasks → implement → review → clean) through 18 slash commands and 15 hook events.
198
+
199
+ ### How does it compare to manual Claude Code workflows?
200
+ Instead of manually prompting each step, all-for-claudecode orchestrates the full cycle with built-in quality gates that physically prevent skipping CI or security checks.
201
+
202
+ ### Does it work with any project?
203
+ Yes. Run `/afc:init` to auto-detect your stack, or use one of the 5 presets (Next.js, React SPA, Express API, Monorepo, or generic template).
204
+
205
+ ### Does it require any dependencies?
206
+ No. Zero runtime dependencies — pure markdown commands + bash hook scripts.
207
+
208
+ ### How do I install it?
209
+ Inside Claude Code, run `/plugin marketplace add jhlee0409/all-for-claudecode` then `/plugin install afc@all-for-claudecode`. Alternatively, run `npx all-for-claudecode` from your terminal for a guided install.
210
+
211
+ ### What Claude Code version is required?
212
+ Claude Code with plugin support (2025+). The plugin uses standard hooks, commands, and agents APIs.
213
+
214
+ ## License
215
+
216
+ MIT
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: afc-architect
3
+ description: "Architecture analysis agent — remembers ADR decisions and architecture patterns across sessions to provide consistent design guidance."
4
+ tools:
5
+ - Read
6
+ - Write
7
+ - Grep
8
+ - Glob
9
+ - Bash
10
+ - Task
11
+ - WebSearch
12
+ model: sonnet
13
+ memory: project
14
+ skills:
15
+ - docs/critic-loop-rules.md
16
+ - docs/phase-gate-protocol.md
17
+ ---
18
+
19
+ You are an architecture analysis agent for the current project.
20
+
21
+ ## Reference Documents
22
+
23
+ Before performing analysis, read these shared reference documents:
24
+ - `docs/critic-loop-rules.md` — Critic Loop execution rules
25
+ - `docs/phase-gate-protocol.md` — Phase gate validation protocol
26
+
27
+ ## Memory Usage
28
+
29
+ At the start of each analysis:
30
+ 1. Read your MEMORY.md (at `.claude/agent-memory/afc-architect/MEMORY.md`) to review previous architecture decisions and patterns
31
+ 2. Reference prior ADRs when making new recommendations to ensure consistency
32
+
33
+ At the end of each analysis:
34
+ 1. Record new ADR decisions, discovered patterns, or architectural insights to MEMORY.md
35
+ 2. Keep entries concise — only stable patterns and confirmed decisions
36
+ 3. Remove outdated entries when architecture evolves
37
+
38
+ ## Memory Format
39
+
40
+ ```markdown
41
+ ## ADR History
42
+ - {date}: {decision summary} — {rationale}
43
+
44
+ ## Architecture Patterns
45
+ - {pattern}: {where used, why}
46
+
47
+ ## Known Constraints
48
+ - {constraint}: {impact}
49
+ ```
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: afc-security
3
+ description: "Security scanning agent — remembers vulnerability patterns and project-specific security characteristics across sessions to improve scan precision."
4
+ tools:
5
+ - Read
6
+ - Grep
7
+ - Glob
8
+ - Bash
9
+ - Task
10
+ - WebSearch
11
+ model: sonnet
12
+ memory: project
13
+ isolation: worktree
14
+ skills:
15
+ - docs/critic-loop-rules.md
16
+ - docs/phase-gate-protocol.md
17
+ ---
18
+
19
+ You are a security scanning agent for the current project.
20
+
21
+ ## Reference Documents
22
+
23
+ Before performing scans, read these shared reference documents:
24
+ - `docs/critic-loop-rules.md` — Critic Loop execution rules
25
+ - `docs/phase-gate-protocol.md` — Phase gate validation protocol
26
+
27
+ ## Memory Usage
28
+
29
+ At the start of each scan:
30
+ 1. Read your MEMORY.md (at `.claude/agent-memory/afc-security/MEMORY.md`) to review previously found vulnerability patterns
31
+ 2. Check false positive records to avoid repeated false alarms
32
+
33
+ At the end of each scan:
34
+ 1. Record newly discovered vulnerability patterns to MEMORY.md
35
+ 2. Record confirmed false positives with reasoning
36
+ 3. Note project-specific security characteristics (e.g., input sanitization patterns, auth flows)
37
+
38
+ ## Memory Format
39
+
40
+ ```markdown
41
+ ## Vulnerability Patterns
42
+ - {pattern}: {description, files affected, severity}
43
+
44
+ ## False Positives
45
+ - {pattern}: {why it's not a real issue}
46
+
47
+ ## Project Security Profile
48
+ - {characteristic}: {description}
49
+ ```
package/bin/cli.mjs ADDED
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { createInterface } from "node:readline/promises";
4
+ import { execSync } from "node:child_process";
5
+ import { stdin, stdout, exit } from "node:process";
6
+
7
+ const GITHUB_REPO = "jhlee0409/all-for-claudecode";
8
+ const MARKETPLACE_NAME = "all-for-claudecode";
9
+ const PLUGIN_NAME = "afc";
10
+
11
+ const SCOPES = [
12
+ {
13
+ key: "1",
14
+ name: "user",
15
+ label: "User (all projects for this user)",
16
+ desc: "~/.claude/settings.json",
17
+ },
18
+ {
19
+ key: "2",
20
+ name: "project",
21
+ label: "Project (shared with team, committable)",
22
+ desc: ".claude/settings.json",
23
+ },
24
+ {
25
+ key: "3",
26
+ name: "local",
27
+ label: "Local (this project only, gitignored)",
28
+ desc: ".claude/settings.local.json",
29
+ },
30
+ ];
31
+
32
+ function run(cmd) {
33
+ try {
34
+ execSync(cmd, { stdio: "inherit" });
35
+ return true;
36
+ } catch {
37
+ return false;
38
+ }
39
+ }
40
+
41
+ async function main() {
42
+ console.log();
43
+ console.log(" All-for-ClaudeCode — Claude Code Plugin Installer");
44
+ console.log(" ===================================================");
45
+ console.log();
46
+
47
+ // Check claude CLI exists
48
+ try {
49
+ execSync("claude --version", { stdio: "pipe" });
50
+ } catch {
51
+ console.error(" ✗ Claude Code CLI is not installed.");
52
+ console.error(" Install it from https://claude.ai/code");
53
+ exit(1);
54
+ }
55
+
56
+ const rl = createInterface({ input: stdin, output: stdout });
57
+
58
+ try {
59
+ console.log(" Select install scope:\n");
60
+ for (const s of SCOPES) {
61
+ console.log(` ${s.key}) ${s.label}`);
62
+ console.log(` → ${s.desc}`);
63
+ }
64
+ console.log();
65
+
66
+ const answer = await rl.question(" Choose [1/2/3] (default: 1): ");
67
+ const choice = answer.trim() || "1";
68
+ const scope = SCOPES.find((s) => s.key === choice);
69
+
70
+ if (!scope) {
71
+ console.error("\n ✗ Invalid selection.");
72
+ exit(1);
73
+ }
74
+
75
+ console.log(`\n → Installing with ${scope.label} scope...\n`);
76
+
77
+ // Step 1: Register marketplace
78
+ console.log(" [1/2] Registering marketplace...");
79
+ run(`claude plugin marketplace add ${GITHUB_REPO}`);
80
+
81
+ // Step 2: Install plugin
82
+ console.log(` [2/2] Installing plugin (--scope ${scope.name})...`);
83
+ const installed = run(
84
+ `claude plugin install ${PLUGIN_NAME}@${MARKETPLACE_NAME} --scope ${scope.name}`
85
+ );
86
+
87
+ if (!installed) {
88
+ console.error("\n ✗ Installation failed. Try manually:");
89
+ console.error(` claude plugin marketplace add ${GITHUB_REPO}`);
90
+ console.error(
91
+ ` claude plugin install ${PLUGIN_NAME}@${MARKETPLACE_NAME} --scope ${scope.name}`
92
+ );
93
+ exit(1);
94
+ }
95
+
96
+ console.log();
97
+ console.log(" ✓ Installation complete!");
98
+ console.log();
99
+ console.log(" Next steps:");
100
+ console.log(" /afc:init Create project config");
101
+ console.log(' /afc:auto "feature desc" Run the pipeline');
102
+ console.log();
103
+ } finally {
104
+ rl.close();
105
+ }
106
+ }
107
+
108
+ main().catch((err) => {
109
+ console.error(`\n ✗ Installation failed: ${err.message}`);
110
+ exit(1);
111
+ });