Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Commit 4cac178

Browse files
jpleva91claude
andauthored
docs: add Copilot + @claude agent configuration (#127)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b9a19e0 commit 4cac178

File tree

4 files changed

+135
-0
lines changed

4 files changed

+135
-0
lines changed

.github/copilot-instructions.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# ShellForge — Copilot Instructions
2+
3+
> Copilot acts as **Tier C — Execution Workforce** in this repository.
4+
> Implement well-specified issues, open draft PRs, never merge or approve.
5+
6+
## Project Overview
7+
8+
**ShellForge** is the execution harness for the Chitin platform — agent loop, LLM providers, tool-use, drift detection.
9+
10+
## Tech Stack
11+
12+
- **Language**: Go 1.22+
13+
- **Module**: `github.com/chitinhq/shellforge`
14+
15+
## Build & Test
16+
17+
```bash
18+
go build ./...
19+
go test ./...
20+
golangci-lint run
21+
```
22+
23+
## Governance Rules
24+
25+
### DENY
26+
- `git push` to main — always use feature branches
27+
- `git force-push` — never rewrite shared history
28+
- Write to `.env`, SSH keys, credentials
29+
30+
### ALWAYS
31+
- Create feature branches: `agent/<type>/issue-<N>`
32+
- Run `go build ./... && go test ./...` before creating PRs
33+
- Link PRs to issues (`Closes #N`)
34+
35+
## PR Rules
36+
37+
- **NEVER merge PRs** — only Tier B or humans merge
38+
- Max 300 lines changed per PR (soft limit)
39+
- Always open as **draft PR** first
40+
- If ambiguous, label `needs-spec` and stop
41+
42+
## Autonomy Directive
43+
44+
- **NEVER pause to ask for clarification** — make your best judgment
45+
- If the issue is ambiguous, label it `needs-spec` and stop
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Claude Code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, ready_for_review, reopened]
6+
7+
jobs:
8+
claude-review:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
pull-requests: read
13+
issues: read
14+
id-token: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 1
21+
22+
- name: Run Claude Code Review
23+
id: claude-review
24+
uses: anthropics/claude-code-action@v1
25+
with:
26+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
27+
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
28+
plugins: 'code-review@claude-code-plugins'
29+
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'

.github/workflows/claude.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
actions: read
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
33+
- name: Run Claude Code
34+
id: claude
35+
uses: anthropics/claude-code-action@v1
36+
with:
37+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38+
additional_permissions: |
39+
actions: read

CLAUDE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Agent Identity
2+
3+
At session start, if you see `[AgentGuard] No agent identity set`, ask the user:
4+
1. **Role**: developer / reviewer / ops / security / planner
5+
2. **Driver**: human / claude-code / copilot / ci
6+
7+
Then run: `scripts/write-persona.sh <driver> <role>`
8+
9+
## Project
10+
11+
ShellForge is the execution harness for the Chitin platform — agent loop, LLM providers, tool-use, drift detection.
12+
13+
**Module**: `github.com/chitinhq/shellforge`
14+
**Language**: Go 1.22+
15+
16+
## Build
17+
18+
```bash
19+
go build ./...
20+
go test ./...
21+
golangci-lint run
22+
```

0 commit comments

Comments
 (0)