jonah-fleet 1.0.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 (53) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +133 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.js +454 -0
  5. package/package.json +47 -0
  6. package/schema.json +49 -0
  7. package/templates/docs/AGENTS.template.md +54 -0
  8. package/templates/prompts/ORCHESTRATION.md +97 -0
  9. package/templates/prompts/_prompt-template.md +43 -0
  10. package/templates/prompts/autowork.md +125 -0
  11. package/templates/prompts/dependency-update-security-check.md +44 -0
  12. package/templates/prompts/issues-housekeeping.md +55 -0
  13. package/templates/prompts/optimizer.md +72 -0
  14. package/templates/prompts/peer-review.md +112 -0
  15. package/templates/prompts/product-planning.md +67 -0
  16. package/templates/skills/code-review/SKILL.md +87 -0
  17. package/templates/skills/code-review/agents/openai.yaml +3 -0
  18. package/templates/skills/codebase-design/DEEPENING.md +37 -0
  19. package/templates/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  20. package/templates/skills/codebase-design/SKILL.md +114 -0
  21. package/templates/skills/codebase-design/agents/openai.yaml +3 -0
  22. package/templates/skills/diagnosing-bugs/SKILL.md +138 -0
  23. package/templates/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  24. package/templates/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
  25. package/templates/skills/domain-modeling/ADR-FORMAT.md +47 -0
  26. package/templates/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  27. package/templates/skills/domain-modeling/SKILL.md +74 -0
  28. package/templates/skills/domain-modeling/agents/openai.yaml +3 -0
  29. package/templates/skills/resolving-merge-conflicts/SKILL.md +14 -0
  30. package/templates/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
  31. package/templates/skills/tdd/SKILL.md +38 -0
  32. package/templates/skills/tdd/agents/openai.yaml +3 -0
  33. package/templates/skills/tdd/mocking.md +59 -0
  34. package/templates/skills/tdd/tests.md +77 -0
  35. package/templates/skills/to-spec/SKILL.md +75 -0
  36. package/templates/skills/to-spec/agents/openai.yaml +5 -0
  37. package/templates/skills/to-tickets/SKILL.md +105 -0
  38. package/templates/skills/to-tickets/agents/openai.yaml +5 -0
  39. package/templates/skills/triage/AGENT-BRIEF.md +207 -0
  40. package/templates/skills/triage/OUT-OF-SCOPE.md +105 -0
  41. package/templates/skills/triage/SKILL.md +112 -0
  42. package/templates/skills/triage/agents/openai.yaml +5 -0
  43. package/templates/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
  44. package/templates/skills/writing-for-agents/SKILL.md +81 -0
  45. package/templates/skills/writing-for-agents/agents/openai.yaml +3 -0
  46. package/templates/workflows/autowork-cron.yml +154 -0
  47. package/templates/workflows/dependency-check-cron.yml +85 -0
  48. package/templates/workflows/issues-housekeeping-cron.yml +85 -0
  49. package/templates/workflows/prompt-optimizer-cron.yml +85 -0
  50. package/templates/workflows/sync-fleet.yml +63 -0
  51. package/templates/workflows/trigger-autowork-on-bug.yml +101 -0
  52. package/templates/workflows/trigger-autowork-on-merge.yml +130 -0
  53. package/templates/workflows/trigger-review-routine.yml +141 -0
