@fableplan/fableplan 1.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.
- package/.claude-plugin/marketplace.json +14 -0
- package/.claude-plugin/plugin.json +12 -0
- package/LICENSE +21 -0
- package/README.md +83 -0
- package/bin/install.mjs +27 -0
- package/package.json +37 -0
- package/skills/fableplan/SKILL.md +96 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fableplan",
|
|
3
|
+
"description": "Marketplace for the fableplan Claude Code plugin: Fable 5-driven implementation planning before building.",
|
|
4
|
+
"owner": {
|
|
5
|
+
"name": "Richard Kuo"
|
|
6
|
+
},
|
|
7
|
+
"plugins": [
|
|
8
|
+
{
|
|
9
|
+
"name": "fableplan",
|
|
10
|
+
"source": "./",
|
|
11
|
+
"description": "Delegates implementation planning to a Fable 5 planning subagent, then builds from the vetted plan — posting it to a referenced GitHub issue along the way."
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fableplan",
|
|
3
|
+
"displayName": "fableplan",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Delegates implementation planning to a Fable 5 planning subagent, then builds from the vetted plan — posting it to a referenced GitHub issue along the way.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Richard Kuo"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/richkuo/fableplan",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": ["planning", "fable", "subagent", "github-issues"]
|
|
12
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Richard Kuo
|
|
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/README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# fableplan
|
|
2
|
+
|
|
3
|
+
A [Claude Code](https://claude.com/claude-code) skill that delegates implementation planning to a **Fable 5** planning subagent, then builds from that plan in your main session — and, when a GitHub issue is referenced, posts the vetted plan to the issue as a comment.
|
|
4
|
+
|
|
5
|
+
The idea: let a dedicated planning model (Fable 5) produce a concrete, ordered implementation plan before any code is written, review it against the real codebase, preserve it on the tracker, and only then build — in an isolated git worktree so your working tree is never touched.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
Trigger it with `/fableplan`, "fableplan this", or "plan this with fable", plus a task description and optionally a GitHub issue (`#N`, a full URL, or `owner/repo#N`).
|
|
10
|
+
|
|
11
|
+
The skill then runs a 7-step flow:
|
|
12
|
+
|
|
13
|
+
1. **Resolve the GitHub issue** (only if one is referenced) so the planner works from the real requirements, not a paraphrase.
|
|
14
|
+
2. **Dispatch the Fable 5 Plan subagent**, confirm it made no edits, and save the plan verbatim to a scratch file.
|
|
15
|
+
3. **Sanity-check the plan** against the actual codebase (files, symbols, conventions). It stops and asks you if the plan is structurally wrong rather than silently re-planning.
|
|
16
|
+
4. **Post the vetted plan** to the GitHub issue as a comment (only if one was referenced).
|
|
17
|
+
5. **Present the plan** to you.
|
|
18
|
+
6. **Set up an isolated git worktree** so the build never touches your current workspace.
|
|
19
|
+
7. **Build** the task from the plan, inside that worktree.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
### As a plugin (recommended)
|
|
24
|
+
|
|
25
|
+
This repo is a Claude Code plugin marketplace. Inside any Claude Code session:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/plugin marketplace add richkuo/fableplan
|
|
29
|
+
/plugin install fableplan@fableplan
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The skill is picked up automatically from the plugin's `skills/` directory, and updates flow through the plugin system.
|
|
33
|
+
|
|
34
|
+
### Ask Claude Code to install it
|
|
35
|
+
|
|
36
|
+
Paste this straight into a Claude Code prompt:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
Install the fableplan skill from https://github.com/richkuo/fableplan into ~/.claude/skills — fetch skills/fableplan/SKILL.md and place it at ~/.claude/skills/fableplan/SKILL.md
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### With `npx skills`
|
|
43
|
+
|
|
44
|
+
If you use [Vercel Labs' `skills` CLI](https://github.com/vercel-labs/skills), it discovers the `skills/fableplan/SKILL.md` layout automatically:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npx skills add richkuo/fableplan
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This installs into `.claude/skills/` (and any other agents it detects). It's a third-party tool, separate from the official plugin marketplace above.
|
|
51
|
+
|
|
52
|
+
### Manual (single file)
|
|
53
|
+
|
|
54
|
+
A Claude Code skill is just a directory containing a `SKILL.md`, so you can also install it with one command — no clone needed:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
mkdir -p ~/.claude/skills/fableplan && curl -fsSL https://raw.githubusercontent.com/richkuo/fableplan/master/skills/fableplan/SKILL.md -o ~/.claude/skills/fableplan/SKILL.md
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This puts it in your personal skills directory (`~/.claude/skills/`), available in every project. To scope it to a single project instead, put the file at `<repo>/.claude/skills/fableplan/SKILL.md`.
|
|
61
|
+
|
|
62
|
+
### Verify
|
|
63
|
+
|
|
64
|
+
Start a new Claude Code session (or restart the current one), then run:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
/fableplan <task to plan>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Requirements
|
|
71
|
+
|
|
72
|
+
- Claude Code with access to the `fable` model for the planning subagent.
|
|
73
|
+
- `gh` (GitHub CLI), authenticated, if you want the issue-comment step.
|
|
74
|
+
- A git repository for the build step (the skill stops and asks if the working directory isn't one).
|
|
75
|
+
|
|
76
|
+
## Notes
|
|
77
|
+
|
|
78
|
+
- The planning subagent always runs on Fable 5 regardless of your main session's model.
|
|
79
|
+
- The skill adapts to the target repo's conventions (e.g. its `CLAUDE.md`); behavior isn't hardcoded to any one project.
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
MIT — see [LICENSE](./LICENSE).
|
package/bin/install.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { cpSync, existsSync, mkdirSync } from 'node:fs';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { dirname, join, resolve } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
|
|
7
|
+
const SKILL = 'fableplan';
|
|
8
|
+
const pkgRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
const src = join(pkgRoot, 'skills', SKILL);
|
|
10
|
+
|
|
11
|
+
if (!existsSync(join(src, 'SKILL.md'))) {
|
|
12
|
+
console.error(`fableplan: could not find skills/${SKILL}/SKILL.md in the package.`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const project = process.argv.includes('--project');
|
|
17
|
+
const skillsDir = project
|
|
18
|
+
? join(process.cwd(), '.claude', 'skills')
|
|
19
|
+
: join(homedir(), '.claude', 'skills');
|
|
20
|
+
const dest = join(skillsDir, SKILL);
|
|
21
|
+
|
|
22
|
+
mkdirSync(skillsDir, { recursive: true });
|
|
23
|
+
cpSync(src, dest, { recursive: true });
|
|
24
|
+
|
|
25
|
+
const scope = project ? 'this project' : 'your personal skills';
|
|
26
|
+
console.log(`fableplan installed into ${scope}:\n ${dest}`);
|
|
27
|
+
console.log('\nRestart Claude Code (or start a new session), then run:\n /fableplan <task to plan>');
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fableplan/fableplan",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Installer for the fableplan Claude Code skill: plan with Fable 5, build with your main-session model.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"fableplan": "bin/install.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"skills",
|
|
12
|
+
".claude-plugin",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"claude-code",
|
|
21
|
+
"claude",
|
|
22
|
+
"skill",
|
|
23
|
+
"plugin",
|
|
24
|
+
"fable",
|
|
25
|
+
"planning"
|
|
26
|
+
],
|
|
27
|
+
"homepage": "https://github.com/richkuo/fableplan#readme",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/richkuo/fableplan.git"
|
|
31
|
+
},
|
|
32
|
+
"author": "Richard Kuo",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fableplan
|
|
3
|
+
description: Use when the user wants a task planned by a Fable 5 planning subagent before building it. Spins up a Plan subagent running on Fable 5 to produce an implementation plan, relays the plan back to the main agent to build, and — if a GitHub issue is referenced — posts the plan as a comment on that issue. Trigger on "/fableplan", "fableplan this", or "plan this with fable".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# fableplan
|
|
7
|
+
|
|
8
|
+
Delegate planning to a **Fable 5** Plan subagent, then build from its plan in the main agent. The main agent does the building — the subagent only plans.
|
|
9
|
+
|
|
10
|
+
## Input
|
|
11
|
+
|
|
12
|
+
The user provides a task description, and optionally a GitHub issue:
|
|
13
|
+
- A task in prose ("fableplan adding X to Y").
|
|
14
|
+
- A GitHub issue reference — full URL, `#<N>`, bare `<N>`, or `owner/repo#N`. When present, the plan is also posted as an issue comment.
|
|
15
|
+
- If neither is obvious, ask the user what to plan before dispatching.
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
### 1. Resolve the GitHub issue (only if one is referenced)
|
|
20
|
+
|
|
21
|
+
If the user named an issue, fetch it so the subagent plans against the real requirements, not a paraphrase:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
gh issue view <N> --json number,title,body,url
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For the `owner/repo#N` form (or a full URL to another repo), add `-R owner/repo` — a bare `gh issue view <N>` only resolves against the current repo.
|
|
28
|
+
|
|
29
|
+
If the command fails (wrong number, no auth, no repo), stop and tell the user — never proceed by planning against your paraphrase of an issue you couldn't fetch.
|
|
30
|
+
|
|
31
|
+
Record the issue number and URL — you'll need them in step 4. If no issue is referenced, skip this and step 4's posting.
|
|
32
|
+
|
|
33
|
+
### 2. Dispatch the Fable 5 Plan subagent
|
|
34
|
+
|
|
35
|
+
Do not re-plan the task yourself first — the subagent owns the plan. Snapshot `git status --porcelain` before dispatching (the tree may already be dirty), then call the Agent tool with:
|
|
36
|
+
|
|
37
|
+
- `subagent_type`: `Plan`
|
|
38
|
+
- `model`: `fable` (this is the whole point of the skill — the plan must come from Fable 5)
|
|
39
|
+
- `run_in_background`: `false` — every later step depends on the plan, so wait for it synchronously instead of doing other work first
|
|
40
|
+
- `description`: `Plan <short task name>`
|
|
41
|
+
- `prompt`: Hand the subagent everything it needs to plan independently — the full task description, the issue title/body if one was fetched, the working directory, and any constraints the user stated. Tell it explicitly:
|
|
42
|
+
- Produce a concrete, ordered implementation plan (files to create/modify, the approach, build sequence, risks/edge cases, and how to verify).
|
|
43
|
+
- Return the plan as its final message in clean Markdown suitable to (a) act on directly and (b) post verbatim as a GitHub issue comment.
|
|
44
|
+
- It is planning only — it must NOT make code edits, including via Bash (no writing/modifying files, no commits). The subagent lacks Edit/Write, but still has Bash, so this must be stated explicitly.
|
|
45
|
+
|
|
46
|
+
The Plan subagent's final message is returned to you as the tool result; it is not shown to the user.
|
|
47
|
+
|
|
48
|
+
If the call returns null or errors (user skip, terminal API failure), retry once; if it fails again, report the failure to the user instead of planning yourself.
|
|
49
|
+
|
|
50
|
+
When the result arrives:
|
|
51
|
+
- Run `git status --porcelain` and compare against the pre-dispatch snapshot to confirm the subagent made no file changes despite the no-edit instruction. If it did, tell the user and ask whether to revert before continuing.
|
|
52
|
+
- Save the plan verbatim to a scratchpad file immediately, so it survives context summarization during a long build and step 4 can post it exactly as produced.
|
|
53
|
+
|
|
54
|
+
### 3. Sanity-check the plan against the code
|
|
55
|
+
|
|
56
|
+
Before posting or presenting it, verify the plan's load-bearing claims against the actual codebase: the files it says to modify exist, the functions/symbols it references are real, and it doesn't contradict repo conventions (CLAUDE.md). Fix small inaccuracies yourself and note them; if the plan is structurally wrong (built on a file or mechanism that doesn't exist), do NOT automatically re-dispatch the Plan subagent — stop and tell the user what's failing, and let them decide whether to re-plan with Fable 5, adjust the task, or proceed anyway. If you fixed small inaccuracies, update the scratchpad file from step 2 so it reflects the corrected plan before step 4 posts it.
|
|
57
|
+
|
|
58
|
+
### 4. Post the plan to the GitHub issue (only if one was resolved in step 1)
|
|
59
|
+
|
|
60
|
+
Now that the plan has passed the sanity-check, save it to the issue as a comment before building, so the vetted plan is preserved on the issue regardless of how the build goes. This comment is not updated after the build.
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
gh issue comment <N> --body-file <tmpfile>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Add `-R owner/repo` when the issue lives in another repo (as in step 1). Use the scratchpad file from step 2 (with any step-3 corrections) as the body-file base — it avoids shell-escaping problems with Markdown. Prefix the comment so its origin is clear with a heading line `## Implementation plan (Fable 5)` above the plan body, and end the body with the standard metadata footer:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
---
|
|
70
|
+
Created with: Fable 5 | high | Claude Code | fableplan
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
After posting, give the user the comment URL `gh` returns. Follow the repo's CLAUDE.md conventions for comment formatting if any apply (e.g. avoid `#N` auto-links in list items). If no issue is referenced, skip this step.
|
|
74
|
+
|
|
75
|
+
### 5. Relay the plan to the user
|
|
76
|
+
|
|
77
|
+
Present the vetted plan to the user (the main agent). This is the plan you will build from.
|
|
78
|
+
|
|
79
|
+
### 6. Set up an isolated git worktree
|
|
80
|
+
|
|
81
|
+
Before making any code changes, move the build into its own git worktree so it never touches the user's current workspace. If the directory isn't a git repository, tell the user and ask how to proceed rather than building in place. Otherwise create a fresh branch and worktree for the task:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
git worktree add ../<repo>-fableplan-<short-task-name> -b fableplan/<short-task-name>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Do all of step 7's building inside that worktree. When the build is done, follow the repo's usual conventions for merging or opening a PR from the branch, and remove the worktree once it's no longer needed (`git worktree remove <path>`).
|
|
88
|
+
|
|
89
|
+
### 7. Build
|
|
90
|
+
|
|
91
|
+
In the worktree from step 6, the main agent builds the task per the plan. Confirm with the user first only if the plan reveals ambiguity or a decision the user must make; otherwise proceed.
|
|
92
|
+
|
|
93
|
+
## Notes
|
|
94
|
+
|
|
95
|
+
- The Plan subagent runs on Fable 5 regardless of the main agent's model — `model: fable` on the Agent call forces it.
|
|
96
|
+
- If the user did not reference an issue, never invent one or post anywhere — just plan and build.
|