Rename scaffold skill to android-project-scaffold-new; add module interactions to android audit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Neil Bantoc 2026-11-04 14:46:28 -08:00
parent 5201aa9bd5
commit 204cb13d60
6 changed files with 65 additions and 10 deletions

View file

@ -1,6 +1,6 @@
---
name: android-project-full-audit
description: Audit-level architecture report for an existing Android project, built by reading the source files themselves (not README/docs, which may be stale). Use when the user wants to understand, audit, map, or document how an Android app is architected — its file/module organization, the libraries and mechanisms behind each implementation category (UI, navigation, networking, concurrency, persistence, DI, background work, etc.) with code pointers, and the user-facing features. Crawls files one by one (optionally fanned out to subagents), records findings into a library of per-category audit docs, then synthesizes a REPORT.md with an implementation table and a features table.
description: Audit-level architecture report for an existing Android project, built by reading the source files themselves (not README/docs, which may be stale). Use when the user wants to understand, audit, map, or document how an Android app is architected — its file/module organization, the libraries and mechanisms behind each implementation category (UI, navigation, networking, concurrency, persistence, DI, background work, etc.) with code pointers, how modules interact and pass data to each other (grouped into user-facing and background interactions), and the user-facing features. Crawls files one by one (optionally fanned out to subagents), records findings into a library of per-category audit docs, then synthesizes a REPORT.md with an implementation table, a module interaction map and a features table.
---
# Android Project Full Audit
@ -100,6 +100,7 @@ Key rule on redundancy: a file does not need to contribute. When a file is "more
The per-file loop doesn't naturally produce these, so write them now:
- `file-organization`: the packaging scheme, naming conventions and outliers, from `audit.sh tree` plus what you read. Use source `(project)`.
- Empty categories: `bash $A none $AUDIT_DIR <category> "<what you looked for>"`, so the report can say "None found in code" with evidence of looking.
- `module-interactions`: close the gaps the per-file pass leaves. For every `project(":…")` edge in the module graph (Phase 2), check that at least one interaction entry explains what that dependency is used for; read the files needed to fill any missing edge. Confirm or correct "Inferred:" callee sides with a refinement. In a single-module app, do the same across top-level feature/layer packages. If the app really is one undivided unit, record `none` saying so.
- `observations`: inconsistencies across files, such as two mechanisms for one job or migrations in progress, that no single file reveals.
- Superseded claims: the library is append-only. If an early finding was wrong or an "Inferred:" note was later confirmed, add a refinement to that slug saying so. The report uses the latest refinement.
@ -111,7 +112,7 @@ The per-file loop doesn't naturally produce these, so write them now:
2. Resolve conflicts: where two mechanisms coexist (Gson + kotlinx.serialization, LiveData + StateFlow), report both with counts — that is a finding, not noise. Note which is newer/dominant only if the code shows it.
3. Pick **code pointers** per category: the 1–3 files that most clearly show the pattern (usually the exemplar, but prefer a clean canonical file over a first-seen edge case). Verify each path exists.
4. Run `bash $A finish $AUDIT_DIR` immediately before writing the report. It stops the clock and writes `usage.md`, whose tables go verbatim into the report's "Usage & duration" section. Tokens spent writing the report itself fall after the clock stops; the report's section says so.
5. Write `AUDIT_DIR/REPORT.md` following **`references/report-template.md`**: at-a-glance, build & toolchain, **file tree organization scheme**, **implementation summary table (Category | Implementation details | Code pointers)**, **features table (Feature | What it lets the user do | Entry point)**, architecture & data flow with one end-to-end trace, observations (inconsistencies, risks, strengths), coverage & method.
5. Write `AUDIT_DIR/REPORT.md` following **`references/report-template.md`**: at-a-glance, build & toolchain, **file tree organization scheme**, **implementation summary table (Category | Implementation details | Code pointers)**, **features table (Feature | What it lets the user do | Entry point)**, architecture & data flow with one end-to-end trace, **module interactions** (user-facing and background tables of From → To | Mechanism | Data passed | Trigger, plus a diagram), observations (inconsistencies, risks, strengths), coverage & method.
6. Print the summary to the terminal as the template's last paragraph describes, and give the full path to `REPORT.md` and the library dir.
If this skill is itself running inside a subagent and the harness refuses the `REPORT.md` write, don't work around it. Return the full report text as your final reply, with the intended path, so the parent session saves it.