@codemap-ai/cli 0.1.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.
Files changed (41) hide show
  1. package/.claude-plugin/plugin.json +12 -0
  2. package/.codex-plugin/plugin.json +35 -0
  3. package/.cursor-plugin/plugin.json +16 -0
  4. package/agent-pack/README.md +44 -0
  5. package/agent-pack/agents/codemap-explorer.md +12 -0
  6. package/agent-pack/commands/feature-area.md +8 -0
  7. package/agent-pack/rules/install.md +35 -0
  8. package/agent-pack/rules/mcp-first.md +18 -0
  9. package/agent-pack/rules/task-lifecycle.md +11 -0
  10. package/agent-pack/rules/workflow-skills.md +97 -0
  11. package/agent-pack/skills/brainstorming/SKILL.md +41 -0
  12. package/agent-pack/skills/executing-plans/SKILL.md +26 -0
  13. package/agent-pack/skills/feature-area-investigation/SKILL.md +15 -0
  14. package/agent-pack/skills/interpreting-codemap-output/SKILL.md +29 -0
  15. package/agent-pack/skills/mcp-first-exploration/SKILL.md +10 -0
  16. package/agent-pack/skills/safe-edit-and-reimport/SKILL.md +18 -0
  17. package/agent-pack/skills/symbol-level-debugging/SKILL.md +15 -0
  18. package/agent-pack/skills/test-driven-development/SKILL.md +36 -0
  19. package/agent-pack/skills/token-efficient-code-review/SKILL.md +15 -0
  20. package/agent-pack/skills/verification-before-completion/SKILL.md +25 -0
  21. package/agent-pack/skills/writing-plans/SKILL.md +32 -0
  22. package/agent-pack/templates/AGENTS.md +21 -0
  23. package/agent-pack/templates/CLAUDE.md +19 -0
  24. package/agent-pack/templates/COPILOT.md +75 -0
  25. package/agent-pack/templates/GEMINI.md +77 -0
  26. package/agent-pack/templates/design-spec.md +34 -0
  27. package/agent-pack/templates/implementation-plan.md +26 -0
  28. package/agent-pack/templates/opencode-AGENTS.md +76 -0
  29. package/agent-pack/templates/opencode-INSTALL.md +5 -0
  30. package/agent-pack/templates/verification-report.md +18 -0
  31. package/dist/chat-terminal-DFFYQ6AF.js +1743 -0
  32. package/dist/chunk-A2QHID6K.js +34 -0
  33. package/dist/chunk-AXGGL47C.js +457 -0
  34. package/dist/chunk-FFFJKKKM.js +218262 -0
  35. package/dist/chunk-KWYP3ADN.js +1742 -0
  36. package/dist/chunk-WNJNT3FC.js +216 -0
  37. package/dist/chunk-YRXVMFXS.js +99 -0
  38. package/dist/index.js +9225 -0
  39. package/dist/login-screen-2DJBDM47.js +143 -0
  40. package/dist/pi-tui-app-GVZ3AN42.js +2073 -0
  41. package/package.json +59 -0
