@frenchtoastman/oh-my-groundcontrol 0.0.16 → 0.0.17
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/dist/cli/index.js +11 -9
- package/dist/index.js +8 -2
- package/package.json +1 -1
- package/src/skills/analyze/SKILL.md +116 -0
package/dist/cli/index.js
CHANGED
|
@@ -13822,6 +13822,12 @@ var CUSTOM_SKILLS = [
|
|
|
13822
13822
|
description: "Repository understanding and hierarchical codemap generation",
|
|
13823
13823
|
allowedAgents: ["orchestrator", "explorer"],
|
|
13824
13824
|
sourcePath: "src/skills/cartography"
|
|
13825
|
+
},
|
|
13826
|
+
{
|
|
13827
|
+
name: "analyze",
|
|
13828
|
+
description: "Code review and analysis for uncommitted changes, commits, branches, PRs, or specific files.",
|
|
13829
|
+
allowedAgents: ["*"],
|
|
13830
|
+
sourcePath: "src/skills/analyze"
|
|
13825
13831
|
}
|
|
13826
13832
|
];
|
|
13827
13833
|
function getCustomSkillsDir() {
|
|
@@ -15689,10 +15695,6 @@ function buildDynamicModelPlan(catalog, config2, externalSignals, options) {
|
|
|
15689
15695
|
}
|
|
15690
15696
|
};
|
|
15691
15697
|
}
|
|
15692
|
-
// src/utils/logger.ts
|
|
15693
|
-
import * as os from "os";
|
|
15694
|
-
import * as path from "path";
|
|
15695
|
-
var logFile = path.join(os.tmpdir(), "oh-my-groundcontrol.log");
|
|
15696
15698
|
// src/utils/env.ts
|
|
15697
15699
|
function getEnv(name) {
|
|
15698
15700
|
const bunValue = globalThis.Bun?.env?.[name];
|
|
@@ -15945,8 +15947,8 @@ async function getOpenCodeVersion() {
|
|
|
15945
15947
|
return null;
|
|
15946
15948
|
}
|
|
15947
15949
|
function getOpenCodePath() {
|
|
15948
|
-
const
|
|
15949
|
-
return
|
|
15950
|
+
const path = resolveOpenCodePath();
|
|
15951
|
+
return path === "opencode" ? null : path;
|
|
15950
15952
|
}
|
|
15951
15953
|
|
|
15952
15954
|
// src/cli/opencode-models.ts
|
|
@@ -16184,9 +16186,9 @@ async function checkOpenCodeInstalled() {
|
|
|
16184
16186
|
return { ok: false };
|
|
16185
16187
|
}
|
|
16186
16188
|
const version2 = await getOpenCodeVersion();
|
|
16187
|
-
const
|
|
16188
|
-
printSuccess(`OpenCode ${version2 ?? ""} detected${
|
|
16189
|
-
return { ok: true, version: version2 ?? undefined, path:
|
|
16189
|
+
const path = getOpenCodePath();
|
|
16190
|
+
printSuccess(`OpenCode ${version2 ?? ""} detected${path ? ` (${DIM}${path}${RESET})` : ""}`);
|
|
16191
|
+
return { ok: true, version: version2 ?? undefined, path: path ?? undefined };
|
|
16190
16192
|
}
|
|
16191
16193
|
function handleStepResult(result, successMsg) {
|
|
16192
16194
|
if (!result.success) {
|
package/dist/index.js
CHANGED
|
@@ -3284,6 +3284,12 @@ var CUSTOM_SKILLS = [
|
|
|
3284
3284
|
description: "Repository understanding and hierarchical codemap generation",
|
|
3285
3285
|
allowedAgents: ["orchestrator", "explorer"],
|
|
3286
3286
|
sourcePath: "src/skills/cartography"
|
|
3287
|
+
},
|
|
3288
|
+
{
|
|
3289
|
+
name: "analyze",
|
|
3290
|
+
description: "Code review and analysis for uncommitted changes, commits, branches, PRs, or specific files.",
|
|
3291
|
+
allowedAgents: ["*"],
|
|
3292
|
+
sourcePath: "src/skills/analyze"
|
|
3287
3293
|
}
|
|
3288
3294
|
];
|
|
3289
3295
|
|
|
@@ -21294,13 +21300,13 @@ function getAgentConfigs(config2) {
|
|
|
21294
21300
|
import * as fs2 from "fs";
|
|
21295
21301
|
import * as os2 from "os";
|
|
21296
21302
|
import * as path2 from "path";
|
|
21297
|
-
var
|
|
21303
|
+
var getLogFile = () => process.env.GROUNDCONTROL_LOG_FILE || path2.join(os2.tmpdir(), "oh-my-groundcontrol.log");
|
|
21298
21304
|
function log(message, data) {
|
|
21299
21305
|
try {
|
|
21300
21306
|
const timestamp = new Date().toISOString();
|
|
21301
21307
|
const logEntry = `[${timestamp}] ${message} ${data ? JSON.stringify(data) : ""}
|
|
21302
21308
|
`;
|
|
21303
|
-
fs2.appendFileSync(
|
|
21309
|
+
fs2.appendFileSync(getLogFile(), logEntry);
|
|
21304
21310
|
} catch {}
|
|
21305
21311
|
}
|
|
21306
21312
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frenchtoastman/oh-my-groundcontrol",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "An OpenCode plugin for multi-agent orchestration for structured planning with NASA-style guardrails.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analyze
|
|
3
|
+
description: Code review and analysis for uncommitted changes, commits, branches, PRs, or specific files.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are a code reviewer. Your job is to review code changes and provide actionable feedback.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Input: $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Determining What to Review
|
|
15
|
+
|
|
16
|
+
Based on the input provided, determine which type of review to perform:
|
|
17
|
+
|
|
18
|
+
1. **No arguments (default)**: Review all uncommitted changes
|
|
19
|
+
- Run: `git diff` for unstaged changes
|
|
20
|
+
- Run: `git diff --cached` for staged changes
|
|
21
|
+
- Run: `git status --short` to identify untracked (net new) files
|
|
22
|
+
|
|
23
|
+
2. **Commit hash** (40-char SHA or short hash): Review that specific commit
|
|
24
|
+
- Run: `git show $ARGUMENTS`
|
|
25
|
+
|
|
26
|
+
3. **Branch name**: Compare current branch to the specified branch
|
|
27
|
+
- Run: `git diff $ARGUMENTS...HEAD`
|
|
28
|
+
|
|
29
|
+
4. **PR URL or number** (contains "github.com" or "pull" or looks like a PR number): Review the pull request
|
|
30
|
+
- Run: `gh pr view $ARGUMENTS` to get PR context
|
|
31
|
+
- Run: `gh pr diff $ARGUMENTS` to get the diff
|
|
32
|
+
|
|
33
|
+
5. **File path**: Review a specific file and its recent changes
|
|
34
|
+
- Verify the file exists and is a regular file (not a directory or binary)
|
|
35
|
+
- Read the full file contents
|
|
36
|
+
- Run: `git log --oneline -10 "$ARGUMENTS"` to see recent history
|
|
37
|
+
- Run: `git diff HEAD~5 -- "$ARGUMENTS"` to get recent changes (adjust range based on log output)
|
|
38
|
+
- Review the recent changes in context of the full file
|
|
39
|
+
|
|
40
|
+
If the file does not exist: "File not found: `<path>`. Please check the path and try again."
|
|
41
|
+
If the argument is a directory: "Cannot review a directory. Please provide a specific file path."
|
|
42
|
+
|
|
43
|
+
Use best judgement when processing input.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Gathering Context
|
|
48
|
+
|
|
49
|
+
**Diffs alone are not enough.** After getting the diff, read the entire file(s) being modified to understand the full context. Code that looks wrong in isolation may be correct given surrounding logic—and vice versa.
|
|
50
|
+
|
|
51
|
+
- Use the diff to identify which files changed
|
|
52
|
+
- Use `git status --short` to identify untracked files, then read their full contents
|
|
53
|
+
- Read the full file to understand existing patterns, control flow, and error handling
|
|
54
|
+
- Check for existing style guide or conventions files (CONVENTIONS.md, AGENTS.md, .editorconfig, etc.)
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## What to Look For
|
|
59
|
+
|
|
60
|
+
**Bugs** - Your primary focus.
|
|
61
|
+
- Logic errors, off-by-one mistakes, incorrect conditionals
|
|
62
|
+
- If-else guards: missing guards, incorrect branching, unreachable code paths
|
|
63
|
+
- Edge cases: null/empty/undefined inputs, error conditions, race conditions
|
|
64
|
+
- Security issues: injection, auth bypass, data exposure
|
|
65
|
+
- Broken error handling that swallows failures, throws unexpectedly or returns error types that are not caught.
|
|
66
|
+
|
|
67
|
+
**Structure** - Does the code fit the codebase?
|
|
68
|
+
- Does it follow existing patterns and conventions?
|
|
69
|
+
- Are there established abstractions it should use but doesn't?
|
|
70
|
+
- Excessive nesting that could be flattened with early returns or extraction
|
|
71
|
+
|
|
72
|
+
**Performance** - Only flag if obviously problematic.
|
|
73
|
+
- O(n^2) on unbounded data, N+1 queries, blocking I/O on hot paths
|
|
74
|
+
|
|
75
|
+
**Behavior Changes** - If a behavioral change is introduced, raise it (especially if it's possibly unintentional).
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Before You Flag Something
|
|
80
|
+
|
|
81
|
+
**Be certain.** If you're going to call something a bug, you need to be confident it actually is one.
|
|
82
|
+
|
|
83
|
+
- Only review the changes - do not review pre-existing code that wasn't modified
|
|
84
|
+
- Don't flag something as a bug if you're unsure - investigate first
|
|
85
|
+
- Don't invent hypothetical problems - if an edge case matters, explain the realistic scenario where it breaks
|
|
86
|
+
- If you need more context to be sure, use the tools below to get it
|
|
87
|
+
|
|
88
|
+
**Don't be a zealot about style.** When checking code against conventions:
|
|
89
|
+
|
|
90
|
+
- Verify the code is *actually* in violation. Don't complain about else statements if early returns are already being used correctly.
|
|
91
|
+
- Some "violations" are acceptable when they're the simplest option. A `let` statement is fine if the alternative is convoluted.
|
|
92
|
+
- Excessive nesting is a legitimate concern regardless of other style choices.
|
|
93
|
+
- Don't flag style preferences as issues unless they clearly violate established project conventions.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Tools
|
|
98
|
+
|
|
99
|
+
Use these to inform your review:
|
|
100
|
+
|
|
101
|
+
- **@explorer** - Find how existing code handles similar problems. Check patterns, conventions, and prior art before claiming something doesn't fit.
|
|
102
|
+
- **@librarian** - Verify correct usage of libraries/APIs before flagging something as wrong. Research best practices if you're unsure about a pattern.
|
|
103
|
+
- **@oracle** - Consult on complex architectural decisions, design pattern trade-offs, or systemic concerns that go beyond the immediate diff.
|
|
104
|
+
|
|
105
|
+
If you're uncertain about something and can't verify it with these tools, say "I'm not sure about X" rather than flagging it as a definite issue.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Output
|
|
110
|
+
|
|
111
|
+
1. If there is a bug, be direct and clear about why it is a bug.
|
|
112
|
+
2. Clearly communicate severity of issues. Do not overstate severity.
|
|
113
|
+
3. Critiques should clearly and explicitly communicate the scenarios, environments, or inputs that are necessary for the bug to arise. The comment should immediately indicate that the issue's severity depends on these factors.
|
|
114
|
+
4. Your tone should be matter-of-fact and not accusatory or overly positive. It should read as a helpful AI assistant suggestion without sounding too much like a human reviewer.
|
|
115
|
+
5. Write so the reader can quickly understand the issue without reading too closely.
|
|
116
|
+
6. AVOID flattery, do not give any comments that are not helpful to the reader. Avoid phrasing like "Great job ...", "Thanks for ...".
|