improve-folder-architecture
Review a project's folder architecture and produce evidence-backed structural candidates in a visual HTML report.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Review a project's folder architecture and produce evidence-backed structural candidates in a visual HTML report.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Apply boundary-first architecture to Flutter/Dart monorepos using Melos, Dart Pub Workspaces, and get_it. Use when changing package boundaries, feature layers, dependency injection, runtime scopes, or workspace validation.
Upgrade dependencies in a Dart or Flutter Melos monorepo to the latest mutually resolvable versions when the user asks to upgrade, update, check outdated packages, or bump dependencies.
| name | improve-folder-architecture |
| description | Review a project's folder architecture and produce evidence-backed structural candidates in a visual HTML report. |
| disable-model-invocation | true |
Assess the folder tree as a navigational interface, not as a style contest. Help a cold-start developer answer:
Use the codebase-design vocabulary precisely: module, interface, depth, seam, adapter, leverage, and locality. Diagnose and propose candidates; implementation is a later phase.
Read HTML-REPORT.md before creating the report. It is the single source of truth for the scaffold, visual language, card structure, diagrams, and tone.
Use EVALUATION-LENSES.md when comparing structures or deciding whether a convention earns its place.
Identify the repository root and inspect the available evidence:
CONTEXT.md, ownership files, and local agent instructions;git log --oneline --decorate -n 80 and path statistics when useful.Exclude generated, vendored, cache, build, dependency, and coverage directories from product architecture, while recording them as tooling evidence.
Trace representative paths through an entry point, main product flow, tests, configuration, persistence or external adapters, and documentation. Do not infer meaning from folder names alone. When routes, commands, screens, jobs, or other public entry points organize the tree, map each to its implementation path and test whether that path is a useful ownership interface.
If the workspace lacks a repository, source tree, manifest, documentation, and Git history, stop diagnosis. Report the inspected scope and request the repository path or files; do not fabricate candidates.
Completion criterion: the inventory names the visible areas, entry points, conventions, exclusions, and at least two verified end-to-end change paths.
Explore recent hotspots and the paths needed to understand the main flow. Use an Explore subagent for an independent pass when available, giving it the repository and user-facing objective rather than a suspected answer.
Simulate a cold-start developer and an agent. For a named capability and for one representative request, command, job, screen, or domain flow, record:
Measure friction with concrete paths and tasks. Evaluate a convention through its complete use in the system. Preserve entry-point locality and stable order-encoding when they help a reader follow ownership, composition, execution, or lifecycle; propose change only when a representative task shows ambiguity, drift, or materially worse locality.
For every finding, separate observed facts from inferences and include a confidence level. Apply the deletion test: a folder earns its place when it hides meaningful complexity, provides a stable seam, or creates useful locality and leverage for a coherent capability.
Completion criterion: every finding has a concrete path, representative change journey, observed friction, fact/inference label, and confidence level.
Generate 3–5 materially different candidates, or record “no structural change” when the evidence supports it. Candidates may address:
Compare candidates against repository scale, change patterns, ownership, runtime boundaries, tooling, and existing conventions. Do not prescribe capability grouping, flatness, or depth universally. Keep code with its route, command, screen, or job when that path is the clearest ownership interface; extract shared code only when verified coordination outweighs lost entry-point locality.
For each candidate, state:
Strong, Worth exploring, or Speculative.Rank by expected improvement in cold-start comprehension and change locality, adjusted for migration risk and evidence strength. Use no numeric score unless requested.
Completion criterion: every candidate represents a distinct decision, includes evidence, trade-offs, and a falsifiable validation, and can be rejected independently.
Write a fresh report to the OS temporary directory as folder-architecture-review-<timestamp>.html. Resolve the directory from $TMPDIR, falling back to /tmp on Unix or %TEMP% on Windows. Do not write it into the repository. Open it with the platform default command when permitted and report the absolute path.
Follow HTML-REPORT.md exactly. Include its fixed header, legend, candidate-card order, before/after visualization for every candidate, and top-recommendation section. Label observed state, proposed state, unresolved questions, and subjective decisions. Keep implementation deferred.
End the report and assistant message with: Which of these would you like to explore?
Completion criterion: the report opens successfully, contains all candidates and their evidence, names one top recommendation with rationale, links to that candidate, and ends with the selection prompt.
When the user selects a candidate, invoke the grilling skill. Ask one decision question at a time and give a recommended answer with rationale. Explore in this order:
If the design introduces a domain term, use domain-modeling to update CONTEXT.md. Offer an ADR only when a durable decision would prevent meaningful future re-litigation.
Completion criterion: the user has confirmed the shape, trade-offs, migration slice, and validation plan. Only then may implementation begin.