Skip to content

Commit 8437f21

Browse files
committed
docs: expand Claude maintainer guidance
1 parent 73b7c34 commit 8437f21

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ The following guidelines want to help and simplify the process of contributing t
2424

2525
If you use Claude Code for maintenance work in this repo, read `docs/coding/claude-code-agent.md` first. It documents the repo-local `.claude/` skills, hook behavior, and required smoke tests.
2626

27+
- The repo-local `.claude/` workflow is authoritative for Claude Code tasks in this repository.
28+
- Run `./test/claude-agent-tests.sh` when you edit `.claude/`, `docs/coding/claude-code-agent.md`, `scripts/install_claude_db_skills.sh`, or `tools/claude-skills/db-core-expertise/`.
29+
- If you update `tools/claude-skills/db-core-expertise/`, rerun `./scripts/install_claude_db_skills.sh` and `~/.claude/skills/db-core-expertise/scripts/smoke-test.sh` so the installed reusable skill stays in sync.
30+
2731
## Principles
2832

2933
1. Contributions should follow the classic GitHub workflow, i.e. forking, cloning, then submitting a Pull Request (PR)

docs/coding/claude-code-agent.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ Run the project-local Claude asset smoke tests with:
2323

2424
These tests validate the repo-local Claude files, hook behavior, and completion policy.
2525

26+
## Troubleshooting
27+
28+
- If Claude blocks before a shell command runs, the pre-tool hook likely denied a destructive git command. Use a non-destructive alternative instead of trying to bypass the hook.
29+
- If Claude blocks at completion time, read the reported missing verification or docs requirement, run the exact command it names, and include the required `Changed`, `Verification`, `Edge Cases`, and `Docs Updated` sections in the final response.
30+
- Verification history is stored in `.claude/state/verification-log.jsonl`. If the log becomes stale during local experimentation, delete `.claude/state/` and rerun the relevant verification commands.
31+
- If you change `tools/claude-skills/db-core-expertise/` or `scripts/install_claude_db_skills.sh`, rerun the installer and the installed smoke test so the user-level copy stays aligned with the repo.
32+
2633
## Expected maintainer flow
2734

2835
1. Start non-trivial tasks with `/dbdeployer-maintainer`.
@@ -41,6 +48,21 @@ Install the reusable MySQL/PostgreSQL/ProxySQL reference skill with:
4148

4249
The installed user-level skill is named `/db-core-expertise`. Use it when the task depends on DB semantics, packaging assumptions, replication edge cases, or live upstream verification.
4350

51+
## Repo-local vs reusable
52+
53+
- Update `.claude/`, `.claude/rules/`, `.claude/hooks/`, or this guide when the change is specific to `dbdeployer` workflow, completion policy, verification gates, or maintainer behavior inside this repo.
54+
- Update `tools/claude-skills/db-core-expertise/` when the change is generic DB knowledge that should remain reusable across repositories, such as MySQL/PostgreSQL/ProxySQL semantics, verification heuristics, or documentation style.
55+
- Keep repo-specific policy out of the reusable skill. If you change the reusable layer, rerun the installer with `./scripts/install_claude_db_skills.sh` and then run `~/.claude/skills/db-core-expertise/scripts/smoke-test.sh` so the installed copy matches the repo.
56+
57+
## Task recipes
58+
59+
- Provider or CLI behavior change:
60+
Start with `/dbdeployer-maintainer`, use `/db-correctness-review` before finishing, run `go test ./...` or `./test/go-unit-tests.sh`, and update the relevant docs if user-visible behavior changed.
61+
- Docs-only or reference-only change:
62+
Update the smallest truthful docs surface, use `/docs-reference-sync`, and avoid claiming behavior changes unless you also verified the underlying code path.
63+
- Claude workflow or reusable skill change:
64+
Run `./test/claude-agent-tests.sh`. If the change touched `tools/claude-skills/db-core-expertise/` or the installer, rerun the installer and the installed smoke test before finishing.
65+
4466
## Completion requirements
4567

4668
Final responses should include:

test/claude-agent-tests.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,17 @@ require_string .claude/skills/docs-reference-sync/SKILL.md README.md
158158
require_string .claude/skills/docs-reference-sync/SKILL.md CONTRIBUTING.md
159159
require_string docs/coding/claude-code-agent.md ./test/claude-agent-tests.sh
160160
require_string docs/coding/claude-code-agent.md ./scripts/install_claude_db_skills.sh
161+
require_string docs/coding/claude-code-agent.md 'Troubleshooting'
162+
require_string docs/coding/claude-code-agent.md 'verification-log.jsonl'
163+
require_string docs/coding/claude-code-agent.md 'Task recipes'
164+
require_string docs/coding/claude-code-agent.md 'Provider or CLI behavior change'
165+
require_string docs/coding/claude-code-agent.md 'Docs-only or reference-only change'
166+
require_string docs/coding/claude-code-agent.md 'Repo-local vs reusable'
167+
require_string docs/coding/claude-code-agent.md 'tools/claude-skills/db-core-expertise/'
168+
require_string docs/coding/claude-code-agent.md 'rerun the installer'
161169
require_string CONTRIBUTING.md docs/coding/claude-code-agent.md
170+
require_string CONTRIBUTING.md 'repo-local `.claude/` workflow'
171+
require_string CONTRIBUTING.md 'If you update `tools/claude-skills/db-core-expertise/`'
162172
require_string tools/claude-skills/db-core-expertise/SKILL.md db-core-expertise
163173
require_string tools/claude-skills/db-core-expertise/verification-playbook.md '`go test ./...` or `./test/go-unit-tests.sh`'
164174
require_string tools/claude-skills/db-core-expertise/verification-playbook.md 'sandbox-test'

0 commit comments

Comments
 (0)