coder-xieshijie/dev-skills / skills/core-spec
core-spec
VerifiedConverges a conversation and its materials into spec.md, the core decisions; when delivery will be automated, also writes verify.md, the acceptance requirements. Use after discussion and clarification are finished, including when the user confirms core-grill's decision summary.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 28.4 KB |
| agents/openai.yaml | config | 154 B |
| references/cross-model.md | markdown | 6.6 KB |
| references/gap-check.md | markdown | 7.2 KB |
| references/spec-example.md | markdown | 8.9 KB |
| references/verify-example.md | markdown | 10.8 KB |
| references/verify.md | markdown | 18.2 KB |
| scripts/clauses.mjs | script | 5.1 KB |
| scripts/clauses.test.mjs | script | 3.2 KB |
| scripts/freeze.mjsexecutable | script | 4.2 KB |
references/cross-model.md
View on GitHub# Cross-model calls
These tasks are done by a model from another family in a new session: the gap check in core-spec step 7; in deliver, the up-front review at the start, consultation on decisions during delivery, the code review before independent verification, and independent verification; in merge-gate, the initial and fix-delta reviews and, on an MR delivered with deliver, independent verification; in cross-review, the second reviewer. Models from the same family with similar context tend to make the same mistakes; a new session gets only the files the caller gives it and cannot see the caller's conversation.
## Which family to call
Go by the family of the current session's model, not by the client: MCode runs whichever model you configure in it.
| Model of the current session | Call |
|---|---|
| Claude (in Claude Code, or in MCode with a Claude model) | Codex: `codex exec` |
| GPT (in Codex, or in MCode with a GPT model) | Claude Code: `claude -p` |
| Another family (for example a MiniMax model in MCode) | Either: `codex exec` or `claude -p` |
| Any of the above | Any other CLI that runs a model from another family and can take a prompt and write its reply to a file |
Use the model and effort currently configured in the other CLI; when the user specifies otherwise, follow the user. The report states the actual model. When the other CLI cannot be used (not installed, not logged in, or still failing after a retry), switch to another CLI of a different family; when none can be used, do not substitute the same family, and handle it as the place that makes the call says. `claude -p` requires being logged in: `loggedIn` is `true` in `claude auth status`.
## How to call
Do not copy the brief ([gap check brief](gap-check.md), deliver's verifier brief) into the command: the command gives its absolute path and the paths of this call's inputs, and the other side reads them itself. The reply is written to a file, and the caller reads the file. `codex exec` reads stdin when stdin is not a terminal, so connect stdin to `/dev/null`. A call may run for a long time; run it in the background and come back on the notification when it ends.
To continue talking or working in the same session, record the session id (`codex exec` prints it at the start of its output; the result of `claude -p --output-format json` contains `session_id`), then:
| CLI | Resume |
|---|---|
| Codex | In the original directory, run `codex exec resume <session id> "<next turn>"`; it has no `-s`, so set the sandbox with `-c sandbox_mode=<read-only or danger-full-access>`; `-o` works as usual |
| Claude Code | `claude -p --resume <session id> "<next turn>"`, with the same permission flags as the first call |
| Other CLIs | Their own option for continuing a session by id |
### Read-only: gap check, up-front review, decisions during delivery, code review
```bash
codex exec -C <repository> -s read-only -o <reply file> "Run a gap check per <absolute path of gap-check.md>. spec: <path>, sha256 <value>; verify: <path>, sha256 <value>; clause list: <path>; source agreements: <path>; repository: <path>." < /dev/null
```
```bash
claude -p "Run a gap check per <absolute path of gap-check.md>. spec: <path>, sha256 <value>; verify: <path>, sha256 <value>; clause list: <path>; source agreements: <path>; repository: <path>." --permission-mode dontAsk --allowedTools Read Grep Glob "Bash(git log:*)" "Bash(git show:*)" "Bash(ls:*)" > <reply file>
```
For the check limited to changed clauses in core-spec step 7, add the IDs of the changed clauses, or the spec diff, to the same command.
`dontAsk` denies every tool that is not listed, so it cannot write files. `--allowedTools` and `--add-dir` take all the arguments after them as their own values, so the prompt goes right after `-p`.
For decisions during delivery, use the same commands with the prompt replaced by: the question to decide, the relevant spec text, the possible approaches and the evidence for each, asking it to give a choice and the reason. Do not write the caller's leaning.
The up-front review and the code review also use read-only commands; the prompt gives the absolute path of deliver's verifier brief, the parts to do this time and the paths of the input files. The code review runs in a directory that has the head under review checked out.
### Running the app: independent verification
The verifier must start and operate the application, so every CLI runs without a sandbox: Codex with `-s danger-full-access`, Claude with `--permission-mode bypassPermissions`, another CLI with its equivalent. Run in a dedicated directory that has the head under verification checked out, and add the evidence directory with `--add-dir`; for a CLI without such a flag, write the absolute path of the evidence directory in the verification input. Wrap the command in deliver's [stall guard](../../deliver/scripts/stall-guard.mjs). It stops the run only when it stalls: no output and no change in the evidence directory, where the verifier appends a result per scenario, for 60 minutes. A verification that keeps producing results runs to the end, however long it takes:
```bash
node <deliver's directory>/scripts/stall-guard.mjs --idle 60m --watch <evidence directory> -- codex exec -C <verification checkout directory> -s danger-full-access --add-dir <evidence directory> -o <report file> "Verify per <absolute path of verifier-brief.md>. Verification input: <path>." < /dev/null
```
On a stall the guard stops the command's whole process group and exits 124 with a line starting `stall-guard: stalled`, and `-o` does not write the report. Look at the output and at `results.md` in the evidence directory: if it is not done, resume the same session (for example `codex exec resume <session id> -c sandbox_mode=danger-full-access -o <report file> "Continue verifying the scenarios that have no result yet"`) under the guard again; if it failed, decide the next step from the cause. An application the verifier started in a process group of its own may still be running; when you will not resume, the caller stops it.
After verification, `git status --porcelain` in the checkout directory is empty and `HEAD` has not changed: the verifier did not change the code.
## After the call
- The reply has the required content: a gap check report has issue entries, or says "No issues found" and lists the scope checked; a verification report has the three lines `head:`, `verifier-model:` and `verdict:` and the results table. When something is missing, the reply is truncated, or the call errors, retry once.
- To spot-check a call, find the other side's session log by session id; Codex keeps them under `$CODEX_HOME/sessions/`, with the session id in the file name.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |