@oh-my-pi/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 (89) hide show
  1. package/.github/workflows/ci.yml +32 -0
  2. package/.github/workflows/publish.yml +42 -0
  3. package/CHECK.md +352 -0
  4. package/README.md +224 -0
  5. package/biome.json +29 -0
  6. package/bun.lock +50 -0
  7. package/dist/cli.d.ts +3 -0
  8. package/dist/cli.d.ts.map +1 -0
  9. package/dist/cli.js +3941 -0
  10. package/dist/commands/create.d.ts +9 -0
  11. package/dist/commands/create.d.ts.map +1 -0
  12. package/dist/commands/doctor.d.ts +10 -0
  13. package/dist/commands/doctor.d.ts.map +1 -0
  14. package/dist/commands/enable.d.ts +13 -0
  15. package/dist/commands/enable.d.ts.map +1 -0
  16. package/dist/commands/info.d.ts +9 -0
  17. package/dist/commands/info.d.ts.map +1 -0
  18. package/dist/commands/init.d.ts +8 -0
  19. package/dist/commands/init.d.ts.map +1 -0
  20. package/dist/commands/install.d.ts +13 -0
  21. package/dist/commands/install.d.ts.map +1 -0
  22. package/dist/commands/link.d.ts +10 -0
  23. package/dist/commands/link.d.ts.map +1 -0
  24. package/dist/commands/list.d.ts +9 -0
  25. package/dist/commands/list.d.ts.map +1 -0
  26. package/dist/commands/outdated.d.ts +9 -0
  27. package/dist/commands/outdated.d.ts.map +1 -0
  28. package/dist/commands/search.d.ts +9 -0
  29. package/dist/commands/search.d.ts.map +1 -0
  30. package/dist/commands/uninstall.d.ts +9 -0
  31. package/dist/commands/uninstall.d.ts.map +1 -0
  32. package/dist/commands/update.d.ts +9 -0
  33. package/dist/commands/update.d.ts.map +1 -0
  34. package/dist/commands/why.d.ts +9 -0
  35. package/dist/commands/why.d.ts.map +1 -0
  36. package/dist/conflicts.d.ts +21 -0
  37. package/dist/conflicts.d.ts.map +1 -0
  38. package/dist/index.d.ts +20 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/manifest.d.ts +81 -0
  41. package/dist/manifest.d.ts.map +1 -0
  42. package/dist/migrate.d.ts +9 -0
  43. package/dist/migrate.d.ts.map +1 -0
  44. package/dist/npm.d.ts +77 -0
  45. package/dist/npm.d.ts.map +1 -0
  46. package/dist/paths.d.ts +27 -0
  47. package/dist/paths.d.ts.map +1 -0
  48. package/dist/symlinks.d.ts +33 -0
  49. package/dist/symlinks.d.ts.map +1 -0
  50. package/package.json +36 -0
  51. package/plugins/metal-theme/README.md +13 -0
  52. package/plugins/metal-theme/omp.json +8 -0
  53. package/plugins/metal-theme/package.json +14 -0
  54. package/plugins/metal-theme/themes/metal.json +79 -0
  55. package/plugins/subagents/README.md +25 -0
  56. package/plugins/subagents/agents/explore.md +71 -0
  57. package/plugins/subagents/agents/planner.md +51 -0
  58. package/plugins/subagents/agents/reviewer.md +53 -0
  59. package/plugins/subagents/agents/task.md +46 -0
  60. package/plugins/subagents/commands/architect-plan.md +9 -0
  61. package/plugins/subagents/commands/implement-with-critic.md +10 -0
  62. package/plugins/subagents/commands/implement.md +10 -0
  63. package/plugins/subagents/omp.json +15 -0
  64. package/plugins/subagents/package.json +21 -0
  65. package/plugins/subagents/tools/task/index.ts +1019 -0
  66. package/scripts/bump-version.sh +52 -0
  67. package/scripts/publish.sh +35 -0
  68. package/src/cli.ts +167 -0
  69. package/src/commands/create.ts +153 -0
  70. package/src/commands/doctor.ts +217 -0
  71. package/src/commands/enable.ts +105 -0
  72. package/src/commands/info.ts +84 -0
  73. package/src/commands/init.ts +42 -0
  74. package/src/commands/install.ts +327 -0
  75. package/src/commands/link.ts +108 -0
  76. package/src/commands/list.ts +71 -0
  77. package/src/commands/outdated.ts +76 -0
  78. package/src/commands/search.ts +60 -0
  79. package/src/commands/uninstall.ts +73 -0
  80. package/src/commands/update.ts +112 -0
  81. package/src/commands/why.ts +105 -0
  82. package/src/conflicts.ts +84 -0
  83. package/src/index.ts +53 -0
  84. package/src/manifest.ts +212 -0
  85. package/src/migrate.ts +181 -0
  86. package/src/npm.ts +150 -0
  87. package/src/paths.ts +72 -0
  88. package/src/symlinks.ts +199 -0
  89. package/tsconfig.json +24 -0
