opencode-athena 0.3.0 → 0.4.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 CHANGED
@@ -290,6 +290,50 @@ Custom model fields:
290
290
  - `contextWindow`: Context window size in tokens
291
291
  - `supportsTemperature`: Whether temperature can be adjusted
292
292
 
293
+ ### Git Operations Policy
294
+
295
+ By default, Athena prevents agents from automatically performing git operations (commits, pushes, branch creation). This ensures developers maintain full control over version control.
296
+
297
+ **Default behavior** (`autoGitOperations: false`):
298
+ - ✅ Agents can read git state (`git status`, `git diff`, `git log`)
299
+ - ❌ Agents cannot automatically commit, push, or create branches
300
+ - ⚠️ If an agent attempts a git write operation, a warning is injected
301
+ - 📝 Agents must ask for explicit user permission before git operations
302
+
303
+ **Enable automatic git operations:**
304
+
305
+ Set `features.autoGitOperations: true` in `athena.json`:
306
+
307
+ ```json
308
+ {
309
+ "features": {
310
+ "autoGitOperations": true
311
+ }
312
+ }
313
+ ```
314
+
315
+ Or during installation, check the "Auto Git Operations" feature.
316
+
317
+ **Covered operations:**
318
+ - **Git commits & pushes:** `git commit`, `git push`
319
+ - **Branch operations:** `git checkout -b`, `git branch`, `git switch -c`, `git switch --create`
320
+ - **Merging & rebasing:** `git merge`, `git rebase`, `git cherry-pick`
321
+ - **Stashing & tags:** `git stash`, `git tag`
322
+ - **Reset operations:** `git reset` (all variants: --soft, --mixed, --hard)
323
+ - **GitHub PR operations:** `gh pr create`, `gh pr edit`, `gh pr merge`, `gh pr close`, `gh pr review`
324
+ - **GitHub issue operations:** `gh issue create`, `gh issue edit`, `gh issue close`
325
+ - **GitHub release operations:** `gh release create`, `gh release edit`, `gh release delete`
326
+
327
+ **Why this is the default:**
328
+
329
+ Version control is critical. Automatic commits can:
330
+ - Create unclear commit messages
331
+ - Commit unintended changes
332
+ - Disrupt branch strategies
333
+ - Bypass code review processes
334
+
335
+ With `autoGitOperations: false`, agents track progress via `athena_update_status()` instead, which updates `sprint-status.yaml` without git operations.
336
+
293
337
  ## GitHub Copilot Support
294
338
 
295
339
  Athena supports GitHub Copilot as a model provider, allowing you to use Claude, GPT, and Gemini models through your Copilot subscription. This is especially useful for enterprise users who only have access to LLMs through Copilot.
@@ -4,6 +4,44 @@ description: Debug an issue using Oracle's deep reasoning capabilities
4
4
 
5
5
  # Athena Debug - Oracle-Powered Debugging
6
6
 
7
+ ## Git Operations Policy
8
+
9
+ **⚠️ AUTOMATIC GIT OPERATIONS ARE PROHIBITED**
10
+
11
+ You must NOT perform any git operations automatically:
12
+ - ❌ Do NOT run `git commit` to save changes
13
+ - ❌ Do NOT run `git push` to push to remote
14
+ - ❌ Do NOT run `git checkout -b` or `git branch` to create branches
15
+ - ❌ Do NOT run `git merge`, `git rebase`, or `git cherry-pick`
16
+ - ❌ Do NOT run `gh pr create` or other GitHub CLI operations
17
+
18
+ **Git operations are ONLY permitted if the user explicitly requests them.**
19
+
20
+ Examples of explicit permission:
21
+ - User says: "Please commit these fixes"
22
+ - User says: "Create a branch for this bugfix"
23
+ - User says: "Push to origin" or "Create a PR"
24
+
25
+ **If you believe git operations would be helpful, ASK the user first:**
26
+ ```
27
+ I've fixed the issue. Would you like me to:
28
+ 1. Commit the fix to git, or
29
+ 2. Leave git operations for you to handle manually?
30
+ ```
31
+
32
+ **To track story progress without git, use:**
33
+ ```
34
+ athena_update_status({
35
+ storyId: "X.Y",
36
+ status: "in_progress",
37
+ notes: "Fixed issue: [description]"
38
+ })
39
+ ```
40
+
41
+ This updates sprint-status.yaml without requiring git commits.
42
+
43
+ ---
44
+
7
45
  Use Oracle, the debugging specialist, to analyze and fix complex issues with systematic hypothesis-driven debugging.
