Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# ShellForge — Copilot Instructions

> Copilot acts as **Tier C — Execution Workforce** in this repository.
> Implement well-specified issues, open draft PRs, never merge or approve.

## Project Overview

**ShellForge** is the execution harness for the Chitin platform — agent loop, LLM providers, tool-use, drift detection.

## Tech Stack

- **Language**: Go 1.22+
- **Module**: `github.com/chitinhq/shellforge`
Comment on lines +12 to +13
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Go version and module path documented here don’t match the repo’s go.mod (module github.com/AgentGuardHQ/shellforge, go 1.18) or CI (Go 1.21). Please align this doc with the actual module path/version, or update the codebase config if the intent is to move to Go 1.22+ and the github.com/chitinhq/shellforge module.

Suggested change
- **Language**: Go 1.22+
- **Module**: `github.com/chitinhq/shellforge`
- **Language**: Go 1.18+
- **Module**: `github.com/AgentGuardHQ/shellforge`

Copilot uses AI. Check for mistakes.

## Build & Test

```bash
go build ./...
go test ./...
golangci-lint run
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instructions tell contributors/agents to run golangci-lint run, but the repository doesn’t include a golangci-lint configuration file (e.g., .golangci.yml) and it’s not invoked in CI. Either add/configure golangci-lint or remove it from the documented workflow to prevent broken setup steps.

Suggested change
golangci-lint run

Copilot uses AI. Check for mistakes.
```

## Governance Rules

### DENY
- `git push` to main — always use feature branches
- `git force-push` — never rewrite shared history
- Write to `.env`, SSH keys, credentials

### ALWAYS
- Create feature branches: `agent/<type>/issue-<N>`
- Run `go build ./... && go test ./...` before creating PRs
- Link PRs to issues (`Closes #N`)

## PR Rules

- **NEVER merge PRs** — only Tier B or humans merge
- Max 300 lines changed per PR (soft limit)
- Always open as **draft PR** first
- If ambiguous, label `needs-spec` and stop

## Autonomy Directive

- **NEVER pause to ask for clarification** — make your best judgment
- If the issue is ambiguous, label it `needs-spec` and stop
29 changes: 29 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]

jobs:
claude-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
39 changes: 39 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Claude Code

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
additional_permissions: |
actions: read
22 changes: 22 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Agent Identity

At session start, if you see `[AgentGuard] No agent identity set`, ask the user:
1. **Role**: developer / reviewer / ops / security / planner
2. **Driver**: human / claude-code / copilot / ci

Then run: `scripts/write-persona.sh <driver> <role>`
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts/write-persona.sh is referenced here, but there is no such file under scripts/ in this repo. This instruction can’t be followed as-is; either add the script or update the doc to point at the correct existing script/command.

Suggested change
Then run: `scripts/write-persona.sh <driver> <role>`
Then record the selected `driver` and `role` as the session identity and continue with those values for the rest of the session.

Copilot uses AI. Check for mistakes.

## Project

ShellForge is the execution harness for the Chitin platform — agent loop, LLM providers, tool-use, drift detection.

**Module**: `github.com/chitinhq/shellforge`
**Language**: Go 1.22+

Comment on lines +11 to +15
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The module path and Go version documented here don’t match the repository configuration: go.mod declares module github.com/AgentGuardHQ/shellforge and go 1.18, and CI currently sets up Go 1.21. Please align these values (or update go.mod/CI if the repo has actually moved to github.com/chitinhq/shellforge + Go 1.22+).

Copilot uses AI. Check for mistakes.
## Build

```bash
go build ./...
go test ./...
golangci-lint run
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build instructions include golangci-lint run, but this repo doesn’t appear to have a .golangci.yml (or any other golangci-lint configuration/CI step). If linting is required, add the config + CI integration; otherwise remove it from the documented build steps to avoid misleading setup guidance.

Suggested change
golangci-lint run

Copilot uses AI. Check for mistakes.
```
Loading