f526a42ddd
- New hands-on/rules/ interactive page: five toggleable rule sources (AGENTS.md, gate-discipline skill, Husky pre-commit, check-ui-contract enforcer, commitlint) rebuild a ruled prompt live against a naive prompt. - Visual system mirrors hands-on/starter (same palette, vanilla JS). - index.html hands-on section now links both labs. - docs/operations-guide.md gains a 'Hands-on rules lab' subsection. - README project structure lists the new lab. - verify.mjs passes content, interaction, and standalone checks for both labs.
29 lines
1.1 KiB
Markdown
29 lines
1.1 KiB
Markdown
# Hands-on · Rules
|
|
|
|
A tiny, zero-dependency demo showing how rule sources reshape the same prompt.
|
|
|
|
## Run
|
|
|
|
Open `index.html` directly. No build, no server, no `npm install`.
|
|
|
|
## What it shows
|
|
|
|
- Five rule sources, taken from a real monorepo (`netcracker/interview`):
|
|
- `AGENTS.md` — repo-wide instruction file.
|
|
- `.agents/skills/gate-discipline/SKILL.md` — skill body loaded on demand.
|
|
- `.husky/pre-commit` — git hook that runs other enforcers.
|
|
- `scripts/check-ui-contract.mjs` — custom CLI enforcer (ratchet).
|
|
- `commitlint.config.cjs` — commit-msg linter.
|
|
- Each rule has an on/off switch. Toggling a rule prepends its body to the **ruled** prompt.
|
|
- EN ↔ PT toggle keeps both languages useful.
|
|
- "Copy ruled prompt" copies the current ruled-prompt text to clipboard.
|
|
- Responsive on mobile, Full HD, and 4K (one column under 720 px).
|
|
|
|
## Mirror of `/hands-on/starter`
|
|
|
|
Same visual system (`--paper`, `--ink`, `--blue`, `--gold`), same vanilla JS pattern, same single-file layout. Drop-in alongside the starter page under `hands-on/rules/`.
|
|
|
|
## Token budget
|
|
|
|
Page weight: ~5 KB total, no framework, no fetch.
|