Skip to content

Commit e01aacd

Browse files
Merge branch 'stage' into ADFA-4690-Clean-up-capitalization-in-Open-External-Link-dialog-box
2 parents 88f0f69 + f13ddd6 commit e01aacd

731 files changed

Lines changed: 81387 additions & 34125 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/.gitignore‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Local, machine-specific settings (not shared)
2+
settings.local.json
3+
4+
# Claude Code worktrees
5+
worktrees/
6+
# Local plan/scratch artifacts, if any
7+
/plans/
8+
9+
# Session/runtime artifacts
10+
projects/
11+
todos/
12+
shell-snapshots/
13+
statsig/
14+
.credentials.json
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
name: architecture-review
3+
description: Review a code change against Code On The Go's architecture — ARCHITECTURE.md and the ADRs in docs/adr/. Forces a read of those authoritative docs (they are NOT reliably in context otherwise), then checks the diff against UDF/state, Koin DI, Room-vs-SQLite, Compose, module boundaries, ABI flavors, dependency substitution, @Parcelize, and strings placement, reporting violations with the ADR/section each comes from. Use when asked to review architecture alignment, check a change against ARCHITECTURE.md/the ADRs, or as the §10 step of a code review.
4+
metadata:
5+
author: Hal Eisen
6+
keywords:
7+
- architecture
8+
- review
9+
- adr
10+
- udf
11+
- code-review
12+
- codeonthego
13+
---
14+
15+
## Why this is a skill (not just REVIEW.md §10)
16+
17+
ARCHITECTURE.md (~4.9k tokens) and the ADRs (~7.3k) are **not** in context during normal work, and prose links in REVIEW.md are not reliably followed. This skill exists to **guarantee the read**: it opens the authoritative docs, then checks the diff against them. Do not review architecture from memory or from the summary in this file alone.
18+
19+
## When to invoke
20+
21+
- "Review this against the architecture / ARCHITECTURE.md / the ADRs."
22+
- "Does this change follow our patterns?" / architecture-alignment review.
23+
- As the §10 step of a full code review — its output feeds REVIEW.md's evidence ledger.
24+
25+
## Step 1 — Scope the diff
26+
27+
Pick the target and get the changed files + hunks:
28+
- Working tree: `git diff --stat` and `git diff`.
29+
- This branch vs the integration branch: `git diff origin/stage...HEAD` (feature branches are based on `stage`).
30+
- A GitHub PR: `gh pr diff <N>`.
31+
32+
**Exclude vendored/generated code** — it's not held to our patterns: `composite-builds/build-deps*`, `subprojects/{aaptcompiler,builder-model-impl,flashbar,xml-dom}`, `termux/`, `eventbus/`, `LayoutEditor/`, `**/build/`, generated `R`/`BuildConfig`. Review only first-party Kotlin/Java/XML/Gradle changes.
33+
34+
## Step 2 — READ the authoritative docs (mandatory)
35+
36+
Before judging anything, read:
37+
- `ARCHITECTURE.md` (whole file — module map, dependency rules, tech stack, **State Management**, testing).
38+
- **Every** file in `docs/adr/*.md`. At minimum open the ones a diff can plausibly violate: 0001 (Room), 0003 (substitution), 0005 (flavors), 0006 (Koin), 0009 (Compose). Read the rest if the change is broad.
39+
40+
Do not skip this because the rules "look familiar" — they are the source of truth and they change.
41+
42+
## Step 3 — Check the diff against the rules
43+
44+
For each changed first-party file, check the applicable rules. Each rule cites its source so findings are traceable.
45+
46+
| # | Rule | Source |
47+
|---|---|---|
48+
| 1 | **UDF:** new screens use `ViewModel` + `StateFlow<UiState>`, sealed `UiEvent`/`UiEffect`, a repository for data; composables collect via `collectAsStateWithLifecycle()` (lifecycle-aware, Android's strongly-recommended default; `collectAsState()` is only for platform-agnostic/KMP code, which we don't have); no I/O or business logic in composables/Activities/Fragments. | ARCHITECTURE.md → State Management |
49+
| 2 | **Sealed state for mutually-exclusive states** (loading/content/error/…): not a `data class` of independent `Boolean`s that can contradict each other ("boolean hell"). | ARCHITECTURE.md → State Management |
50+
| 3 | **Koin DI**, constructor injection; register new singletons/ViewModels in the module. No hand-rolled singletons/service locators (the documented `ServiceLocator` aside). | ADR 0006 |
51+
| 4 | **Persistence:** Room is the default for relational data; raw SQLite only for a justified exception (prebuilt read-only DB, perf/allocation-critical indexing, cross-boundary schema) — and the PR must say which. Non-relational → filesystem/preferences (DataStore). | ADR 0001 |
52+
| 5 | **`@Parcelize`** (`kotlin-parcelize`) for `Parcelable`; never hand-implement it unless Parcelize genuinely can't. | ARCHITECTURE.md → Parceling |
53+
| 6 | **New UI is Jetpack Compose** — a new XML-layout / `Fragment`-rendered screen for the IDE's own UI is a violation (existing XML screens are fine until reworked). | ADR 0009 |
54+
| 7 | **Module boundaries / dependency direction:** UI → ViewModel → Repository → data source; features depend on `common`/`utils`, not the reverse; no new cross-feature or upward dependency. | ARCHITECTURE.md → module map |
55+
| 8 | **ABI flavors:** new Android modules get `v7`/`v8` via `composite-builds/build-logic` centrally — no per-module flavor blocks, no flavorless `assembleDebug`. (`:plugin-api` is intentionally flavorless.) | ADR 0005 |
56+
| 9 | **Dependency substitution:** don't add a Maven coordinate for something already vendored/substituted (`build-deps*`); don't add a new dependency without checking `gradle/libs.versions.toml` first. | ADR 0003 |
57+
| 10 | **Strings** live in the `:resources` module's `strings.xml` (not per-module, not inline literals). | REVIEW.md §7 |
58+
| 11 | **UI never drawn over the two system bars** (top status bar, bottom navigation bar). | CLAUDE.md |
59+
| 12 | **Text scales:** new/changed screens verified at font scale 1.0 and 2.0 — `sp` for text and `dp` for spacing (no `sp` dimen used as margin/padding), no text boxed in a fixed `dp` size, a scroll container on content that can grow, and `maxLines`/`singleLine`/`ellipsize` only on genuinely disposable text. | CLAUDE.md, REVIEW.md §8 |
60+
61+
Rules 1, 2, 6, 10, 11, 12 apply to UI changes; 4, 5 to data/model changes; 8, 9 to Gradle changes; 3 wherever a dependency, singleton, or ViewModel is introduced; 7 wherever a module's dependencies or cross-module imports change. Any rule not listed here is still checked whenever the diff touches its subject. Judge by what the diff touches — don't flag rules a file doesn't engage.
62+
63+
For a **large diff (~15+ first-party files)**, fan out: spawn a subagent per dimension (UI/state, DI, persistence, Gradle/modules), each instructed to read the relevant ADR and report only its dimension's findings; then merge. For a small diff, do it inline.
64+
65+
## Step 4 — Report
66+
67+
Output a findings table, most-severe first. Every finding must cite the rule source and give a concrete fix. If a rule was checked and passes, say so (the evidence ledger wants pass/fail, not silence).
68+
69+
```
70+
### Architecture review — <scope>
71+
Docs read: ARCHITECTURE.md, docs/adr/0001,0003,0005,0006,0009 (+others as needed)
72+
73+
| Verdict | File:line | Rule | Source | Fix |
74+
|---|---|---|---|---|
75+
| ❌ | ui/FooScreen.kt:42 | Mutually-exclusive state as booleans | ADR 0001 sibling / State Mgmt | Model as a sealed FooUiState (Loading/Content/Error) |
76+
| ⚠️ | data/BarStore.kt:10 | Raw SQLite without stated justification | ADR 0001 | Use Room, or state which exception applies in the PR |
77+
| ✅ | — | Koin DI | ADR 0006 | new VM registered in module, constructor-injected |
78+
79+
Summary: <n> violations, <n> warnings, <n> checks passed.
80+
```
81+
82+
- **❌ violation** = contradicts a rule; blocking. **⚠️ warning** = likely issue / missing justification. **✅** = checked and clean.
83+
- If nothing architectural changed (e.g. a docs- or test-only diff), say so explicitly rather than inventing findings.
84+
85+
## Notes
86+
87+
- This is a *conformance* check against our documented patterns — not a general bug hunt (use `/code-review` for correctness). Keep findings tied to a specific ADR/section.
88+
- If a rule seems wrong or outdated for the change at hand, flag it as a possible ADR update rather than forcing the code to fit — the ADRs are `Proposed`, not immutable.

