@phren/cli 0.0.11 → 0.0.13
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/README.md +9 -9
- package/mcp/dist/capabilities/cli.js +1 -1
- package/mcp/dist/capabilities/mcp.js +1 -1
- package/mcp/dist/capabilities/vscode.js +1 -1
- package/mcp/dist/capabilities/web-ui.js +1 -1
- package/mcp/dist/cli-actions.js +54 -67
- package/mcp/dist/cli-config.js +4 -5
- package/mcp/dist/cli-extract.js +3 -2
- package/mcp/dist/cli-graph.js +17 -3
- package/mcp/dist/cli-hooks-output.js +1 -1
- package/mcp/dist/cli-hooks-session.js +1 -1
- package/mcp/dist/cli-hooks.js +5 -3
- package/mcp/dist/cli.js +1 -1
- package/mcp/dist/content-archive.js +21 -12
- package/mcp/dist/content-citation.js +13 -2
- package/mcp/dist/content-learning.js +6 -4
- package/mcp/dist/content-metadata.js +10 -0
- package/mcp/dist/core-finding.js +1 -1
- package/mcp/dist/data-access.js +10 -31
- package/mcp/dist/data-tasks.js +5 -26
- package/mcp/dist/embedding.js +0 -1
- package/mcp/dist/entrypoint.js +4 -0
- package/mcp/dist/finding-impact.js +1 -32
- package/mcp/dist/finding-journal.js +1 -1
- package/mcp/dist/finding-lifecycle.js +2 -7
- package/mcp/dist/governance-locks.js +6 -0
- package/mcp/dist/governance-policy.js +1 -7
- package/mcp/dist/governance-scores.js +1 -7
- package/mcp/dist/hooks.js +23 -0
- package/mcp/dist/init-config.js +1 -1
- package/mcp/dist/init-preferences.js +1 -1
- package/mcp/dist/init-setup.js +1 -50
- package/mcp/dist/init-shared.js +53 -1
- package/mcp/dist/init.js +21 -6
- package/mcp/dist/link-context.js +1 -1
- package/mcp/dist/link-doctor.js +11 -54
- package/mcp/dist/link.js +4 -53
- package/mcp/dist/mcp-extract-facts.js +11 -6
- package/mcp/dist/mcp-finding.js +10 -14
- package/mcp/dist/mcp-graph.js +6 -6
- package/mcp/dist/mcp-hooks.js +1 -1
- package/mcp/dist/mcp-search.js +3 -8
- package/mcp/dist/mcp-session.js +12 -2
- package/mcp/dist/memory-ui-assets.js +1 -36
- package/mcp/dist/memory-ui-graph.js +152 -50
- package/mcp/dist/memory-ui-page.js +7 -5
- package/mcp/dist/memory-ui-scripts.js +42 -36
- package/mcp/dist/phren-core.js +2 -0
- package/mcp/dist/phren-paths.js +1 -2
- package/mcp/dist/proactivity.js +5 -5
- package/mcp/dist/project-config.js +1 -1
- package/mcp/dist/provider-adapters.js +1 -1
- package/mcp/dist/query-correlation.js +22 -19
- package/mcp/dist/session-checkpoints.js +14 -14
- package/mcp/dist/shared-data-utils.js +28 -0
- package/mcp/dist/shared-fragment-graph.js +11 -11
- package/mcp/dist/shared-governance.js +1 -1
- package/mcp/dist/shared-retrieval.js +2 -10
- package/mcp/dist/shared-search-fallback.js +2 -12
- package/mcp/dist/shared.js +2 -3
- package/mcp/dist/shell-entry.js +1 -1
- package/mcp/dist/shell-input.js +62 -52
- package/mcp/dist/shell-palette.js +6 -1
- package/mcp/dist/shell-render.js +9 -5
- package/mcp/dist/shell-state-store.js +1 -4
- package/mcp/dist/shell-view.js +4 -4
- package/mcp/dist/shell.js +4 -54
- package/mcp/dist/status.js +2 -8
- package/mcp/dist/utils.js +1 -1
- package/package.json +1 -2
- package/skills/docs.md +11 -11
- package/starter/README.md +1 -1
- package/starter/global/CLAUDE.md +2 -2
- package/starter/global/skills/audit.md +10 -10
- package/mcp/dist/cli-hooks-retrieval.js +0 -2
- package/mcp/dist/impact-scoring.js +0 -22
package/skills/docs.md
CHANGED
|
@@ -74,10 +74,10 @@ These numbers appear in multiple files and must all agree:
|
|
|
74
74
|
|
|
75
75
|
| Item | Where to verify |
|
|
76
76
|
|------|----------------|
|
|
77
|
-
| MCP tool count | `mcp/src/index.ts
|
|
78
|
-
| CLI subcommand count | `mcp/src/cli.ts
|
|
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
79
|
| Version | `package.json` → `version` field |
|
|
80
|
-
| Hook events | `mcp/src/init.ts
|
|
80
|
+
| Hook events | `mcp/src/init.ts`: look for hook registration |
|
|
81
81
|
|
|
82
82
|
Run `/parity` if it is installed to automate numeric cross-checking across surfaces.
|
|
83
83
|
|
|
@@ -95,7 +95,7 @@ Sections to verify and update:
|
|
|
95
95
|
- **Tool count** in any summary sentence (e.g. "65 MCP tools")
|
|
96
96
|
|
|
97
97
|
When updating the HTML:
|
|
98
|
-
- Keep existing structure and CSS classes
|
|
98
|
+
- Keep existing structure and CSS classes. Do not restructure the page
|
|
99
99
|
- Update text content only; do not rewrite layout
|
|
100
100
|
- Preserve the `<details>` blocks for env var categories if they exist
|
|
101
101
|
|
|
@@ -103,12 +103,12 @@ When updating the HTML:
|
|
|
103
103
|
|
|
104
104
|
These files are consumed by LLMs directly. Keep them plain text with no HTML.
|
|
105
105
|
|
|
106
|
-
`llms.txt
|
|
106
|
+
`llms.txt`, short summary (under 60 lines):
|
|
107
107
|
- Tool count
|
|
108
108
|
- Install command
|
|
109
109
|
- One-line description of what phren does
|
|
110
110
|
|
|
111
|
-
`llms-full.txt
|
|
111
|
+
`llms-full.txt`, comprehensive reference:
|
|
112
112
|
- All MCP tool signatures with descriptions
|
|
113
113
|
- All CLI commands
|
|
114
114
|
- All environment variables
|
|
@@ -122,7 +122,7 @@ The CLI commands block must list every top-level command. Add or remove lines to
|
|
|
122
122
|
|
|
123
123
|
### 7. Sync version references
|
|
124
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
|
|
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
126
|
|
|
127
127
|
`README.md` and `docs/index.html`: update any hardcoded version strings (badges, `npm install @phren/cli@X.Y.Z`, etc.).
|
|
128
128
|
|
|
@@ -150,18 +150,18 @@ No changes needed:
|
|
|
150
150
|
- mcp/README.md: tool count correct
|
|
151
151
|
|
|
152
152
|
Warnings:
|
|
153
|
-
- docs/faq.md: references `phren init
|
|
153
|
+
- docs/faq.md: references `phren init`, command was renamed to `phren link` in v0.0.7
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
List every file checked. Be specific about what changed and what line/section.
|
|
157
157
|
|
|
158
158
|
## What not to do
|
|
159
159
|
|
|
160
|
-
- Do not restructure or reformat documentation for style
|
|
160
|
+
- Do not restructure or reformat documentation for style. Only fix accuracy
|
|
161
161
|
- Do not add new sections or features to the docs without user direction
|
|
162
162
|
- Do not fabricate changelog entries for unreleased versions
|
|
163
|
-
- Do not silently skip a surface because it looks "probably fine"
|
|
164
|
-
- Do not guess tool counts
|
|
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
165
|
|
|
166
166
|
## Related skills
|
|
167
167
|
|
package/starter/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# My Phren
|
|
2
2
|
|
|
3
|
-
Your personal project store for [phren](https://github.com/alaarab/phren). Phren is your project's memory keeper
|
|
3
|
+
Your personal project store for [phren](https://github.com/alaarab/phren). Phren is your project's memory keeper. He holds what your agents learn and surfaces it when it matters, across sessions and machines.
|
|
4
4
|
|
|
5
5
|
## Structure
|
|
6
6
|
|
package/starter/global/CLAUDE.md
CHANGED
|
@@ -56,7 +56,7 @@ Run `/phren-sync` to pull everything down or push changes back.
|
|
|
56
56
|
|
|
57
57
|
## MCP tools
|
|
58
58
|
|
|
59
|
-
The phren MCP server is running. Phren already knows a lot
|
|
59
|
+
The phren MCP server is running. Phren already knows a lot. Ask him before asking the user to repeat themselves.
|
|
60
60
|
|
|
61
61
|
- **At session start:** ask phren what's active: `list_projects()`, then `get_project_summary(name)` for the relevant project
|
|
62
62
|
- **When the user mentions a project, codebase, or task:** ask phren first: `search_knowledge(query)` before asking questions
|
|
@@ -86,4 +86,4 @@ Read `~/.phren-context.md` at the start of every session for machine-specific co
|
|
|
86
86
|
|
|
87
87
|
## Without MCP server
|
|
88
88
|
|
|
89
|
-
If the MCP server isn't available, phren still helps. Claude reads `~/.phren-context.md` and per-project memory files from `~/.claude/projects/` for context, then fetches details directly from `~/.phren/project-name/` as needed. No MCP required
|
|
89
|
+
If the MCP server isn't available, phren still helps. Claude reads `~/.phren-context.md` and per-project memory files from `~/.claude/projects/` for context, then fetches details directly from `~/.phren/project-name/` as needed. No MCP required, phren just works a bit more quietly.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: audit
|
|
3
|
-
description: Full codebase audit
|
|
3
|
+
description: Full codebase audit. Dead code, security, dependencies, performance, optimization. Not a diff review, scans everything.
|
|
4
4
|
---
|
|
5
5
|
# /audit - Full Codebase Audit
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@ Launch 5 parallel agents. Each one scans the full codebase for a different class
|
|
|
15
15
|
Before launching agents, understand the project:
|
|
16
16
|
|
|
17
17
|
```
|
|
18
|
-
1. Read package.json (or pyproject.toml, Cargo.toml, go.mod
|
|
18
|
+
1. Read package.json (or pyproject.toml, Cargo.toml, go.mod, whatever applies)
|
|
19
19
|
2. Find the source directories (src/, lib/, app/, etc.)
|
|
20
20
|
3. Count files by extension to understand the stack
|
|
21
21
|
4. Check for existing lint/test configs
|
|
@@ -32,7 +32,7 @@ Use the Agent tool to launch all five concurrently in a single message. Give eac
|
|
|
32
32
|
Find code that exists but isn't used:
|
|
33
33
|
|
|
34
34
|
1. **Unused exports.** For every `export` in the codebase, check if it's imported anywhere. Flag exports that are only used in their own file or not used at all. Exclude entry points and public API surfaces.
|
|
35
|
-
2. **Unused dependencies.** Cross-reference `package.json` dependencies against actual imports in source files. Flag packages that are installed but never imported. Check devDependencies too
|
|
35
|
+
2. **Unused dependencies.** Cross-reference `package.json` dependencies against actual imports in source files. Flag packages that are installed but never imported. Check devDependencies too. Are test utilities actually used in tests?
|
|
36
36
|
3. **Dead functions.** Functions defined but never called. Methods on classes that nothing invokes. Event handlers registered but for events that are never emitted.
|
|
37
37
|
4. **Orphan files.** Files that nothing imports. Test files for source files that no longer exist. Config files for tools that aren't in the project.
|
|
38
38
|
5. **Feature flags that resolved.** Environment variable checks where one branch is clearly dead. TODO/FIXME/HACK comments older than 6 months.
|
|
@@ -91,16 +91,16 @@ Wait for all agents. Then:
|
|
|
91
91
|
|
|
92
92
|
1. **Deduplicate.** Multiple agents may flag the same issue from different angles. Merge them.
|
|
93
93
|
2. **Prioritize.** Security issues first. Then dead code (easy wins). Then performance. Then quality.
|
|
94
|
-
3. **Fix directly.** Don't just report
|
|
94
|
+
3. **Fix directly.** Don't just report. Fix what you can. For things that need the user's input (like removing a dependency that might be used in a way you can't see), ask.
|
|
95
95
|
4. **Summarize.** Report what was found, what was fixed, and what needs the user's decision.
|
|
96
96
|
|
|
97
97
|
## Options
|
|
98
98
|
|
|
99
99
|
The user can scope the audit:
|
|
100
100
|
|
|
101
|
-
- `/audit
|
|
102
|
-
- `/audit security
|
|
103
|
-
- `/audit dead-code
|
|
104
|
-
- `/audit performance
|
|
105
|
-
- `/audit deps
|
|
106
|
-
- `/audit quality
|
|
101
|
+
- `/audit`: full audit, all 5 agents
|
|
102
|
+
- `/audit security`: just the security agent
|
|
103
|
+
- `/audit dead-code`: just dead code detection
|
|
104
|
+
- `/audit performance`: just performance
|
|
105
|
+
- `/audit deps`: just dependency health
|
|
106
|
+
- `/audit quality`: just code quality
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// Backward-compatible wrapper around finding-impact.
|
|
2
|
-
import { findingIdFromLine, extractFindingIdsFromSnippet, logImpact, getHighImpactFindings, markImpactEntriesCompletedForSession, } from "./finding-impact.js";
|
|
3
|
-
export function impactEntryKey(project, findingId) {
|
|
4
|
-
return `${project}\u0000${findingId}`;
|
|
5
|
-
}
|
|
6
|
-
export { findingIdFromLine, extractFindingIdsFromSnippet, markImpactEntriesCompletedForSession, };
|
|
7
|
-
export function appendImpactEntries(phrenPath, entries) {
|
|
8
|
-
const pending = entries.filter((entry) => !entry.taskCompleted);
|
|
9
|
-
if (pending.length === 0)
|
|
10
|
-
return;
|
|
11
|
-
logImpact(phrenPath, pending.map((entry) => ({
|
|
12
|
-
findingId: entry.findingId,
|
|
13
|
-
project: entry.project,
|
|
14
|
-
sessionId: entry.sessionId,
|
|
15
|
-
})));
|
|
16
|
-
}
|
|
17
|
-
export function getHighImpactFindingKeys(phrenPath, minSuccessCount = 3) {
|
|
18
|
-
const findingIds = getHighImpactFindings(phrenPath, minSuccessCount);
|
|
19
|
-
// Legacy API encoded project+findingId; new API tracks finding ID globally.
|
|
20
|
-
// Return IDs as-is to preserve compatibility where only membership checks are used.
|
|
21
|
-
return findingIds;
|
|
22
|
-
}
|