project-layout
Skill0 starsChanged 4 months agoMITView on GitHub
Use when starting a new computational-science project, restructuring an existing one, or deciding where a new module, script, notebook, dataset, or document belongs — including whether a piece of work is a notebook one-off or a reusable script, and maintaining the notebook series. Also use when reviewing whether a repository's layout still matches its documented map. Trigger phrases: "where should this file go", "set up the project structure", "scaffold the repo", "folder layout", "project organization", "does this belong in scripts or notebooks", "notebook or script", "should this be a notebook or a script", "make this rerunnable", "the notebook is stale", "promote this to a script".
2 other projects use a version of this.
Adopted by
Most recently taken up by
- rafapeixer/java-skillstheir own version, first seen Oct 20, 2026
- jwd83/skillstheir own version, first seen Jun 18, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- jwd83/skills★ 1same name
- rafapeixer/java-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- build-logSkill
- canonical-paramsSkill
- correctness-gateSkill
- decision-logSkill
- evidence-conventionSkill
- layer-syncSkill
- phase-gateSkill
- run-provenanceSkill
- external-positioningSkill
- lit-anchorSkill
- negative-results-ledgerSkill
- numerical-determinismSkill
- statistical-reportingSkill
- skill-library-generatorSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 66
Placement question: read the layout document, place the file, and if the answer was not derivable from the document, add the missing …
≈ “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
project-layout
Propose and hold a canonical folder layout for a computational-science repository, and keep a single layout document that says what every directory is for. The layout is a contract: every artifact has exactly one home, bulk artifacts never enter version control, and AI-session planning files never mix with project deliverables.
When to use
- Scaffolding a new research repository.
- Answering "where does this go?" for any new file.
- Auditing an existing repo whose layout document has drifted from reality.
When NOT to use
- Mid-project wholesale reorganization without an explicit decision-log entry — moving directories breaks links, history, and muscle memory; propose, record the decision, then move.
- Adding one module to an existing, documented layout — just follow the map; do not re-derive it.
- Deciding project phase status — the layout document must never carry "current phase" information (see Rules).
The canonical shape
Adapt names to the project; keep the separations. The copyable version lives in the pack's
templates/project-layout.md.
<project>/
├── README.md # summary, install, how to run
├── TODO.md # current-iteration execution buffer (ephemeral, rewritten per phase)
├── CLAUDE.md # operating rules + the Aletheia config block
├── <env manifest + lockfile> # pyproject.toml + lock, environment.yml, etc. (see run-provenance)
├── docs/
│ ├── README.md # authority map: which document is current / stale / archived
│ ├── decisions.md # ADR-lite decision chain (see decision-log)
│ ├── <spec>.md # implementation spec — the contract code is tested against
│ ├── design/ # full technical design ("why" documents)
│ ├── roadmap/ # long-horizon plan + phase/gate registry
│ ├── build_log/ # write-once phase/gate evidence entries (see build-log)
│ └── archive/ # retired documents — moved, never deleted
├── src/<package>/ # installable package (src-layout)
│ ├── common/ # shared library — imports nothing above it
│ └── <domain subpackages> # model / analysis / orchestration layers
├── configs/ # declarative run configurations (reviewer can re-run from these)
├── scripts/ # reusable CLI pipelines (run repeatedly, produce artifacts)
├── notebooks/ # numbered exploratory narratives + README manifest
├── tests/ # unit + integration; includes the named correctness gate
├── data/ # inputs — gitignored, README tracked (see run-provenance)
├── models/ # trained/fitted artifacts — gitignored
└── results/ # run evidence — gitignored, selected summaries force-added
# (see evidence-convention)Runbook
- New repo: copy
templates/project-layout.mdintodocs/, prune directories the project will not use, and create the tree. Createdata/README.md,results/README.mdstating the gitignore-plus-tracked-README policy before the first run lands. - Placement question: read the layout document, place the file, and if the answer was not derivable from the document, add the missing one-line intent to it in the same change.
- Layout audit: diff the real tree (
find . -maxdepth 2 -type d) against the layout document; report undocumented directories and documented-but-absent ones. - Record any structural change as a decision-log entry before moving files.
Rules
- One home per artifact class. Exploratory one-offs →
notebooks/; reusable pipelines →scripts/; shared logic →src/<package>/common/; orchestration imports downward, never sideways or up. - Import direction is bottom-up.
common/imports nothing from higher layers; orchestration layers import everything below. A violated import direction is a layout bug. - Bulk directories are gitignored, their READMEs are tracked.
data/,models/,results/accumulate gigabytes; version the policy and provenance (READMEs, meta files, selected summaries via explicit force-add), not the bulk. - The layout document never states current phase or status. Status is derived from git history, the build log, and the roadmap's status board — a status line in a layout file is a drift source by construction.
- Session artifacts are not deliverables. Plans, task breakdowns, and scratch specs
generated during AI-assisted sessions live under
.claude/plans/(or the harness equivalent), never indocs/,scripts/, or the repo root.docs/holds only artifacts the project's papers and reports derive from. - Retired documents move to
docs/archive/, never get deleted. Superseded specs remain citable; the docs authority map (docs/README.md) records what is current. - Every directory earns a one-line intent in the layout document. A directory nobody can describe in one line is a candidate for removal.
Placement + notebook discipline
Rule 1 states the routing (one-offs → notebooks/, pipelines → scripts/, shared logic →
the package); the discipline below is how each destination avoids its characteristic rot —
notebooks rot as un-diffable pipelines, scripts rot as unread one-offs, copy-pasted logic
rots everywhere at once.
- The notebook is the default; a script is earned by re-run demand, not granted by optimism. Second manual re-run of a notebook for fresh outputs is the promotion signal: move the logic into the package, wrap a CLI script around it, keep the notebook as the narrative importing the same functions, and note the promotion in the manifest.
- Numbered series with a manifest.
NN_kebab-topic.ipynb, numbering append-only (reusing a number breaks every citation to the old one);notebooks/README.mdstates each notebook's role and rerun policy (live / frozen / archived). - Execute top-to-bottom before commit. A committed notebook carries its outputs — run it
in place (e.g.
jupyter nbconvert --execute --inplace) so the repo version shows what the code actually produces. A stale committed notebook is a bug: re-execute it or mark it frozen/archived. Retired series move tonotebooks/archive/, numbers never reused (historical notebooks pinned to old APIs are narrative, not drift —layer-syncrule 7). - Narrative is the point; no library logic in cells. Prose cells state the question,
method, and reading of each figure — a notebook that is only code should have been a script,
and the moment a function is worth reusing it moves to the package. Scripts orchestrate
(argument parsing + calls into
src/+ output writing); heavy logic inside a script is library code in hiding. Never edit defaults to probe — a probe is a notebook cell or a script flag (canonical-params).
Configuration
Reads from the Aletheia config block in the adopter's CLAUDE.md:
{{evidence_dir}}— the run-evidence root (defaultresults/).{{decision_log}}— the decision chain file (defaultdocs/decisions.md).{{build_log_dir}}— the build-log directory (defaultdocs/build_log/).
Provenance & maintenance
Generalized from the working layout of a mature computational-research repository (src-layout
package, shared-library import discipline, gitignored bulk dirs with tracked READMEs,
docs authority map, session-artifact separation); see the pack's examples/ directory for
the worked exemplar mapping. The tree above is a verified pattern; directory names are
adaptable, the separations are the invariant. Inference is labeled where it occurs.
Re-verify in your project:
git check-ignore data results models— confirms bulk directories are ignored (paths that print are ignored; adjust to your names).test -f docs/README.md && test -f {{decision_log}}— confirms the authority map and decision chain exist.find . -maxdepth 2 -type d -not -path './.git*'— diff this against the layout document for undocumented directories.
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.

