@aabadin/project-memory-context 0.1.4 → 0.2.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/README.md +514 -69
- package/cli/context.mjs +291 -15
- package/cli/install-pmc.mjs +20 -0
- package/cli/query.mjs +136 -0
- package/cli/status.mjs +56 -2
- package/mcp/pmc-query-server.mjs +90 -0
- package/package.json +3 -2
- package/src/command-dispatch.mjs +1 -0
- package/src/plugin-config.mjs +8 -0
- package/src/query/load-artifacts.mjs +96 -0
- package/src/query/orchestrator.mjs +175 -0
- package/src/retrieval/context-renderer-v1.mjs +53 -0
- package/src/retrieval/target-resolver.mjs +57 -0
- package/src/setup-bootstrap.mjs +1 -0
- package/src/template-installer.mjs +60 -5
- package/templates/claude-code/CLAUDE.md.snippet +29 -3
- package/templates/cursor/.cursorrules.snippet +29 -3
- package/templates/opencode/commands/doctor.md +21 -0
- package/templates/opencode/commands/enrich-status.md +21 -0
- package/templates/opencode/commands/get-context.md +22 -5
- package/templates/opencode/commands/init-project.md +21 -0
- package/templates/opencode/commands/{new-project.md → map-project.md} +1 -1
- package/templates/pmc-skill/SKILL.md +34 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: enrich-status
|
|
3
|
+
description: Show enrichment progress — pending, enriched, stale, and failed symbols in the worklist.
|
|
4
|
+
argument-hint: ""
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Bash
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<objective>
|
|
10
|
+
Display the current enrichment queue status: how many symbols have been enriched, how many are pending, stale, or failed.
|
|
11
|
+
</objective>
|
|
12
|
+
|
|
13
|
+
<execution>
|
|
14
|
+
Run:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
{{PMC_BIN}} status .
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This shows the worklist summary with counts for pending, enriched, stale, and failed symbols.
|
|
21
|
+
</execution>
|
|
@@ -1,22 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: get-context
|
|
3
|
-
description: Retrieve structured project context
|
|
4
|
-
argument-hint: "<target>"
|
|
3
|
+
description: Retrieve structured project context for a target (symbol, file, or query).
|
|
4
|
+
argument-hint: "<target> [depth] [focus]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Bash
|
|
7
7
|
- Read
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
<objective>
|
|
11
|
-
Retrieve and display structured project context
|
|
11
|
+
Retrieve and display structured project context for the given target. Use before reading files to get a structural overview.
|
|
12
12
|
</objective>
|
|
13
13
|
|
|
14
14
|
<execution>
|
|
15
|
-
|
|
15
|
+
Auto mode (recommended):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
{{PMC_BIN}} context <target> [depth] [focus]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Explicit modes:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
{{PMC_BIN}} context symbol <target> [depth] [focus]
|
|
25
|
+
{{PMC_BIN}} context file <target> [depth] [focus]
|
|
26
|
+
{{PMC_BIN}} context query <target> [depth] [focus]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Depths: compact (default), extended, deep.
|
|
30
|
+
Focus modes: all (default), dependencies, callers, containment, impact.
|
|
31
|
+
|
|
32
|
+
Repository refresh (legacy):
|
|
16
33
|
|
|
17
34
|
```bash
|
|
18
35
|
{{PMC_BIN}} context . --refresh
|
|
19
36
|
```
|
|
20
37
|
|
|
21
|
-
This
|
|
38
|
+
This resets the 9 base project-context memories without a specific target.
|
|
22
39
|
</execution>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init-project
|
|
3
|
+
description: Initialize PMC project structure — creates .planning/project-memory-context/ directory tree.
|
|
4
|
+
argument-hint: ""
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Bash
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<objective>
|
|
10
|
+
Initialize the PMC directory structure in the current project. Creates the .planning/project-memory-context/ hierarchy and default configuration.
|
|
11
|
+
</objective>
|
|
12
|
+
|
|
13
|
+
<execution>
|
|
14
|
+
Run:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
{{PMC_BIN}} init .
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This creates the full directory tree under `.planning/project-memory-context/` with intake, graph, enrichment, project-context, and runs subdirectories.
|
|
21
|
+
</execution>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# PMC-Aware Workflow
|
|
2
|
+
|
|
3
|
+
PMC first, files second.
|
|
4
|
+
|
|
5
|
+
Before reading more than 3 files, query PMC for structural context first. Use PMC to understand symbols, dependencies, and callers before falling back to raw file reads.
|
|
6
|
+
|
|
7
|
+
## Rule of thumb
|
|
8
|
+
|
|
9
|
+
- Query PMC before reading more than 3 files.
|
|
10
|
+
- Prefer PMC summaries for architecture, dependencies, and symbol lookup.
|
|
11
|
+
- Read source files after PMC when you need exact implementation details.
|
|
12
|
+
|
|
13
|
+
## Available commands
|
|
14
|
+
|
|
15
|
+
- `/map-project`
|
|
16
|
+
- `/get-context`
|
|
17
|
+
- `/enrich-status`
|
|
18
|
+
- `/doctor`
|
|
19
|
+
- `/init-project`
|
|
20
|
+
- `/sync-context`
|
|
21
|
+
- `/sanitize`
|
|
22
|
+
|
|
23
|
+
- `/get-context <target> [depth] [focus]`—resolve a symbol, file, or query and return structural context
|
|
24
|
+
|
|
25
|
+
## Available MCP tools
|
|
26
|
+
|
|
27
|
+
- `pmc_query_project`
|
|
28
|
+
- `pmc_search_symbols`
|
|
29
|
+
- `pmc_get_dependents`
|
|
30
|
+
- `pmc_get_dependencies`
|
|
31
|
+
|
|
32
|
+
## Why this saves tokens
|
|
33
|
+
|
|
34
|
+
PMC returns focused structural context, so the agent can avoid loading many full files into context. Querying graph-backed summaries first usually costs fewer tokens than broad file reads and helps reserve file inspection for the exact places that matter.
|