一键导入
hack
Execute implementation work with TDD. Use when changing code, behavior, contracts, tests, or release artifacts as part of a ProdOps-backed task.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute implementation work with TDD. Use when changing code, behavior, contracts, tests, or release artifacts as part of a ProdOps-backed task.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Proactive drift-scan cycle. Reads all active OBCs and Issues, identifies divergences, and repairs what can be automated. Runs across the entire active backlog, not for a specific OBC.
Read all active OBCs and compare declared state with backlogs and external tools. Produces a divergence list. Does not repair — only identifies gaps.
Event-driven cycle triggered by a product decision. Captures the decision as an OBC, attaches a Work Item, promotes it through the backlog hierarchy, and closes it when the OBC reaches Operational. Runs for a specific OBC.
Create or update an OBC from the decision that triggered the Diligence Sync cycle. Use when an Assessment decision, Discovery experiment, or Operation signal requires canonical state to be recorded before Work Items are created.
Synchronize OBC state across backlogs and tools. Runs event-driven cycle (diligence-sync) or proactive drift-scan cycle (diligence-async). Never touches product code.
Classify divergences from Scan and register them as pending Diligence items with severity and corrective action. Does not repair — only signals.
| name | hack |
| description | Execute implementation work with TDD. Use when changing code, behavior, contracts, tests, or release artifacts as part of a ProdOps-backed task. |
Use this skill to implement the smallest coherent change that satisfies the
current ProdOps release context. This skill is self-sufficient: do not pre-read
AGENTS.md, prodops/framework/, or any other framework documentation before
executing it.
For detailed execution mechanics (branching, code style, No Mocks Rule), read
references/workflow.md on demand.
Read before editing — and only this:
prodops/exec/manifest.yaml: paths.obcs (committed OBCs), paths.bdd
(committed Features), or paths.experiments under
<NNN-slug>/features/ for exploratory work.If the OBC or BDD Feature for the requested behavior is missing, stop and surface the gap — Bootstrap was not completed. Do not invent acceptance criteria.
When invoked with a step argument (/hack <step>), execute only that step
instead of the full flow. Read the corresponding step file and follow it
exclusively — do not run the rest of the flow.
| Step | File | When to use |
|---|---|---|
start | steps/start/SKILL.md | Clean stage, sync base branch, create feature branch |
tdd | steps/tdd/SKILL.md | Execute red → green → yellow cycle with artifact closure |
commit | steps/commit/SKILL.md | Stage and commit after green + lint + trail |
If the requested step is not listed, run the full flow.
Do not read the whole repository or the whole codebase by default. Read only:
Expand reading only when the focused context shows that the behavior crosses a module boundary.
When invoked without a step argument, execute the three steps in sequence. Before starting, confirm the requested behavior exists in the OBC and BDD Feature listed in Required context above.
start → tdd → commit are sequential steps. Security, quality, and
documentation validations are not extra steps — they are transversal and run
inside each cycle's Yellow Bar. See
../../framework/journeys/delivery/phases/hack/README.md.
A Red → Green → Yellow cycle is complete — and you may only commit and move to the next step — when every gate below is satisfied:
| Gate | Check | Command / evidence |
|---|---|---|
| Green | Focused test passing | focused e2e spec via jest e2e config (there are no unit suites — see gates note in the manifest) |
| Lint | Exits 0 for the affected package | manifest gates.lint |
| No forbidden mock | No forbidden jest mock pattern in the diff | manifest gates.no_mocks |
| No secrets or PII | None in the diff | review diff |
| Release Trail | Cycle evidence appended | manifest paths.release_trail |
| ProdOps artifacts | Event Storming / architecture updated when impacted | see tdd step |
These gates are the minimum to commit. The canonical checklist lives in
../../framework/journeys/delivery/phases/hack/quality-gates.md.
Release-blocking gates (what blocks merge) live in
../../framework/journeys/delivery/phases/finish/quality-gates.md.
For Clean Code rules (naming, functions, refactoring) see
../references/local/engineering/clean-code/ (product-local reference).
| Area | File | When to read |
|---|---|---|
| TDD ProdOps | ../references/engineering/tdd-prodops/ | Red/green/yellow cycle, mocking policy, quality gates |
| Clean Code (local) | ../references/local/engineering/clean-code/ | Naming, functions, refactoring, error handling |
| DDD (local) | ../references/local/engineering/ddd/ | Aggregates, repositories, domain events, ubiquitous language |
Gates are named and defined in prodops/exec/manifest.yaml (gates:). The
commands below are inlined for execution and must stay in agreement with the
manifest.
| Gate | Command | Pass criterion |
|---|---|---|
lint | cd api && npm run lint | exit 0 — mandatory after every code change, not optional. Runs ESLint with --fix; auto-corrects Prettier and fixable violations; remaining errors must be fixed in source. Run after green phase, after refactor, and before commit. |
acceptance | ./scripts/test-acceptance.sh (or cd api && npm run test:acceptance) | exit 0 — the test gate (the repo has no unit suites); required when payment behavior or contracts changed; runs the 4 acceptance suites and requires LocalStack |
no_mocks | grep for jest.fn(, .mockReturnValue(, .overrideProvider(, jest.mock( in api/src and api/test | zero hits — see references/workflow.md (No Mocks Rule) |
Required evidence for code changes:
lint gate clean for the affected package.Validation Workbench note: validation-workbench/ has no lint script; run
npm run build inside it for TypeScript and Vite validation.
Write code that satisfies the active lint rules from the start. See
references/workflow.md section Code Style — Active Lint Rules for the
Prettier and TypeScript constraints enforced in api/.