Skip to content

Commit fa95e3d

Browse files
committed
docs: 📝 Update Claude documentation
1 parent c50a635 commit fa95e3d

1 file changed

Lines changed: 41 additions & 55 deletions

File tree

.claude/docs/README.md

Lines changed: 41 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# `.claude/` tooling
22

3-
Team reference for the custom Claude Code tooling in this repo: the slash-command **skills**, the
4-
**agents** they dispatch, the **hooks** that fire automatically, the auto-loaded **rules**, and the
5-
shared coding **standards**.
3+
Team reference for the custom Claude Code tooling in this repo: the slash-command **skills**, the **agents** they dispatch, the **hooks** that fire automatically, the auto-loaded **rules**, and the shared coding **standards**.
64

75
> Claude tooling is shared via the repo.
8-
> On first use after pulling, Claude Code asks each teammate to approve the hooks (workspace trust).
9-
> The hook scripts need `jq`; without it, they degrade to no-ops rather than breaking.
6+
> On first use after pulling, Claude Code might ask you to approve the hooks (workspace trust). The hook scripts need `jq`; without it, they quietly do nothing instead of erroring.
107
118
---
129

@@ -20,8 +17,7 @@ shared coding **standards**.
2017

2118
**Reviewing a teammate's PR:** `/code-review <PR-number>`, then your manual review on top.
2219

23-
**Writing tests:** the unit-test-writer agent owns `tests/PHPUnit/`; the test rule routes work to it
24-
automatically.
20+
**Writing tests:** the unit-test-writer agent owns `tests/PHPUnit/`; the test rule routes work to it automatically.
2521

2622

2723
---
@@ -34,48 +30,47 @@ _Slash-commands that we manually invoke._
3430
3531
### `/understand`
3632

37-
Run **before** starting a complex task, to research an area and capture what you learn. Args:
38-
`[module-or-topic] [JIRA-ID]`, both optional.
33+
Run **before** starting a complex task, to research an area and capture what you learn. Args: `[module-or-topic] [JIRA-ID]`, both optional.
3934

40-
Recalls any existing notes, researches the code, cross-references your assumptions against it,
41-
offers
42-
an optional interview, then dispatches `note-taker` to file durable facts and task context as
43-
local notes.
35+
Recalls any existing notes, researches the code, cross-references your assumptions against it, offers an optional interview, then dispatches `note-taker` to file durable facts and task context as local notes.
4436

4537
Source: [skills/understand/SKILL.md](../skills/understand/SKILL.md)
4638

4739
### `/pr-readiness`
4840

4941
Run on **your own** branch before opening a PR. Args: `[JIRA-ID] [base-branch]`, both optional.
5042

51-
Dispatches the pr-readiness agent to check test coverage, docs, and code quality, then give a ready
52-
or not-ready verdict. Does not write the PR description.
43+
Dispatches the pr-readiness agent to check test coverage, docs, and code quality, then give a ready or not-ready verdict. Does not write the PR description.
5344

5445
Source: [skills/pr-readiness/SKILL.md](../skills/pr-readiness/SKILL.md)
5546

5647
### `/describe-pr`
5748

5849
Run after `/pr-readiness`. Args: `[PR-number] [JIRA-ID]`, both optional.
5950

60-
Drafts a reviewer-focused PR title and description, and updates the PR via `gh pr edit` only after
61-
you approve.
51+
Drafts a reviewer-focused PR title and description, and updates the PR via `gh pr edit` only after you approve.
6252

6353
Source: [skills/describe-pr/SKILL.md](../skills/describe-pr/SKILL.md)
6454

6555
### `/code-review`
6656

6757
Run on **someone else's** PR, before your manual review. Arg: `[PR-number]`.
6858

69-
Automated first pass against the shared quality standard, plus bug and test notes. Writes a report
70-
to `./temp/code-reviews`.
59+
Automated first pass against the shared quality standard, plus bug and test notes. Writes a report to `./temp/code-reviews`.
7160

7261
Source: [skills/code-review/SKILL.md](../skills/code-review/SKILL.md)
7362

