forked from bchanot/claude
feat(generators): onboarder and scaffolder emit docker/testing/ci path rules from templates/project-rules
This commit is contained in:
1 parent
041e04b1d6
commit
dbd20dd575
7 files changed
+86
No files matched your search
@@ -128,6 +128,24 @@ ls ${PROJECT_ROOT}/.claude/tasks/TODO.md ${PROJECT_ROOT}/.claude/memory/ 2>/dev/
|
||||
|
||||
**Do NOT overwrite existing content.**
|
||||
|
||||
## PHASE 5b — PATH-SCOPED RULES (born split)
|
||||
|
||||
For each of `docker`, `testing`, `ci`:
|
||||
```bash
|
||||
bash ~/.claude/lib/project-rules.sh -C <PROJECT_ROOT> emit ~/.claude/templates/project-rules/<name>.md .claude/rules/<name>.md
|
||||
```
|
||||
- rc 0 → written with the globs that match this tree; its stub comments
|
||||
are `<!-- TODO(/onboard STEP 3): … -->` placeholders the orchestrator's
|
||||
STEP 3 fills (list them in OUTPUT beside the CLAUDE.md placeholders).
|
||||
Fill now only what the BRIEF already settles (`docker` commands from
|
||||
`build_cmd`, `testing` layout from `test_cmd`); never duplicate the
|
||||
always-on Build/Test sections.
|
||||
- rc 1 → no match, nothing written, skip silently.
|
||||
- rc 2 → the file exists: keep it, never overwrite.
|
||||
Then `bash ~/.claude/lib/project-rules.sh -C <PROJECT_ROOT> check` must print
|
||||
`N rule(s) ok`. The `!.claude/rules/` negation comes from the gitflow socle
|
||||
at /onboard STEP 2.6 (`gitflow init` reconciles it); PHASE 4 stays as is.
|
||||
|
||||
---
|
||||
|
||||
## PHASE 6 — GSD v2 ROADMAP (optional, per orchestrator flag)
|
||||
|
||||
@@ -73,6 +73,25 @@ Empty structure only: imports + empty main/init. No logic.
|
||||
`.dockerignore`: node_modules, .git, .env, dist/build/target, __pycache__.
|
||||
Add `COMPOSE_PROJECT_NAME=<slug>` to `.env.example`.
|
||||
|
||||
## PHASE 3b — PATH-SCOPED RULES (born split)
|
||||
|
||||
After PHASE 3 wrote the files and BEFORE PHASE 4 installs dependencies
|
||||
(installed packages must not match the globs). `<PROJECT_ROOT>` is the
|
||||
project root PHASE 1 wrote `CLAUDE.md` into, as a literal absolute path
|
||||
(`pwd` there; it is not an INPUT, the scaffold defines it). For each of
|
||||
`docker`, `testing`, `ci`, one uniform loop:
|
||||
```bash
|
||||
bash ~/.claude/lib/project-rules.sh -C <PROJECT_ROOT> emit ~/.claude/templates/project-rules/<name>.md .claude/rules/<name>.md
|
||||
```
|
||||
rc 0 → fill its stubs from the DESIGN (image, compose services, test
|
||||
layout, pipeline jobs), no placeholders left; rc 1 → nothing matched,
|
||||
skipped (a plain scaffold yields `docker.md` when Docker is relevant, and
|
||||
`testing.md` only when the stack scaffolds a test file). Then
|
||||
`bash ~/.claude/lib/project-rules.sh -C <PROJECT_ROOT> check` prints
|
||||
`N rule(s) ok`. The `.gitignore` negation `!.claude/rules/` comes from the
|
||||
gitflow socle at STEP 5f (`gitflow init` reconciles it before the root
|
||||
commit); do not add `.claude` lines to the stack `.gitignore` yourself.
|
||||
|
||||
---
|
||||
|
||||
## PHASE 4 — INSTALL DEPS
|
||||
|
||||
Reference in new issue
Block a user