-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add Copilot + @claude agent configuration #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,98 @@ | ||||||||||||||
| # LLMint — 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 | ||||||||||||||
|
|
||||||||||||||
| **LLMint** is the token economics middleware for the Chitin platform. It tracks LLM costs, enforces budget rules, and enables model cascading. Octi Pulpo imports LLMint for dispatch budget gating. | ||||||||||||||
|
|
||||||||||||||
| **Core principle**: Every token has a cost. LLMint makes that cost visible and enforceable. | ||||||||||||||
|
|
||||||||||||||
| ## Tech Stack | ||||||||||||||
|
|
||||||||||||||
| - **Languages**: Go + Python | ||||||||||||||
| - **Go module**: `github.com/chitinhq/llmint` | ||||||||||||||
| - **Version**: v0.1.0 (semver — breaking changes require major bump) | ||||||||||||||
|
|
||||||||||||||
| ## Repository Structure | ||||||||||||||
|
|
||||||||||||||
| ``` | ||||||||||||||
| cmd/llmint/ # Go binary entrypoint | ||||||||||||||
| internal/ | ||||||||||||||
| ├── tracker/ # Cost tracking per request/session | ||||||||||||||
| ├── budget/ # Budget rules and enforcement | ||||||||||||||
| ├── cascade/ # Model cascading logic (Haiku → Sonnet → Opus) | ||||||||||||||
| └── config/ # Configuration | ||||||||||||||
| llmint/ # Python package (analytics, cost reporting) | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ## Build & Test | ||||||||||||||
|
|
||||||||||||||
| ```bash | ||||||||||||||
| # Go | ||||||||||||||
| go build ./... | ||||||||||||||
| go test ./... | ||||||||||||||
| golangci-lint run | ||||||||||||||
|
|
||||||||||||||
| # Python | ||||||||||||||
|
||||||||||||||
| # Python | |
| # Python | |
| cd python | |
| python -m pip install -e . |
Copilot
AI
Apr 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The “Autonomy Directive” is internally inconsistent: it says “NEVER pause to ask for clarification — make your best judgment” but then says “If the issue is ambiguous, label it needs-spec and stop.” Please reconcile these instructions (choose one behavior) to avoid unpredictable agent actions.
| - **NEVER pause to ask for clarification** — make your best judgment | |
| - If the issue is ambiguous, label it `needs-spec` and stop | |
| - Default to the **safest option** in every ambiguous situation | |
| - **Do not pause to ask for clarification during execution** — make your best judgment only when the issue is sufficiently specified | |
| - If the issue is ambiguous, label it `needs-spec` and stop | |
| - When multiple safe implementations fit a sufficiently specified issue, default to the **safest option** |
| 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 }}' |
| 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: | ||||||||||||||||||
|
Comment on lines
+1
to
+14
|
||||||||||||||||||
| 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')) || | ||||||||||||||||||
|
Comment on lines
+16
to
+17
|
||||||||||||||||||
| (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 == 'issue_comment' && | |
| contains(github.event.comment.body, '@claude') && | |
| contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) || | |
| (github.event_name == 'pull_request_review_comment' && | |
| contains(github.event.comment.body, '@claude') && | |
| contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) || |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||||||||||||||||||
| ## 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>` | ||||||||||||||||||||||
|
||||||||||||||||||||||
| Then run: `scripts/write-persona.sh <driver> <role>` | |
| Then record the selected identity in the session and continue using `driver=<driver>` and `role=<role>` for the rest of the task. |
Copilot
AI
Apr 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The listed “Key Directories” (cmd/llmint/, internal/*, llmint/) don’t exist in this repository (current top-level dirs include cabi/, provider/, middleware/, python/, examples/). Please update this section to match the actual repo layout to avoid misleading agent guidance.
| - `cmd/llmint/` — binary entrypoint | |
| - `internal/tracker/` — cost tracking per request/session | |
| - `internal/budget/` — budget rules and enforcement (cost impact, careful) | |
| - `internal/cascade/` — model cascading logic | |
| - `llmint/` — Python package for analytics | |
| - `cabi/` — C ABI bindings and interoperability layer | |
| - `provider/` — provider integrations and related abstractions | |
| - `middleware/` — middleware for request handling, policy, and cost controls | |
| - `python/` — Python package and bindings | |
| - `examples/` — example integrations and usage samples |
Copilot
AI
Apr 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Python test command here (python -m pytest tests/) doesn’t match the repo’s Python layout; tests live under python/tests/ and CI runs them via cd python && pytest tests/ after installing python as an editable package. Updating this avoids giving agents a build command that fails from the repo root.
| python -m pytest tests/ | |
| cd python && pytest tests/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The “Repository Structure” tree doesn’t match this repo (there’s no
cmd/orinternal/; instead there areprovider/,middleware/,cabi/, andpython/). Please align this section with the actual directories so Copilot/agents don’t optimize for a non-existent layout.