aboutsummaryrefslogtreecommitdiff
path: root/.ai/sessions/2026-05-20-11-58-review-code-command-to-skill-conversion.org
blob: eb623fe9c69b71d40a096c9e38cdd6e3d917fdcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#+TITLE: Session — review-code command→skill conversion
#+DATE: 2026-05-20

* Summary

** Active Goal

Launch several project sessions via the "launch project X" trigger, then convert =/review-code= from a Claude Code command to a model-invocable skill so the model can reach for it on its own instead of delegating back to Craig.

** Decisions

- *Convert =review-code= command → skill.* Craig changed his mind on the original command classification: agents kept wanting to invoke review-code mid-flow but the command form (=disable-model-invocation: true=) forced a hand-back to him. A skill is both model-invocable and slash-invocable, so it removes the friction without losing =/review-code= as a manual entry point.
- *=git mv= over delete+recreate.* Preserves file history — the diff shows a 99% rename rather than a 400-line delete + add, keeping =git blame= / =log --follow= intact on the skill body.
- *Skill frontmatter: =name:= + =description:= only, no =allowed-tools:=.* Matches house style (add-tests, debug, etc. inherit the full toolset). review-code needs Bash/git/gh/Agent, so restricting tools would break it. Only =voice= declares =allowed-tools= because it's edit-only.
- *Remove the =commits.md= discovery-check paragraph.* It existed solely because review-code was a command absent from the available-skills enumeration. As a skill it appears in the list, so the on-disk fallback check is moot.
- *No Makefile change needed.* Both skills (=$(wildcard */SKILL.md)=) and the commands dir (whole-dir symlink) are wildcard-driven, so the move is auto-discovered on =make install=.
- *Sibling command references left as-is.* finish-branch, start-work, respond-to-review, respond-to-cj-comments reference =/review-code= as a slash-command — still valid since a skill named review-code is slash-invocable.
- *protocols.org mirror sync committed separately.* The startup rsync propagated the Working-Files Convention section into the in-repo =.ai/protocols.org= mirror from canonical — unrelated to the review-code move, so it got its own =chore(ai)= commit.

** Data Collected / Findings

- =~/.claude/commands= is a whole-directory symlink into =rulesets/.claude/commands=, so removing =review-code.md= there removes it from the global command set automatically.
- Project locations differ from assumption: =work= and =homelab= live under =~/projects/=, not =~/code/=. The =ai= launcher errored on =~/code/work= until the path was corrected.
- =homelab= repo flagged =↓1 dirty= by the launcher — 1 behind upstream with a dirty tree; surfaced for Craig to reconcile in that project's own session.
- =make doctor= went 39 → 40 ok after the skill linked. =make lint= clean.
- review-code appeared in this session's available-skills list immediately after =make install= — the conversion was verified live.
- Lapse: no Session Log was maintained during the session despite multiple state-modifying turns; this record was reconstructed at wrap-up.

** Files Modified

Two commits pushed to =origin/main= (=5737cc0..3c8bfeb=):

- =b9da9b5 refactor(skills): convert review-code from command to skill= — =git mv .claude/commands/review-code.md → review-code/SKILL.md=, frontmatter swap (add =name:=, drop =disable-model-invocation:=, heading =# /review-code= → =# Review Code=), and removal of the discovery-check paragraph in =claude-rules/commits.md=.
- =3c8bfeb chore(ai): sync working-files section into protocols.org mirror= — +12 lines into =.ai/protocols.org= from the startup rsync (Working-Files Convention section, canonical-sourced).

System-side: =~/.claude/skills/review-code= symlink created by =make install=.

** Next Steps

Carryover =[#A]= work, unchanged from prior sessions:
- Implement the task-review daily-habit per spec (=docs/design/task-review.org=) — the thing that retires the recurring date-coverage lint-followups churn.
- =DOING= memory-sync (pending VERIFY on stow approach).
- Build =create-documentation= skill.
- Build =/update-skills= skill.
- 2026-05-04 audit review pass.

Inbox: =inbox/lint-followups.org= still holds one =misplaced-heading= lint warning (todo.org line 2143, likely a verbatim-marker false positive like the prior line-2139 case) plus the 8 deferred date-coverage candidates.

* Session Log

** Startup

Ran the startup workflow: Phase A.0 pulls clean (rulesets + project both current), Phase A fan-out, Phase B session-summary reads. No session-context.org at start (clean prior wrap). Inbox had one file (lint-followups.org). No cross-agent messages, reminders, or pending decisions.

** Project launches

Craig used the "launch project X" trigger repeatedly. Launched archsetup (~/code/archsetup), work (~/projects/work — corrected after ~/code/work errored), archangel (~/code/archangel), and homelab (~/projects/homelab, flagged ↓1 dirty). Each opened as a new window in the tmux =ai= session via the =ai= launcher. Flagged the homelab dirty/behind state and the archsetup duplicate-window question.

** review-code command→skill conversion

Craig asked whether =/review-code= was a command or a skill (it was a command), then decided to convert it to a skill because the command form forced delegate-back behavior. Explored the command file, Makefile install logic, and existing SKILL.md frontmatter conventions. Confirmed both skills and commands are wildcard-driven (no Makefile change). =git mv= to =review-code/SKILL.md=, edited frontmatter (added name, dropped disable-model-invocation, heading), removed the obsolete discovery-check paragraph in commits.md. =make install= + =make lint= + =make doctor= all green; skill went live in-session. Ran the publish flow: =/review-code --staged= (Approve, zero blocking findings), =/voice= general mode (pattern #13 em-dash fix), committed as b9da9b5.

** protocols.org mirror sync + push

Identified the =M .ai/protocols.org= working-tree change as a separate startup-rsync artifact (Working-Files Convention section synced from canonical). Confirmed the mirror now matches canonical, committed separately as 3c8bfeb. Pre-push reconcile showed 0 behind / 2 ahead; pushed origin main (5737cc0..3c8bfeb).