stack-foundation
Skill0 starsChanged 8 days agoMITView on GitHub
Sets up a new surface so it is clean, observable, and shippable from day one: official generator, strict types, lint and format, unit and end-to-end tests, CI wiring, environment config, preview deploys, error tracking, and rot finders. Use right after product-kickoff confirms the stack, or when adding a new surface.
- Reads credentials
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- agent-handoverSkill
- brand-sweepSkill
- design-tokensSkill
- experiment-labSkill
- parity-checkSkill
- pitch-from-evidenceSkill
- plan-and-buildSkill
- platform-reachSkill
- product-kickoffSkill
- product-reconSkill
- quality-loopSkill
- repository-auditSkill
- review-miningSkill
- review-practiceSkill
- security-auditSkill
- systematic-debuggingSkill
- technical-reconSkill
- ux-qualitySkill
- web-qualitySkill
- agent-handoverSkill
- brand-sweepSkill
- design-tokensSkill
- experiment-labSkill
- parity-checkSkill
- pitch-from-evidenceSkill
- plan-and-buildSkill
- platform-reachSkill
- product-kickoffSkill
- product-reconSkill
- quality-loopSkill
- repository-auditSkill
- review-miningSkill
- review-practiceSkill
- security-auditSkill
- stack-foundationSkill
- systematic-debuggingSkill
- technical-reconSkill
- ux-qualitySkill
- web-qualitySkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 36
Preview for review (web UIs): add a [surfaces.preview] table with the dev command and URL using a {port} placeholder, every route, and …
- Very specific: line 40
Configuration and secrets: commit .env.example with every variable and a comment, never real values.
- Distinctive: line 42
Observability: write 2 to 4 questions on-call will ask first (is it succeeding, why does it fail, is a dependency slow).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Stack foundation
Outcome: a walking skeleton (the thinnest end-to-end path, deployed to a
preview) whose quality gates run in make done and CI before any feature work.
Cleanliness is cheapest on day one; retrofitting it costs ten times more.
Scale the setup to the kickoff tier: a prototype needs steps 1 to 5; a
product needs all steps; a platform also applies "Built to scale" in
docs/engineering.md from the start.
Steps
- Scaffold with the official generator at a pinned version (for example
create-next-app,create-expo-app,flutter create, the Xcode or Android Studio template). Verify the current command and version with Context7 or theresearcherrole first. Keep generated defaults unless the decision record says otherwise. - Strictness on: strict type checking (TypeScript
strict, Dart analysis, Swift warnings as errors), one formatter, one linter, no warnings in CI. - Tests at three levels: a unit test runner, one end-to-end smoke test of
the walking skeleton (Playwright for web, Maestro or Detox for mobile, XCUITest
for native), and the screenshot review from
ux-quality. - Declare the surface in
project.toml:verificationruns typecheck, lint, and tests from the surface'spath(soStreak.xcodeproj, notStreak/Streak.xcodeproj), and must pass undermake verify;gardenruns a dead-code finder (knip for JS/TS, vulture for Python, or the stack's analyzer); add a[budgets]glob so files stay agent-sized. Bind the surface's architecture doc with<!-- covers: -->. When the generator writes an entry file outside the app directory — Vite keepsindex.htmlat the root besidesrc/— list it in that surface'sextra_paths, so one declaration owns the whole surface. - Preview for review (web UIs): add a
[surfaces.preview]table with the dev command and URL using a{port}placeholder, every route, and seeded storagestatesfor filled screens, then runmake ui-review. Native apps use simulator or emulator screenshots instead. - Configuration and secrets: commit
.env.examplewith every variable and a comment, never real values; validate configuration at startup and fail fast. - Observability: write 2 to 4 questions on-call will ask first (is it
succeeding, why does it fail, is a dependency slow); every signal answers one.
Structured JSON logs with stable event names, a request ID on every line, and
an
entryPointfield when a scheduler, webhook, or CLI share a sink; never log secrets or whole bodies. Rate, errors, and duration histograms (read p95/p99, never averages) per endpoint and external call, with labels from small fixed sets (route template, status class), never user ids or URLs. Error tracking (Sentry or platform crash reporting), a health endpoint, and OpenTelemetry traces once more than one service exists. Alert only on user symptoms (error rate, p99, queue age), each with a three-line runbook (means, first check, escalate to) indocs/runbooks/; at most two severities, page and ticket. Prove it: force one error, find it by request ID, and test-fire each alert once. Record any personal data they touch indocs/legal/data-inventory.md. - Delivery: CI runs
make verify(the test half ofmake done; agents runmake donelocally); every pull request gets a preview deployment or build when the platform supports it; document rollback indocs/production.md. - Web reach, if web: semantic HTML, metadata and social cards, sitemap, performance budget (Core Web Vitals), and i18n-ready strings when more than one language is plausible.
Done when
The walking skeleton is deployed to a preview (or runs locally when the owner
has no host yet), make done runs every gate above and passes, and a fresh
agent can find the surface with make where. make check enforces the owning
doc and, in UI projects, the ux-quality review in the quality oracle; lint and
the end-to-end smoke test are on you, so list them in verification.
Never
Hand-roll what the official generator provides, add a dependency beyond the generator's defaults without a reason in the issue, or commit secrets, generated build output, or caches.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

