@phren/cli 0.0.8 → 0.0.10
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/icon.svg +416 -0
- package/mcp/dist/capabilities/mcp.js +5 -5
- package/mcp/dist/capabilities/vscode.js +3 -3
- package/mcp/dist/cli-actions.js +113 -3
- package/mcp/dist/cli-govern.js +166 -1
- package/mcp/dist/cli-hooks.js +2 -2
- package/mcp/dist/cli-namespaces.js +497 -4
- package/mcp/dist/cli.js +7 -1
- package/mcp/dist/content-citation.js +12 -22
- package/mcp/dist/data-access.js +1 -1
- package/mcp/dist/data-tasks.js +39 -1
- package/mcp/dist/entrypoint.js +6 -0
- package/mcp/dist/mcp-finding.js +26 -1
- package/mcp/dist/mcp-tasks.js +23 -2
- package/mcp/dist/memory-ui-assets.js +37 -1
- package/mcp/dist/memory-ui-graph.js +19 -5
- package/mcp/dist/memory-ui-page.js +7 -30
- package/mcp/dist/memory-ui-scripts.js +1 -103
- package/mcp/dist/memory-ui-server.js +1 -82
- package/mcp/dist/shared-retrieval.js +7 -47
- package/mcp/dist/shell-input.js +4 -22
- package/mcp/dist/shell-render.js +2 -2
- package/mcp/dist/shell-view.js +1 -2
- package/mcp/dist/shell.js +0 -5
- package/mcp/dist/tool-registry.js +1 -0
- package/package.json +2 -1
- package/skills/docs.md +170 -0
package/skills/docs.md
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docs
|
|
3
|
+
description: Update and verify all phren documentation surfaces after code changes.
|
|
4
|
+
dependencies:
|
|
5
|
+
- git
|
|
6
|
+
---
|
|
7
|
+
# phren-docs - Documentation accuracy check and update
|
|
8
|
+
|
|
9
|
+
> Keep all phren documentation surfaces in sync with the code after any change.
|
|
10
|
+
|
|
11
|
+
Invoke this after adding tools, changing CLI commands, bumping versions, or editing hooks. It walks every documentation surface, checks what's stale, and updates `docs/documentation.html` (the canonical public-facing reference).
|
|
12
|
+
|
|
13
|
+
## When to run
|
|
14
|
+
|
|
15
|
+
- After adding, removing, or renaming MCP tools
|
|
16
|
+
- After changing CLI commands or their flags
|
|
17
|
+
- After bumping the version number
|
|
18
|
+
- After changing hook names, events, or behavior
|
|
19
|
+
- Before publishing to npm
|
|
20
|
+
- When the user says "update the docs" or "check the docs"
|
|
21
|
+
|
|
22
|
+
## Documentation surfaces
|
|
23
|
+
|
|
24
|
+
| File | What it contains | What to check |
|
|
25
|
+
|------|-----------------|---------------|
|
|
26
|
+
| `README.md` | Project overview, install steps, quick-start | Tool count, version badge, CLI examples |
|
|
27
|
+
| `CLAUDE.md` | In-repo instructions for Claude | Tool count (heading says "MCP Tools (N)"), CLI command list, key file list |
|
|
28
|
+
| `AGENTS.md` | Agent-facing instructions | Tool count, hook table, CLI commands |
|
|
29
|
+
| `CONTRIBUTING.md` | Dev setup, build/test commands | `npm run build`, `npm test`, publish steps |
|
|
30
|
+
| `CHANGELOG.md` | Release history | Latest version matches `package.json` version |
|
|
31
|
+
| `docs/index.html` | GitHub Pages landing page | Install commands, version references, feature list |
|
|
32
|
+
| `docs/documentation.html` | Full reference doc (primary surface) | Tool count, CLI commands, hook table, env vars table |
|
|
33
|
+
| `docs/api-reference.md` | API / tool reference | Tool signatures, return shapes |
|
|
34
|
+
| `docs/architecture.md` | Data-flow diagrams and architecture | File paths, hook names, flow descriptions |
|
|
35
|
+
| `docs/faq.md` | Common questions and answers | References to commands, file paths |
|
|
36
|
+
| `docs/llms.txt` | Short LLM-friendly summary | Tool count, version, install command |
|
|
37
|
+
| `docs/llms-full.txt` | Full LLM-readable reference | Complete tool list, CLI commands, env vars |
|
|
38
|
+
| `mcp/README.md` | MCP server README | Tool count, server entry point |
|
|
39
|
+
| `vscode-extension/README.md` | VS Code extension README | Feature list, commands |
|
|
40
|
+
|
|
41
|
+
## Step-by-step
|
|
42
|
+
|
|
43
|
+
### 1. Read the source of truth
|
|
44
|
+
|
|
45
|
+
The source of truth for counts and signatures lives in the code, not the docs:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Count exported MCP tools in index.ts
|
|
49
|
+
grep -c 'server\.tool(' mcp/src/index.ts
|
|
50
|
+
|
|
51
|
+
# Current version
|
|
52
|
+
node -p "require('./package.json').version"
|
|
53
|
+
|
|
54
|
+
# CLI commands (scan cli.ts / index.ts for subcommand registrations)
|
|
55
|
+
grep 'program\.' mcp/src/cli.ts | head -40
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Record: **tool count**, **version**, and the list of top-level CLI subcommands.
|
|
59
|
+
|
|
60
|
+
### 2. Check each documentation surface
|
|
61
|
+
|
|
62
|
+
For each surface in the table above:
|
|
63
|
+
|
|
64
|
+
1. Read the file
|
|
65
|
+
2. Find every place it mentions a tool count (e.g. "65 tools", "MCP Tools (65)")
|
|
66
|
+
3. Find every place it mentions the version number
|
|
67
|
+
4. Find every CLI command listing
|
|
68
|
+
5. Find the hook table (event names, what each hook does)
|
|
69
|
+
6. Note any stale references (old file paths, renamed tools, removed commands)
|
|
70
|
+
|
|
71
|
+
### 3. Spot-check critical numbers
|
|
72
|
+
|
|
73
|
+
These numbers appear in multiple files and must all agree:
|
|
74
|
+
|
|
75
|
+
| Item | Where to verify |
|
|
76
|
+
|------|----------------|
|
|
77
|
+
| MCP tool count | `mcp/src/index.ts` — count `server.tool(` calls |
|
|
78
|
+
| CLI subcommand count | `mcp/src/cli.ts` — count `program.command(` calls |
|
|
79
|
+
| Version | `package.json` → `version` field |
|
|
80
|
+
| Hook events | `mcp/src/init.ts` — look for hook registration |
|
|
81
|
+
|
|
82
|
+
Run `/parity` if it is installed to automate numeric cross-checking across surfaces.
|
|
83
|
+
|
|
84
|
+
### 4. Update `docs/documentation.html`
|
|
85
|
+
|
|
86
|
+
This is the primary public reference. It must reflect the current state of the code.
|
|
87
|
+
|
|
88
|
+
Sections to verify and update:
|
|
89
|
+
|
|
90
|
+
- **Tool reference table**: every tool name, description, and parameter signature
|
|
91
|
+
- **CLI commands block**: every `phren <subcommand>` with flags and description
|
|
92
|
+
- **Hooks table**: event name, what it runs, what it does
|
|
93
|
+
- **Environment variables table**: variable name, default, description
|
|
94
|
+
- **Version number** in the page title, install command snippets, and any badges
|
|
95
|
+
- **Tool count** in any summary sentence (e.g. "65 MCP tools")
|
|
96
|
+
|
|
97
|
+
When updating the HTML:
|
|
98
|
+
- Keep existing structure and CSS classes — do not restructure the page
|
|
99
|
+
- Update text content only; do not rewrite layout
|
|
100
|
+
- Preserve the `<details>` blocks for env var categories if they exist
|
|
101
|
+
|
|
102
|
+
### 5. Update `docs/llms.txt` and `docs/llms-full.txt`
|
|
103
|
+
|
|
104
|
+
These files are consumed by LLMs directly. Keep them plain text with no HTML.
|
|
105
|
+
|
|
106
|
+
`llms.txt` — short summary (under 60 lines):
|
|
107
|
+
- Tool count
|
|
108
|
+
- Install command
|
|
109
|
+
- One-line description of what phren does
|
|
110
|
+
|
|
111
|
+
`llms-full.txt` — comprehensive reference:
|
|
112
|
+
- All MCP tool signatures with descriptions
|
|
113
|
+
- All CLI commands
|
|
114
|
+
- All environment variables
|
|
115
|
+
- Directory structure
|
|
116
|
+
|
|
117
|
+
### 6. Update `CLAUDE.md` (in-repo)
|
|
118
|
+
|
|
119
|
+
The heading `## MCP Tools (N)` must match the actual tool count. Update N if it changed.
|
|
120
|
+
|
|
121
|
+
The CLI commands block must list every top-level command. Add or remove lines to match.
|
|
122
|
+
|
|
123
|
+
### 7. Sync version references
|
|
124
|
+
|
|
125
|
+
`CHANGELOG.md`: the top entry's version must match `package.json`. If a new version was bumped but the changelog has no entry yet, note it — do not fabricate one.
|
|
126
|
+
|
|
127
|
+
`README.md` and `docs/index.html`: update any hardcoded version strings (badges, `npm install @phren/cli@X.Y.Z`, etc.).
|
|
128
|
+
|
|
129
|
+
### 8. Report
|
|
130
|
+
|
|
131
|
+
After reviewing and updating, output:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
phren-docs
|
|
135
|
+
|
|
136
|
+
Version: 0.0.8
|
|
137
|
+
MCP tools: 65
|
|
138
|
+
CLI subcommands: 22
|
|
139
|
+
|
|
140
|
+
Surfaces checked: 14
|
|
141
|
+
|
|
142
|
+
Changes made:
|
|
143
|
+
- docs/documentation.html: updated tool count (64→65), added new env var PHREN_X
|
|
144
|
+
- CLAUDE.md: updated MCP Tools heading (64→65)
|
|
145
|
+
- docs/llms-full.txt: added PHREN_X to env vars section
|
|
146
|
+
|
|
147
|
+
No changes needed:
|
|
148
|
+
- README.md: version and tool count already correct
|
|
149
|
+
- CHANGELOG.md: top entry matches package.json version
|
|
150
|
+
- mcp/README.md: tool count correct
|
|
151
|
+
|
|
152
|
+
Warnings:
|
|
153
|
+
- docs/faq.md: references `phren init` — command was renamed to `phren link` in v0.0.7
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
List every file checked. Be specific about what changed and what line/section.
|
|
157
|
+
|
|
158
|
+
## What not to do
|
|
159
|
+
|
|
160
|
+
- Do not restructure or reformat documentation for style — only fix accuracy
|
|
161
|
+
- Do not add new sections or features to the docs without user direction
|
|
162
|
+
- Do not fabricate changelog entries for unreleased versions
|
|
163
|
+
- Do not silently skip a surface because it looks "probably fine" — check all of them
|
|
164
|
+
- Do not guess tool counts — always derive from `grep` on the source file
|
|
165
|
+
|
|
166
|
+
## Related skills
|
|
167
|
+
|
|
168
|
+
- `/parity`: numeric cross-check across all documentation surfaces
|
|
169
|
+
- `/consolidate`: surface cross-project patterns before updating architecture docs
|
|
170
|
+
- `/discover`: find gaps in project documentation
|