‎.claude/skills/retro/SKILL.md‎

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
---
2+
name: retro
3+
user-invocable: true
4+
description: Run a retrospective with transcript analysis and log feedback. Use when the user explicitly invokes /retro, when a full plan implementation is complete, or after creating a PR or addressing code review feedback (if a retro hasn't happened yet this session).
5+
---
6+
# Retrospective
7+
8+
Run this skill when:
9+
- The user explicitly invokes `/retro`
10+
- A full plan implementation is complete (all work packages done and verified)
11+
- After creating a PR (offer a quick retro, if a retro hasn't happened yet this session)
12+
- After receiving and addressing code review feedback (offer, if a retro hasn't happened yet this session)
13+
14+
For the last two triggers, use a lightweight prompt: "Good moment for a quick retro. Want me to run `/retro`?" Do NOT auto-run — just offer. If the user declines, move on.
15+
16+
## Session Mode
17+
18+
Determine whether this is a **human-led** or **autonomous** session:
19+
- **Human-led**: A human is actively participating in the conversation (they've been sending messages, answering questions, etc.)
20+
- **Autonomous**: The agent is running independently (ticket agent, background task, no human interaction in the session)
21+
22+
This affects Steps 3 and 5 below. All other steps run the same regardless of mode.
23+
24+
## Steps
25+
26+
1. **Session time analysis**: Run the transcript analysis script to extract timing data. Do NOT write custom parsing code or use a subagent for JSONL extraction. Note the current time before starting — you'll record how long this analysis took in the retro log.
27+
28+
**How to run the analysis:**
29+
- Find the transcript: glob `~/.claude/projects/<converted-cwd>/*.jsonl` sorted by modification time (convert cwd slashes to dashes, e.g., `/Users/me/myproject` → `-Users-me-myproject`). Pick the most recent.
30+
- Run the script: `python3 scripts/analyze_transcript.py <path-to-jsonl>` — the script lives in `scripts/` alongside this SKILL.md.
31+
- The script outputs: per-turn breakdown (full user text, assistant word count, tools, errors) and timing stats (reading at 150 wpm, typing at 60 wpm, 1 min buffer per turn, overlapping turns merged).
32+
- System-injected messages (skill injections, /mcp outputs, system reminders) are automatically filtered out.
33+
34+
**What you do with the output:**
35+
- Read the turn-by-turn output to understand what happened
36+
- Group turns into high-level phases (plan, build, review, etc.) based on what was being worked on
37+
- Use the adjusted hands-on time as the hands-on metric
38+
- Identify pain points from the turn data: errors, user corrections, repeated tool calls
39+
40+
Present as a time breakdown table with proportional bars and a metrics summary:
41+
42+
| Started | Phase | 👤 Hands-On Time | 🤖 Agent Time | Problems |
43+
|---------|-------|-----------------|---------------|----------|
44+
| Feb 10 10:00am | Build (engine restart, voice recog, UI tweaks) | ██████ 60m | ███ 30m | ⚠ 5 fix cycles |
45+
| Feb 10 11:30am | Research (BT routing for AirPods + external mics) | | █████ 45m | |
46+
| Feb 10 1:00pm | Review (code review, docs, feedback log) | | ██ 15m | |
47+
48+
**Format rules:**
49+
- **Started**: Date and wall-clock time when the phase began (from transcript timestamps)
50+
- **Bars**: Use █ blocks proportional to time (each █ ≈ 10min), followed by the minute label (e.g., `███ 30m`)
51+
- **Empty cells**: Leave the column blank if that role wasn't involved in the phase
52+
- **Problems**: Inline with ⚠ marker — only for phases that had real friction or rework
53+
- **Sort**: Chronological (by start time)
54+
- **Brevity**: Keep the table to 10 rows max. A 4-row table is better than a 12-row table.
55+
56+
| Metric | Duration |
57+
|--------|----------|
58+
| Total wall-clock | X hours |
59+
| Hands-on | X hours (Y%) |
60+
| Automated agent time | X hours (Y%) |
61+
| Idle/away | X hours (Y%) |
62+
63+
2. **Key observations from transcript**: Before asking the user for feedback, identify patterns yourself:
64+
- Where did Claude work most independently? Why?
65+
- Where were the most user interactions needed? What caused them?
66+
- Were there avoidable back-and-forth cycles (bugs that better testing would have caught, unclear requirements that better planning would have resolved)?
67+
- What was the ratio of productive work to debugging/rework?
68+
69+
In human-led mode, present these observations to the user as conversation starters. In autonomous mode, use them as input to Step 4. For each observation, also suggest what kind of action might address it (see Step 4 for action types).
70+
71+
3. **Gather feedback** (mode-dependent):
72+
73+
**Human-led mode:** Ask the user in a single prompt:
74+
- What worked well in how we approached this?
75+
- What was frustrating or slower than expected?
76+
- Anything I should do differently?
77+
78+
Wait for their response — don't assume or fill in answers.
79+
80+
**Autonomous mode:** Skip this step. Use only the transcript observations from Step 2 as input to Step 5.
81+
82+
4. **Propose concrete actions**: For each issue identified (from your observations in Step 2 AND the user's feedback from Step 3 if human-led), investigate the right action and propose a specific deliverable.
83+
84+
**4a. Launch CLAUDE.md review in parallel.** While investigating actions below, launch a Task agent (`general-purpose` type) to audit CLAUDE.md. In the prompt, include your key observations from Step 2 and the user's feedback from Step 3 (if human-led). The agent should:
85+
- Glob for all `**/CLAUDE.md` files in the project
86+
- Read each one and evaluate whether any sections need additions or updates based on the session observations and feedback you provided
87+
- Return specific proposed edits (section + exact change), not vague suggestions
88+
- If nothing needs changing, say so
89+
90+
Call this Task in the same message as your first tool calls for 4b — they'll run in parallel naturally. Do NOT use `run_in_background`.
91+
92+
**4b. Investigate actions for each issue.** Each action must be one of these types:
93+
94+
| Action Type | When to use | What to do |
95+
|-------------|-------------|------------|
96+
| **Update a skill** | A skill's behavior caused the issue, or a skill should enforce a new practice | Read the skill's SKILL.md, propose the specific edit |
97+
| **Update CLAUDE.md** | A new rule or convention should be followed in all future sessions | Propose the specific addition to the relevant section |
98+
| **Update docs** | Architecture, decisions, or learnings are wrong/missing | Propose the specific edit to the doc |
99+
| **Create a ticket** | The fix requires implementation work beyond a doc/config change | Draft the ticket title + description |
100+
| **No action needed** | The issue was a one-off or already resolved | Explain why no systemic fix is needed |
101+
102+
For each proposed action:
103+
1. Read the file you'd change (skill, CLAUDE.md, doc)
104+
2. Identify the specific section to edit
105+
3. Draft the exact change (not a vague suggestion)
106+
107+
**4c. Merge CLAUDE.md review results.** When the subagent returns, incorporate its recommendations into your action proposals. Deduplicate with actions you've already proposed — if the subagent suggests something you've already covered, note it as reinforcement rather than listing it twice.
108+
109+
**Example — good:**
110+
> Issue: Agent didn't check learnings.md before writing HTTP client code.
111+
> Action type: Update CLAUDE.md
112+
> File: CLAUDE.md → "Before Making Changes" section
113+
> Change: Add "Check `docs/process/learnings.md` when writing code that touches external services"
114+
115+
**Example — bad:**
116+
> Issue: Agent didn't check learnings.md before writing HTTP client code.
117+
> Action: "We should remember to check learnings next time."
118+
119+
5. **Approve and execute actions** (mode-dependent):
120+
121+
**Human-led mode:** Present all proposed actions (from 4b and 4c) to the user and ask which ones they'd like to take. Execute approved actions; skip declined ones.
122+
123+
**Autonomous mode:** Execute actions that are low-risk and reversible (doc updates, learnings additions, ticket creation). Do NOT execute actions that change skill behavior or CLAUDE.md without human review — log these as "proposed but deferred" in the retro entry.
124+
125+
6. **Log to `docs/process/retrospective.md`** using this format:
126+
```markdown
127+
## YYYY-MM-DD - [Brief context of what we worked on]
128+
129+
### Time Breakdown
130+
| Started | Phase | 👤 Hands-On Time | 🤖 Agent Time | Problems |
131+
|---------|-------|-----------------|---------------|----------|
132+
| ... | ... | ... | ... | ... |
133+
134+
### Metrics
135+
| Metric | Duration |
136+
|--------|----------|
137+
| Total wall-clock | X hours |
138+
| Hands-on | X hours (Y%) |
139+
| Automated agent time | X hours (Y%) |
140+
| Idle/testing/away | X hours (Y%) |
141+
| Retro analysis time | X min |
142+
143+
### Key Observations
144+
- [Patterns identified from transcript]
145+
146+
### Feedback
147+
**What worked:** [User's feedback, or "N/A — autonomous session" if autonomous]
148+
**What didn't:** [User's feedback, or "N/A — autonomous session" if autonomous]
149+
150+
### Actions Taken
151+
| Issue | Action Type | Change |
152+
|-------|-------------|--------|
153+
| [Issue description] | Skill / CLAUDE.md / Doc / Ticket | [Specific change made or ticket created] |
154+
```
155+
156+
7. **Elevate to learnings**: Review the session for things worth adding to `docs/process/learnings.md`:
157+
- Technical gotchas or surprises
158+
- Patterns that worked well
159+
- Mistakes to avoid repeating
160+
- API quirks, environment issues, or tooling discoveries
161+
162+
**Propose specific additions**, e.g.:
163+
> "Based on this session, I'd suggest adding to learnings.md:
164+
> `## [Category]`
165+
> `- [Specific learning]`
166+
> Want me to add it?"
167+
168+
Don't just ask "anything to add?" - identify candidates yourself.
169+
170+
8. **Commit** all retro changes (actions, retrospective log, learnings) with message: `docs: retro for [brief context]`
171+
172+
9. **Confirm** what was logged and what actions were taken.

0 commit comments

Comments
 (0)