Skip to content

docs: add Copilot + @claude agent configuration#4

Merged
jpleva91 merged 2 commits intomainfrom
docs/agent-config
Apr 6, 2026
Merged

docs: add Copilot + @claude agent configuration#4
jpleva91 merged 2 commits intomainfrom
docs/agent-config

Conversation

@jpleva91
Copy link
Copy Markdown
Contributor

@jpleva91 jpleva91 commented Apr 6, 2026

Summary

  • Add claude.yml workflow for @claude GitHub integration
  • Add copilot-instructions.md for Tier C agent implementation
  • Add CLAUDE.md project context for agent awareness

Context

Part of Chitin assembly line v2 rollout — expanding agent coverage from 2 repos to 7.

🤖 Generated with Claude Code

Add GitHub Actions workflow for claude-code-action, copilot-instructions.md
for Tier C agent governance, and CLAUDE.md for project context. Part of
Chitin assembly line v2 rollout.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 6, 2026 01:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds agent/automation configuration docs and a GitHub Actions workflow to support Claude Code + Copilot usage in the github.com/chitinhq/llmint repository.

Changes:

  • Introduces CLAUDE.md with project/agent context and suggested build commands.
  • Adds .github/workflows/claude.yml to run anthropics/claude-code-action based on comments/events.
  • Adds .github/copilot-instructions.md describing Copilot’s intended operating mode and repo guidelines.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
CLAUDE.md New agent context file (currently contains repo-layout and command mismatches).
.github/workflows/claude.yml New workflow wiring for @claude integration (needs tighter security gating/permissions).
.github/copilot-instructions.md New Copilot operating instructions (currently mismatched to repo layout and CI test commands).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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 as a required step, but there is no scripts/ directory in this repo. Either add the script (and ensure it’s used by the tooling) or update this doc to reference an existing setup step so agents don’t fail on first run.

Suggested change
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 uses AI. Check for mistakes.
Comment on lines +19 to +23
- `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
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 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.

Suggested change
- `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 uses AI. Check for mistakes.
go build ./...
go test ./...
golangci-lint run
python -m pytest tests/
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 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.

Suggested change
python -m pytest tests/
cd python && pytest tests/

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +28
## 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)
```
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 “Repository Structure” tree doesn’t match this repo (there’s no cmd/ or internal/; instead there are provider/, middleware/, cabi/, and python/). Please align this section with the actual directories so Copilot/agents don’t optimize for a non-existent layout.

Copilot uses AI. Check for mistakes.
go test ./...
golangci-lint run

# Python
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 Python test instructions (python -m pytest tests/) are inaccurate for this repo. CI runs Python tests from the python/ subdir (and installs the package first), so the documented commands should mirror that to prevent routine agent runs from failing.

Suggested change
# Python
# Python
cd python
python -m pip install -e .

Copilot uses AI. Check for mistakes.
Comment on lines +96 to +98
- **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
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 “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.

Suggested change
- **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**

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +13
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
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.

This workflow can be triggered by any GitHub user commenting @claude, and it runs with secrets.ANTHROPIC_API_KEY. Please add a gate on the commenter’s trust level (e.g., github.event.comment.author_association in OWNER|MEMBER|COLLABORATOR) to prevent untrusted users from burning API quota / triggering paid runs.

Suggested change
(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)) ||

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +10
name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
pull_request:
types: [opened, synchronize]
jobs:
claude:
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.

Consider setting explicit permissions: for this workflow/job instead of relying on the repo default GITHUB_TOKEN permissions. Minimizing token scope (and only enabling the specific write permissions the action needs) reduces blast radius if the workflow is abused.

Copilot uses AI. Check for mistakes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jpleva91 jpleva91 merged commit f05d666 into main Apr 6, 2026
8 checks passed
@jpleva91 jpleva91 deleted the docs/agent-config branch April 6, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants