fix template, remove okr, use casan.*

This commit is contained in:
thanhnv
2026-07-18 16:45:31 +07:00
parent 0dfd1742d3
commit 13fae3e6c3
249 changed files with 4881 additions and 5702 deletions
+7 -5
View File
@@ -10,6 +10,7 @@ Scaffold template: `packages/casan-devkit/templates/domain-pack/`.
```
apps/<project>/domain/
├── domain-pack.yaml # manifest describing this pack
├── project.manifest.json # executable project/build/test/verification contract
├── input/
│ ├── requirement.md # FR-xx table drives the traceability gate
│ └── architecture.md # optional tech-stack/context
@@ -33,10 +34,12 @@ apps/<project>/domain/
- **traceability-map.json** — `{"FR-01": {"name": "...", "code": ["apps/okr/backend/src/...", {"file":"...","symbols":["Foo"],"lines":[12]}], "tests": ["..."]}}`. Symbol/line refs are
optional but tighten the gate.
- **domain-pack.yaml** — documents the above + optional threshold overrides.
- **project.manifest.json** — selects authoritative inputs, source roots, quality profile,
feature/artifact namespace, argv build/test commands, and per-path verification commands.
## Wire it up
```bash
export CASAN_DOMAIN_ROOT=apps/<project>/domain
export CASAN_PROJECT_MANIFEST=apps/<project>/domain/project.manifest.json
bin/casan gate # runs domain-dependent suites against your pack
```
`domain_root` is also recorded per-project in `packages/casan-harness/level5/project-registry.json`
@@ -46,7 +49,6 @@ so `bin/casan reuse` can prove multi-project reuse.
The OKR app's own pack is the worked example: `apps/okr/domain/` (golden-runs, corpus,
input, traceability-map). Copy its shape for your domain.
## Toward Plan-12 (Domain Pack SDK)
Today a pack is a directory + `CASAN_DOMAIN_ROOT`. Plan-12 will make it fully declarative
(register a pack by manifest, no manual wiring). The `domain-pack.yaml` here is the seed of
that manifest.
The project manifest is validated fail-closed by both Node and Python runtimes. Paths are confined
to the repository, commands are argv arrays checked against the quality-profile executable
allowlist, and every source root must map to a post-patch verification rule.