8
46
 
9
47
  **You are Sisyphus, the orchestrator.** You will coordinate Oracle's deep reasoning with automated tools to efficiently diagnose and fix issues.
@@ -4,6 +4,44 @@ description: Implement the current BMAD story using Sisyphus and specialized sub
4
4
 
5
5
  # Athena Dev - Story Implementation
6
6
 
7
+ ## Git Operations Policy
8
+
9
+ **⚠️ AUTOMATIC GIT OPERATIONS ARE PROHIBITED**
10
+
11
+ You must NOT perform any git operations automatically:
12
+ - ❌ Do NOT run `git commit` to save changes
13
+ - ❌ Do NOT run `git push` to push to remote
14
+ - ❌ Do NOT run `git checkout -b` or `git branch` to create branches
15
+ - ❌ Do NOT run `git merge`, `git rebase`, or `git cherry-pick`
16
+ - ❌ Do NOT run `gh pr create` or other GitHub CLI operations
17
+
18
+ **Git operations are ONLY permitted if the user explicitly requests them.**
19
+
20
+ Examples of explicit permission:
21
+ - User says: "Please commit these changes"
22
+ - User says: "Create a branch called feature-x"
23
+ - User says: "Push to origin" or "Create a PR"
24
+
25
+ **If you believe git operations would be helpful, ASK the user first:**
26
+ ```
27
+ I've completed the implementation. Would you like me to:
28
+ 1. Commit these changes to git, or
29
+ 2. Leave git operations for you to handle manually?
30
+ ```
31
+
32
+ **To track story progress without git, use:**
33
+ ```
34
+ athena_update_status({
35
+ storyId: "X.Y",
36
+ status: "completed",
37
+ completionSummary: "What was implemented..."
38
+ })
39
+ ```
40
+
41
+ This updates sprint-status.yaml without requiring git commits.
42
+
43
+ ---
44
+
7
45
  You are implementing a BMAD story using OpenCode Athena's full capabilities.
8
46
 
9
47
  **You are Sisyphus, the orchestrator.** You will coordinate subagents and tools to implement this story efficiently and correctly.
@@ -8,6 +8,23 @@ description: Work on multiple stories in parallel using background agents
8
8
  >
9
9
  > This command describes **planned functionality** that is not yet available. The `athena_parallel` tool is a placeholder. This document describes the intended behavior for future implementation.
10
10
 
11
+ ## Git Operations Policy
12
+
13
+ **⚠️ AUTOMATIC GIT OPERATIONS ARE PROHIBITED**
14
+
15
+ You must NOT perform any git operations automatically:
16
+ - ❌ Do NOT run `git commit` to save changes
17
+ - ❌ Do NOT run `git push` to push to remote
18
+ - ❌ Do NOT run `git checkout -b` or `git branch` to create branches
19
+ - ❌ Do NOT run `git merge`, `git rebase`, or `git cherry-pick`
20
+ - ❌ Do NOT run `gh pr create` or other GitHub CLI operations
21
+
22
+ **Git operations are ONLY permitted if the user explicitly requests them.**
23
+
24
+ When working on multiple stories in parallel, git operations become especially important to coordinate manually. Always ask the user before performing any git operations.
25
+
26
+ ---
27
+
11
28
  Execute multiple BMAD stories simultaneously using background agents for maximum throughput.