63+
### `/php-review`
64+
65+
Run on a PHP file for an on-demand cleanliness review. Args: `[FULL|CHANGES] <file>` (scope defaults to `CHANGES`).
66+
67+
The manual counterpart to the automatic hook: it runs the same `php-review` agent for a more thorough pass. `CHANGES` reviews only what you changed; `FULL` reviews the whole file.
68+
69+
Source: [skills/php-review/SKILL.md](../skills/php-review/SKILL.md)
70+
7471
### Disabling skills you don't use
7572

76-
Every listed skill's name and description is fed into Claude's context each session, which costs a
77-
few tokens per skill. To trim skills you don't use, add a `skillOverrides` map to your personal
78-
`.claude/settings.local.json` (gitignored, so it stays yours and does not affect the team):
73+
Every listed skill's name and description is fed into Claude's context each session, which costs a few tokens per skill. To trim skills you don't use, add a `skillOverrides` map to your personal `.claude/settings.local.json` (gitignored, so it stays yours and does not affect the team):
7974

8075
```json
8176
{
@@ -99,65 +94,57 @@ Keys are skill names (e.g. `understand`, `describe-pr`), not paths. Omit a skill
9994

10095
## Agents
10196

102-
_Automatically invoked by skills or hooks; can also be manually dispatched ("Use agent X for
103-
TASK")._
97+
_Automatically invoked by skills or hooks; can also be manually dispatched ("Use agent X for TASK")._
10498

10599
> Claude Docs: https://code.claude.com/docs/en/sub-agents
106100
107101
### `php-review`
108102

109-
Haiku, read-only. Dispatched by the Stop hook or manually.
110-
111-
Reviews the PHP lines you changed this session for cleanliness (function focus, comment noise,
112-
coupling, over-engineering) and returns fixes. Never edits.
103+
Read-only. Reviews changed PHP for cleanliness (function focus, comment noise, coupling, over-engineering) and suggests fixes; never edits. It runs automatically after you edit PHP (via the Stop hook), and you can also run it on demand with `/php-review`.
113104

114105
Source: [agents/php-review.md](../agents/php-review.md)
115106

116107
### `pr-readiness`
117108

118-
Sonnet, read-only. Dispatched only by the `/pr-readiness` skill.
109+
Read-only. Dispatched only by the `/pr-readiness` skill.
119110

120-
Audits the branch diff. Shares its name with the skill on purpose: the skill gathers context, the
121-
agent reviews.
111+
Audits the branch diff. Shares its name with the skill on purpose: the skill gathers context, the agent reviews.
122112

123113
Source: [agents/pr-readiness.md](../agents/pr-readiness.md)
124114

125115
### `unit-test-writer`
126116

127-
Writes and updates PHPUnit tests in `tests/PHPUnit/`, following the project's conventions.
128-
Dispatched manually or via the test rule below.
117+
Writes and updates PHPUnit tests in `tests/PHPUnit/`, following the project's conventions. Dispatched manually or via the test rule below.
129118

130119
Source: [agents/unit-test-writer.md](../agents/unit-test-writer.md)
131120

132121
### `js-unit-test-writer`
133122

134-
Writes and updates Jest tests (the colocated `*.test.js` files next to module `resources/js`
135-
sources), following the existing JS suite's conventions. Dispatched manually.
123+
Writes and updates Jest tests (the colocated `*.test.js` files next to module `resources/js` sources), following the existing JS suite's conventions. Dispatched manually.
136124

137125
Source: [agents/js-unit-test-writer.md](../agents/js-unit-test-writer.md)
138126

127+
### `ci`
128+
129+
Background. Runs the project's tests and linters (PHP unit, JS unit, integration, PHPCS, PHPStan) and distills the output to a crisp pass/fail summary, keeping heavy tool output out of the main context. Use it for any test or lint run; the test-writer agents hand off verification to it.
130+
131+
Source: [agents/ci.md](../agents/ci.md)
132+
139133
### `copy-editor`
140134

141-
Haiku, read-only. Canonicalizes a user-facing string (sentence case, brand capitalization,
142-
concision) against the copy guidelines and returns a suggestion. The caller passes the draft plus
143-
its context; a human still has the final word. Dispatch when writing or changing UI copy.
135+
Read-only. Canonicalizes a user-facing string (sentence case, brand capitalization, concision) against the copy guidelines and returns a suggestion. The caller passes the draft plus its context; a human still has the final word. Dispatch when writing or changing UI copy.
144136

145137
Source: [agents/copy-editor.md](../agents/copy-editor.md)
146138

147139
### `note-reader`
148140

149-
Haiku, read-only. Recalls the developer's local research notes - crisp canonical knowledge per
150-
module/topic, plus throwaway per-task context. Returns the relevant notes or reports none exist.
151-
Dispatched by `/understand`, by other skills, or manually to recall a note.
141+
Read-only. Recalls your local research notes for a module or topic and returns what's relevant (or reports that none exist). Dispatched by `/understand`, by other skills, or manually.
152142

153143
Source: [agents/note-reader.md](../agents/note-reader.md)
154144

155145
### `note-taker`
156146

157-
Sonnet. Records an insight into the developer's local research notes and owns their conventions:
158-
files durable facts into a crisp per-module/topic domain note (deduped and pruned), and loose per-task
159-
context into a throwaway task note. Dispatched by `/understand`, by other skills, or manually to
160-
record a note.
147+
Records what you learn into your local research notes: durable facts about a module or topic, plus looser per-task context. Dispatched by `/understand`, by other skills, or manually.
161148

162149
Source: [agents/note-taker.md](../agents/note-taker.md)
163150

@@ -172,18 +159,20 @@ _Fire automatically when Claude performs certain actions._
172159
173160
### `php-review-track.sh`
174161

175-
PostToolUse (Edit / Write). Records which PHP files you touch this session, so only those become
176-
review candidates. Pre-existing files are left alone.
162+
PostToolUse (Edit / Write). Records which PHP files you touch this session, so only those become review candidates. Pre-existing files are left alone.
177163

178164
Source: [hooks/php-review-track.sh](../hooks/php-review-track.sh)
179165

180166
### `php-review-stop.sh`
181167

182-
Stop. When your turn settles, asks Claude to review each touched PHP file whose content changed
183-
since its last review. Each state is reviewed once, so the loop terminates.
168+
Stop. When your turn settles, asks Claude to review each touched PHP file whose content changed since its last review. Each state is reviewed once, so the loop terminates.
184169

185170
Source: [hooks/php-review-stop.sh](../hooks/php-review-stop.sh)
186171

172+
### Disabling the php-review hooks
173+
174+
Both hooks read `hooks/config.local.json` (gitignored). Copy `config.example.json` to `config.local.json` and set `"php-review": false` to turn them off locally. No config file, or a missing key, means enabled. The `/php-review` skill is unaffected: a manual invocation always runs.
175+
187176
---
188177

189178
## Rules
@@ -195,15 +184,13 @@ _Autoloaded by Claude, passive context._
195184
196185
### `unit-test-conventions.md`
197186

198-
Loads on first read of a `tests/PHPUnit/**/*.php` file. Routes all test writing through the
199-
unit-test-writer agent instead of inline test code.
187+
Loads on first read of a `tests/PHPUnit/**/*.php` file. Routes all test writing through the unit-test-writer agent instead of inline test code.
200188

201189
Source: [rules/unit-test-conventions.md](../rules/unit-test-conventions.md)
202190

203191
### `js-test-conventions.md`
204192

205-
Loads on first read of a `modules/**/*.test.js` file. Routes all JS test writing through the
206-
js-unit-test-writer agent instead of inline test code.
193+
Loads on first read of a `modules/**/*.test.js` file. Routes all JS test writing through the js-unit-test-writer agent instead of inline test code.
207194

208195
Source: [rules/js-test-conventions.md](../rules/js-test-conventions.md)
209196

@@ -215,7 +202,6 @@ _Our conventions, not a regular Claude Code folder._
215202

216203
### code-quality.md
217204

218-
The shared code-quality rules. Single source of truth for `/code-review` and `/pr-readiness`. The
219-
php-review agent keeps a tuned subset inline and does not read this file.
205+
The shared code-quality rules. Single source of truth for `/code-review` and `/pr-readiness`. The php-review agent keeps a tuned subset inline and does not read this file.
220206

221207
Source: [code-quality.md](./code-quality.md)

0 commit comments

Comments
 (0)