feat(devkit): enforce governed prompt adoption

This commit is contained in:
thanhnv
2026-07-21 23:40:26 +07:00
parent 4d5dca9400
commit 7b2ba60a3a
16 changed files with 622 additions and 12 deletions
+19 -3
View File
@@ -1,16 +1,29 @@
# CASAN Adoption Guide
The installer also provisions the mandatory prompt-enforcement pack. After adoption, send project prompts through `bin/casan-chat` (or `bin/casan-chat.ps1` on Windows/WSL2) and run `bin/casan prompt verify`. See [PROMPT_ENFORCEMENT_GUIDE.md](PROMPT_ENFORCEMENT_GUIDE.md) for the technical boundary and per-trace certification.
How a downstream project adopts the CASAN governance harness. Adoption is **config +
domain only** — you never edit gate logic (H1→H7).
## Option A — DevKit install (recommended)
From a CASAN source hub or an extracted `casan-devkit` bundle:
Clone CASAN Core from your Gitea repository once, and pull the latest `main` before each install or upgrade:
```bash
git clone <gitea-casan-core-url> casan-core
cd casan-core
git pull --ff-only origin main
```
Then run the installer from that CASAN checkout:
```bash
packages/casan-devkit/install.sh --target ../my-project --project ticketing --domain "Ticketing"
```
This copies the core harness + `bin/casan` into `../my-project`, scaffolds
`apps/ticketing/domain/` from the domain-pack template, adds `.gitea/workflows/casan-ci.yml`,
and registers the project in `project-registry.json`.
`apps/ticketing/domain/` from the domain-pack template, installs the prompt entrypoints and
standalone `.gitea/workflows/casan-prompt-enforcement.yml`, and registers the project in
`project-registry.json`. Existing domain files, registry state, and project CI are preserved.
## Option A2 — New production project shell
@@ -32,12 +45,15 @@ tar -xzf casan-core-v1.0.0.tar.gz
cp -R casan-core-v1.0.0/{packages,bin,VERSION} /path/to/project/
```
Then create `apps/<project>/domain/` yourself (see `DOMAIN_PACK_GUIDE.md`).
This harness-only option does not install the mandatory repository prompt-enforcement pack;
use Option A when every project prompt must be governed and certifiable.
## Option C — Docker (no install into repo)
```bash
docker run --rm -v "$PWD":/workspace -w /workspace casan-harness:1.0.0 casan gate
```
See `DOCKER_GUIDE.md`.
This runtime-only option also does not enforce repository-agent entrypoints.
## After install
1. Requirement → `apps/<project>/domain/input/requirement.md` (keep the `| FR-xx |` table).