12
29
 
13
30
  ## Planned Behavior
@@ -4,6 +4,23 @@ description: Research patterns, implementations, or documentation using Libraria
4
4
 
5
5
  # Athena Research - Librarian-Powered Research
6
6
 
7
+ ## Git Operations Policy
8
+
9
+ **⚠️ AUTOMATIC GIT OPERATIONS ARE PROHIBITED**
10
+
11
+ You must NOT perform any git operations automatically:
12
+ - ❌ Do NOT run `git commit` to save changes
13
+ - ❌ Do NOT run `git push` to push to remote
14
+ - ❌ Do NOT run `git checkout -b` or `git branch` to create branches
15
+ - ❌ Do NOT run `git merge`, `git rebase`, or `git cherry-pick`
16
+ - ❌ Do NOT run `gh pr create` or other GitHub CLI operations
17
+
18
+ **Git operations are ONLY permitted if the user explicitly requests them.**
19
+
20
+ This command focuses on research and should rarely involve git operations. If you believe git operations are needed, ASK the user first.
21
+
22
+ ---
23
+
7
24
  Use Librarian, the research specialist, to find patterns, examples, and documentation from multiple sources.
8
25
 
9
26
  **You are Sisyphus, the orchestrator.** You will coordinate Librarian's research capabilities with Explore for comprehensive information gathering.
@@ -4,6 +4,44 @@ description: Run a combined quality gate on the current story implementation
4
4
 
5
5
  # Athena Review - Automated Quality Gate
6
6
 
7
+ ## Git Operations Policy
8
+
9
+ **⚠️ AUTOMATIC GIT OPERATIONS ARE PROHIBITED**
10
+
11
+ You must NOT perform any git operations automatically:
12
+ - ❌ Do NOT run `git commit` to save changes
13
+ - ❌ Do NOT run `git push` to push to remote
14
+ - ❌ Do NOT run `git checkout -b` or `git branch` to create branches
15
+ - ❌ Do NOT run `git merge`, `git rebase`, or `git cherry-pick`
16
+ - ❌ Do NOT run `gh pr create` or other GitHub CLI operations
17
+
18
+ **Git operations are ONLY permitted if the user explicitly requests them.**
19
+
20
+ Examples of explicit permission:
21
+ - User says: "Please commit these changes"
22
+ - User says: "Create a branch called feature-x"
23
+ - User says: "Push to origin" or "Create a PR"
24
+
25
+ **If you believe git operations would be helpful, ASK the user first:**
26
+ ```
27
+ The quality gate passed! Would you like me to:
28
+ 1. Commit these changes to git, or
29
+ 2. Leave git operations for you to handle manually?
30
+ ```
31
+
32
+ **To track story progress without git, use:**
33
+ ```
34
+ athena_update_status({
35
+ storyId: "X.Y",
36
+ status: "completed",
37
+ completionSummary: "What was implemented..."
38
+ })
39
+ ```
40
+
41
+ This updates sprint-status.yaml without requiring git commits.
42
+
43
+ ---
44
+
7
45
  Perform a comprehensive quality review by orchestrating **oh-my-opencode Oracle code review** and **BMAD adversarial review**, both powered by Oracle's deep reasoning capabilities.
8
46
 
9
47
  **You are Sisyphus, the orchestrator.** You will coordinate multiple review perspectives and synthesize the findings.
@@ -4,6 +4,23 @@ description: View and manage BMAD sprint status
4
4
 
5
5
  # Athena Status - Sprint Status Management
6
6
 
