Skip to content

Latest commit

 

History

History
307 lines (272 loc) · 18 KB

REPO-LAYOUT.md

File metadata and controls

307 lines (272 loc) · 18 KB

Concord Repo Layout Standard

Where non-programmatic files live, so all Concord member repos (and every future member) mirror each other. Companion to VISION.md.

The rule of thumb: src/ is for the compiler, site/ is for the website, everything else that's text or art has exactly one named home. Every member mirrors this layout; a new member is scaffolded from it before any code exists.


1. The canonical tree

<mod>/
├── README.md                  # feature summary + dev/API section; only prose doc at root
├── LICENSE                    # MIT
├── AGENTS.md                  # AI agent guidance: conventions, layout, lifecycle
├── CLAUDE.md                  # symlink → AGENTS.md (Tribulation pattern)
├── Makefile                   # task shortcuts wrapping gradle
├── build.gradle / settings.gradle / gradle.properties
├── versions-common.properties # suite toolchain pins — concord-owned, synced
├── gradlew / gradlew.bat / gradle/
│
├── .ai/                       # AI working area (committed)
│   ├── README.md              #   what lives here and why
│   ├── skills/                #   vendored from concord — refresh via `make sync`
│   ├── skills/.concord-rev    #   provenance: concord SHA of the last sync
│   ├── commands/              #   vendored from concord — slash commands (/glyph, /sfx)
│   ├── agents/                #   vendored from concord — /implement pipeline sub-agents
│   └── prompts/, review-criteria.yml  # OPTIONAL overrides of the concord defaults
│
├── .claude/                   # Claude Code local state (mostly gitignored)
│   ├── skills/                #   symlink → ../.ai/skills (vendored skills)
│   ├── commands/              #   symlink → ../.ai/commands (vendored slash commands)
│   ├── agents/                #   symlink → ../.ai/agents (vendored sub-agents)
│   └── settings.local.json    #   gitignored
│
├── .plan/                     # local planning scratchpad (gitignored, never committed)
│
├── design/                    # the "why & what" — pre-implementation truth
│   ├── VISION.md              #   the player-experience promise, written for players
│   ├── DESIGN.md              #   brand, palette, motif, HUD slot
│   ├── SPEC.md                #   full behavioral spec (the Prosperity model)
│   └── ASSETS.md              #   asset manifest: .glyph source → final path, MISSING where none
│
├── art/                       # art masters & working files (derived copies live under src/main/resources/assets/)
│   ├── logo.png               #   full logo master (stone-frame formula)
│   ├── icon-128.png           #   mod icon master (fabric.mod.json / store listings)
│   ├── hud-icon-16.png        #   HUD/UI glyph master (omit if mod has no HUD slot)
│   ├── hud-icon-16.glyph      #   .glyph source beside each pipeline master (re-renderable)
│   └── exploration/           #   style explorations, rejected variants, gen prompts
│
├── site/                      # website CONTENT (built by the shared Concord template)
│   ├── site.json              #   identity, nav, theme colors, links
│   ├── pages/<slug>.json      #   one structured-content file per page
│   ├── assets/                #   logo.png, icon.png, og-image.png, favicons
│   ├── listing-modrinth.md    #   store listing copy (Mercantile pattern)
│   ├── listing-curseforge.md
│   ├── listing-summary.txt    #   ≤256 chars — synced to the Modrinth description
│   └── github-description.txt #   the GitHub "About" blurb (manual)
│
├── changelogs/                # OPTIONAL curated release notes
│   └── <version>.md           #   e.g. 1.0.0.md — published verbatim if present;
│                              #   otherwise the GitHub release body is the record
│
├── scripts/                   # repo automation; concord-release.py is hub-owned (synced)
│
├── src/                       # code only — Loom split source sets
│   ├── main/                  #   server + common
│   ├── client/                #   client-only
│   ├── gametest/              #   Fabric gametests + their manifest and
│   │                          #   fixtures (not in jar)
│   └── test/                  #   JUnit
│
└── .github/                   # CI, issue/PR templates

Gitignored runtime/IDE dirs (never committed, standard list in §4): .gradle/, build/, out/, classes/, run/, mods/, logs/, config/, .idea/, .vscode/, _site/ (the generated website), .plan/ (local planning).

docs/ is retired. The website is no longer committed: site/ holds the structured content, the shared template in the concord repo renders it, and CI deploys the result straight to GitHub Pages (source: "GitHub Actions"). During migration a repo may still carry its legacy docs/ until its site/ build is verified live.


2. Directory-by-directory rules

Root

