gstack-plan
Use before building a feature: challenge the scope, then review architecture, code quality, tests and performance, and end with a plan to build. (gstack)
- 01GitHub stars
- 140.4K
- 02Installs
- New
- 03Files scanned
- 1
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 893f1cc3fcbb960c… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Plan a feature: scope first, then the engineering review
Review a plan, not code: do not build the feature. If the user has not given you the plan or feature description, ask for it and stop.
Start here. In the repository (cd into it first: the shell starts in the workspace root), run with execute to see what already exists:
git log --oneline -10
ls
Then read the files the plan touches. Work through Scope Challenge, then Sections 1-4 in order; for each finding give severity, a recommendation and the alternative. Ask about decisions that change scope in one message and stop until the user answers. Finish with the revised plan: what to build, in order, the files it touches, the tests that prove it, and what is NOT in scope.
My engineering preferences (use these to guide your recommendations):
- Shared code: require common behavior and improved reliability or net savings; similar-looking code alone is insufficient.
- Tests: every behavior tested; no test without a regression it would catch.
- Enough engineering: avoid fragility and premature abstraction/complexity.
- Edge cases: thorough handling over speed.
- Explicit over clever.
- Right-sized diff: smallest clear change; rewrite a broken foundation when necessary.
- Data model: storage follows the data's queries, integrity rules and update boundaries, not file count: fields queried, constrained or updated on their own get explicit columns or tables; JSON suits a document read and written whole.
A. Assess the target
Complete these checks before proposing scope changes. Do not write findings into the plan yet.
-
What already solves each sub-problem? Inspect helpers, libraries, callers and reusable outputs: behavior and dependency/deployment boundaries. Cite authored sources; label proposed callers with their motivating plan requirement and assumptions.
-
What minimum changes achieve the goal? Flag work deferrable without blocking it; challenge scope creep.
-
Complexity check: Count the selected work, not files read only as evidence: for a plan, its proposed changed files and new classes/services; for a diff, changed files and classes/services introduced by that diff; for a file/directory, files in that selected scope and any explicitly proposed new classes/services. Count each once, label estimates, and seek fewer moving parts. At 8+ files or 2+ new classes or services, propose a smaller arrangement and ask before changing scope.
-
Distribution check: For new artifacts, verify build/publish CI/CD, target OS/architectures and download/install channels. Put deferrals in "NOT in scope".
Review Sections (after scope is agreed)
Evaluate Architecture → Code Quality → Tests → Performance. Never condense, abbreviate or skip a section, including strategy/spec/infra plans.
1. Architecture review
Evaluate:
- System/component boundaries, dependencies and coupling.
- Data flow, bottlenecks, scaling and single points of failure.
- Security: auth, data access and API boundaries.
- Key flows needing ASCII diagrams in plans/code.
- One realistic production failure per new path/integration; does the plan handle it?
- Distribution architecture: New artifacts' build, publish and update paths; included or deferred CI/CD.
Two shapes before one (design-twice)
Run this only when the plan introduces a new module, service, package or boundary: a public surface other code calls; otherwise say so in one line.
Ask for the second shape. A plan with one design usually took the first
shape that compiled in the author's head. Before judging it, require a second
shape that is structurally different: another owner for the state, another
split of responsibilities, another place for the boundary. A point fix inside
the first shape is not a second candidate. When the plan has none, sketch one
in five lines (types and signatures, bodies not implemented) and record it
as the alternative. Compare the candidates on interface depth: how much
behavior and policy each hides behind how small a public surface, and prefer
the one that hides more behind less. A deep module is not a deep call chain:
the chain scatters the understanding across layers, the module concentrates
it behind one interface.
The eight red flags. Screen the chosen shape before Section 1 closes. Assume the next contributor is an agent that sees only the files it opened, copies the nearest example and takes the shortest path that compiles; prefer the design where a change that looks right from one file is right for the whole repo. A flag is a finding with a file or symbol and a reason to revise the shape, not a comment asking for care.
- Shallow module. A large interface over little hidden complexity: several calls per operation, options that expose internal stages.
- Information leakage. One decision (a representation, a policy, a wire or storage detail) lives in more than one module. Re-exported transport types are leakage; parse external data into domain types at the boundary.
- Temporal decomposition. Modules split by execution order (load, validate, transform, save) instead of by the knowledge they own.
- Pass-through method. A function that forwards the same arguments to another with the same shape; remove it or move the responsibility.
- Split ownership. Two modules write the same state or each keep a copy; an agent editing one cannot see the other. One owner per piece of state.
- Two ways to do one task. An agent copies whichever it meets first. Keep one; move the callers and delete the rest in the same change.
- Importable internals. The shortest path that compiles imports them and they become interface. Make an outside import fail the build.
- Hand-synced list. The same items in two places; an agent that sees one list edits one. Derive the second, or fail the build when they disagree.
Record under Architecture: both shapes, the pick, the depth argument for it, and each flag with its fix.
2. Code quality review
Evaluate:
- Organization and module structure.
- Shared-code opportunities in the target and related callers. No standalone history/PR sweep or quotas. Check proposed caller assumptions against existing interfaces.
- Explicitly flag error handling gaps and missing edge cases.
- Technical debt, fragility and needless complexity per engineering preferences.
- Accuracy of touched files' ASCII diagrams.
3. Test review
For shared-code changes, audit existing/missing shared-contract tests (behavior, errors, side effects, boundaries) and each migrated caller's integration/differences. Rejected extractions still need coverage for real duplicated-code defects.
For every new codepath, branch and error path in the plan, name the test that proves it (unit, integration or end-to-end) and the regression it would catch. Missing tests become plan items.
4. Performance review
Evaluate:
- N+1 queries and database access patterns.
- Memory usage.
- Caching opportunities.
- Slow or complex paths.
On per-request or looped paths, check queries in loops, unbounded queries or caches, missing indexes, whole-file loads and blocking calls without timeouts. Give each finding's scale (rows, requests/s, bytes) or mark it unknown; never invent benchmarks.
Files
1- SKILL.md
9dc375055b7.7 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from garrytan/gstack8
Fixture dispatcher with a mode table and forced-read references.
Auto-review pipeline — runs the CEO, design, eng and DX reviews in order (lean run: one reviewer), auto-deciding. Use for: run all reviews, automatic review pipeline. (gstack)
Web performance regression detection. Use for: web performance benchmark, check page speed. (gstack)
Cross-model benchmark for gstack skills. Use for: cross model benchmark, compare claude gpt gemini. (gstack)
Clean fixture tool skill with no forced reads and no mode table.
Drive a real browser through Aside: open a page, read it, click through a flow, take screenshots, check console errors. Use for: browse a page, open this url, take page screenshot. (gstack)
Use when coding: run the checks and tests /ship picks until green. Use for: verify my change, run the checks, make the tests pass. (gstack)
Post-deploy canary monitoring. Use for: monitor after deploy, canary check. (gstack)
Related methodology skillsscan passed
Use when writing E2E tests with Playwright, setting up test infrastructure, or debugging flaky browser tests. Invoke to write test scripts, create page objects, configure test fixtures, set up reporters, add CI integration, implement API mocking, or perform visual regression testing. Trigger terms:
Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.
Review workspace changes, PRs, commits, or branch comparisons with the host agent's model. OCR's CLI selects files and resolves rules; the host reviews them for defects and explains changes that affect users or callers. Use when the user has no separate API key for OCR or wants to reuse their coding
Modern TypeScript/JavaScript testing with Vitest. Fast unit and integration tests, native ESM support, Vite-powered HMR, and comprehensive mocking. Use for testing TS/JS projects.