7
+ ## Git Operations Policy
8
+
9
+ **⚠️ AUTOMATIC GIT OPERATIONS ARE PROHIBITED**
10
+
11
+ You must NOT perform any git operations automatically:
12
+ - ❌ Do NOT run `git commit` to save changes
13
+ - ❌ Do NOT run `git push` to push to remote
14
+ - ❌ Do NOT run `git checkout -b` or `git branch` to create branches
15
+ - ❌ Do NOT run `git merge`, `git rebase`, or `git cherry-pick`
16
+ - ❌ Do NOT run `gh pr create` or other GitHub CLI operations
17
+
18
+ **Git operations are ONLY permitted if the user explicitly requests them.**
19
+
20
+ This command focuses on status management and should not involve git operations.
21
+
22
+ ---
23
+
7
24
  View current sprint progress and manage story statuses. This command helps you track where you are in the sprint and what to work on next.
8
25
 
9
26
  ## Quick Status Check
@@ -149,7 +149,8 @@
149
149
  "notifications": { "type": "boolean", "default": true },
150
150
  "contextMonitor": { "type": "boolean", "default": true },
151
151
  "commentChecker": { "type": "boolean", "default": true },
152
- "lspTools": { "type": "boolean", "default": true }
152
+ "lspTools": { "type": "boolean", "default": true },
153
+ "autoGitOperations": { "type": "boolean", "default": false, "description": "Allow agents to perform git/gh operations automatically (false = requires explicit user permission)" }
153
154
  }
154
155
  },
155
156
  "mcps": {
package/dist/cli/index.js CHANGED
@@ -905,7 +905,8 @@ var FeaturesSchema = z.object({
905
905
  notifications: z.boolean(),
906
906
  contextMonitor: z.boolean(),
907
907
  commentChecker: z.boolean(),
908
- lspTools: z.boolean()
908
+ lspTools: z.boolean(),
909
+ autoGitOperations: z.boolean().default(false)
909
910
  });
910
911
  var McpsSchema = z.object({
911
912
  context7: z.boolean(),
@@ -1338,9 +1339,14 @@ var AVAILABLE_FEATURES = [
1338
1339
  {
1339
1340
  name: "LSP Refactoring Tools - Enable lsp_rename, lsp_find_references, etc.",
1340
1341
  value: "lsp-tools"
1342
+ },
1343
+ {
1344
+ name: "Auto Git Operations - Allow agents to commit/push/branch automatically (unchecked = requires explicit permission)",
1345
+ value: "auto-git-operations"
1341
1346
  }
1342
1347
  ];
1343
1348
  var ALL_FEATURE_VALUES = AVAILABLE_FEATURES.map((f) => f.value);
1349
+ var FEATURES_ENABLED_BY_DEFAULT = ALL_FEATURE_VALUES.filter((f) => f !== "auto-git-operations");
1344
1350
  var AVAILABLE_MCPS = [
1345
1351
  {
1346
1352
  name: "context7 - Documentation lookup and context retrieval",
@@ -1357,7 +1363,7 @@ var AVAILABLE_MCPS = [
1357
1363
  ];
1358
1364
  var ALL_MCP_VALUES = AVAILABLE_MCPS.map((m) => m.value);
1359
1365
  function createFeatureChoices(defaults) {
1360
- const enabledSet = new Set(defaults ?? ALL_FEATURE_VALUES);
1366
+ const enabledSet = new Set(defaults ?? FEATURES_ENABLED_BY_DEFAULT);
1361
1367
  return AVAILABLE_FEATURES.map((feature) => ({
1362
1368
  ...feature,
1363
1369
  checked: enabledSet.has(feature.value)
@@ -1392,7 +1398,8 @@ function featuresToFlags(enabledFeatures) {
1392
1398
  notifications: enabledFeatures.includes("notifications"),
1393
1399
  contextMonitor: enabledFeatures.includes("context-monitor"),
1394
1400
  commentChecker: enabledFeatures.includes("comment-checker"),
1395
- lspTools: enabledFeatures.includes("lsp-tools")
1401
+ lspTools: enabledFeatures.includes("lsp-tools"),
1402
+ autoGitOperations: enabledFeatures.includes("auto-git-operations")
1396
1403
  };
1397
1404
  }
1398
1405
  function mcpsToFlags(mcps) {