Text only, and only the files listed above (plus an optional .agent/ of symlinks into .ai/* for tools that look there). No binaries (logo moves to art/ — README embeds art/logo.png instead), no design docs, no stray logs or compiled classes. README.md is the single prose document at root; everything deeper has a directory.

CLAUDE.md is a symlink to AGENTS.md so every agent finds what it expects without content drift. AGENTS.md follows the Tribulation skeleton: project overview → build commands → source layout → conventions (Mojang mappings, the MOD_ID / LOGGER / <Mod>.id() bootstrap trio from the mc-registration skill, conventional commits) → Where things live (the map from a subsystem to its package) → Compat integrations (the soft deps this mod probes for, and the guard each sits behind — omit it when there are none) → development lifecycle.

Those sections sit outside the Concord-owned block and stay repo-owned: they describe this mod's packages and this mod's integrations, so there is nothing for concord to say. The sync never touches them.

The invariant tail sections — Working with domain skills, Custom art & audio, Development lifecycle, Pull requests & commits, and Version scheme — are Concord-owned: they sit together inside one <!-- concord:managed:start --> / <!-- concord:managed:end --> block and are kept in sync from concord's AGENTS-COMMON.md by propagate.yml, which proposes the update as a concord-sync PR (the default branch is protected). Don't hand-edit between those markers; edit the canonical copy in concord. The skills section is just a pointer to the generated .ai/skills/CATALOG.md — the old per-repo "when you're touching X, read Y" table is retired (it drifted: it hard-coded a skill count). A new repo opts in once by pasting the single marker pair; sections added inside the block thereafter propagate automatically, no new markers needed.

Makefile

A two-line shell around a hub-owned file: the member's Makefile does include concord.mk and adds only its member-specific targets. concord.mk is propagated verbatim (propagate/concord.mk) and reads the mod id from gradle.properties, so it is byte-identical in every member. The target list it owns lives in concord's makefile-targets.json and is checked by make makefile-check: the Makefile must include concord.mk, carry an unmodified copy, and not redefine any target it owns — build, jar, test, coverage, ci, run-client, run-server, run-datagen, gen-sources, refresh-deps, clean, version, release, site, site-serve, sync, and help. A change to a shared recipe is one hub commit, not eight member PRs.

make ci runs exactly what mod-ci.yml runs, in the same order, so a green local run predicts a green CI job. help is generated: it lists every target carrying a trailing ## description note, hub targets first, member targets after. Targets beyond the contract are a member's own business: the list is a floor, not a ceiling.

.ai/ — AI working area

Committed. skills/ and commands/ are vendored from the concord repo — edit them in concord; the concord-sync PR proposes refreshes automatically when they change on the member's hub channel (master for the canary, stable for the rest), or run make sync locally to work ahead of it (both directories are wholly owned by the sync — removals propagate; .concord-rev records the source SHA). Claude Code reaches them via .claude/skills → .ai/skills, .claude/commands → .ai/commands, and .claude/agents → .ai/agents symlinks, so vendored skills, slash commands (like /glyph), and sub-agents work here. All three symlinks are committed.

agents/ holds the sub-agents the /implement pipeline dispatches — recon, domain-reviewer, standards-reviewer, performance-reviewer — each pinning its own model in frontmatter. It is vendored from concord like the other two, but on a different channel: make sync rsyncs it, while the automatic concord-sync PR does not carry it. Editing an agent in concord therefore reaches members only when someone runs make sync; a member whose agents look stale is not a sync failure.

The generated skills/CATALOG.md (concord's make catalog) indexes the skills and rides the same sync, so AGENTS.md points at it rather than repeating the list. CI prompts and review criteria default to concord's .ai/; a repo-local prompts/*.md or review-criteria.yml here is a whole-file override (see the resolution order in concord's README). Reusable role prompts belong in concord.

.plan/ — planning (local only)

A local dev scratchpad, never committed — the whole directory is gitignored. Durable work tracking lives in GitHub Issues (the needs-spec → spec → ready lifecycle, implemented with /implement); anything under .plan/ is personal working state.

design/ — pre-implementation truth

The why and what, kept out of the published site. Fixed names: VISION.md (the player-experience promise — written for players, zero implementation vocabulary), DESIGN.md (brand, palette, motif, HUD slot decision), SPEC.md (behavioral spec), ASSETS.md (asset manifest — each asset's .glyph source under art/, its final resource/site path, and MISSING where no glyph source exists yet). Each fixed name has an authoring guide in concord prescribing its shape, requirements, and truth direction: design/VISION-GUIDE.md, design/DESIGN-GUIDE.md, design/SPEC-GUIDE.md, design/ASSETS-GUIDE.md. Specs are written before implementation (the Prosperity model) and updated when behavior changes — README.md/docs/ describe what is; design/ records what was intended and why.

art/ — masters

Source-of-truth images and working files. src/main/resources/assets/ (and the site/ assets the template serves) hold derived, optimized copies; when art changes, the master changes first. Generation prompts (Gemini/PixelLab) live next to their outputs in exploration/. Every pipeline-generated texture ships a .glyph spec — under art/glyphs/, or beside the master where a mod prefers that — and every custom sound ships a .sfx spec under art/audio/. The rendered PNG and .ogg are derived: they live only under src/main/resources/assets/<mod>/, and design/ASSETS.md is the authoritative join between a spec and the path it ships to. The spec is the source of truth, so a texture or sound is re-renderable for minor edits (concord design/DESIGN-SYSTEM.md §8–9, the mc-textures and mc-audio skills). Custom, high-quality art is encouraged.

site/ — website content, not website output

The mod repo holds only structured content: site.json (identity, nav order, the four theme colors), pages/<slug>.json (one per page, block-based — schema in the concord repo's template/README.md), and assets/ (image masters' web copies). The shared Concord template renders it; .github/workflows/site.yml (≈15 lines, calls concord's reusable workflow) deploys it to Pages. Local preview: make site. Store listing copy lives here too, in four files split by how they reach their destination. listing-modrinth.md and listing-summary.txt are synced: the listing-sync.yml stub calls concord's mod-listing-sync.yml, which pushes the body and — when the summary file is non-empty — the ≤256-character Modrinth description, failing the run if it is longer. An absent summary file is skipped silently, so a member that wants one has to have one. listing-curseforge.md and github-description.txt are manual copy-paste sources — CurseForge has no public write API, and the GitHub "About" blurb is set through the repo settings — so nothing reads them and nothing will tell you when they go stale. Generated _site/ output is never committed.

scripts/

Optional. Executable automation only — anything an agent or human runs by hand; Makefile targets wrap these. make release VERSION=X.Y.Z is the only release entry point: it runs the hub-owned scripts/concord-release.py (synced verbatim), which tags and pushes per the version scheme in AGENTS-COMMON.md and never writes a version into gradle.properties. Don't add a repo-local release script.


3. Naming conventions

  • Directories: lowercase, singular (design/, art/, not designs/)
  • Canonical docs: UPPERCASE fixed names (VISION.md, DESIGN.md, SPEC.md, ASSETS.md) — greppable across all repos at the same path
  • Everything else kebab-case (listing-modrinth.md, listing-curseforge.md)
  • Suite-level documents (this file, VISION.md, API-STANDARD.md, HUD-STANDARD.md, design/DESIGN-SYSTEM.md) live in the concord repo (../concord/ in the local workspace), never duplicated into mod repos; each mod's AGENTS.md carries a "Suite standards (Concord)" section linking to them (snippet in the concord README)

4. Standard .gitignore

The common ignores are a Concord-owned managed region, synced from concord's gitignore-common into each member's .gitignore (between # concord:gitignore:start / # concord:gitignore:end) by propagate.yml — the same mechanism as the AGENTS.md regions. Edit the shared list in gitignore-common, never in a mod repo; put repo-specific ignores outside the marker block, where the sync never touches them. A member opts in by carrying the marker pair once (make gitignore-sync from concord seeds and refreshes siblings checked out as ../<member>).

Defensive anchoring. Every ignore whose name could collide with a source, package, or resource directory — build out bin classes net .gradle run mods logs config _site .plan — is anchored with a leading / so it matches only at repo root, never a nested dir like src/.../config/. An unanchored config/ silently swallows a Java package of that name. Genuinely global junk (IDE/OS files, *.iml, JVM crash dumps) stays unanchored so it is caught at any depth.


5. Definition of "mirrored"

A repo conforms when all of these are true at the same paths:

  1. README.md, LICENSE, AGENTS.md, CLAUDE.md (symlink), Makefile at root — and nothing else prose or binary at root
  2. design/ carries the four fixed names — VISION.md, DESIGN.md, SPEC.md, ASSETS.md (§2)
  3. .ai/ with skills/, commands/, and agents/ vendored from concord, and the matching .claude/ symlinks committed (prompts/ / review-criteria.yml only as deliberate whole-file overrides — concord defaults otherwise); no committed .plan/
  4. art/logo.png + art/icon-128.png masters; README embeds art/logo.png
  5. site/ contains the structured website content (site.json, pages/, assets/, listing-*.md, listing-summary.txt, github-description.txt) + a site.yml workflow calling concord's reusable build; no committed docs/ or _site/ output
  6. The standard .gitignore, with no committed runtime artifacts (logs/, run/, replay_pid*, compiled classes)
  7. The .github/workflows/ caller stubs match concord's canonical contract — each stub's uses: ref and permissions: block per workflow-stubs.json (checked by make stubs-check); per-repo triggers and with: inputs (e.g. curseforge-id) may vary
  8. The Makefile does include concord.mk — the hub-owned file carrying the universal targets per makefile-targets.json — and redefines none of them (checked by make makefile-check); extra targets are a member's own business
  9. build.gradle keeps plugins {}, dependencies {}, extra repositories, the access widener, and mod-specific tasks, and runs apply from: 'gradle/concord-common.gradle' for everything shared — the hub-owned file (propagate/gradle/concord-common.gradle) carries the version computation, gametest/datagen wiring, JaCoCo, and packaging excludes, per the mc-gradle-builds skill. Not machine-checked: the member's own file differs by design, and the shared file arrives byte-identical through the sync
  10. Datagen is either 4-of-4 on the anchors in the mc-datagen skill — entrypoint, Loom run config, make target, verifyDatagenIdempotent — or deliberately none of the four, recorded in AGENTS.md. The one carve-out is the scaffold state the skill describes: run config, make target, and verify task in place ahead of the entrypoint, while a member is getting ready to generate. Any other partial set is drift, because CI gates the idempotency step on the task existing and the task itself passes vacuously without the entrypoint

Future members (Tempest, Stratum, …) are created from this layout before any code exists.