@@ -0,0 +1,75 @@
1
+ # COPILOT.md
2
+
3
+ Use CodeMap MCP as the first context source for codebase work.
4
+
5
+ - Prefer CodeMap tools before raw file reads.
6
+ - Start with `get_project`.
7
+ - For broad implementation/debug/review/refactor/test/research work with unclear files, call `explore_task`.
8
+ - Use `find_related_files` or `search_codebase` to locate files.
9
+ - Use `get_file` and `symbol` to keep context small.
10
+ - Use `symbol` for impact analysis.
11
+ - Read MCP summaries, ranking reasons, next steps, and resource URIs before expanding context.
12
+ - Verify with focused build/test commands and reimport after meaningful changes.
13
+
14
+ ## Brainstorming (design before code)
15
+
16
+ For new features or vague requirements, design first — never write production code before the design is approved.
17
+
18
+ 1. Call `explore_task` to gather real codebase context.
19
+ 2. Ask clarifying questions one at a time until scope is clear.
20
+ 3. Propose 2–3 approaches with trade-offs, referencing real files from CodeMap.
21
+ 4. Write a design doc (`docs/specs/YYYY-MM-DD-<topic>.md`) covering goal, approach, affected files, and open questions.
22
+ 5. Self-review the spec, then wait for user approval before touching any file.
23
+
24
+ ## Test-Driven Development
25
+
26
+ For new functionality or bug fixes, follow RED → GREEN → REFACTOR strictly.
27
+
28
+ - **RED**: `search_codebase("test <feature>")` to find patterns, write a minimal failing test, run with the host agent test runner and confirm it **fails**.
29
+ - **GREEN**: Use `symbol` to read the target, implement only the minimum to pass, run the host agent test runner and confirm it **passes**.
30
+ - **REFACTOR**: Clean up, run the host agent test runner again, then call `diff(mode="working")` before declaring done.
31
+
32
+ No production code before a failing test exists.
33
+
34
+ ## Feature Area Investigation
35
+
36
+ Use when the task involves a named feature (billing, auth, admin, graph, etc.).
37
+
38
+ 1. Call `explore_task(query)` — review likely files, entrypoints, and recommended reads.
39
+ 2. Call `get_file(path=[...])` on the top results to survey outlines without loading full files.
40
+ 3. Use `symbol` for the most relevant component, service, or controller.
41
+ 4. If still unclear, call `find_related_files` anchored to the best file found.
42
+
43
+ ## Symbol-Level Debugging
44
+
45
+ Use when a bug or behavior centers on a specific function, class, component, or method.
46
+
47
+ 1. `search_codebase(symbol_name)` if the file is unknown.
48
+ 2. `symbol(action="context", symbol_name, file_path)` for the exact body.
49
+ 3. `symbol` when call flow or impact matters.
50
+ 4. Read only adjacent files needed to explain or change the behavior.
51
+
52
+ Do not read an entire large file to inspect one symbol when CodeMap can return symbol context.
53
+
54
+ ## Interpreting CodeMap Output
55
+
56
+ After any CodeMap tool returns ranked files, symbols, or related files:
57
+
58
+ 1. Read the summary first — decide if it is enough to act before expanding.
59
+ 2. Prefer high-ranked results before low-ranked ones.
60
+ 3. Follow `nextSteps`, `resourceUris`, and suggested tool calls before opening raw files.
61
+ 4. Use ranking signals to filter: exact path/symbol match = strong; fuzzy keyword = weak.
62
+ 5. Stop expanding context once the edit or answer is grounded enough.
63
+
64
+ When results look weak or noisy, refine the query, anchor to a known file or symbol, or switch tool.
65
+
66
+ ## Token-Efficient Code Review
67
+
68
+ Use when reviewing changes in a CodeMap-indexed repository.
69
+
70
+ 1. Start with `diff(mode="working")` or `diff(mode="refs")`.
71
+ 2. For changed symbols, use `symbol` instead of full-file reads.
72
+ 3. Use `symbol` for risky public API or shared behavior changes.
73
+ 4. Lead findings by severity. Mention test gaps and residual risk.
74
+
75
+ Review behavior and integration risks — avoid summarizing broad context unless it supports a finding.
@@ -0,0 +1,77 @@
1
+ # GEMINI.md
2
+
3
+ Use CodeMap MCP before raw file reads or grep.
4
+
5
+ Default workflow:
6
+
7
+ 1. Call `get_project`.
8
+ 2. For broad implementation/debug/review/refactor/test/research work with unclear files, call `explore_task`.
9
+ 3. Use `explore_task` for broad implementation/debugging.
10
+ 4. Use `find_related_files` for anchor file/symbol questions.
11
+ 6. Use `search_codebase` for known symbols, exports, filenames, or keywords.
12
+ 7. Use `get_file` for outlines and `symbol` for exact bodies.
13
+ 8. Read MCP summaries, rankings, score reasons, next steps, and resource URIs before opening raw files.
14
+ 9. After edits, build/test, inspect diff, and reimport when needed.
15
+
16
+ ## Brainstorming (design before code)
17
+
18
+ For new features or vague requirements, design first — never write production code before the design is approved.
19
+
20
+ 1. Call `explore_task` to gather real codebase context.
21
+ 2. Ask clarifying questions one at a time until scope is clear.
22
+ 3. Propose 2–3 approaches with trade-offs, referencing real files from CodeMap.
23
+ 4. Write a design doc (`docs/specs/YYYY-MM-DD-<topic>.md`) covering goal, approach, affected files, and open questions.
24
+ 5. Self-review the spec, then wait for user approval before touching any file.
25
+
26
+ ## Test-Driven Development
27
+
28
+ For new functionality or bug fixes, follow RED → GREEN → REFACTOR strictly.
29
+
30
+ - **RED**: `search_codebase("test <feature>")` to find patterns, write a minimal failing test, run with the host agent test runner and confirm it **fails**.
31
+ - **GREEN**: Use `symbol` to read the target, implement only the minimum to pass, run the host agent test runner and confirm it **passes**.
32
+ - **REFACTOR**: Clean up, run the host agent test runner again, then call `diff(mode="working")` before declaring done.
33
+
34
+ No production code before a failing test exists.
35
+
36
+ ## Feature Area Investigation
37
+
38
+ Use when the task involves a named feature (billing, auth, admin, graph, etc.).
39
+
40
+ 1. Call `explore_task(query)` — review likely files, entrypoints, and recommended reads.
41
+ 2. Call `get_file(path=[...])` on the top results to survey outlines without loading full files.
42
+ 3. Use `symbol` for the most relevant component, service, or controller.
43
+ 4. If still unclear, call `find_related_files` anchored to the best file found.
44
+
45
+ ## Symbol-Level Debugging
46
+
47
+ Use when a bug or behavior centers on a specific function, class, component, or method.
48
+
49
+ 1. `search_codebase(symbol_name)` if the file is unknown.
50
+ 2. `symbol(action="context", symbol_name, file_path)` for the exact body.
51
+ 3. `symbol` when call flow or impact matters.
52
+ 4. Read only adjacent files needed to explain or change the behavior.
53
+
54
+ Do not read an entire large file to inspect one symbol when CodeMap can return symbol context.
55
+
56
+ ## Interpreting CodeMap Output
57
+
58
+ After any CodeMap tool returns ranked files, symbols, or related files:
59
+
60
+ 1. Read the summary first — decide if it is enough to act before expanding.
61
+ 2. Prefer high-ranked results before low-ranked ones.
62
+ 3. Follow `nextSteps`, `resourceUris`, and suggested tool calls before opening raw files.
63
+ 4. Use ranking signals to filter: exact path/symbol match = strong; fuzzy keyword = weak.
64
+ 5. Stop expanding context once the edit or answer is grounded enough.
65
+
66
+ When results look weak or noisy, refine the query, anchor to a known file or symbol, or switch tool.
67
+
68
+ ## Token-Efficient Code Review
69
+
70
+ Use when reviewing changes in a CodeMap-indexed repository.
71
+
72
+ 1. Start with `diff(mode="working")` or `diff(mode="refs")`.
73
+ 2. For changed symbols, use `symbol` instead of full-file reads.
74
+ 3. Use `symbol` for risky public API or shared behavior changes.
75
+ 4. Lead findings by severity. Mention test gaps and residual risk.
76
+
77
+ Review behavior and integration risks — avoid summarizing broad context unless it supports a finding.
@@ -0,0 +1,34 @@
1
+ # Design Spec: <topic>
2
+
3
+ ## Goal
4
+
5
+ Describe the user-visible goal and why it matters.
6
+
7
+ ## Non-Goals
8
+
9
+ List what this change intentionally will not do.
10
+
11
+ ## Context
12
+
13
+ Summarize the CodeMap tools used and the relevant files, symbols, or feature areas found.
14
+
15
+ ## Chosen Approach
16
+
17
+ Describe the selected design and why it fits the existing codebase.
18
+
19
+ ## Affected Interfaces
20
+
21
+ List public APIs, schemas, commands, resources, routes, or user-visible behavior that changes.
22
+
23
+ ## Risks and Edge Cases
24
+
25
+ Describe failure modes, compatibility concerns, and high-risk areas.
26
+
27
+ ## Verification
28
+
29
+ List the build/test/manual checks that must pass.
30
+
31
+ ## Open Questions
32
+
33
+ List questions that must be answered before implementation.
34
+
@@ -0,0 +1,26 @@
1
+ # Implementation Plan: <topic>
2
+
3
+ ## Summary
4
+
5
+ Briefly state the intended change and success criteria.
6
+
7
+ ## Key Edits
8
+
9
+ List the exact files, modules, or feature areas to change.
10
+
11
+ ## Steps
12
+
13
+ 1. Orient with CodeMap and confirm current state.
14
+ 2. Make the smallest scoped code or docs changes.
15
+ 3. Update related resources, exports, or registrations.
16
+ 4. Run verification.
17
+ 5. Refresh local index and decide whether cloud reimport is needed.
18
+
19
+ ## Verification
20
+
21
+ List exact commands and expected outcomes.
22
+
23
+ ## Assumptions
24
+
25
+ Record any decisions the implementer must preserve.
26
+
@@ -0,0 +1,76 @@
1
+ # OpenCode CodeMap Agent Pack
2
+
3
+ Use CodeMap MCP-first workflow in this repository.
4
+
5
+ - New session: `get_project`.
6
+ - Broad implementation/debug/review/refactor/test/research task with unclear files: `explore_task`.
7
+ - Broad codebase exploration: `explore_task`.
8
+ - Related files: `find_related_files`.
9
+ - Known lookup: `search_codebase`.
10
+ - Read many outlines: `get_file`.
11
+ - Read exact symbol body: `symbol`.
12
+ - Read MCP summaries, ranking reasons, next steps, and resource URIs before expanding context.
13
+ - After edits: build/test, inspect diff, reimport when needed.
14
+
15
+ ## Brainstorming (design before code)
16
+
17
+ For new features or vague requirements, design first — never write production code before the design is approved.
18
+
19
+ 1. Call `explore_task` to gather real codebase context.
20
+ 2. Ask clarifying questions one at a time until scope is clear.
21
+ 3. Propose 2–3 approaches with trade-offs, referencing real files from CodeMap.
22
+ 4. Write a design doc (`docs/specs/YYYY-MM-DD-<topic>.md`) covering goal, approach, affected files, and open questions.
23
+ 5. Self-review the spec, then wait for user approval before touching any file.
24
+
25
+ ## Test-Driven Development
26
+
27
+ For new functionality or bug fixes, follow RED → GREEN → REFACTOR strictly.
28
+
29
+ - **RED**: `search_codebase("test <feature>")` to find patterns, write a minimal failing test, run with the host agent test runner and confirm it **fails**.
30
+ - **GREEN**: Use `symbol` to read the target, implement only the minimum to pass, run the host agent test runner and confirm it **passes**.
31
+ - **REFACTOR**: Clean up, run the host agent test runner again, then call `diff(mode="working")` before declaring done.
32
+
33
+ No production code before a failing test exists.
34
+
35
+ ## Feature Area Investigation
36
+
37
+ Use when the task involves a named feature (billing, auth, admin, graph, etc.).
38
+
39
+ 1. Call `explore_task(query)` — review likely files, entrypoints, and recommended reads.
40
+ 2. Call `get_file(path=[...])` on the top results to survey outlines without loading full files.
41
+ 3. Use `symbol` for the most relevant component, service, or controller.
42
+ 4. If still unclear, call `find_related_files` anchored to the best file found.
43
+
44
+ ## Symbol-Level Debugging
45
+
46
+ Use when a bug or behavior centers on a specific function, class, component, or method.
47
+
48
+ 1. `search_codebase(symbol_name)` if the file is unknown.
49
+ 2. `symbol(action="context", symbol_name, file_path)` for the exact body.
50
+ 3. `symbol` when call flow or impact matters.
51
+ 4. Read only adjacent files needed to explain or change the behavior.
52
+
53
+ Do not read an entire large file to inspect one symbol when CodeMap can return symbol context.
54
+
55
+ ## Interpreting CodeMap Output
56
+
57
+ After any CodeMap tool returns ranked files, symbols, or related files:
58
+
59
+ 1. Read the summary first — decide if it is enough to act before expanding.
60
+ 2. Prefer high-ranked results before low-ranked ones.
61
+ 3. Follow `nextSteps`, `resourceUris`, and suggested tool calls before opening raw files.
62
+ 4. Use ranking signals to filter: exact path/symbol match = strong; fuzzy keyword = weak.
63
+ 5. Stop expanding context once the edit or answer is grounded enough.
64
+
65
+ When results look weak or noisy, refine the query, anchor to a known file or symbol, or switch tool.
66
+
67
+ ## Token-Efficient Code Review
68
+
69
+ Use when reviewing changes in a CodeMap-indexed repository.
70
+
71
+ 1. Start with `diff(mode="working")` or `diff(mode="refs")`.
72
+ 2. For changed symbols, use `symbol` instead of full-file reads.
73
+ 3. Use `symbol` for risky public API or shared behavior changes.
74
+ 4. Lead findings by severity. Mention test gaps and residual risk.
75
+
76
+ Review behavior and integration risks — avoid summarizing broad context unless it supports a finding.
@@ -0,0 +1,5 @@
1
+ # Install CodeMap Agent Pack For OpenCode
2
+
3
+ This directory contains OpenCode-facing CodeMap guidance.
4
+
5
+ Use CodeMap MCP as the context engine before raw file reads or grep. Follow `.opencode/AGENTS.md` for the default workflow.
@@ -0,0 +1,18 @@
1
+ # Verification Report: <topic>
2
+
3
+ ## Diff Inspection
4
+
5
+ Summarize changed files and whether they match the plan.
6
+
7
+ ## Commands Run
8
+
9
+ List build, test, lint, or manual smoke checks and their results.
10
+
11
+ ## Indexing
12
+
13
+ State whether `refresh_local_index` ran and whether cloud `reimport` was needed.
14
+
15
+ ## Skipped Checks
16
+
17
+ List skipped checks with reasons and residual risk.
18
+