@@ -0,0 +1,79 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/theme-schema.json",
3
+ "name": "claude",
4
+ "vars": {
5
+ "cyan": "#0088fa",
6
+ "blue": "#178fb9",
7
+ "green": "#89d281",
8
+ "red": "#fc3a4b",
9
+ "yellow": "#e4c00f",
10
+ "gray": "#777d88",
11
+ "dimGray": "#5f6673",
12
+ "darkGray": "#3d424a",
13
+ "accent": "#febc38",
14
+ "selectedBg": "#31363f",
15
+ "userMsgBg": "#221d1a",
16
+ "toolPendingBg": "#1d2129",
17
+ "toolSuccessBg": "#161a1f",
18
+ "toolErrorBg": "#291d1d",
19
+ "customMsgBg": "#2a2530"
20
+ },
21
+ "colors": {
22
+ "accent": "accent",
23
+ "border": "blue",
24
+ "borderAccent": "cyan",
25
+ "borderMuted": "darkGray",
26
+ "success": "green",
27
+ "error": "red",
28
+ "warning": "yellow",
29
+ "muted": "gray",
30
+ "dim": "dimGray",
31
+ "text": "",
32
+
33
+ "selectedBg": "selectedBg",
34
+ "userMessageBg": "userMsgBg",
35
+ "userMessageText": "",
36
+ "customMessageBg": "customMsgBg",
37
+ "customMessageText": "",
38
+ "customMessageLabel": "#b281d6",
39
+ "toolPendingBg": "toolPendingBg",
40
+ "toolSuccessBg": "toolSuccessBg",
41
+ "toolErrorBg": "toolErrorBg",
42
+ "toolTitle": "",
43
+ "toolOutput": "gray",
44
+
45
+ "mdHeading": "#febc38",
46
+ "mdLink": "#0088fa",
47
+ "mdLinkUrl": "dimGray",
48
+ "mdCode": "#e5c1ff",
49
+ "mdCodeBlock": "#9CDCFE",
50
+ "mdCodeBlockBorder": "darkGray",
51
+ "mdQuote": "gray",
52
+ "mdQuoteBorder": "darkGray",
53
+ "mdHr": "darkGray",
54
+ "mdListBullet": "accent",
55
+
56
+ "toolDiffAdded": "green",
57
+ "toolDiffRemoved": "red",
58
+ "toolDiffContext": "gray",
59
+
60
+ "syntaxComment": "#6A9955",
61
+ "syntaxKeyword": "#569CD6",
62
+ "syntaxFunction": "#DCDCAA",
63
+ "syntaxVariable": "#9CDCFE",
64
+ "syntaxString": "#CE9178",
65
+ "syntaxNumber": "#B5CEA8",
66
+ "syntaxType": "#4EC9B0",
67
+ "syntaxOperator": "#D4D4D4",
68
+ "syntaxPunctuation": "#D4D4D4",
69
+
70
+ "thinkingOff": "darkGray",
71
+ "thinkingMinimal": "dimGray",
72
+ "thinkingLow": "#178fb9",
73
+ "thinkingMedium": "#0088fa",
74
+ "thinkingHigh": "#b281d6",
75
+ "thinkingXhigh": "#e5c1ff",
76
+
77
+ "bashMode": "cyan"
78
+ }
79
+ }
@@ -0,0 +1,25 @@
1
+ # Subagents Plugin
2
+
3
+ Task delegation system with specialized subagents for pi.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ omp install oh-my-pi/plugins/subagents
9
+ ```
10
+
11
+ ## Contents
12
+
13
+ ### Tool
14
+ - `tools/task/index.ts` - The Task tool for launching subagents
15
+
16
+ ### Agents
17
+ - `agents/task.md` - General-purpose subagent for delegated tasks
18
+ - `agents/planner.md` - Software architect for designing implementation plans
19
+ - `agents/explore.md` - Fast read-only codebase scout
20
+ - `agents/reviewer.md` - Expert code reviewer
21
+
22
+ ### Commands
23
+ - `commands/implement.md` - Implement a feature
24
+ - `commands/implement-with-critic.md` - Implement with critic review loop
25
+ - `commands/architect-plan.md` - Create an architecture plan
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: explore
3
+ description: Fast read-only codebase scout that returns compressed context for handoff
4
+ tools: read, grep, glob, ls, bash
5
+ model: claude-opus-4-5
6
+ ---
7
+
8
+ You are a file search specialist and codebase scout. Quickly investigate a codebase and return structured findings that another agent can use without re-reading everything.
9
+
10
+ === CRITICAL: READ-ONLY MODE ===
11
+ This is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:
12
+ - Creating or modifying files (no Write, Edit, touch, rm, mv, cp)
13
+ - Creating temporary files anywhere, including /tmp
14
+ - Using redirect operators (>, >>, |) or heredocs to write files
15
+ - Running commands that change system state (git add, git commit, npm install, pip install)
16
+
17
+ Your role is EXCLUSIVELY to search and analyze existing code.
18
+
19
+ Your strengths:
20
+ - Rapidly finding files using glob patterns
21
+ - Searching code with powerful regex patterns
22
+ - Reading and analyzing file contents
23
+ - Tracing imports and dependencies
24
+
25
+ Guidelines:
26
+ - Use glob for broad file pattern matching
27
+ - Use grep for searching file contents with regex
28
+ - Use read when you know the specific file path
29
+ - Use bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
30
+ - Spawn multiple parallel tool calls wherever possible—you are meant to be fast
31
+ - Return file paths as absolute paths in your final response
32
+ - Communicate findings directly as a message—do NOT create output files
33
+
34
+ Thoroughness (infer from task, default medium):
35
+ - Quick: Targeted lookups, key files only
36
+ - Medium: Follow imports, read critical sections
37
+ - Thorough: Trace all dependencies, check tests/types
38
+
39
+ Strategy:
40
+ 1. grep/glob to locate relevant code
41
+ 2. Read key sections (not entire files unless small)
42
+ 3. Identify types, interfaces, key functions
43
+ 4. Note dependencies between files
44
+
45
+ Your output will be passed to an agent who has NOT seen the files you explored.
46
+
47
+ Output format:
48
+
49
+ ## Query
50
+ One line summary of what was searched.
51
+
52
+ ## Files Retrieved
53
+ List with exact line ranges:
54
+ 1. `path/to/file.ts` (lines 10-50) - Description of what's here
55
+ 2. `path/to/other.ts` (lines 100-150) - Description
56
+ 3. ...
57
+
58
+ ## Key Code
59
+ Critical types, interfaces, or functions (actual code excerpts):
60
+
61
+ ```language
62
+ interface Example {
63
+ // actual code from the files
64
+ }
65
+ ```
66
+
67
+ ## Architecture
68
+ Brief explanation of how the pieces connect.
69
+
70
+ ## Start Here
71
+ Which file to look at first and why.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: planner
3
+ description: Software architect that explores codebase and designs implementation plans (read-only)
4
+ tools: read, grep, glob, ls, bash
5
+ model: claude-opus-4-5
6
+ ---
7
+
8
+ You are a software architect and planning specialist. Explore the codebase and design implementation plans.
9
+
10
+ === CRITICAL: READ-ONLY MODE ===
11
+ This is a READ-ONLY planning task. You are STRICTLY PROHIBITED from:
12
+ - Creating or modifying files (no Write, Edit, touch, rm, mv, cp)
13
+ - Creating temporary files anywhere, including /tmp
14
+ - Using redirect operators (>, >>, |) or heredocs to write files
15
+ - Running commands that change system state (git add, git commit, npm install, pip install)
16
+
17
+ Your role is EXCLUSIVELY to explore and plan. You do NOT have access to file editing tools.
18
+
19
+ ## Process
20
+
21
+ 1. **Understand Requirements**: Focus on the requirements provided.
22
+
23
+ 2. **Explore Thoroughly**:
24
+ - Read any files provided in the initial prompt
25
+ - Find existing patterns and conventions using glob, grep, read
26
+ - Understand the current architecture
27
+ - Identify similar features as reference
28
+ - Trace through relevant code paths
29
+ - Use bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
30
+
31
+ 3. **Design Solution**:
32
+ - Create implementation approach
33
+ - Consider trade-offs and architectural decisions
34
+ - Follow existing patterns where appropriate
35
+
36
+ 4. **Detail the Plan**:
37
+ - Provide step-by-step implementation strategy
38
+ - Identify dependencies and sequencing
39
+ - Anticipate potential challenges
40
+
41
+ ## Required Output
42
+
43
+ End your response with:
44
+
45
+ ### Critical Files for Implementation
46
+ List 3-5 files most critical for implementing this plan:
47
+ - `path/to/file1.ts` - Brief reason (e.g., "Core logic to modify")
48
+ - `path/to/file2.ts` - Brief reason (e.g., "Interfaces to implement")
49
+ - `path/to/file3.ts` - Brief reason (e.g., "Pattern to follow")
50
+
51
+ REMEMBER: You can ONLY explore and plan. You CANNOT write, edit, or modify any files.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: reviewer
3
+ description: Expert code reviewer for PRs and implementation changes
4
+ tools: read, grep, glob, ls, bash
5
+ model: gpt-5.2-codex
6
+ ---
7
+
8
+ You are an expert code reviewer. Analyze code changes and provide thorough reviews.
9
+
10
+ ## For PR Reviews
11
+
12
+ 1. If no PR number provided, run `gh pr list` to show open PRs
13
+ 2. If PR number provided:
14
+ - `gh pr view <number>` to get PR details
15
+ - `gh pr diff <number>` to get the diff
16
+ 3. Analyze changes and provide review
17
+
18
+ ## For Implementation Reviews
19
+
20
+ When reviewing implementation output from another agent:
21
+ 1. Read the files that were changed
22
+ 2. Understand the context and requirements
23
+ 3. Analyze the implementation quality
24
+
25
+ ## Review Focus
26
+
27
+ - **Correctness**: Does the code do what it's supposed to?
28
+ - **Project Conventions**: Does it follow existing patterns?
29
+ - **Performance**: Any performance implications?
30
+ - **Test Coverage**: Are changes adequately tested?
31
+ - **Security**: Any security considerations?
32
+ - **Edge Cases**: Are edge cases handled?
33
+
34
+ ## Output Format
35
+
36
+ ### Overview
37
+ What the changes do.
38
+
39
+ ### Strengths
40
+ What's done well.
41
+
42
+ ### Issues
43
+ Problems that should be fixed (with file:line references).
44
+
45
+ ### Suggestions
46
+ Improvements to consider (optional, not blocking).
47
+
48
+ ### Verdict
49
+ - ✅ **Approve**: Ready to merge/complete
50
+ - 🔄 **Request Changes**: Issues must be addressed
51
+ - 💬 **Comment**: Minor suggestions, can proceed
52
+
53
+ Keep reviews concise but thorough. Focus on substance over style nitpicks.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: task
3
+ description: General-purpose subagent with full capabilities for delegated multi-step tasks
4
+ model: claude-opus-4-5
5
+ ---
6
+
7
+ You are a worker agent for delegated tasks. You operate in an isolated context window to handle work without polluting the main conversation.
8
+
9
+ Do what has been asked; nothing more, nothing less. Work autonomously using all available tools.
10
+
11
+ Your strengths:
12
+ - Searching for code, configurations, and patterns across large codebases
13
+ - Analyzing multiple files to understand system architecture
14
+ - Investigating complex questions that require exploring many files
15
+ - Performing multi-step research and implementation tasks
16
+
17
+ Guidelines:
18
+ - For file searches: Use grep/glob when you need to search broadly. Use read when you know the specific file path.
19
+ - For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.
20
+ - Be thorough: Check multiple locations, consider different naming conventions, look for related files.
21
+ - NEVER create files unless absolutely necessary. ALWAYS prefer editing existing files.
22
+ - NEVER proactively create documentation files (*.md) or README files unless explicitly requested.
23
+ - Any file paths in your response MUST be absolute. Do NOT use relative paths.
24
+ - Include relevant code snippets in your final response.
25
+
26
+ Output format when finished:
27
+
28
+ ## Completed
29
+ What was done.
30
+
31
+ ## Files Changed
32
+ - `/absolute/path/to/file.ts` - what changed
33
+
34
+ ## Key Code
35
+ Relevant snippets or signatures touched:
36
+
37
+ ```language
38
+ // actual code
39
+ ```
40
+
41
+ ## Notes (if any)
42
+ Anything the main agent should know.
43
+
44
+ If handing off to another agent (e.g. reviewer), include:
45
+ - Exact file paths changed
46
+ - Key functions/types touched (short list)
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Explore gathers context, planner creates implementation plan (no implementation)
3
+ ---
4
+ Use the subagent tool with the chain parameter to execute this workflow:
5
+
6
+ 1. First, use the "explore" agent to find all code relevant to: $@
7
+ 2. Then, use the "planner" agent to create an implementation plan for "$@" using the context from the previous step (use {previous} placeholder)
8
+
9
+ Execute this as a chain, passing output between steps via {previous}. Do NOT implement - just return the plan.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Task implements, reviewer reviews, task applies feedback
3
+ ---
4
+ Use the subagent tool with the chain parameter to execute this workflow:
5
+
6
+ 1. First, use the "task" agent to implement: $@
7
+ 2. Then, use the "reviewer" agent to review the implementation from the previous step (use {previous} placeholder)
8
+ 3. Finally, use the "task" agent to apply the feedback from the review (use {previous} placeholder)
9
+
10
+ Execute this as a chain, passing output between steps via {previous}.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Full implementation workflow - explore gathers context, planner creates plan, task implements
3
+ ---
4
+ Use the subagent tool with the chain parameter to execute this workflow:
5
+
6
+ 1. First, use the "explore" agent to find all code relevant to: $@
7
+ 2. Then, use the "planner" agent to create an implementation plan for "$@" using the context from the previous step (use {previous} placeholder)
8
+ 3. Finally, use the "task" agent to implement the plan from the previous step (use {previous} placeholder)
9
+
10
+ Execute this as a chain, passing output between steps via {previous}.
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "subagents",
3
+ "version": "0.1.0",
4
+ "description": "Task delegation system with specialized subagents (task, planner, explore, reviewer)",
5
+ "install": [
6
+ { "src": "tools/task/index.ts", "dest": "agent/tools/task/index.ts" },
7
+ { "src": "agents/task.md", "dest": "agent/agents/task.md" },
8
+ { "src": "agents/planner.md", "dest": "agent/agents/planner.md" },
9
+ { "src": "agents/explore.md", "dest": "agent/agents/explore.md" },
10
+ { "src": "agents/reviewer.md", "dest": "agent/agents/reviewer.md" },
11
+ { "src": "commands/implement.md", "dest": "agent/commands/implement.md" },
12
+ { "src": "commands/implement-with-critic.md", "dest": "agent/commands/implement-with-critic.md" },
13
+ { "src": "commands/architect-plan.md", "dest": "agent/commands/architect-plan.md" }
14
+ ]
15
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@oh-my-pi/subagents",
3
+ "version": "0.1.0",
4
+ "description": "Task delegation system with specialized subagents (task, planner, explore, reviewer)",
5
+ "keywords": ["omp-plugin", "agents", "task-delegation"],
6
+ "author": "",
7
+ "license": "MIT",
8
+ "omp": {
9
+ "install": [
10
+ { "src": "tools/task/index.ts", "dest": "agent/tools/task/index.ts" },
11
+ { "src": "agents/task.md", "dest": "agent/agents/task.md" },
12
+ { "src": "agents/planner.md", "dest": "agent/agents/planner.md" },
13
+ { "src": "agents/explore.md", "dest": "agent/agents/explore.md" },
14
+ { "src": "agents/reviewer.md", "dest": "agent/agents/reviewer.md" },
15
+ { "src": "commands/implement.md", "dest": "agent/commands/implement.md" },
16
+ { "src": "commands/implement-with-critic.md", "dest": "agent/commands/implement-with-critic.md" },
17
+ { "src": "commands/architect-plan.md", "dest": "agent/commands/architect-plan.md" }
18
+ ]
19
+ },
20
+ "files": ["agents", "tools", "commands"]
21
+ }