| summary | tpl-template-repo L0. | |
|---|---|---|
| read_when |
|
|
| type | reference |
core/tpl-template-repo is the L0 meta-template that scaffolds L1 template repos.
First validated slice:
- one L1 profile:
template-repo - generated L1 repos include CI, hooks, contracts, and five L2 templates (
tpl-agent-repo,tpl-project-repo,tpl-monorepo,tpl-package,tpl-org-repo)
If you need one doc for "how do I create repos" and "how do I transition old repos":
docs/dev/README.md- wikilink:
[[docs/dev/README.md]]
For the detailed L0 -> L1 -> L2 file contract (deep review + what goes where):
copier-template/docs/dev/tpl-project-repo-file-contract.md- wikilink:
[[copier-template/docs/dev/tpl-project-repo-file-contract.md]]
Repo-local work-items in generated tpl-project-repo / tpl-monorepo repos are now AK-first:
the generated work-items JSON file is a deterministic checked-in projection/mirror, and generated repos use plain installed ak for ak work-items import|export|check.
When repo-local task-scope snapshots are in play, the same public path fronts ak task scope show|export, and frozen governance/task-scopes/AK-<TASK-ID>.snapshot.json files are repo-consumption artifacts rather than hand-authored authority.
For the template-side brownfield migration/deprecation path, see copier-template/docs/dev/task-scope-migration-playbook.md.
For how engineering-core lane metadata, local overrides, and conditional companions such as engineering-<lane>.ts-quality.md propagate through generated repos:
copier-template/docs/dev/engineering-contract.md- wikilink:
[[copier-template/docs/dev/engineering-contract.md]]
Generate an L1 repo from L0:
./scripts/new-l1-from-copier.sh /tmp/holdingco \
-d repo_slug=holdingco \
-d l1_org_docs_profile=rich \
-d l2_org_docs_default=compact \
-d enable_community_pack=false \
-d enable_release_pack=false \
-d enable_vouch_gate=false \
--defaults --overwriteSet -d l1_org_docs_profile=rich|compact to choose how much org structure L1 repositories ship.
Set -d l2_org_docs_default=compact|rich to choose the default org-context depth L1 templates use for generated tpl-project-repo / tpl-monorepo repositories.
Set -d enable_community_pack=true for public/community-facing collaboration intake.
Set -d enable_release_pack=true for release-please/publish automation baseline.
Set -d enable_vouch_gate=true for trust-gated template lines.
This repository runs two Copier passes with different template suffixes:
- L0 -> L1 pass uses
_templates_suffix: .jinja(./copier.yml).- Files under
./copier-template/that should render in this pass must use.jinja.
- Files under
- L1 -> L2 pass uses
_templates_suffix: .j2(each./copier-template/copier/*/copier.yml).- Files under
./copier-template/copier/that should render in this pass must use.j2.
- Files under
Pass-boundary rule:
- never place
.jinjatemplates under./copier-template/copier/ - never place
.j2templates directly under./copier-template/(outside./copier-template/copier/)
bash ./scripts/check-l0-guardrails.sh enforces this boundary to prevent accidental cross-pass suffix drift and fails if nested L2 files contain Jinja markers without the .j2 suffix.
- Start session with:
read @next_session_prompt.md - End session with:
/commit(project-local template at.pi/prompts/commit.md) - Capture raw session notes in
./diary/(repo-local KES rule) - Crystallize via KES flow:
Session output -> diary/ -> docs/learnings/ -> tips/meta/
Use the wrapper instead of ad-hoc inline scripting:
./scripts/rocs.sh version
./scripts/rocs.sh validate --repo .Resolution order (automatic):
- explicit
ROCS_BIN - vendored
./tools/rocs-cli - this repo if it is
rocs-cli - workspace core
~/ai-society/core/rocs-cli rocsonPATH
Diagnostics:
./scripts/rocs.sh --doctor
./scripts/rocs.sh --whichUse plain installed ak when operating on repo-local AK tasks or task-scope snapshots:
ak task show 546
ak task scope show <TASK-ID>
mkdir -p governance/task-scopes && ak task scope export <TASK-ID> > governance/task-scopes/AK-<TASK-ID>.snapshot.jsonAuthor explicit task scope in AK. Frozen governance/task-scopes/AK-<TASK-ID>.snapshot.json files are repo-consumption exports; hand-authored AK-*.json manifests are transitional scaffolding only.
Generic copied AK launcher/build bundles are being removed from templates, fixtures, and generated repos.
The public/operator path is plain installed ak, and template guidance should stay aligned to that surface rather than preserving copied repo-local launcher-resolution logic.
l1_org_docs_profile=rich(default): generated L1 repositories include a richerdocs/org/structure for organization-level governance and strategy artifacts.l1_org_docs_profile=compact: generated L1 repositories keep only a compact org baseline.l2_org_docs_default=compact(default): generated L1 templates default generatedtpl-project-repo/tpl-monoreporepositories to a compact org-context snapshot.l2_org_docs_default=rich: generated L1 templates default generatedtpl-project-repo/tpl-monoreporepositories to a richer org-context pack.
Generated tpl-project-repo / tpl-monorepo repositories can still override with -d org_docs_profile=compact|rich at generation time.
When enable_community_pack=true, generated L1 template repositories include:
.github/ISSUE_TEMPLATE/issue forms.github/pull_request_template.mdCODE_OF_CONDUCT.mdSUPPORT.md
Defaults stay conservative (false) for internal/private template lines.
When enable_release_pack=true, generated L1 template repositories include:
- release workflows (
release-please,release-check,publish) - release metadata (
.release-please-config.json,.release-please-manifest.json) - baseline release/security docs (
CHANGELOG.md,SECURITY.md) - release helper scripts (
scripts/release/check.sh,scripts/release/publish.sh)
Defaults stay conservative (false) and should be enabled when repository governance requires release automation.
Current L2 archetypes (tpl-agent-repo, tpl-org-repo, tpl-project-repo, tpl-monorepo) still inherit enable_community_pack, enable_release_pack, and enable_vouch_gate as compatibility metadata only; they do not scaffold extra L2 overlay files yet.
Run full L0 validations:
bash ./scripts/check-l0.shOptional focused checks:
bash ./scripts/check-supply-chain.sh
bash ./scripts/check-l0-generation.sh
bash ./scripts/check-l0-adversarial.sh
bash ./scripts/check-l0-fixtures.shLayer map:
- L0:
tpl-template-repo - L1: template repos generated from L0
- L2: product repos generated from L1 templates
Allowed edges:
L0 -> L1L1 -> L2
Forbidden edges:
L1 -> L0L2 -> L1- any cycle
scripts/check-l0-guardrails.sh: validates required artifacts + recursion policy + contract presence.scripts/check-l0-generation.sh: renders a sample L1 repo, runs its checks, and verifies idempotency.scripts/check-l0-adversarial.sh: stress-tests operator surfaces (git worktrees, lane bootstrap adoption previews, migration portability, deep repo census).contracts/layer-contract.yml: canonical L0 contract DSL for layer transitions.
- Preview L1 adoption diffs (non-destructive):
The preview focuses on the pure L1 render surface, materializes canonical lane-root baselines when they exist, and ignores nested child repos so tracked lane-baseline drift stays visible.
./scripts/preview-l1-diff.sh /path/to/holdingco ./scripts/preview-l1-diff.sh /path/to/softwareco
- Contributing guide:
CONTRIBUTING.md - Release/compatibility policy:
docs/release-compatibility-policy.md - L1 rollout playbook:
docs/l1-adoption-playbook.md - L2 transition playbook:
docs/l2-transition-playbook.md - Profile governance policy (internal vs public bundles):
docs/profile-governance-policy.md - Supply-chain policy:
docs/supply-chain-policy.md - Vouch
.tdprimer:docs/vouch-td-primer.md - Feature matrix (AI Society L0/L1/L2 vs pi template):
docs/feature-matrix-l0-l1-l2-vs-pi-template.md - Solo-builder cadence:
docs/solo-builder-operating-cadence.md - L0 contribution workflow:
CONTRIBUTING.md - Refresh deterministic fixtures:
bash ./scripts/sync-l0-fixtures.sh
To reduce drift with richer template ecosystems:
- generated L1 template repositories seed baseline folders:
docs/,examples/,external/,ontology/,policy/,src/,tests/ - generated L1 template repositories also seed git baseline files:
.github/,.githooks/,.gitignore,.gitattributes - generated L2 repositories are archetype/profile-specific (from
tpl-agent-repo,tpl-org-repo,tpl-project-repo,tpl-monorepo,tpl-package) and do not all ship identical folder/git baselines; GitHub assets are profile-gated (enable_community_pack,enable_release_pack,enable_vouch_gate)
Use fixtures/ plus bash ./scripts/check-l0-fixtures.sh for the exact rendered baseline contract.