Pane listing the HTML, SVG, image, Office and PDF files Claude wrote this session, each with Open and Reveal buttons.

A Claude Code plugin marketplace whose main offering is cpm-next: a planning and building method for Claude Code, plus the mods that keep its model, effort and progress in view. It also holds smaller development tools.
cpm-next turns an idea into working, tested code through a short chain of artefacts kept in your repository's docs/ folder: a discussion record, a product brief, a specification, and epics made of stories with acceptance criteria. Six skills cover the whole path:
| Skill | What it does | Finished when |
|---|---|---|
/cpm-next:party | Discussion with named specialist personas (PM, Architect, Developer, UX, QA and others) | A discussion record is saved and the next step is named |
/cpm-next:plan | Writes whatever is missing of brief, spec and epics, from whatever already exists | The artefacts down to the epics exist and trace upward |
/cpm-next:review | Independent challenge of the epics before they are built | Critical and Warning findings are fixed or waiting on you |
/cpm-next:do | Builds stories, verifies each acceptance criterion with evidence, and has each story audited | Every story in scope is Complete and the tests pass |
/cpm-next:library | Curates reference documents in docs/library/ that planning and building read | Documents carry complete front-matter |
/cpm-next:status | Read-only report of where things stand and the next command to run | Nothing is written |
Each skill declares its model and effort: Opus plans and reviews, Sonnet builds, an Opus auditor agent checks every story before it closes, a Haiku scout agent answers lookups, and status runs on Haiku. The artefact formats are defined in cpm-next/shared/artifacts.md; the plugin's own log of changes is in cpm-next/README.md.
Training material (open in a browser):
cpm-next-onboarding.html — install it and run your first spec in an afternooncpm-next-presentation.html — a slide deck introducing the methodcpm-next-training-guide.html — the full guide: every skill, the artefacts, the mods and day-to-day practiceCPM and DPM, the earlier planning plugins, were withdrawn on 2026-10-08. Their source is in this repository's git history.
Inside Claude Code:
/plugin marketplace add ninthspace/claude-code-marketplace
The suffix is the marketplace's name, not the repository's. marketplace.json declares ninthspace-marketplace, and every installed plugin is keyed by it, so cpm-next@claude-code-marketplace resolves to nothing.
Install these at user scope (the default), so one install serves every repository:
/plugin install cpm-next@ninthspace-marketplace # the six skills, the auditor and scout agents
/plugin install cpm-next-models@ninthspace-marketplace # mod: holds each skill's model and effort, per-story effort
/plugin install cpm-next-progress@ninthspace-marketplace # mod: /progress-tracker, claude.ai trackers per spec and an overview of every project
/plugin install whats-next@ninthspace-marketplace # mod: /next, a live pane of the work left in the repository
/plugin install plugin-sync@ninthspace-marketplace # mod: reloads open sessions when a plugin here is updated
/reload-plugins
Only cpm-next is required. The four mods are optional, and each adds one thing:
| Plugin | Kind | Without it |
|---|---|---|
cpm-next | Skills and agents | — |
cpm-next-models | Mod (function hooks) | A skill's model and effort last only for the turn that invoked it; later turns of a do run fall back to the session model, and stories are not given their own effort |
cpm-next-progress | Mod, adds /progress-tracker | No shareable progress pages or cross-project overview; read the epic docs or run /cpm-next:status |
whats-next | Mod, adds /next | No live pane; run /cpm-next:status |
plugin-sync | Mod | After an update, run /reload-plugins in each open session |
Mods are plugins of function hooks that run inside Claude Code. They load like any plugin, run no model calls of their own unless stated, and are switched off and on with the plugin. A session that was open before you installed one needs /reload-plugins to load it.
Per-project setup for /progress-tracker. In a repository whose spec has epics in docs/epics/, run /progress-tracker 01 (the spec's number). The mod writes the page and asks Claude to publish it, then saves the tracker's link and keeps the table in step with the epic docs from then on. /progress-tracker all then shows every project's trackers in a pane, and /progress-tracker all publish puts the same overview on a claude.ai page. Details under CPM Next Progress.
Keeping up to date. The marketplace auto-updates when Claude Code starts. plugin-sync then reloads sessions that were already open. To update straight away, from any directory:
claude plugin marketplace update ninthspace-marketplace
claude plugin update cpm-next@ninthspace-marketplace # and each other plugin that changed
/plugin install noteplan@ninthspace-marketplace
/plugin install php-lsp@ninthspace-marketplace
/plugin install js-simplifier@ninthspace-marketplace
/plugin install filament-mockup@ninthspace-marketplace
/plugin install generated-files@ninthspace-marketplace
/plugin install weather@ninthspace-marketplace
Plan and build with six skills: party, plan, review, do, library, status
The skills read and write Markdown artefacts under docs/: discussions/, briefs/, architecture/, specifications/, epics/, reviews/, retros/, quick/ and library/. The artefacts are the only state; there are no progress files to clean up. A typical path:
/cpm-next:party to talk an idea through (optional)./cpm-next:plan to write the brief, spec and epics. It reads what exists, asks its questions in one batch, and fills only the gaps. In a brownfield project it grounds every requirement in the current code./cpm-next:review before a large or risky epic (optional)./cpm-next:do to build: one story (/cpm-next:do 3), one epic, or all, which runs unattended and marks a blocked story instead of stopping. Each acceptance criterion gets an Evidence line, and each story is audited before it closes. Before the audit, do checks the story the way the auditor will: the full suite, tests that would fail without the change, unexpected inputs, and the words it wrote against the code. A failed audit gets one more after its fixes, and that one audits the fix code as new code; a story still failing is marked blocked. --parallel builds unblocked stories together in git worktrees, one subagent each, even when they touch the same files, and merges them; it covers code and tests, and stories that need the running app, a lock-file change or a shared migration still go one at a time. --parallel check says what it would do, and whether the test suite is isolated enough for it, without building anything. Without the flag, do makes the same check whenever two or more stories are unblocked at once, and names any batch that qualifies./cpm-next:status whenever you return to the project.Story effort. plan gives a story Effort: high where a mistake is costly or hard to see, and Effort: low for mechanical edits; with cpm-next-models installed, do builds each story at that effort and raises it for a fix after a failed audit. A low story marked Model: haiku is built by a Haiku subagent.
Agents: auditor (Opus, read-only) checks a finished story's evidence, diff, scope, tests, unexpected inputs and user-facing text, reading the full-suite result do hands it rather than running the suite again; scout (Haiku, read-only) answers lookups such as where something is used or what a read-only query returns.
Quick Start:
/plugin install cpm-next@ninthspace-marketplace
/reload-plugins
/cpm-next:plan a CSV export for the bookings report
Holds each cpm-next skill's model and effort for its whole run
A Claude Code mod. A skill's model and effort frontmatter normally lasts only for the turn that invoked it. This mod keeps them for every later turn of the run, including your replies to the skill's questions, until another skill runs, you switch model or effort yourself, or /clear. It runs do all at high effort, and gives /cpm-next:do a set_story_effort tool so each story is built at its own Effort, never below high in a do all run. The footer shows what is held, for example cpm-next:do · story 3 · sonnet · low.
Commands: /cpm-models shows what is held; /cpm-models off releases it.
Works under sec-default. Claude Code's built-in sec-default mod sends classic.* and skill.prompt events past every user-installed plugin, so the mod reads skills from the typed prompt and the Skill tool instead. A typed built-in such as /cost leaves the hold alone. No managed settings are needed: seating the mod in the prepend tier through prependPlugins works only when the marketplace is a local folder declared in managed extraKnownMarketplaces.
Quick Start:
/plugin install cpm-next-models@ninthspace-marketplace
/reload-plugins
Develop: claude plugin validate cpm-next-models and claude plugin test cpm-next-models.
claude.ai progress trackers for cpm-next specs, kept in step with the epic docs, and an overview of every project's
A Claude Code mod (a plugin of function hooks). Name a spec and the mod writes a build order for its stories to a small JSON file, which you can edit; Claude then publishes a private claude.ai artifact showing that order as a table, grouped by phase. The mod compares the table with the epic docs in docs/epics/ whenever they change, and tells Claude which rows to update. Status, titles and outstanding blockers come from the epic docs; the order, phase labels, notes and open decisions come from the build-order file. Every check also saves each tracker's counts to the mod's own store, which feeds a pane and an overview page showing all projects at once. A project that keeps its CPM documents under docs/cpm/ instead, with a docs/cpm/specifications/ folder and no docs/specifications/, is read from there; the paths below then start docs/cpm/.
The mod only reads. It lists the artifact's rows through the ArtifactData tool, which auto mode does not ask about, and never writes to it. Claude's own ArtifactData calls do the writing, so no permission rule is needed. An earlier version wrote to the artifact itself, and auto mode refused those calls intermittently with "The server-side auto mode classifier gave no verdict for ArtifactData".
Build-order file: docs/specifications/NN-build-order.json:
{
"title": "01-Series Build Order",
"spec": "docs/specifications/01-spec-requirements-matrix-todos.md",
"decisions": ["Questions still open, shown in a box above the table"],
"phases": [
{ "label": "No visible change", "items": [
{ "epic": "01-05", "story": 1, "note": "Default value keeps today's text" },
{ "epic": "01-05", "task": "3.1" }
] },
{ "label": "Waiting on input", "note": "Shown beside the phase label", "items": [
{ "epic": "01-05", "story": 2, "waitingOn": "new name from the client" }
] }
]
}
An item is a story (story) or one task (task) of an epic, named by the epic's number prefix. waitingOn shows the item as Waiting on input until it is removed from the file or the item starts. artifact holds the tracker's link; the mod adds it when Claude publishes the page.
The first build order is written from the spec's epics (those whose number starts with the spec's): one phase per epic, epics ordered by their Blocked by epics, each epic's stories ordered by their Blocked by stories and then by number. Superseded and withdrawn epics and stories are left out. Edit the file afterwards to reorder, regroup, split a story into tasks or add waitingOn.
Statuses: Complete, In progress (the story says so, or one of its tasks has started), Waiting on input, Pending. The page shows a Pending row with no blockers as Ready, as whats-next does; the stored status stays Pending. A row's date moves only when its status changes. Blockers shown are the story's and epic's Blocked by items not yet Complete, earlier unfinished tasks of the same story, and any waitingOn.
How it works:
.claude/cpm-next-progress/NN-build-order.pending.json, shows you a one-line notice, and gives Claude a note with the artifact link and the writes. Claude applies them with one ArtifactData batch. More than eight writes stay in the file, and Claude hands them to a Haiku subagent, which reads the file and applies each batch, so they never enter the main conversation.Epics with no spec. Epics planned straight from a discussion, numbered 00-01 and so on with no 00-spec-*.md, still get a tracker: /progress-tracker 00 writes docs/specifications/00-build-order.json from the 00- epics, titled from the first of them, with its Source spec line as the source.
A deleted tracker. Once a spec's work is done you can delete its artifact. The mod then reports that tracker as no longer existing, in one line, and stops reading it; nothing else is checked differently. /progress-tracker 01 for that spec removes the dead link from the build-order file and publishes a new tracker. To stop the line instead, delete the artifact entry from the build-order file yourself.
Finished work costs nothing. A tracker whose rows are all Complete and in step, or whose artifact was deleted, is settled: later checks skip it without reading its build-order file or its artifact, until that build-order file changes. A bare /progress-tracker still checks it. So a story reopened in a finished spec reaches its tracker only through /progress-tracker or an edit to the build-order file. The epic docs are read once per check, not once per tracker.
The folder .claude/cpm-next-progress/ holds generated files (the pages and the pending writes, including overview.html and overview.pending.json); /progress-tracker 01 and /progress-tracker all publish add it to the project's .gitignore.
Commands:
/progress-tracker — checks every tracker in the repository now and prints what differs, or "up to date". In a repository with one spec and no tracker yet, it prepares that spec's tracker instead./progress-tracker all — opens the pane of every project's trackers; /progress-tracker all finished includes the finished ones./progress-tracker times — how long this project's stories have taken and how long each story in progress has run (see Story timings)./progress-tracker all publish — writes the overview page and asks Claude to publish it, or to republish it to its link if it has one./progress-tracker 01 (or a spec file, or a build-order file) — writes docs/specifications/01-build-order.json from the spec's epics if it does not exist yet, writes the page to .claude/cpm-next-progress/, and adds that folder to .gitignore. It then submits a prompt asking Claude to publish the page. When Claude does, the mod saves the link to the build-order file and gives Claude the rows to write. init before the name still works. For a spec that already has a tracker, it rewrites the page from the current template and asks Claude to republish it to the same link, keeping the rows.Every project at a glance. /progress-tracker all opens a pane with one row per tracker in every project, grouped by project, those with work left first: the title, a bar, done of total, and the stories in progress, or the date the counts last moved. The rows fit the pane's own width: in a narrow pane, such as one side of a split, each title gets a line of its own with the bar beneath it. Finished and deleted trackers are counted under their project rather than listed; /progress-tracker all finished lists them too. Each check saves its tracker's counts to the mod's own store, so the pane reads no repository and no artifact; it is redrawn as checks run and once a minute while open, to show other sessions' checks. A project appears once a session there has run a check, and one whose build-order file was removed is dropped when the pane opens.
The overview as a claude.ai page. /progress-tracker all publish writes .claude/cpm-next-progress/overview.html and asks Claude to publish it; the mod keeps its link in its own store, since the page belongs to no one project. The page shows a card per project with a row per tracker, linked to that tracker, and totals across all of them. Finished trackers are counted under each project, with a button to list them; the choice is remembered in that browser. Its rows (collection trackers, one document per project and spec, such as slate--01) are copied from the index and carry the project's folder name, never its path. They are kept in step as the trackers are: a check that changes the index works out the rows the page lacks, and Claude writes them. The page is read only when the index changed since its rows last matched. A bare /progress-tracker brings the page in line from any folder, and asks Claude to write what it found at once. If the page is deleted, the mod forgets the link and says so once; /progress-tracker all publish makes a new one.
Story timings. Each check that sees an epic doc change records the stories whose status moved, stamped with the time the doc was written. A story is timed from the check that sees it go from Pending to In Progress to the one that sees it Complete; a story already under way when timing began, or one seen to jump straight from Pending to Complete, gets no time, and a reopened story goes on from its first start. Only projects with a build-order file are checked, so only they are timed. Once a project has 10 timed stories, /progress-tracker times gives the middle half of their times and the median, overall and for each Effort with 10 of its own, and for each story in progress, how long it has run and roughly how long is left. An estimate counts as a prediction only while the slower quartile is within three times the quicker one; past that the times are shown but no time left is given. The pane adds the time in to each story in progress, and the typical range when it is a prediction; so do the tracker page, under the story's status, and the overview page, beside each story in progress. The pages' rows carry only the story's start and range, which change when a story starts or finishes, and each page works out the time in itself and redraws it every minute. Pages published before 0.7.0 need their template again: /progress-tracker 04 for a tracker and /progress-tracker all publish for the overview republish to the same links. Times run from the first start to the close, so a story left In Progress overnight takes the night with it; the median and quartiles keep one such story from moving the estimate much.
Asking in words. Claude has a publish_tracker tool that does what /progress-tracker 01 does, so "publish the progress tracker" in a prompt gets the plugin's page and not one Claude writes by hand. A story_times tool answers "how long until story 5 is done?" from the timings, as /progress-tracker times does, rather than from Claude's guess at the steps left.
Data layout (in the artifact's database, readable by anyone it is shared with, writable by editors): collection items, one document per row (01-05-s1, 01-05-t3.1), a timed story in progress with started (epoch ms) and, when steady, typical; document meta/tracker with the title, spec, last update and decisions. The overview page has one collection, trackers, one document per project and spec (slate--01), with timings (story, started, typical) for its timed stories in progress.
Mod store ($.store, on this machine only): index:<root>/<file> per tracker, settled: and gone: for finished and deleted trackers, checked:, behind: and times: (each story's status, effort, start and finish) per project, and overview:url and overview:synced for the overview page.
Quick Start:
/plugin install cpm-next-progress@ninthspace-marketplace
/reload-plugins
/progress-tracker 01
/progress-tracker all
/progress-tracker all publish
/progress-tracker times
The mod asks Claude to publish each page. The spec needs its epics in docs/epics/ first.
Reads: the cpm-next epic format (cpm-next/shared/artifacts.md), as What's Next does.
Develop: claude plugin validate cpm-next-progress and claude plugin test cpm-next-progress. To run the working tree, start Claude Code with --plugin-dir cpm-next-progress. Both commands run on the newest Claude Code installed, while open sessions may run an older one; see docs/maintenance/README.md for loading the mod under each.
A live pane and band showing the cpm-next work left in the current repository
A Claude Code mod (a plugin of function hooks). It reads the docs/epics/ and docs/specifications/ folders of the repository the session runs in — or the nearest folder above it that has either, up to the repository's top and never the home folder; a project that keeps its CPM documents under docs/cpm/ is read from there — and shows every story not yet Complete, in the order to build them, and every spec no epic has been planned from yet. It reads the files directly, with no model calls, so it stays current as /cpm-next:do or you edit the epics.
What it shows:
doing, ready, or after Story 1 / after Epic …), and each open epic's story count. Opens by itself in a repository with work left when the terminal is at least 144 columns wide; /next opens it at any width.docs/specifications/ that no epic was planned from, in number order. A spec counts as planned when an epic is numbered after it (03-spec-… → 03-01-epic-…) or an epic names its file in Source spec; a spec whose own Status is Complete, Superseded or Withdrawn is left out, as is a withdrawal notice (a Withdrawn or Superseded by field, or WITHDRAWN / SUPERSEDED in its title).Ask Claude button (hotkey a) that asks Sonnet for a short note on what to do next, from the ordered list and the first two stories in full. The note is kept per repository across sessions and dimmed once hooks/register.tsx 138 lines1import { atom, read, update } from 'claude-code'
2import type { EngineInterface, Register } from 'claude-code'
3
4import type { GeneratedFile } from '../types'
5import { candidatePaths, displayFolder, isGenerated } from './paths'
6
7const PANE = 'generated-files'
8const TITLE = 'Files'
9const LIMIT = 30
10
11const files = atom({ plugin: 'generated-files', key: 'files' } as const, [])
12
13let home = ''
14let hasOpened = false
15
16async function homeDir($: EngineInterface): Promise<string> {
17 if (home === '') home = (await $.env.get('HOME')) ?? ''
18
19 return home
20}
21
22async function remember($: EngineInterface, paths: string[], via: GeneratedFile['via']) {
23 if (paths.length === 0) return
24 const at = await $.clock.now()
25 const base = await homeDir($)
26 const added: GeneratedFile[] = paths.map(path => ({
27 path,
28 name: path.slice(path.lastIndexOf('/') + 1),
29 folder: displayFolder(path, base),
30 at,
31 via,
32 }))
33 // Newest first; a file written again moves to the top rather than appearing twice.
34 await update($, files, list => [...added, ...list.filter(f => !paths.includes(f.path))].slice(0, LIMIT))
35 if (!hasOpened) {
36 hasOpened = true
37 await $.ui.open({ id: PANE, title: TITLE })
38 }
39}
40
41// Of the paths a command names, the ones that exist and changed while it ran.
42async function writtenSince($: EngineInterface, paths: string[], startedAt: number): Promise<string[]> {
43 const written: string[] = []
44 for (const path of paths) {
45 const stat = await $.fs.stat(path).catch(() => undefined)
46 if (stat?.kind === 'file' && stat.mtimeMs >= startedAt - 2000) written.push(path)
47 }
48
49 return written
50}
51
52async function openFile($: EngineInterface, path: string, isReveal: boolean) {
53 const argv = isReveal ? ['open', '-R', path] : ['open', path]
54 const { exitCode, stderr } = await $.process.run(argv)
55 if (exitCode !== 0) $.ui.toast(`Could not open ${path}: ${stderr.trim() || `exit ${exitCode}`}`)
56}
57
58let isStarted = false
59
60// Registers /files, once per load.
61async function start($: EngineInterface) {
62 if (isStarted) return
63 isStarted = true
64 await $.command.register({ name: 'files', description: 'Show the files Claude generated this session, with Open buttons' })
65}
66
67export const register: Register = on => {
68 on('session.start', async ($, e, next) => {
69 await start($)
70
71 return next(e)
72 })
73
74 // A plugin loaded by /reload-plugins (an install or update mid-session) sees no session.start; start on the first prompt.
75 on('prompt.submit', async ($, e, next) => {
76 await start($)
77
78 return next(e)
79 })
80
81 on('command.run', { command: 'files' }, async $ => {
82 await $.ui.open({ id: PANE, title: TITLE })
83 const list = await read($, files)
84
85 return {
86 text: list.length === 0
87 ? 'No generated files yet this session.'
88 : list.map((f, i) => `${i + 1}. ${f.path}`).join('\n'),
89 }
90 })
91
92 on('tool.call', { tool: ['Write', 'Edit'] }, async ($, e, next) => {
93 const result = await next(e)
94 if (!('deny' in result && result.deny !== undefined) && result.isError !== true && isGenerated(e.file_path)) {
95 await remember($, [e.file_path], e.tool)
96 }
97
98 return result
99 })
100
101 on('tool.call', { tool: 'Bash' }, async ($, e, next) => {
102 const startedAt = await $.clock.now()
103 const result = await next(e)
104 const candidates = candidatePaths(e.command, await $.session.cwd(), await homeDir($))
105 if (candidates.length > 0) await remember($, await writtenSince($, candidates, startedAt), 'Bash')
106
107 return result
108 })
109
110 on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
111 const { Box, Text, Button } = $.ui.resolve(e)
112 const list = await read($, files)
113
114 if (list.length === 0) return <Text dimColor>No HTML, image, Office or PDF files generated yet this session.</Text>
115
116 return (
117 <Box flexDirection="column">
118 <Box>
119 <Text bold>{list.length} generated {list.length === 1 ? 'file' : 'files'} </Text>
120 <Button key="clear" label="Clear" plain dimColor onPress={() => void update($, files, () => [])} />
121 </Box>
122 <Text> </Text>
123 {list.map((f, i) => (
124 <Box flexDirection="column">
125 <Box>
126 <Button key={`open-${f.path}`} label="Open" hotkey={i < 9 ? String(i + 1) : undefined} onPress={() => void openFile($, f.path, false)} />
127 <Text> </Text>
128 <Button key={`reveal-${f.path}`} label="Reveal" onPress={() => void openFile($, f.path, true)} />
129 <Text wrap="truncate-end"> {f.name}</Text>
130 </Box>
131 <Text wrap="truncate-middle" dimColor> {f.folder}</Text>
132 </Box>
133 ))}
134 </Box>
135 )
136 })
137}
138hooks/paths.ts 48 lines1export const EXTENSIONS = ['html', 'htm', 'svg', 'png', 'jpg', 'jpeg', 'gif', 'webp', 'docx', 'xlsx', 'pptx', 'pdf']
2
3const EXT = new RegExp(`\\.(${EXTENSIONS.join('|')})$`, 'i')
4const TOKEN = new RegExp(`[^\\s'"\`<>|;&()=]+\\.(?:${EXTENSIONS.join('|')})(?![\\w.])`, 'gi')
5
6export const isGenerated = (path: string) => EXT.test(path)
7
8/** The folder a command runs in: a leading `cd <dir> &&`, else the session's directory. */
9export function commandDir(command: string, cwd: string, home: string): string {
10 const cd = /^\s*cd\s+(['"]?)([^'"&;|]+?)\1\s*(?:&&|;)/.exec(command)
11
12 return cd?.[2] === undefined ? cwd : resolvePath(cd[2], cwd, home)
13}
14
15export function resolvePath(path: string, dir: string, home: string): string {
16 const expanded = path === '~' ? home : path.startsWith('~/') ? `${home}${path.slice(1)}` : path.replace(/^\$HOME(?=\/)/, home)
17 const absolute = expanded.startsWith('/') ? expanded : `${dir.replace(/\/$/, '')}/${expanded}`
18 const parts: string[] = []
19 for (const part of absolute.split('/')) {
20 if (part === '' || part === '.') continue
21 if (part === '..') parts.pop()
22 else parts.push(part)
23 }
24
25 return `/${parts.join('/')}`
26}
27
28/**
29 * Paths a Bash command may have written: every token with a listed extension, and for
30 * md2docx or pandoc runs the `.docx` beside each `.md` it names (md2docx's default output).
31 * The caller keeps only those modified while the command ran.
32 */
33export function candidatePaths(command: string, cwd: string, home: string): string[] {
34 const dir = commandDir(command, cwd, home)
35 const found = [...command.matchAll(TOKEN)].map(m => m[0])
36 if (/md2docx|pandoc/.test(command)) {
37 for (const m of command.matchAll(/[^\s'"`<>|;&()=]+\.md(?![\w.])/g)) found.push(m[0].replace(/\.md$/, '.docx'))
38 }
39
40 return [...new Set(found.map(p => resolvePath(p, dir, home)))]
41}
42
43export function displayFolder(path: string, home: string): string {
44 const folder = path.slice(0, path.lastIndexOf('/')) || '/'
45
46 return folder === home || folder.startsWith(`${home}/`) ? `~${folder.slice(home.length)}` : folder
47}
48types/index.d.ts 15 lines1export type GeneratedFile = {
2 path: string
3 name: string
4 /** The folder, with the home directory shown as ~. */
5 folder: string
6 at: number
7 via: 'Write' | 'Edit' | 'Bash'
8}
9
10declare module 'claude-code' {
11 interface PluginState {
12 'generated-files': { files: GeneratedFile[] }
13 }
14}
15