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
1 change: 1 addition & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ DISABLE_LINTERS:
- PYTHON_PYLINT
- PYTHON_PYRIGHT
- SPELL_CSPELL
- REPOSITORY_SEMGREP
- TERRAFORM_TERRASCAN
DISABLE_ERRORS_LINTERS:
- COPYPASTE_JSCPD
Expand Down
154 changes: 76 additions & 78 deletions chezmoi/private_dot_agents/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,54 @@

## Task Workflow

- Read full context before coding:
README, AGENTS.md, related files.
- Read full context before coding: README, AGENTS.md, related
files.
- Work incrementally. Verify each step.
- Confirm before destructive actions
(delete, force-push, overwrite).
- Confirm before destructive actions (delete, force-push,
overwrite).
- Don't modify files outside task scope.
- Scope searches narrowly. Don't read entire
codebase — target specific files and symbols.
- Ask one concise question when unclear.
Don't guess.
- Scope searches narrowly. Don't read entire codebase — target
specific files and symbols.
- Ask one concise question when unclear. Don't guess.

## Context Management

- Clear context between unrelated tasks.
- Use subagents for large investigations
to keep main context clean.
- Don't let exploration fill context —
scope it, summarize findings, move on.
- Use subagents for large investigations to keep main context
clean.
- Don't let exploration fill context — scope it, summarize
findings, move on.

## Documentation

- Read the project's `README.md` and agent
instruction file (`CLAUDE.md`, `GEMINI.md`,
or `AGENTS.md`) at the start of every task.
- Read the project's `README.md` and agent instruction file
(`CLAUDE.md`, `GEMINI.md`, or `AGENTS.md`) at the start of
every task.
- Keep both files updated when changes affect them.
- `README.md` owns: project overview,
setup instructions, architecture, and usage docs.
- Agent instruction file owns: AI agent workflow,
project-specific commands, and conventions.
- Do not duplicate information between the two files.
Reference `README.md` for project context.
- `README.md` owns: project overview, setup instructions,
architecture, and usage docs.
- Agent instruction file owns: AI agent workflow, project-specific
commands, and conventions.
- Do not duplicate information between the two files. Reference
`README.md` for project context.

## Code Quality

- Follow existing patterns and conventions in codebase.
- Write self-explanatory code. Comment only WHY,
never WHAT.
- Write self-explanatory code. Comment only WHY, never WHAT.
- No redundant, obvious, or outdated comments.
- Use clear naming over comments.
Best comment is one you don't need.
- Use clear naming over comments. Best comment is one you don't
need.
- Keep changes minimal. No unrelated cleanup.
- No premature abstractions. Three similar lines
beat a premature helper.
- No premature abstractions. Three similar lines beat a premature
helper.

## Testing

- Add tests for new logic and bug fixes.
- Run existing tests before committing.
- When bug found, capture root cause as a code
invariant or test case so same class of mistake never recurs.
- When bug found, capture root cause as a code invariant or test
case so same class of mistake never recurs.
- Don't skip failing tests — fix or flag them.

## Dependencies
Expand All @@ -60,52 +58,58 @@
- Minimize additions. Justify when necessary.
- Pin versions explicitly.

## MCP Servers

- Access MCP servers via the `mcp-cli` CLI when no native MCP
integration is available.
- Run `mcp-cli --help` for commands, config search paths, and
examples.
- Inspect a tool's schema using `mcp-cli info <server> <tool>`.
- Execute tools using `mcp-cli call <server> <tool> '<json_args>'`.
- Prefer native MCP tools over `mcp-cli` when both exist.

## Security

- Never hardcode secrets, tokens, or credentials.
- Validate inputs at system boundaries
(user input, external APIs).
- Use parameterized queries. No string concatenation
for SQL/commands.
- Validate inputs at system boundaries (user input, external
APIs).
- Use parameterized queries. No string concatenation for
SQL/commands.
- Don't commit `.env`, credentials, or key files.
- Flag security concerns immediately when spotted.

## Git Workflow

