Skip to content

Commit 39f3bd9

Browse files
brabojclaude
andauthored
chore(templates): move the concern directories out of base (#1504) (#1941)
templates/base/<concern>/ becomes templates/<concern>/ for core, security, workflow, infra, data and language, per ADR-050. Template and section IDs are unchanged, and every root resolves the same ordered ID list and the same section directives before and after. sync.py lists each concern directory on its own and checks base: entries against the concern directories; smoke's TPL-08 reads the concern directories directly. Active references follow; history, the frozen benchmark arms, examples/ and the harness's pinned vendoring path keep the old paths. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 60ec068 commit 39f3bd9

125 files changed

Lines changed: 1099 additions & 1103 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ alters no template carries no entry.
2121

2222
## [Unreleased]
2323

24+
### Breaking changes
25+
26+
- The concern directories leave `templates/base/`: `templates/base/<concern>/`
27+
is now `templates/<concern>/` for core, security, workflow, infra, data and
28+
language. Template and section IDs are unchanged; update any path a
29+
reference or hybrid file, or a vendored copy, names.
30+
2431
### Changed
2532

2633
- The repository moved to the `solid-ai-dev` organisation. Generated files

‎CLAUDE.md‎

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ project type.
2020

2121
```
2222
templates/ # All template source files
23-
base/ # Cross-cutting rules (core, security, infra, workflow, language)
23+
core/ # Cross-cutting foundation (git, docs, quality, testing, ...)
24+
security/ # Security rules
25+
workflow/ # Session protocol, issues, gates
26+
infra/ # CI/CD, containers, deployment
27+
data/ # Data modeling, quality, governance, migration
28+
language/ # Language-specific rules
2429
backend/ # Backend layer — HTTP, API, database, observability
2530
frontend/ # Frontend layer — UX, accessibility, CSS, SSG
2631
platform/ # CI and security tool mappings per hosting platform
@@ -147,9 +152,11 @@ Stacks without a variant use a bare name (e.g. `htmx.md`).
147152
### 2.4 Inheritance model
148153

149154
```
150-
base/ ──┬── frontend/ ──┐
151-
├── backend/ ──┼── stack/
152-
└── platform/ ──┘
155+
concerns ──┬── frontend/ ──┐
156+
├── backend/ ──┼── stack/
157+
└── platform/ ──┘
158+
159+
concerns = core/, security/, workflow/, infra/, data/, language/
153160
```
154161

155162
- Every stack declares `[DEPENDS ON: ...]` at the top
@@ -180,12 +187,12 @@ base/ ──┬── frontend/ ──┐
180187
### 2.6 Adding a new base or layer template
181188

182189
1. Create the file in the correct directory:
183-
- `templates/base/core/` — foundation (git, docs, quality, etc.)
184-
- `templates/base/security/` — security rules
185-
- `templates/base/infra/` — CI/CD, containers, deployment
186-
- `templates/base/workflow/` — session protocol, issues, gates
187-
- `templates/base/language/` — language-specific rules
188-
- `templates/base/data/` — data modeling, quality, governance, migration
190+
- `templates/core/` — foundation (git, docs, quality, etc.)
191+
- `templates/security/` — security rules
192+
- `templates/infra/` — CI/CD, containers, deployment
193+
- `templates/workflow/` — session protocol, issues, gates
194+
- `templates/language/` — language-specific rules
195+
- `templates/data/` — data modeling, quality, governance, migration
189196
- `templates/backend/` — backend services
190197
- `templates/frontend/` — frontend/UI projects
191198
- `templates/platform/` — CI platform mappings
@@ -288,7 +295,7 @@ base/ ──┬── frontend/ ──┐
288295

289296
#### Decision logs
290297

291-
- Apply the ADR threshold in `templates/base/core/docs.md`: a record is
298+
- Apply the ADR threshold in `templates/core/docs.md`: a record is
292299
owed when a decision changes something a consuming project can observe
293300
without reading this repository — the composition model. Prose style,
294301
tooling, release procedure, naming and file layout do not, however
@@ -530,7 +537,7 @@ summarize — visible sequential execution prevents missed steps.
530537
checks pass
531538
6. **CLAUDE.md** — for each new convention/rule, apply the
532539
doc-placement decision tree in
533-
`templates/base/workflow/ai-workflow.md` (Doc placement decision
540+
`templates/workflow/ai-workflow.md` (Doc placement decision
534541
tree section): evaluate code → ADR → README → PLAYBOOK →
535542
CLAUDE.md → memory in order. CLAUDE.md is the home ONLY if the
536543
agent MUST apply the rule on every turn.

‎README.md‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ effective; declining a new rule needs no ADR or ticket. See the
123123
<!-- generated:readme-model-limits -->
124124
| Stack category | Stacks | Largest chain | Prompt | Min context |
125125
|----------------|--------|---------------|--------|-------------|
126-
| abstract | 2 | `stack-python-service` — 557K chars | ~159K tokens | 200K |
127-
| backend | 8 | `stack-django` — 571K chars | ~163K tokens | 200K |
126+
| abstract | 2 | `stack-python-service` — 556K chars | ~159K tokens | 200K |
127+
| backend | 8 | `stack-django` — 570K chars | ~163K tokens | 200K |
128128
| embedded | 1 | `stack-c-embedded` — 363K chars | ~104K tokens | 128K |
129129
| hypermedia | 1 | `stack-htmx` — 382K chars | ~109K tokens | 128K |
130130
| library | 3 | `stack-python-lib` — 486K chars | ~139K tokens | 200K |
@@ -211,17 +211,17 @@ meets templates the stacks table does not list.
211211
| `templates/backend/microservices.md` | backend | Service boundaries, inter-service comms, saga, contract testing |
212212
| `templates/backend/monitoring.md` | backend | Key metrics, thresholds, alerts, dashboards, incidents |
213213
| `templates/backend/webhooks.md` | backend | Inbound webhook intake, edge signature verification, fast-ack, retry amplification |
214-
| `templates/base/workflow/360.md` | workflow | 360-degree project analysis — four stakeholder perspectives, grading |
215-
| `templates/base/core/agents.md` | core | Output structure, models (inline/reference/hybrid), formatting rules |
216-
| `templates/base/workflow/ai-workflow.md` | workflow | AI-assisted development lifecycle, work item hierarchy |
217-
| `templates/base/workflow/communication.md` | workflow | Communication preferences — concise output, shorthand verbs, scope-asking |
218-
| `templates/base/workflow/compression.md` | workflow | Re-verifying summaries, tables and rollups derived from verified research |
219-
| `templates/base/data/data-governance.md` | data | Classification, PII handling, retention, ownership, audit trail |
220-
| `templates/base/data/data-migration.md` | data | Versioned migrations, zero-downtime, rollback strategies |
221-
| `templates/base/infra/deployment.md` | infra | Deployment targets (cloud/hybrid/offline), certs, LB, registries, secrets |
222-
| `templates/base/workflow/release.md` | workflow | Semver, version bump propagation, backward compat, cut-over |
223-
| `templates/base/core/skills.md` | core | Skill authoring — when to write one, frontmatter, triggering, structure, scripts |
224-
| `templates/base/workflow/two-pass-review.md` | workflow | Split convention checks into mechanical (auto-fix) and contextual (over-flag, judge) passes over one catalogue |
214+
| `templates/workflow/360.md` | workflow | 360-degree project analysis — four stakeholder perspectives, grading |
215+
| `templates/core/agents.md` | core | Output structure, models (inline/reference/hybrid), formatting rules |
216+
| `templates/workflow/ai-workflow.md` | workflow | AI-assisted development lifecycle, work item hierarchy |
217+
| `templates/workflow/communication.md` | workflow | Communication preferences — concise output, shorthand verbs, scope-asking |
218+
| `templates/workflow/compression.md` | workflow | Re-verifying summaries, tables and rollups derived from verified research |
219+
| `templates/data/data-governance.md` | data | Classification, PII handling, retention, ownership, audit trail |
220+
| `templates/data/data-migration.md` | data | Versioned migrations, zero-downtime, rollback strategies |
221+
| `templates/infra/deployment.md` | infra | Deployment targets (cloud/hybrid/offline), certs, LB, registries, secrets |
222+
| `templates/workflow/release.md` | workflow | Semver, version bump propagation, backward compat, cut-over |
223+
| `templates/core/skills.md` | core | Skill authoring — when to write one, frontmatter, triggering, structure, scripts |
224+
| `templates/workflow/two-pass-review.md` | workflow | Split convention checks into mechanical (auto-fix) and contextual (over-flag, judge) passes over one catalogue |
225225
| `templates/platform/github.md` | platform | CodeQL, GitHub Actions, gitleaks action, push protection |
226226
| `templates/platform/gitlab.md` | platform | Semgrep OSS, GitLab CI/CD, gitleaks CLI |
227227
| `templates/platform/linear.md` | platform | Label groups, native priority, sub-issues, code-host sync |
@@ -246,7 +246,7 @@ Attach the template directly, or run `python3 tools/resolve.py <root>
246246
| Generic / other | `AI_CONTEXT.md` |
247247
<!-- /generated:readme-agents -->
248248

249-
See `templates/base/core/agents.md` for structure, models, and formatting rules.
249+
See `templates/core/agents.md` for structure, models, and formatting rules.
250250

251251
## Links
252252

‎docs/ONBOARDING.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ files. Instead of writing a `CLAUDE.md` or `AGENTS.md` from scratch for every
1010
project, you compose templates from three layers:
1111

1212
```
13-
templates/base/ → rules that apply to every project
13+
templates/core/ → rules that apply to every project; security/,
14+
workflow/, infra/, data/ and language/ sit beside it
1415
templates/backend/ → rules for backend services and APIs
1516
templates/frontend/ → rules for frontend and UI projects
1617
templates/stack/ → concrete, technology-specific rules
@@ -74,7 +75,7 @@ what differs from the parent.
7475

7576
Example chain:
7677
```
77-
templates/base/core/git.md + templates/base/core/quality.md + ...
78+
templates/core/git.md + templates/core/quality.md + ...
7879
↓
7980
templates/stack/python-lib.md
8081
↓
@@ -115,7 +116,7 @@ Then run the system end-to-end with an agent:
115116

116117
1. Open Claude Code in any project directory
117118
2. Attach `templates/INTERVIEW.md` and `templates/stack/python-flask.md`
118-
3. Ask: "Generate a CLAUDE.md for this project using templates/base/core/agents.md
119+
3. Ask: "Generate a CLAUDE.md for this project using templates/core/agents.md
119120
format"
120121
4. Review the output — this is what users get
121122

0 commit comments

Comments
 (0)