@@ -0,0 +1,154 @@
1
+ name: Autowork Scheduled Cron (agy)
2
+
3
+ # Scheduled execution of the Autowork routine using Antigravity CLI on Gemini 3.7 Flash.
4
+
5
+ on:
6
+ schedule:
7
+ # Runs every 6 hours by default (00:15, 06:15, 12:15, 18:15 UTC)
8
+ - cron: '15 */6 * * *'
9
+ workflow_dispatch:
10
+ inputs:
11
+ target_issue:
12
+ description: 'Optional issue number to work in Targeted mode (leave blank for Scan mode)'
13
+ required: false
14
+ type: string
15
+
16
+ concurrency:
17
+ group: autowork-agent-scan
18
+ cancel-in-progress: false
19
+
20
+ jobs:
21
+ run-autowork:
22
+ runs-on: ubuntu-latest
23
+ timeout-minutes: 65
24
+ permissions:
25
+ contents: write
26
+ issues: write
27
+ pull-requests: write
28
+ statuses: write
29
+ actions: read
30
+ steps:
31
+ - name: Checkout repository
32
+ uses: actions/checkout@v4
33
+ with:
34
+ fetch-depth: 0
35
+
36
+ - name: Setup Node.js
37
+ uses: actions/setup-node@v4
38
+ with:
39
+ node-version: 22
40
+
41
+ - name: Configure Git author identity
42
+ run: |
43
+ git config --global user.name "github-actions[bot]"
44
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
45
+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
46
+
47
+ - name: Cache Antigravity CLI
48
+ id: cache-agy
49
+ uses: actions/cache@v4
50
+ with:
51
+ path: ~/.local/bin/agy
52
+ key: agy-cli-linux-amd64-v1
53
+
54
+ - name: Install Antigravity CLI
55
+ if: steps.cache-agy.outputs.cache-hit != 'true'
56
+ run: |
57
+ curl -fsSL https://antigravity.google/cli/install.sh | bash
58
+
59
+ - name: Add Antigravity CLI to PATH
60
+ run: echo "$HOME/.local/bin" >> $GITHUB_PATH
61
+
62
+ - name: Write Antigravity OAuth Token
63
+ env:
64
+ ANTIGRAVITY_OAUTH_TOKEN: ${{ secrets.ANTIGRAVITY_OAUTH_TOKEN || secrets.GEMINI_API_KEY }}
65
+ run: |
66
+ if [ -z "$ANTIGRAVITY_OAUTH_TOKEN" ]; then
67
+ echo "::error::Neither ANTIGRAVITY_OAUTH_TOKEN nor GEMINI_API_KEY secret is set; cannot authenticate Antigravity CLI." >&2
68
+ exit 1
69
+ fi
70
+ mkdir -p "$HOME/.gemini/antigravity-cli"
71
+ chmod 700 "$HOME/.gemini/antigravity-cli"
72
+ printf '%s' "$ANTIGRAVITY_OAUTH_TOKEN" > "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
73
+ chmod 600 "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
74
+
75
+ - name: Preflight validation
76
+ env:
77
+ GH_TOKEN: ${{ github.token }}
78
+ run: |
79
+ if [ ! -s "$HOME/.gemini/antigravity-cli/antigravity-oauth-token" ]; then
80
+ echo "::error::Preflight check failed: Antigravity OAuth token file is missing or empty." >&2
81
+ exit 1
82
+ fi
83
+ if ! gh auth status >/dev/null 2>&1; then
84
+ echo "::error::GitHub CLI authentication check failed with GITHUB_TOKEN." >&2
85
+ exit 1
86
+ fi
87
+ echo "✓ Preflight credential and GitHub CLI validation passed."
88
+
89
+ - name: Discover domain skills
90
+ id: skills
91
+ run: |
92
+ SKILLS_PROMPT=""
93
+ if [ -d ".agents/skills" ]; then
94
+ for skill_path in .agents/skills/*/SKILL.md; do
95
+ if [ -f "$skill_path" ]; then
96
+ SKILLS_PROMPT="${SKILLS_PROMPT}Read and follow ${skill_path}. "
97
+ fi
98
+ done
99
+ fi
100
+ echo "skills_prompt=$SKILLS_PROMPT" >> "$GITHUB_OUTPUT"
101
+
102
+ - name: Run Autowork
103
+ timeout-minutes: 60
104
+ env:
105
+ GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
106
+ GOOGLE_API_KEY: ${{ secrets.GEMINI_API_KEY }}
107
+ ANTIGRAVITY_API_KEY: ${{ secrets.GEMINI_API_KEY }}
108
+ GH_TOKEN: ${{ secrets.GH_PAT || github.token }}
109
+ TARGET_ISSUE: ${{ inputs.target_issue }}
110
+ SKILLS_PROMPT: ${{ steps.skills.outputs.skills_prompt }}
111
+ GITHUB_SERVER_URL: ${{ github.server_url }}
112
+ GITHUB_REPOSITORY: ${{ github.repository }}
113
+ GITHUB_RUN_ID: ${{ github.run_id }}
114
+ run: |
115
+ if [ -n "$TARGET_ISSUE" ]; then
116
+ PROMPT="You are the Autowork routine for this repository. Read and follow the instructions in .github/prompts/autowork.md exactly. ${SKILLS_PROMPT} Your target is issue #${TARGET_ISSUE}. You are in Targeted mode: work issue #${TARGET_ISSUE} directly, ahead of Phase 1 convergence and priority scan."
117
+ else
118
+ PROMPT="You are the Autowork routine for this repository. Read and follow the instructions in .github/prompts/autowork.md exactly. ${SKILLS_PROMPT} You are in Scan mode: check open PRs for review comments to fix, close merged issues, then pick the highest-priority unclaimed issue."
119
+ fi
120
+
121
+ agy -p "$PROMPT" \
122
+ --model gemini-3.7-flash-high \
123
+ --output-format text \
124
+ --print-timeout 60m \
125
+ --dangerously-skip-permissions
126
+
127
+ - name: Emit run summary
128
+ if: always()
129
+ run: |
130
+ LATEST_LOG=$(ls -t .github/prompts/logs/autowork/*.md 2>/dev/null | head -n 1)
131
+ if [ -n "$LATEST_LOG" ] && [ -n "$GITHUB_STEP_SUMMARY" ]; then
132
+ cat "$LATEST_LOG" >> "$GITHUB_STEP_SUMMARY"
133
+ fi
134
+
135
+ - name: Verify Atomic Handoff Invariant (PR Existence Guard)
136
+ if: always()
137
+ env:
138
+ GH_TOKEN: ${{ github.token }}
139
+ run: |
140
+ LATEST_LOG=$(ls -t .github/prompts/logs/autowork/*.md 2>/dev/null | head -n 1)
141
+ if [ -n "$LATEST_LOG" ]; then
142
+ if grep -q "Result.*SUCCESS" "$LATEST_LOG"; then
143
+ WORKED_BRANCH=$(grep -E '^\s*-\s*(Pushed branch|Branch):' "$LATEST_LOG" | head -n 1 | sed -E 's/.*`([^`]+)`.*/\1/')
144
+ if [ -n "$WORKED_BRANCH" ] && [[ "$WORKED_BRANCH" =~ (feat|fix)/ ]]; then
145
+ echo "Verifying PR existence for branch: $WORKED_BRANCH"
146
+ PR_COUNT=$(gh pr list --head "$WORKED_BRANCH" --state all --json number --jq 'length' 2>/dev/null || echo "0")
147
+ if [ "$PR_COUNT" -eq 0 ]; then
148
+ echo "::error::Atomic Handoff Invariant Violated: Branch '$WORKED_BRANCH' was implemented and pushed, but no pull request exists on GitHub!" >&2
149
+ exit 1
150
+ fi
151
+ echo "✓ Verified pull request exists on GitHub for branch: $WORKED_BRANCH"
152
+ fi
153
+ fi
154
+ fi
@@ -0,0 +1,85 @@
1
+ name: Dependency Check Cron
2
+
3
+ on:
4
+ schedule:
5
+ # Runs weekly on Mondays at 08:00 UTC
6
+ - cron: '0 8 * * 1'
7
+ workflow_dispatch:
8
+
9
+ concurrency:
10
+ group: dependency-check
11
+ cancel-in-progress: false
12
+
13
+ jobs:
14
+ run-dependency-check:
15
+ runs-on: ubuntu-latest
16
+ timeout-minutes: 30
17
+ permissions:
18
+ contents: write
19
+ issues: write
20
+ pull-requests: write
21
+ statuses: write
22
+ actions: read
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v4
26
+ with:
27
+ fetch-depth: 0
28
+
29
+ - name: Setup Node.js
30
+ uses: actions/setup-node@v4
31
+ with:
32
+ node-version: 22
33
+
34
+ - name: Configure Git author identity
35
+ run: |
36
+ git config --global user.name "github-actions[bot]"
37
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
38
+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
39
+
40
+ - name: Cache Antigravity CLI
41
+ id: cache-agy
42
+ uses: actions/cache@v4
43
+ with:
44
+ path: ~/.local/bin/agy
45
+ key: agy-cli-linux-amd64-v1
46
+
47
+ - name: Install Antigravity CLI
48
+ if: steps.cache-agy.outputs.cache-hit != 'true'
49
+ run: |
50
+ curl -fsSL https://antigravity.google/cli/install.sh | bash
51
+
52
+ - name: Add Antigravity CLI to PATH
53
+ run: echo "$HOME/.local/bin" >> $GITHUB_PATH
54
+
55
+ - name: Write Antigravity OAuth Token
56
+ env:
57
+ ANTIGRAVITY_OAUTH_TOKEN: ${{ secrets.ANTIGRAVITY_OAUTH_TOKEN || secrets.GEMINI_API_KEY }}
58
+ run: |
59
+ if [ -z "$ANTIGRAVITY_OAUTH_TOKEN" ]; then
60
+ echo "::error::Neither ANTIGRAVITY_OAUTH_TOKEN nor GEMINI_API_KEY secret is set; cannot authenticate Antigravity CLI." >&2
61
+ exit 1
62
+ fi
63
+ mkdir -p "$HOME/.gemini/antigravity-cli"
64
+ chmod 700 "$HOME/.gemini/antigravity-cli"
65
+ printf '%s' "$ANTIGRAVITY_OAUTH_TOKEN" > "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
66
+ chmod 600 "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
67
+
68
+ - name: Run Dependency Update Check
69
+ timeout-minutes: 25
70
+ env:
71
+ GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
72
+ GOOGLE_API_KEY: ${{ secrets.GEMINI_API_KEY }}
73
+ ANTIGRAVITY_API_KEY: ${{ secrets.GEMINI_API_KEY }}
74
+ GH_TOKEN: ${{ secrets.GH_PAT || github.token }}
75
+ GITHUB_SERVER_URL: ${{ github.server_url }}
76
+ GITHUB_REPOSITORY: ${{ github.repository }}
77
+ GITHUB_RUN_ID: ${{ github.run_id }}
78
+ run: |
79
+ PROMPT="You are the Dependency Update & Security Check routine. Read and follow .github/prompts/dependency-update-security-check.md exactly. Check dependencies for updates and vulnerabilities, and create or update tracking issues."
80
+
81
+ agy -p "$PROMPT" \
82
+ --model gemini-3.7-flash-high \
83
+ --output-format text \
84
+ --print-timeout 25m \
85
+ --dangerously-skip-permissions
@@ -0,0 +1,85 @@
1
+ name: Issues Housekeeping Cron
2
+
3
+ on:
4
+ schedule:
5
+ # Runs weekly on Sundays at 04:00 UTC
6
+ - cron: '0 4 * * 0'
7
+ workflow_dispatch:
8
+
9
+ concurrency:
10
+ group: issues-housekeeping
11
+ cancel-in-progress: false
12
+
13
+ jobs:
14
+ run-housekeeping:
15
+ runs-on: ubuntu-latest
16
+ timeout-minutes: 45
17
+ permissions:
18
+ contents: write
19
+ issues: write
20
+ pull-requests: write
21
+ statuses: write
22
+ actions: read
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v4
26
+ with:
27
+ fetch-depth: 0
28
+
29
+ - name: Setup Node.js
30
+ uses: actions/setup-node@v4
31
+ with:
32
+ node-version: 22
33
+
34
+ - name: Configure Git author identity
35
+ run: |
36
+ git config --global user.name "github-actions[bot]"
37
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
38
+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
39
+
40
+ - name: Cache Antigravity CLI
41
+ id: cache-agy
42
+ uses: actions/cache@v4
43
+ with:
44
+ path: ~/.local/bin/agy
45
+ key: agy-cli-linux-amd64-v1
46
+
47
+ - name: Install Antigravity CLI
48
+ if: steps.cache-agy.outputs.cache-hit != 'true'
49
+ run: |
50
+ curl -fsSL https://antigravity.google/cli/install.sh | bash
51
+
52
+ - name: Add Antigravity CLI to PATH
53
+ run: echo "$HOME/.local/bin" >> $GITHUB_PATH
54
+
55
+ - name: Write Antigravity OAuth Token
56
+ env:
57
+ ANTIGRAVITY_OAUTH_TOKEN: ${{ secrets.ANTIGRAVITY_OAUTH_TOKEN || secrets.GEMINI_API_KEY }}
58
+ run: |
59
+ if [ -z "$ANTIGRAVITY_OAUTH_TOKEN" ]; then
60
+ echo "::error::Neither ANTIGRAVITY_OAUTH_TOKEN nor GEMINI_API_KEY secret is set; cannot authenticate Antigravity CLI." >&2
61
+ exit 1
62
+ fi
63
+ mkdir -p "$HOME/.gemini/antigravity-cli"
64
+ chmod 700 "$HOME/.gemini/antigravity-cli"
65
+ printf '%s' "$ANTIGRAVITY_OAUTH_TOKEN" > "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
66
+ chmod 600 "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
67
+
68
+ - name: Run Issues Housekeeping
69
+ timeout-minutes: 40
70
+ env:
71
+ GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
72
+ GOOGLE_API_KEY: ${{ secrets.GEMINI_API_KEY }}
73
+ ANTIGRAVITY_API_KEY: ${{ secrets.GEMINI_API_KEY }}
74
+ GH_TOKEN: ${{ secrets.GH_PAT || github.token }}
75
+ GITHUB_SERVER_URL: ${{ github.server_url }}
76
+ GITHUB_REPOSITORY: ${{ github.repository }}
77
+ GITHUB_RUN_ID: ${{ github.run_id }}
78
+ run: |
79
+ PROMPT="You are the Issues Housekeeping routine for this repository. Read and follow .github/prompts/issues-housekeeping.md exactly. Sweep open issues for staleness, duplicates, priority accuracy, and orphaned claims."
80
+
81
+ agy -p "$PROMPT" \
82
+ --model gemini-3.7-flash-high \
83
+ --output-format text \
84
+ --print-timeout 40m \
85
+ --dangerously-skip-permissions
@@ -0,0 +1,85 @@
1
+ name: Prompt Optimizer Cron
2
+
3
+ on:
4
+ schedule:
5
+ # Runs weekly on Sundays at 10:00 UTC
6
+ - cron: '0 10 * * 0'
7
+ workflow_dispatch:
8
+
9
+ concurrency:
10
+ group: prompt-optimizer
11
+ cancel-in-progress: false
12
+
13
+ jobs:
14
+ run-optimizer:
15
+ runs-on: ubuntu-latest
16
+ timeout-minutes: 40
17
+ permissions:
18
+ contents: write
19
+ issues: write
20
+ pull-requests: write
21
+ statuses: write
22
+ actions: read
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v4
26
+ with:
27
+ fetch-depth: 0
28
+
29
+ - name: Setup Node.js
30
+ uses: actions/setup-node@v4
31
+ with:
32
+ node-version: 22
33
+
34
+ - name: Configure Git author identity
35
+ run: |
36
+ git config --global user.name "github-actions[bot]"
37
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
38
+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
39
+
40
+ - name: Cache Antigravity CLI
41
+ id: cache-agy
42
+ uses: actions/cache@v4
43
+ with:
44
+ path: ~/.local/bin/agy
45
+ key: agy-cli-linux-amd64-v1
46
+
47
+ - name: Install Antigravity CLI
48
+ if: steps.cache-agy.outputs.cache-hit != 'true'
49
+ run: |
50
+ curl -fsSL https://antigravity.google/cli/install.sh | bash
51
+
52
+ - name: Add Antigravity CLI to PATH
53
+ run: echo "$HOME/.local/bin" >> $GITHUB_PATH
54
+
55
+ - name: Write Antigravity OAuth Token
56
+ env:
57
+ ANTIGRAVITY_OAUTH_TOKEN: ${{ secrets.ANTIGRAVITY_OAUTH_TOKEN || secrets.GEMINI_API_KEY }}
58
+ run: |
59
+ if [ -z "$ANTIGRAVITY_OAUTH_TOKEN" ]; then
60
+ echo "::error::Neither ANTIGRAVITY_OAUTH_TOKEN nor GEMINI_API_KEY secret is set; cannot authenticate Antigravity CLI." >&2
61
+ exit 1
62
+ fi
63
+ mkdir -p "$HOME/.gemini/antigravity-cli"
64
+ chmod 700 "$HOME/.gemini/antigravity-cli"
65
+ printf '%s' "$ANTIGRAVITY_OAUTH_TOKEN" > "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
66
+ chmod 600 "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
67
+
68
+ - name: Run Prompt Optimizer
69
+ timeout-minutes: 35
70
+ env:
71
+ GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
72
+ GOOGLE_API_KEY: ${{ secrets.GEMINI_API_KEY }}
73
+ ANTIGRAVITY_API_KEY: ${{ secrets.GEMINI_API_KEY }}
74
+ GH_TOKEN: ${{ secrets.GH_PAT || github.token }}
75
+ GITHUB_SERVER_URL: ${{ github.server_url }}
76
+ GITHUB_REPOSITORY: ${{ github.repository }}
77
+ GITHUB_RUN_ID: ${{ github.run_id }}
78
+ run: |
79
+ PROMPT="You are the Prompt Optimizer routine for this repository. Read and follow .github/prompts/optimizer.md exactly. Diagnose failures, token anomalies, and review loops, and propose preventative prompt and test fixes."
80
+
81
+ agy -p "$PROMPT" \
82
+ --model gemini-3.7-flash-high \
83
+ --output-format text \
84
+ --print-timeout 35m \
85
+ --dangerously-skip-permissions
@@ -0,0 +1,63 @@
1
+ name: Sync Jonah Fleet
2
+
3
+ on:
4
+ schedule:
5
+ # Check for fleet updates weekly on Mondays at 06:00 UTC
6
+ - cron: '0 6 * * 1'
7
+ workflow_dispatch:
8
+ repository_dispatch:
9
+ types: [fleet-release]
10
+
11
+ jobs:
12
+ sync-fleet:
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ contents: write
16
+ pull-requests: write
17
+ steps:
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Setup Node.js
24
+ uses: actions/setup-node@v4
25
+ with:
26
+ node-version: 22
27
+
28
+ - name: Configure Git author identity
29
+ run: |
30
+ git config --global user.name "github-actions[bot]"
31
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
32
+
33
+ - name: Run jonah-fleet sync
34
+ id: sync
35
+ run: |
36
+ npx jonah-fleet sync --check || true
37
+ npx jonah-fleet sync --force
38
+
39
+ - name: Check for changes
40
+ id: git-check
41
+ run: |
42
+ if [ -n "$(git status --porcelain)" ]; then
43
+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
44
+ else
45
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
46
+ fi
47
+
48
+ - name: Create Pull Request for Fleet Updates
49
+ if: steps.git-check.outputs.has_changes == 'true'
50
+ env:
51
+ GH_TOKEN: ${{ secrets.GH_PAT || github.token }}
52
+ run: |
53
+ BRANCH_NAME="chore/sync-jonah-fleet-$(date +%Y%m%d)"
54
+ git checkout -B "$BRANCH_NAME"
55
+ git add .
56
+ git commit -m "chore(fleet): sync prompt routines and workflows from jonah-fleet"
57
+ git push -u origin "$BRANCH_NAME" --force
58
+
59
+ gh pr create \
60
+ --head "$BRANCH_NAME" \
61
+ --base main \
62
+ --title "chore(fleet): sync prompt routines and workflows from jonah-fleet" \
63
+ --body "Automated update from \`jonah-fleet\`. Synchronizes latest prompt invariants, claim protocols, and workflow fixes."
@@ -0,0 +1,101 @@
1
+ name: Trigger Autowork on Bug
2
+
3
+ on:
4
+ issues:
5
+ types: [labeled, opened]
6
+
7
+ concurrency:
8
+ group: autowork-bug-${{ github.event.issue.number }}
9
+ cancel-in-progress: true
10
+
11
+ jobs:
12
+ fire-autowork:
13
+ if: >-
14
+ (github.event.action == 'opened' && contains(github.event.issue.labels.*.name, 'bug') && contains(github.event.issue.labels.*.name, 'priority/P1')) ||
15
+ (github.event.action == 'labeled' && (github.event.label.name == 'bug' || github.event.label.name == 'priority/P1'))
16
+ runs-on: ubuntu-latest
17
+ timeout-minutes: 65
18
+ permissions:
19
+ contents: write
20
+ issues: write
21
+ pull-requests: write
22
+ statuses: write
23
+ actions: read
24
+ steps:
25
+ - name: Checkout repository
26
+ uses: actions/checkout@v4
27
+ with:
28
+ fetch-depth: 0
29
+
30
+ - name: Setup Node.js
31
+ uses: actions/setup-node@v4
32
+ with:
33
+ node-version: 22
34
+
35
+ - name: Configure Git author identity
36
+ run: |
37
+ git config --global user.name "github-actions[bot]"
38
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
39
+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
40
+
41
+ - name: Cache Antigravity CLI
42
+ id: cache-agy
43
+ uses: actions/cache@v4
44
+ with:
45
+ path: ~/.local/bin/agy
46
+ key: agy-cli-linux-amd64-v1
47
+
48
+ - name: Install Antigravity CLI
49
+ if: steps.cache-agy.outputs.cache-hit != 'true'
50
+ run: |
51
+ curl -fsSL https://antigravity.google/cli/install.sh | bash
52
+
53
+ - name: Add Antigravity CLI to PATH
54
+ run: echo "$HOME/.local/bin" >> $GITHUB_PATH
55
+
56
+ - name: Write Antigravity OAuth Token
57
+ env:
58
+ ANTIGRAVITY_OAUTH_TOKEN: ${{ secrets.ANTIGRAVITY_OAUTH_TOKEN || secrets.GEMINI_API_KEY }}
59
+ run: |
60
+ if [ -z "$ANTIGRAVITY_OAUTH_TOKEN" ]; then
61
+ echo "::error::Neither ANTIGRAVITY_OAUTH_TOKEN nor GEMINI_API_KEY secret is set; cannot authenticate Antigravity CLI." >&2
62
+ exit 1
63
+ fi
64
+ mkdir -p "$HOME/.gemini/antigravity-cli"
65
+ chmod 700 "$HOME/.gemini/antigravity-cli"
66
+ printf '%s' "$ANTIGRAVITY_OAUTH_TOKEN" > "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
67
+ chmod 600 "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
68
+
69
+ - name: Discover domain skills
70
+ id: skills
71
+ run: |
72
+ SKILLS_PROMPT=""
73
+ if [ -d ".agents/skills" ]; then
74
+ for skill_path in .agents/skills/*/SKILL.md; do
75
+ if [ -f "$skill_path" ]; then
76
+ SKILLS_PROMPT="${SKILLS_PROMPT}Read and follow ${skill_path}. "
77
+ fi
78
+ done
79
+ fi
80
+ echo "skills_prompt=$SKILLS_PROMPT" >> "$GITHUB_OUTPUT"
81
+
82
+ - name: Run Autowork
83
+ timeout-minutes: 60
84
+ env:
85
+ GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
86
+ GOOGLE_API_KEY: ${{ secrets.GEMINI_API_KEY }}
87
+ ANTIGRAVITY_API_KEY: ${{ secrets.GEMINI_API_KEY }}
88
+ GH_TOKEN: ${{ secrets.GH_PAT || github.token }}
89
+ TARGET_ISSUE: ${{ github.event.issue.number }}
90
+ SKILLS_PROMPT: ${{ steps.skills.outputs.skills_prompt }}
91
+ GITHUB_SERVER_URL: ${{ github.server_url }}
92
+ GITHUB_REPOSITORY: ${{ github.repository }}
93
+ GITHUB_RUN_ID: ${{ github.run_id }}
94
+ run: |
95
+ PROMPT="You are the Autowork routine for this repository. A high-priority bug was filed. Read and follow .github/prompts/autowork.md. ${SKILLS_PROMPT} Your target is issue #${TARGET_ISSUE}. You are in Targeted mode: work issue #${TARGET_ISSUE} directly."
96
+
97
+ agy -p "$PROMPT" \
98
+ --model gemini-3.7-flash-high \
99
+ --output-format text \
100
+ --print-timeout 60m \
101
+ --dangerously-skip-permissions