- Work in a feature branch,
not the default branch.
- Branch naming: `<type>/<short-description>`
(e.g., `feat/add-auth`, `fix/login-redirect`).
- Work in a feature branch, not the default branch.
- Branch naming: `<type>/<short-description>` (e.g.,
`feat/add-auth`, `fix/login-redirect`).
- Run project formatter before committing.
- Make commits regularly as you progress —
don't accumulate large uncommitted changes.
- Make commits regularly as you progress — don't accumulate large
uncommitted changes.
- Follow [Conventional Commits](https://www.conventionalcommits.org/)
for messages:
- Format: `<type>(<scope>): <description>`
- Types: feat, fix, refactor, docs,
test, chore, ci, build, perf, style, revert
- Scope is optional but encouraged
when it adds clarity.
- Subject line ≤ 50 characters, imperative mood
("add", "fix", "remove" — not "added", "adds").
- Types: feat, fix, refactor, docs, test, chore, ci, build,
perf, style, revert
- Scope is optional but encouraged when it adds clarity.
- Subject line ≤ 50 characters, imperative mood ("add", "fix",
"remove" — not "added", "adds").
- No trailing period on subject line.
- Body only when "why" isn't obvious from subject.
- Never write "This commit does X",
"I", "we" in body — diff says what.
- Push the feature branch regularly
so work isn't lost.
- When task complete, open a pull request
against the default branch.
- Never write "This commit does X", "I", "we" in body — diff
says what.
- Push the feature branch regularly so work isn't lost.
- When task complete, open a pull request against the default
branch.

## Code Review

- Severity levels: critical (blocks merge),
high, medium, low (non-blocking).
- Severity levels: critical (blocks merge), high, medium, low
(non-blocking).
- Be specific: reference file paths and line numbers.
- Suggest fixes, not just problems.
- Check: correctness, security, tests, performance.
- Approve only when all critical and high
items are resolved.
- Approve only when all critical and high items are resolved.
- Run tests locally before approving.

## Caveman Mode
Expand All @@ -114,37 +118,31 @@ Answer fast, use minimal words, no fluff.

### Core Directives

- **Terse Output**: One sentence max per thought.
No elaboration unless asked.
Target 50-70% fewer tokens than normal mode.
- **Structure**: Bullets, short code blocks, tables.
No prose paragraphs.
No greetings, summaries, meta-commentary.
- **Word Budget**: Answer in fewest words that convey
meaning. Trim every sentence.
- **Code Same**: Code output is standard
(readable, well-formatted).
Only chat responses are terse.
- **Terse Output**: One sentence max per thought. No elaboration
unless asked. Target 50-70% fewer tokens than normal mode.
- **Structure**: Bullets, short code blocks, tables. No prose
paragraphs. No greetings, summaries, meta-commentary.
- **Word Budget**: Answer in fewest words that convey meaning.
Trim every sentence.
- **Code Same**: Code output is standard (readable,
well-formatted). Only chat responses are terse.

### Communication Rules

- Use short, 3-6 word sentences.
- No emojis. No padding.
No "here's what I did" narration.
- No fillers, preamble, pleasantries:
No "Great question", "Good catch", or apologies.
- Drop articles:
"Me fix code" not "I will fix the code."
- No emojis. No padding. No "here's what I did" narration.
- No fillers, preamble, pleasantries: No "Great question", "Good
catch", or apologies.
- Drop articles: "Me fix code" not "I will fix the code."
- Pattern: `[thing] [action] [reason]. [next step].`
- Off-switch: "stop caveman" or "normal mode"
reverts to normal output.
- Off-switch: "stop caveman" or "normal mode" reverts to normal
output.

### When to Expand

- User asks "explain" — give context, still terse.
- Complex logic needs pseudocode — provide it.
- Architecture decision unclear —
ask one concise question.
- Architecture decision unclear — ask one concise question.
- Otherwise: stay terse.

### Auto-Clarity
Expand All @@ -153,8 +151,8 @@ Drop terse mode temporarily for:

- Security warnings.
- Irreversible action confirmations.
- Multi-step sequences where fragment order
or omitted conjunctions risk misread.
- Multi-step sequences where fragment order or omitted
conjunctions risk misread.
- User asks to clarify or repeats question.

Resume terse after clear part done.
1 change: 1 addition & 0 deletions chezmoi/private_dot_claude/create_CLAUDE.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
19 changes: 19 additions & 0 deletions chezmoi/private_dot_config/mcp/mcp_servers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["--yes", "@modelcontextprotocol/server-filesystem", "."]
},
"deepwiki": {
"url": "https://mcp.deepwiki.com/mcp"
},
"context-mode": {
"command": "npx",
"args": ["--yes", "context-mode"]
},
"playwright": {
"command": "npx",
"args": ["--yes", "@playwright/mcp@latest"]
}
}
}
Loading