okstra 0.216.0 → 0.218.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/pr/pr.d.mts +5 -1
- package/dist/commands/pr/pr.mjs +40 -14
- package/dist/commands/pr/pr.mjs.map +1 -1
- package/docs/cli.md +1 -1
- package/docs/pr-template-usage.md +2 -1
- package/docs/project-structure-overview.md +1 -1
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/prompts/coding-preflight/clean-code.md +24 -0
- package/runtime/prompts/coding-preflight/overview.md +1 -0
- package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-diff-review.md +1 -0
- package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-verifier.md +1 -0
- package/runtime/python/okstra_ctl/phases/release_handoff/profile.md +6 -6
- package/runtime/python/okstra_ctl/phases/release_handoff/spec.md +1 -1
- package/runtime/skills/okstra-pr-gen/SKILL.md +8 -44
- package/runtime/templates/pr/drafting-rules.md +32 -0
- package/runtime/templates/pr/pr-body.template.md +6 -11
- package/dist/commands/pr/default.md +0 -21
|
@@ -11,11 +11,13 @@ interface CommitSummary {
|
|
|
11
11
|
}
|
|
12
12
|
interface GenerationBundle {
|
|
13
13
|
readonly base: string;
|
|
14
|
+
readonly head: string;
|
|
14
15
|
readonly currentBranch: string | null;
|
|
15
16
|
readonly templateName: string;
|
|
16
17
|
readonly template: string;
|
|
17
18
|
readonly commits: readonly CommitSummary[];
|
|
18
19
|
readonly diffStat: string;
|
|
20
|
+
readonly draftingRules: string;
|
|
19
21
|
}
|
|
20
22
|
export declare function isValidTemplateName(name: string): boolean;
|
|
21
23
|
export declare function templateDir(home: string): string;
|
|
@@ -23,11 +25,13 @@ export declare function listTemplates(home: string): Promise<string[]>;
|
|
|
23
25
|
export declare function readTemplate(home: string, name: string | undefined): Promise<string>;
|
|
24
26
|
export declare function addTemplate(home: string, name: string, content: string, opts?: TemplateOptions): Promise<string>;
|
|
25
27
|
export declare function recommendBranches(cwd: string): BranchRecommendation;
|
|
26
|
-
export declare function buildGenBundle({ cwd, home, base, templateName, }: {
|
|
28
|
+
export declare function buildGenBundle({ cwd, home, base, head, templateName, templateFile, }: {
|
|
27
29
|
readonly cwd: string;
|
|
28
30
|
readonly home: string;
|
|
29
31
|
readonly base: string;
|
|
32
|
+
readonly head?: string;
|
|
30
33
|
readonly templateName: string | undefined;
|
|
34
|
+
readonly templateFile?: string | undefined;
|
|
31
35
|
}): Promise<GenerationBundle>;
|
|
32
36
|
export declare function renderGenerationBundle(bundle: GenerationBundle): string;
|
|
33
37
|
export declare function run(args: readonly string[]): Promise<number>;
|
package/dist/commands/pr/pr.mjs
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { promises as fs } from "node:fs";
|
|
2
2
|
import { execFileSync } from "node:child_process";
|
|
3
|
-
import {
|
|
4
|
-
import { dirname, join, resolve } from "node:path";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
5
4
|
import { createInterface } from "node:readline/promises";
|
|
6
5
|
import { stdin as input, stdout as output } from "node:process";
|
|
7
6
|
import { resolveOkstraHome } from "../../lib/paths.mjs";
|
|
7
|
+
import { getPackageRoot } from "../../lib/version.mjs";
|
|
8
8
|
const NAME_RE = /^[A-Za-z0-9._-]+$/;
|
|
9
|
-
|
|
9
|
+
// release-handoff resolves the installed copy of this same file as its default, so both callers
|
|
10
|
+
// fill one template and follow one set of drafting rules.
|
|
11
|
+
const PR_TEMPLATE_DIR = join(getPackageRoot(), "runtime", "templates", "pr");
|
|
12
|
+
const DEFAULT_TEMPLATE_PATH = join(PR_TEMPLATE_DIR, "pr-body.template.md");
|
|
13
|
+
const DRAFTING_RULES_PATH = join(PR_TEMPLATE_DIR, "drafting-rules.md");
|
|
10
14
|
const USAGE = `okstra pr — PR body templates and PR generation
|
|
11
15
|
|
|
12
16
|
Usage:
|
|
@@ -15,7 +19,7 @@ Usage:
|
|
|
15
19
|
okstra pr template add --name <name> (--content <text> | --file <path>) [--yes]
|
|
16
20
|
okstra pr template path
|
|
17
21
|
okstra pr branches [--json]
|
|
18
|
-
okstra pr gen --base <ref> [--template <name|default>] [--json]
|
|
22
|
+
okstra pr gen --base <ref> [--head <ref>] [--template <name|default> | --template-file <path>] [--json]
|
|
19
23
|
`;
|
|
20
24
|
export function isValidTemplateName(name) {
|
|
21
25
|
return (typeof name === "string" &&
|
|
@@ -219,15 +223,18 @@ function cmdBranches(args, cwd) {
|
|
|
219
223
|
output.write((r.recommended.join("\n") || "(no branches)") + "\n");
|
|
220
224
|
return 0;
|
|
221
225
|
}
|
|
222
|
-
export async function buildGenBundle({ cwd, home, base, templateName, }) {
|
|
226
|
+
export async function buildGenBundle({ cwd, home, base, head = "HEAD", templateName, templateFile, }) {
|
|
223
227
|
if (!base)
|
|
224
228
|
throw new Error("gen requires --base");
|
|
225
229
|
const verified = tryGit(cwd, ["rev-parse", "--verify", "--quiet", `${base}^{commit}`]);
|
|
226
230
|
if (verified === null)
|
|
227
231
|
throw new Error(`base ref not found: ${base}`);
|
|
232
|
+
if (tryGit(cwd, ["rev-parse", "--verify", "--quiet", `${head}^{commit}`]) === null) {
|
|
233
|
+
throw new Error(`head ref not found: ${head}`);
|
|
234
|
+
}
|
|
228
235
|
const currentBranch = tryGit(cwd, ["rev-parse", "--abbrev-ref", "HEAD"]);
|
|
229
236
|
const logRaw = tryGit(cwd, [
|
|
230
|
-
"log", "--reverse", "--format=%h%x09%s", `${base}
|
|
237
|
+
"log", "--reverse", "--format=%h%x09%s", `${base}..${head}`,
|
|
231
238
|
]) || "";
|
|
232
239
|
const commits = logRaw
|
|
233
240
|
.split("\n")
|
|
@@ -236,12 +243,17 @@ export async function buildGenBundle({ cwd, home, base, templateName, }) {
|
|
|
236
243
|
const tab = line.indexOf("\t");
|
|
237
244
|
return { hash: line.slice(0, tab), subject: line.slice(tab + 1) };
|
|
238
245
|
});
|
|
239
|
-
const diffStat = tryGit(cwd, ["diff", "--stat", `${base}
|
|
240
|
-
const template =
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
246
|
+
const diffStat = tryGit(cwd, ["diff", "--stat", `${base}...${head}`]) || "";
|
|
247
|
+
const template = templateFile
|
|
248
|
+
? await fs.readFile(resolve(cwd, templateFile), "utf8")
|
|
249
|
+
: await readTemplate(home, templateName);
|
|
250
|
+
const resolvedName = templateFile
|
|
251
|
+
? resolve(cwd, templateFile)
|
|
252
|
+
: templateName && templateName !== "default" ? templateName : "default";
|
|
253
|
+
const draftingRules = await fs.readFile(DRAFTING_RULES_PATH, "utf8");
|
|
254
|
+
return {
|
|
255
|
+
base, head, currentBranch, templateName: resolvedName, template, commits, diffStat, draftingRules,
|
|
256
|
+
};
|
|
245
257
|
}
|
|
246
258
|
export function renderGenerationBundle(bundle) {
|
|
247
259
|
const commits = bundle.commits.length
|
|
@@ -250,6 +262,7 @@ export function renderGenerationBundle(bundle) {
|
|
|
250
262
|
return [
|
|
251
263
|
"Okstra PR generation",
|
|
252
264
|
`Base: ${bundle.base}`,
|
|
265
|
+
`Head: ${bundle.head}`,
|
|
253
266
|
`Current branch: ${bundle.currentBranch ?? "-"}`,
|
|
254
267
|
`Template name: ${bundle.templateName}`,
|
|
255
268
|
"Commits:",
|
|
@@ -258,20 +271,28 @@ export function renderGenerationBundle(bundle) {
|
|
|
258
271
|
bundle.diffStat || "-",
|
|
259
272
|
"Template:",
|
|
260
273
|
bundle.template,
|
|
274
|
+
"Drafting rules:",
|
|
275
|
+
bundle.draftingRules,
|
|
261
276
|
].join("\n");
|
|
262
277
|
}
|
|
263
278
|
async function cmdGen(args, cwd, home) {
|
|
264
279
|
const opts = {
|
|
265
280
|
base: null,
|
|
266
|
-
|
|
281
|
+
head: "HEAD",
|
|
282
|
+
template: null,
|
|
283
|
+
templateFile: null,
|
|
267
284
|
};
|
|
268
285
|
const json = args.includes("--json");
|
|
269
286
|
for (let i = 0; i < args.length; i++) {
|
|
270
287
|
const flag = args[i];
|
|
271
288
|
if (flag === "--base")
|
|
272
289
|
opts.base = takeValue(args, i++, flag);
|
|
290
|
+
else if (flag === "--head")
|
|
291
|
+
opts.head = takeValue(args, i++, flag);
|
|
273
292
|
else if (flag === "--template")
|
|
274
293
|
opts.template = takeValue(args, i++, flag);
|
|
294
|
+
else if (flag === "--template-file")
|
|
295
|
+
opts.templateFile = takeValue(args, i++, flag);
|
|
275
296
|
else if (flag === "--json")
|
|
276
297
|
continue;
|
|
277
298
|
else
|
|
@@ -279,11 +300,16 @@ async function cmdGen(args, cwd, home) {
|
|
|
279
300
|
}
|
|
280
301
|
if (opts.base === null)
|
|
281
302
|
throw new Error("gen requires --base");
|
|
303
|
+
if (opts.template !== null && opts.templateFile !== null) {
|
|
304
|
+
throw new Error("gen takes --template or --template-file, not both");
|
|
305
|
+
}
|
|
282
306
|
const bundle = await buildGenBundle({
|
|
283
307
|
cwd,
|
|
284
308
|
home,
|
|
285
309
|
base: opts.base,
|
|
286
|
-
|
|
310
|
+
head: opts.head,
|
|
311
|
+
templateName: opts.template ?? "default",
|
|
312
|
+
templateFile: opts.templateFile ?? undefined,
|
|
287
313
|
});
|
|
288
314
|
output.write(json ? JSON.stringify(bundle) + "\n" : renderGenerationBundle(bundle));
|
|
289
315
|
return 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr.mjs","sourceRoot":"","sources":["../../../src/commands/pr/pr.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAE,MA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AAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACjD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpB,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,IAAI,GAAG,iBAAiB,EAAE,CAAC;IACjC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAI,CAAC;QACH,IAAI,GAAG,KAAK,UAAU;YAAE,OAAO,MAAM,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7D,IAAI,GAAG,KAAK,UAAU;YAAE,OAAO,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAChE,IAAI,GAAG,KAAK,KAAK;YAAE,OAAO,MAAM,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC;QAClE,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,EAAE,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,OAAO,IAAI,CAAC,CAAC;QAC5C,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
|
package/docs/cli.md
CHANGED
|
@@ -883,7 +883,7 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
883
883
|
| `okstra recap <assemble\|record\|note> (<task-root\|task-key> \| --task-group <group>) …` | Backend for the okstra-inspect `recap` facet. `assemble` is read-only: for a task it prints a JSON summary of phase transitions across its runs; with `--task-group` it prints the group's start order (briefs in ordinal order, each `done` / `in progress` / `not started` from the catalog's task-manifests, memory entries only for tasks the catalog does not know) and every recorded task's latest conclusion from `group-context.md`'s Task Memory. `okstra model-io recap-input --task-group <group>` is the fixed-text projection of the same join. `record --kind <summary\|qa> --mode <artifact\|code> --answer <text> [--question <text>] [--citation <path:line> …]` appends one line to `<task-root>/recap/recap-log.jsonl`, or with `--task-group` to `.okstra/tasks/<group>/.recap/recap-log.jsonl`, and never mutates other artifacts. `note` is task-only. `note --kind <verification-evidence\|decision-draft\|analysis-note> --slug <topic> --purpose <text> --scope-note <text> (--body <markdown>\|--body-file <path>)` writes an agent-authored note to `<task-root>/notes/` and prints its path plus the `--clarification-response` argument for feeding it into a later run |
|
|
884
884
|
| `okstra user-response <list-view\|show-view\|begin\|answer\|plan-decision\|legacy-report-authoring\|finalize> …` | Backend for the `/okstra-user-response` skill. `list-view` and `show-view --report <md\|data.json> --project-root <dir>` are fixed-text model views; `show-view` validates that the report belongs to the explicit project root and prints each open row's why-asked line, linked plan items, and cited `path:line` artifacts so the skill can read them before asking. The legacy `list` and `show` JSON reads retain their automation-compatible fields. `begin --report <md\|data.json> --task-key <key>` returns an opaque transaction id. A predefined clarification choice uses `answer --transaction <id> --clarification-id <C-NNN> --kind <kind> --option-number <N>`; Python resolves the answer, disposition, reach, and scope effects from the validated report. Direct input instead uses `--disposition <answer\|reframe> --value-file <md> [--rationale-file <md>]`. Every value, rationale, and reason file must be a regular file under `<PROJECT_ROOT>/.okstra/tmp/user-response/`; external paths and symbolic links are rejected. `plan-decision` accepts `approved`, `revision-requested`, or `rejected`, validates any `--implementation-option` against the report candidates, and requires `--reason-file` for the latter two statuses. `legacy-report-authoring` is restricted to report contract 2.0. `finalize` validates the complete existing sidecar before a lossless merge, uses compare-and-swap under a run-local lock, and atomically publishes only the user-owned sidecar; exit 0 ok / 1 error. |
|
|
885
885
|
| `okstra option-comparison --report <data.json\|md>` | Read-only backend for the okstra-run comparison material. Prints one implementation-option-selection report's comparison facts as JSON: `criteria` (the eight evaluation criteria and their weights), `workers` (voting analysts in first-seen order), and per ranked direction `scores`, `scoreRationales`, the recorded `weightedScore` (publication already checks it against the recalculated value), `coverage` (verdict, counts, requirement ids), `safetyBlockers` and `unresolvedFeasibilityFacts` counts, and `votes` per worker (verdict, rationale, counterevidence); plus the report's `narrative` texts and `nextStep`, which is the next-phase pointer rationale. Exits 2 when the record has no `implementationOptionSelection` block or ranks no direction. |
|
|
886
|
-
| `okstra pr <template\|branches\|gen> … [--json]` | Backend for the okstra-pr-gen skill. Git-only—no project registration required. `template list\|show <name\|default>\|add --name <name> (--content <text>\|--file <path>)\|path` manages PR body templates under `~/.okstra/template/pr/` (
|
|
886
|
+
| `okstra pr <template\|branches\|gen> … [--json]` | Backend for the okstra-pr-gen skill. Git-only—no project registration required. `template list\|show <name\|default>\|add --name <name> (--content <text>\|--file <path>)\|path` manages PR body templates under `~/.okstra/template/pr/` (default `templates/pr/pr-body.template.md`, shared with release-handoff); `branches` recommends a base branch; `gen --base <ref> [--head <ref>] [--template <name\|default> \| --template-file <path>]` emits fixed `Base`, `Head`, `Current branch`, `Template name`, `Commits`, `Diff stat`, `Template`, and `Drafting rules` sections by default. `--head` reads a branch without checking it out. `--json` preserves the machine bundle for automation. |
|
|
887
887
|
| `okstra migrate [--apply] [--cwd <dir>] [--quiet]` | One-time migration of the project artifact root from `.project-docs/okstra/` to `.okstra/`. It is a dry run by default; `--apply` performs the move with `git mv` in a Git worktree, removes an empty `.project-docs/`, and synchronizes the `<PROJECT>/CLAUDE.md` import line, `.gitignore`, the project's rows in `~/.okstra/{recent,active}.jsonl`, and `~/.okstra/worktrees/registry.json`. It exits 1 if `.okstra/` already exists or the legacy directory is absent. Scheduled for removal by the end of v0.x |
|
|
888
888
|
| `okstra task-list [--project-root <path>]` | Combine `list_project_tasks` and `read_latest_task` into JSON containing the task catalog and latest task |
|
|
889
889
|
| `okstra task-show <task-key> [--project-root <path>]` | Summarize workflow, phase, status, and artifacts from the Task Read-Side Snapshot |
|
|
@@ -32,7 +32,8 @@ no PR template available: default template not found. Searched: <candidate paths
|
|
|
32
32
|
|
|
33
33
|
## 3. The original inside the source repository
|
|
34
34
|
|
|
35
|
-
- [`templates/pr/pr-body.template.md`](../templates/pr/pr-body.template.md) — the original that `npx okstra install` copies to `~/.okstra/templates/pr/pr-body.template.md` (§2 candidate 2). To change the copy, edit this file and install again.
|
|
35
|
+
- [`templates/pr/pr-body.template.md`](../templates/pr/pr-body.template.md) — the original that `npx okstra install` copies to `~/.okstra/templates/pr/pr-body.template.md` (§2 candidate 2). To change the copy, edit this file and install again. `okstra pr gen --template default` reads the packaged copy of the same file, so the okstra-pr-gen skill and release-handoff share one default.
|
|
36
|
+
- [`templates/pr/drafting-rules.md`](../templates/pr/drafting-rules.md) — the drafting rules `okstra pr gen` prints after the template. The release-handoff lead passes the resolved template with `okstra pr gen --template-file <PR_TEMPLATE_PATH>` and fills it by these rules.
|
|
36
37
|
|
|
37
38
|
## 4. Configuration commands — persistence
|
|
38
39
|
|
|
@@ -206,7 +206,7 @@ The Module column below is where the command's behaviour lives — a `src/` modu
|
|
|
206
206
|
| `token-usage` | `scripts/okstra-token-usage.py` | Wrap installed Python token usage CLI |
|
|
207
207
|
| `spawn-followups`, `error-log` | `scripts/okstra-spawn-followups.py`, `scripts/okstra-error-log.py` | Follow-up task bundle creation and run error-log append helpers |
|
|
208
208
|
| `memory` | `src/commands/memory/memory.mts` | Store/find global conversation memory under `~/.okstra/memory-book`; `add --source-key` returns the stored entry for a key it already holds, under a per-key lock (`src/lib/file-lock.mts`, shared with `chat`) |
|
|
209
|
-
| `pr` | `src/commands/pr/pr.mts` | `okstra pr <template\|branches\|gen>` — PR body template store under `~/.okstra/template/pr/` (
|
|
209
|
+
| `pr` | `src/commands/pr/pr.mts` | `okstra pr <template\|branches\|gen>` — PR body template store under `~/.okstra/template/pr/` (default `templates/pr/pr-body.template.md`, shared with release-handoff), base-branch recommendation, and a fixed-text generation bundle — template, `<base>..<head>` commits, `<base>...<head>` diffstat and the `templates/pr/drafting-rules.md` drafting rules — used by the okstra-pr-gen skill and the release-handoff lead. `--json` preserves the same fields as a machine contract. Git-only; no project registration required |
|
|
210
210
|
| `recap` | `scripts/okstra_ctl/recap.py` | `okstra recap <assemble\|record\|note>` Node wrapper backing the okstra-inspect `recap` facet — `assemble` is a read-only phase-transition summary for a task or, with `--task-group`, the group's start order plus each task's latest conclusion; `record` appends one line to `recap/recap-log.jsonl` (task) or `.okstra/tasks/<group>/.recap/recap-log.jsonl` (`--task-group`); `note` writes an agent-authored note under `notes/` and prints the `--clarification-response` argument for a follow-up run |
|
|
211
211
|
| `stage-map` | `scripts/okstra_ctl/stage_map_cli.py` | `okstra stage-map <task-key>` — exposes a task's implementation-planning Stage Map as JSON (`stages[].{stage_number,title,depends_on,step_count}` + consumer-state-based `doneStages[]`). If there is no Stage Map, `stages: []`. The read-side basis from which `okstra-schedule-gen` derives stage units and dependency closure |
|
|
212
212
|
| `design-prep` | `scripts/okstra_ctl/design_prep.py` | `okstra design-prep <list\|show\|write>` thin shim into `scripts/okstra_ctl/design_prep.py` — queries (`list`/`show`) the design items that implementation-planning pre-authored with AI, and records the user-confirmed responses as an append-only sidecar under `design-prep-inputs/` (`write`, `--confirmed` required). It never modifies the report snapshot |
|
package/package.json
CHANGED
package/runtime/BUILD.json
CHANGED
|
@@ -327,6 +327,30 @@ For every source file this change touches, follow the paths the change creates o
|
|
|
327
327
|
|
|
328
328
|
**A finding names the input or state that produces the wrong result.** *"If the archive yields no entries, line 42 reports success and stores an empty result"* is a finding. Code that works as written is `clean`, however you would have written it differently: alternative structures, guards for states no caller can reach, extra tests for covered paths, and "consider extracting / renaming / memoizing" are improvements, not findings. A real failure that is small and cheap to fix is still a finding.
|
|
329
329
|
|
|
330
|
+
## Untrusted input and security
|
|
331
|
+
|
|
332
|
+
Input from outside the process — request bodies, query strings, headers, uploaded files, queue messages, webhook payloads — is controlled by whoever sends it, authenticated or not. These checks apply to every changed file that reads such input or acts on its behalf. **A finding names the input and what it does:** *"a body of 100k fonts with distinct keys runs the O(n²) uniqueness check before the size limit rejects it"* is a finding; "could be more secure" is not.
|
|
333
|
+
|
|
334
|
+
### Bound the work before the expensive check
|
|
335
|
+
|
|
336
|
+
A size or count limit protects nothing if a costlier check still runs on the oversized input. Many validators run every rule on a field rather than stopping at the first failure — class-validator under a `ValidationPipe` without `stopAtFirstError`, for one — so `@ArrayMaxSize(50)` failing does not stop `@ArrayUnique`, whose comparison is O(n²). Any work that grows faster than the input — pairwise uniqueness, nested scans, a backtracking regex, recursion or expansion driven by the input — runs only after a bound has rejected oversized input, inside the same check (`if (items.length > MAX) return false;` then a `Set`), or the framework is configured to stop at the first failure. The body-size limit is not that bound: it caps bytes, not the element count the costly step loops over. Pin it with a test that sends an input well past the limit and asserts the rejection returns quickly (see "Resource bounds need their own regression test").
|
|
337
|
+
|
|
338
|
+
### Input never builds code
|
|
339
|
+
|
|
340
|
+
Input that reaches SQL, a shell command, a file path, a URL fetched server-side, a template, or a regular expression goes through a parameter, an allowlist, or an escaping API for that sink — never string concatenation or interpolation. A path from input is resolved and checked to stay under its root; a server-side fetch target is checked against an allowlist of hosts.
|
|
341
|
+
|
|
342
|
+
### Every new entry point checks who is calling and what they own
|
|
343
|
+
|
|
344
|
+
A new route, handler, resolver, or job that reads or writes per-user data carries the project's authentication guard, and a lookup by an id from the input compares the caller's identity with the resource's owner before returning or changing it. An id the caller can choose is not proof of ownership.
|
|
345
|
+
|
|
346
|
+
### Secrets and personal data stay out of code, logs, and responses
|
|
347
|
+
|
|
348
|
+
No secret, token, or credential in source or fixtures meant for production. Logs, error messages, and response bodies carry no secret, full token, password, or personal data — including inside an echoed request body or an upstream error passed through verbatim.
|
|
349
|
+
|
|
350
|
+
### No execution of input
|
|
351
|
+
|
|
352
|
+
No `eval`, `Function(...)`, dynamic `import()` of an input-chosen path, or deserializer that can instantiate arbitrary types (`pickle`, Java native serialization, YAML loaders without a safe mode) applied to input.
|
|
353
|
+
|
|
330
354
|
## No magic numbers
|
|
331
355
|
|
|
332
356
|
Replace hardcoded values with named constants.
|
|
@@ -50,6 +50,7 @@ If no Stage 1 language rule matches (an unlisted language), stop and ask the use
|
|
|
50
50
|
- [ ] Language reference read for this turn.
|
|
51
51
|
- [ ] `clean-code.md` principles applied: DRY, KISS, SOLID, YAGNI, meaningful naming (truthful + standalone + one identifier one meaning per file), single-purpose functions, plain-English summary test, 50-line cap, no magic numbers, shallow nesting, comments-explain-why.
|
|
52
52
|
- [ ] **Mutation and state boundaries** (`clean-code.md`): decide on the direct identifier, not a status/flag proxy; capture before-state in one snapshot ahead of the mutating boundary; update only this work's owned fields on an existing row; re-read state before calling a zero-affected-rows write success or failure; put priority-between-inputs in a named domain function; keep error messages to what was observed.
|
|
53
|
+
- [ ] **Untrusted input and security** (`clean-code.md`), for every file that reads input from outside the process: a size/count bound rejects oversized input before any check or step that grows faster than the input; input reaches SQL, shell, paths, server-side fetches, templates and regexes only through parameters, allowlists or escaping; a new entry point carries the auth guard and an ownership check on input-chosen ids; no secrets or personal data in code, logs or responses; no eval or unsafe deserialization of input.
|
|
53
54
|
- [ ] Tests planned: which test(s) cover this change. New behaviour without a test is **incomplete** unless the user has explicitly opted out for this change.
|
|
54
55
|
- [ ] **Existing tests surveyed (run this before planning any new test):** for every surface this change touches, `grep -rln` the candidate test files, list their test names, then READ the bodies of the ones that could overlap. A list of names does not tell you what a test asserts, and behavioural overlap does not collide on names — treat a clean name search as unfinished, not as a clear result. Record per surface: `extend <path:line>` / `new (nothing covers <behaviour>)` / `retire <path:line> (behaviour moved to <where>)`. A new test or test file with no survey line is unfinished work. The survey may change the design — moving the seam so existing tests keep passing beats adding parallel ones. Carry out a `retire` verdict in the same commit, on behavioural grounds only: the behaviour it asserted is gone, or a new test asserts it more strongly through the same seam. "Looks similar" / "touches the same file" is not grounds; without grounds the test stays, because a silent coverage loss costs more than one extra test.
|
|
55
56
|
- [ ] **Testing discipline:** the test does not stub/spy methods on the SUT itself (collaborators are fine), and assertions are on outcomes (return values, state, events, boundary calls) — not on which internal helper was called. Each branch this change adds (`catch`, guard, early return, `else`) has a test that fails when the branch body is deleted; assertions land on the last write to a record, not an intermediate one; each test title names its unit and the single condition it isolates; no effect is claimed under its own mock; shared fixtures keep their ordinary defaults; the scenarios' setup values actually differ; every new test helper/mock is used by a test in this same change; no positional mock-argument access (`rg 'mock\.calls'`).
|
package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-diff-review.md
CHANGED
|
@@ -37,6 +37,7 @@ Do not scan holistically and stop when it "looks fine". Work the matrix exhausti
|
|
|
37
37
|
- test file (`*.spec.*` / `*.test.*` / `test_*.py` / `*_test.go` …) → `clean-code.md` "Testing discipline": no self-mocking of the SUT, behavioral (outcome) assertions not interaction-only, no tautological delegation assertion, no effect claimed under its own mock, shared-fixture defaults left on the ordinary path, setup values that actually separate the scenarios, every new test helper/mock used by a test in this same diff, no positional mock-argument access (`rg 'mock\.calls'`), every branch this diff adds covered by a test that fails when the branch body is deleted, assertions on the last write to a record rather than an intermediate one, and test titles naming their unit plus the single condition each case isolates.
|
|
38
38
|
- port / adapter / domain file, when the hexagonal overlay is loaded → `architectures/hexagonal.md`: no business logic in a port body, adapter methods are I/O only (no post-fetch filtering on domain state, no `findValid*`/`findActive*` names hiding a rule), domain objects declared under the domain boundary, no changed domain file importing an ORM / framework / adapter / service (read the import list — mechanical), and a service dependency you add or modify goes through a port rather than a concrete adapter (advisory only while the project has not declared `architecture.style = hexagonal` in `.okstra/project.json` — record it with the port sketch; blocking under that declaration, so fix it in place before the commit rather than record-and-pass, exactly as `_implementation-verifier.md` re-grades this same diff. Either way, the codebase already injecting concrete classes is the debt this pays down, not a reason to skip it).
|
|
39
39
|
- a service file, when the hexagonal overlay is loaded → `architectures/hexagonal.md` Rule H6: a decision this diff puts in a service — an `if`/`else` chain over domain fields, a business formula, a private method named for a domain concept — belongs in a domain function. Orchestration control flow, DTO mapping and calling a domain predicate are not violations.
|
|
40
|
+
- a file that reads input from outside the process (request body, query, header, upload, message, webhook) or acts on its behalf → `clean-code.md` "Untrusted input and security": a size/count bound rejects oversized input before any check that grows faster than the input (a validator that runs every rule, such as class-validator without `stopAtFirstError`, does not stop at a failed `@ArrayMaxSize`), input reaches SQL / shell / paths / server-side fetches / templates / regexes only through parameters, allowlists or escaping, a new entry point carries the auth guard and compares the caller with the owner of an input-chosen id, no secret or personal data reaches code, logs or responses, and nothing evaluates or unsafely deserializes input.
|
|
40
41
|
- every changed source file → `clean-code.md` "Trace what this change can do wrong": walk the error, partial, concurrent and selection paths this diff creates to their end and fix wherever a wrong result comes out. Name the input that produces it — if you cannot name one, there is nothing to fix here and you move on rather than restructuring code that works.
|
|
41
42
|
A file can hold several roles — apply every rule set that fits it.
|
|
42
43
|
3. **Decide clean-or-finding for each cell.** Read the full file when a rule needs context (never judge a port/adapter/domain or a naming rule from the hunk alone).
|
package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-verifier.md
CHANGED
|
@@ -193,6 +193,7 @@ Re-running commands proves the diff *builds and passes*; it does NOT prove the d
|
|
|
193
193
|
- **Load the project's review rule packs.** Run the project-context projection above and union its `Project Review Rule Packs` entries with exact `SKILL.md` paths cited by the task brief's `Source Material` / `Reporter Confirmations`. Read only those files and the `references/*.md` files they directly name. Do not search parent directories or host skill catalogs. Apply the rules as an overlay on this static review, but do NOT dispatch extra reviewer agents unless the task explicitly configured them. Record `project-review-rules: <paths read>`, `project-review-rules: declared <path> unreadable`, or `project-review-rules: none declared or cited` in the worker result — an unreadable declared pack is a recorded gap, not a skip.
|
|
194
194
|
- **Declared architecture style promotes the placement overlay from advisory to binding.** Take `Architecture style` from that projection and record `architecture-style: <hexagonal|layered|none>` in the worker result next to the `coding-conventions:` line. A declared `hexagonal` counts the overlay as loaded even when none of the router's Stage 3 layout signals matched, so the **Hexagonal** blocking check below applies in full, and the concrete-adapter injection listed under Advisory findings is promoted to a blocking finding → verdict `FAIL`, not a `should-fix`. A declared `layered` has no pack resource; its binding invariant is direction — an upper layer may import a lower one, never the reverse — so a changed file whose import list reaches back up a layer, or around a layer boundary, is a blocking placement violation cited `path:line` from that import list. The `layered` half is worker judgement: no machine check reads layer names, so a missed reverse dependency is a missed finding, not a validator failure. A `none` or absent projected style leaves Stage 3 detection-driven and the placement items advisory. **Enforced:** `scripts/okstra_project/resolver.py` `resolve_architecture` reads the same stored field for the planning-side rule in `scripts/okstra_ctl/phases/implementation_planning/plan_body.py` `_validate_variation_point_analysis`, and `_validate_verifier_fail_blocks_verdict` keeps the resulting `FAIL` from being dropped during synthesis.
|
|
195
195
|
- **Blocking checks (any hit → verdict `FAIL`, cited `path:line` + rule name, recommended fix recorded — the verifier does NOT apply it):**
|
|
196
|
+
- **Security (every changed file that reads input from outside the process or acts on its behalf — `clean-code.md` "Untrusted input and security"):** work that grows faster than the input — pairwise uniqueness, nested scans, a backtracking regex, input-driven recursion — reachable before a size/count bound has rejected oversized input (read the validation framework's configuration: class-validator without `stopAtFirstError` still runs `@ArrayUnique` after `@ArrayMaxSize` fails, and a byte-size body limit does not bound element count); input concatenated into SQL, a shell command, a file path, a server-side fetch target, a template or a regex; a new route / handler / resolver without the project's auth guard, or a lookup by an input-chosen id that never compares the caller with the owner; a secret, full token, password or personal data written to source, logs, an error message or a response; `eval`, dynamic code, or unsafe deserialization applied to input. Cite the input that triggers it and its effect — for unbounded work, the input size and the measured or derived cost.
|
|
196
197
|
- **New duplication / DRY:** two or more newly added or meaningfully modified blocks implement the same helper stack, transform, or domain rule. Literal copy-paste is always blocking; semantically equivalent transforms across services are blocking unless the approved plan explicitly justified keeping them separate. Recommend the shared module location.
|
|
197
198
|
- **Self-mocking:** a test for `Foo` stubs/spies a method on the `Foo` instance under test (`jest.spyOn(sut, ...)`, `spyOn(FooService.prototype, ...)` in `foo.*.spec.*`, `vi.mocked(sut)` + stub). Mocking injected collaborators is fine.
|
|
198
199
|
- **Interaction-only assertion:** a test whose only/primary assertion is `toHaveBeenCalled*` / `toHaveBeenCalledTimes` on an internal helper or a non-side-effecting collaborator, with no assertion on the returned value / resulting state / persisted row / emitted event.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
- the run's input document (`release-handoff-input.md`, generated by prepare in place of a task brief — briefs belong to entry phases only) carries a `## Source Verification Report` section with `Stages` and one table row per cited `final-verification` final-report. The run context exposes the same selection as `HANDOFF_STAGES` (csv, never empty — prepare defaults it to every eligible stage).
|
|
17
17
|
- the lead opens each cited single-stage report and confirms its `verificationScope` is `single-stage` and its verdict is release-ready — `Verdict Token` exactly `accepted`, or exactly `conditional-accept` with every **Conditional Acceptance Condition** row declaring `blocksReleaseHandoff: false`. The rule lives in `okstra_ctl.release_gate.release_handoff_allowed`; the lead reads the reports against it and does not invent a third case. Eligibility was already enforced at prepare time (`okstra_ctl.handoff.compute_eligibility`) and is re-enforced by `okstra handoff pr-plan` — the lead never hand-computes it.
|
|
18
18
|
- Record each cited verdict and any blocking acceptance condition as entry-gate evidence. Read the `## release-handoff` section of `prompts/lead/phase-routing.md` before user questions or Git commands.
|
|
19
|
-
- when a cited verdict is `conditional-accept`, the lead MUST carry that stage's **Conditional Acceptance Condition** rows into **that stage's** PR body under a heading naming them as unresolved —
|
|
19
|
+
- when a cited verdict is `conditional-accept`, the lead MUST carry that stage's **Conditional Acceptance Condition** rows into **that stage's** PR body under a heading naming them as unresolved — each condition and the evidence the reviewer would need, restated in the reviewer's terms (what in the code is still open, and where). The condition id stays in the final report: a reviewer cannot open it, so the PR body never carries it. These conditions are the whole reason a non-`accepted` verdict was allowed through; a PR body that drops them turns a recorded condition into a silent one.
|
|
20
20
|
- the lead MUST capture `git status --short` and confirm the working tree is clean. Dirty state aborts the run; release-handoff packages the commits produced by `implementation`, it does not stage or commit changes.
|
|
21
21
|
- the lead MUST capture `git rev-parse --abbrev-ref HEAD` and record it as the run's current branch. It is evidence, not a PR head: every PR head comes from `okstra handoff pr-plan`. If the current branch is `main`, `master`, `prod`, `preprod`, `staging`, or `dev`, record it and do not push it — release-handoff never pushes a base branch.
|
|
22
22
|
- before pushing, run `okstra handoff pr-plan` again if anything mutated since entry, and confirm each selected stage is still present in its output. `pr-plan` re-checks eligibility and each stage's recorded verified commit. Record the pr-plan output in Executed Commands. These pre-push comparisons are lead instructions; the automated entry checks are enforced by `okstra_ctl.handoff_verification` and the handoff tests.
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
- `edit then proceed` — accept inline edits from the user (the user may edit any subset), then proceed with the edited text.
|
|
55
55
|
- `cancel` — end the run without executing push or PR commands; record the cancellation in the final report.
|
|
56
56
|
- Inline drafting rules (Okstra lead) — applied once per stage:
|
|
57
|
-
-
|
|
58
|
-
- **
|
|
57
|
+
- **Generation bundle** — for each stage run `okstra pr gen --base <base_commit> --head <head_commit> --template-file <PR_TEMPLATE_PATH>`, with `base_commit` and `head_commit` from the stage's pr-plan row and `PR_TEMPLATE_PATH` from the run context (`PR_TEMPLATE_SOURCE` says which configuration chose it). `--head` reads the stage branch without checking it out, so a torn-down stage worktree needs no re-attach. The bundle prints the stage's commits, diff stat, the template verbatim, and a `Drafting rules` section — the same rules the okstra-pr-gen skill fills a PR body by. If the command fails, show its error and abort the draft — do NOT invent a structure. A stacked PR's diff is that stage alone — do not describe a predecessor's work in it.
|
|
58
|
+
- **Fill** — follow every item of the bundle's `Drafting rules`: read the full `git diff <base_commit>...<head_commit>`, fill the template's sections from it (the template, never a hard-coded section list, is the structure), open the new-behavior section with its 2–4 bullet summary, and keep okstra identifiers — condition, finding and clarification ids, stage and phase labels, `.okstra/` paths — out of the title and body. The run brief, that stage's cited final-verification report and its implementation report explain why the change was made; restate what they say in the reviewer's terms rather than citing them.
|
|
59
59
|
- produce **two artifacts per stage** before showing them to the user:
|
|
60
60
|
1. **PR title** — by default the subject of that stage's most recent implementation commit, or a concise Conventional Commits-style summary of the stage's committed range.
|
|
61
61
|
2. **PR body** — markdown filled from `PR_TEMPLATE_PATH`, and nothing else. Do NOT append a stack plan, a stage checklist, a sentence about where this PR stops in the stack, or a merge-policy line: the stack's shape and merge rule belong to the final report and the closeout, not to a reviewer's PR. The user-confirmation step's diff (Q3 `edit then proceed`) is computed against the filled template, not against the raw template file.
|
|
62
62
|
- **Filled-body self-check (runs on each drafted body, before Q3 shows it).** "Fill in the placeholders" is only observable if someone checks that they were filled, so scan the drafted body for these and carry the result into Q3: a residual HTML comment or template marker (`<!-- … -->`, `_Describe your changes…_`, a bare `TODO` / `FIXME` the diff did not introduce), an unchecked `- [ ]` box with no inline N/A justification, a section heading whose body is empty, and a whole body short enough to carry no substance. Each hit is reported to the user with its line — never silently left in, and never auto-filled with invented content. The user remains free to accept it; the point is that they see it before choosing `use as-is`.
|
|
63
63
|
- Allowed actions during the run (Okstra lead only):
|
|
64
|
-
- read-only inspection: `git status`, `git status --short`, `git diff`, `git log`, `git rev-parse`, `git ls-remote --heads origin <name>`, `gh pr list --head <branch>`, `gh pr view <url>`.
|
|
64
|
+
- read-only inspection: `git status`, `git status --short`, `git diff`, `git log`, `git rev-parse`, `git ls-remote --heads origin <name>`, `gh pr list --head <branch>`, `gh pr view <url>`, and the drafting bundle `okstra pr gen --base <base_commit> --head <head_commit> --template-file <PR_TEMPLATE_PATH>`.
|
|
65
65
|
- merge-conflict probe (only when the user picked `push + PR`): `git fetch origin <chosen-base>` and the exact `git merge-tree` commands from step 2b. Both preserve the working tree and branch tips.
|
|
66
66
|
- branch push (only when the user picked `push + PR`): `git push -u origin <branch>` for each `push_plan` row whose `action` is `create` or `fast-forward`, in the order `push_plan` lists them (each `merge-base` branch before the PR that targets it, then the stage heads in ascending order). Skip an `up-to-date` row — origin already holds that commit. The pushed ref MUST come from a `push_plan` row — never the release base branch, and never a ref that list does not name.
|
|
67
67
|
- PR creation, one per stage (only when the user picked `push + PR` AND no PR with the same head already exists on origin): `gh pr create --base <row base_branch> --head <row head_branch> --title "<title>" --body "<body>"`. The title and body are the user-confirmed PR draft for that stage. Open them in ascending stage order so each base branch already exists on origin.
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
- Pick between the two `Checked out` variants by the command's `removedWorktree` field: a non-empty path takes the first, an empty string takes the second. Never write a removal that did not happen.
|
|
100
100
|
- **Routing recommendation**: record which selected stages were delivered, skipped, cancelled, or still need a PR. The lead chooses the next phase under `## release-handoff` in `prompts/lead/phase-routing.md`.
|
|
101
101
|
- Self-review pass before finalising the report (the Okstra lead runs this):
|
|
102
|
-
1. **Entry-gate audit** — record the final-verification report path and literal `Verdict Token` row for every delivered stage, and the conditions
|
|
102
|
+
1. **Entry-gate audit** — record the final-verification report path and literal `Verdict Token` row for every delivered stage, and the conditions restated in each conditional-accept stage's PR body. Record any missing evidence for the lead's routing decision.
|
|
103
103
|
2. **User-selection traceability** — every executed mutating command maps to a user selection captured in the report. Any mutating command without a corresponding user answer is a contract violation.
|
|
104
104
|
3. **Forbidden-action audit** — scan the run's session transcripts (`git`, `gh` invocations) for every entry in the Forbidden actions list above. Any occurrence means the run has crossed into unsafe territory and MUST be flagged as `contract-violated`.
|
|
105
105
|
4. **Push-target audit** — for every `git push` recorded, confirm the refspec resolves to a branch that appears in the pr-plan output, not to the release base branch.
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
6. **Idempotency check** — for every stage whose PR already existed at run start, confirm the report records `PR reused` rather than a fresh `gh pr create` invocation.
|
|
108
108
|
7. **Merge-conflict probe audit** — for any `push + PR` run, confirm the report's `Merge Conflict Probe` section is present and either records `Clean` or records `Conflicts detected` with the user's verbatim choice. A missing or unparseable probe entry on a `push + PR` run is a contract violation.
|
|
109
109
|
- Non-goals:
|
|
110
|
-
- re-litigating a final-verification verdict — release-handoff trusts the cited release-ready verdicts and does not reopen acceptance checks.
|
|
110
|
+
- re-litigating a final-verification verdict — release-handoff trusts the cited release-ready verdicts and does not reopen acceptance checks. Restating a conditional-accept's conditions in the PR body is reporting, not verification: the lead does not check whether a condition has been satisfied.
|
|
111
111
|
- creating, amending, squashing, rebasing, or rewriting commits. Commit production belongs to `implementation`; the only commits this phase may create are the merge commits `okstra handoff pr-plan` makes on a `merge-base` branch.
|
|
112
112
|
- bundling several stages into one PR, or building a branch that collects every stage. One stage is one PR.
|
|
113
113
|
- opening releases or deployments beyond the per-stage PRs the user chose to create.
|
|
@@ -173,7 +173,7 @@ flowchart TD
|
|
|
173
173
|
Global -->|missing| Default[okstra skill default template]
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
When the user picks a template on the customize path, the okstra-run skill performs the project/global scope save before render-bundle. The runtime puts the resolved `PR_TEMPLATE_PATH` and `PR_TEMPLATE_SOURCE` into the run context
|
|
176
|
+
When the user picks a template on the customize path, the okstra-run skill performs the project/global scope save before render-bundle. The runtime puts the resolved `PR_TEMPLATE_PATH` and `PR_TEMPLATE_SOURCE` into the run context. For each stage the lead runs `okstra pr gen --base <base_commit> --head <head_commit> --template-file <PR_TEMPLATE_PATH>` and fills the printed template by the bundle's `Drafting rules`, the same rules the okstra-pr-gen skill uses. The section structure must not be hard-coded. The default template is `templates/pr/pr-body.template.md`, which `okstra pr gen --template default` also reads.
|
|
177
177
|
|
|
178
178
|
## 7. Deliverables
|
|
179
179
|
|
|
@@ -84,50 +84,14 @@ Present a 3-option base picker from the first two printed branches plus `Enter d
|
|
|
84
84
|
okstra pr gen --base <base> --template <template>
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
For a large diff, read it in sections. Fill the `template` placeholders from the
|
|
96
|
-
diff and commits: describe only what actually changed. Mark checklist boxes
|
|
97
|
-
`[x]` only when the diff supports them (tests touched → tests box, docs touched →
|
|
98
|
-
docs box). If the `Commits`/`Diff stat` sections print `-` (empty), tell the user there is nothing to
|
|
99
|
-
describe and stop. **Never** append AI trailers/footers.
|
|
100
|
-
|
|
101
|
-
Open the new-behavior section — `What is the new behavior` in the bundled default,
|
|
102
|
-
or the section of a stored template that describes the change — with a short
|
|
103
|
-
summary of what changed: 2–4 bullets, one change per bullet, each naming the
|
|
104
|
-
observable difference a reviewer would notice. Put the detailed description below
|
|
105
|
-
that summary. The summary restates the details; it adds no claim the diff does
|
|
106
|
-
not support.
|
|
107
|
-
|
|
108
|
-
### A3b. Identifier allowlist for the body
|
|
109
|
-
|
|
110
|
-
Reviewers have never seen okstra, so an okstra-internal id reads as a nonsense
|
|
111
|
-
token. Identifiers in the PR title and body come from this list and nothing else:
|
|
112
|
-
|
|
113
|
-
| allowed | example |
|
|
114
|
-
| --- | --- |
|
|
115
|
-
| repo-relative source path, optionally with a line | `src/commands/pr/pr.mjs:42` |
|
|
116
|
-
| symbol name that exists in the diff | `resolveTemplate()` |
|
|
117
|
-
| branch name, commit subject, commit SHA | `feature/dev-9436`, `a1b2c3d` |
|
|
118
|
-
| issue-tracker ticket id the reviewer can open | `dev-9436` |
|
|
119
|
-
|
|
120
|
-
okstra's own artifact identifiers are out of the allowlist — drop them:
|
|
121
|
-
|
|
122
|
-
- report item ids — `F-001`, `C-001`, `R-001`, `D-0001`, `PREP-001`
|
|
123
|
-
- run artifact names and their `<task-type>-<seq>` suffixes —
|
|
124
|
-
`final-report-implementation-3.data.json`, `run-manifest-implementation-3.json`
|
|
125
|
-
- phase / stage / worker labels — `final-verification`, `stage-2`, `codex-worker`
|
|
126
|
-
- any path under `.okstra/` — reports, decisions, glossary, user-response sidecars
|
|
127
|
-
|
|
128
|
-
When the only source for a claim is such an artifact, restate its substance in
|
|
129
|
-
the reviewer's terms — what changed in the code, and why — instead of citing the
|
|
130
|
-
id.
|
|
87
|
+
To describe a branch other than the checkout — a stage branch whose worktree is gone — add
|
|
88
|
+
`--head <branch>`; nothing is checked out.
|
|
89
|
+
|
|
90
|
+
Read the fixed `Base`, `Head`, `Current branch`, `Template name`, `Commits`, `Diff stat`,
|
|
91
|
+
`Template`, and `Drafting rules` sections. Then fill the template by following every item of
|
|
92
|
+
`Drafting rules`: it says how to read the full diff, when to stop, how to fill sections and
|
|
93
|
+
checkboxes, how to open the new-behavior section, and which identifiers the title and body may
|
|
94
|
+
carry. release-handoff drafts its PR bodies from the same rules.
|
|
131
95
|
|
|
132
96
|
### A4. Output and offer to create the PR
|
|
133
97
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
1. Read the full diff — it is the source of truth: `git diff <Base>...<Head>`, using the `Base` and
|
|
2
|
+
`Head` values above. Read a large diff in sections.
|
|
3
|
+
2. If `Commits` or `Diff stat` above is `-`, there is nothing to describe: stop and say so.
|
|
4
|
+
3. Fill the template from the diff and the commits. Describe only what actually changed. Strip HTML
|
|
5
|
+
comments; keep the template's sections as the structure.
|
|
6
|
+
4. Mark a checklist box `[x]` only when the diff supports it (tests touched → the tests box, docs
|
|
7
|
+
touched → the docs box).
|
|
8
|
+
5. Open the new-behavior section — `What is the new behavior` in the default template, or the section
|
|
9
|
+
of another template that describes the change — with a summary of 2–4 bullets, one change per
|
|
10
|
+
bullet, each naming the observable difference a reviewer would notice. Put the detailed description
|
|
11
|
+
below it. The summary adds no claim the diff does not support.
|
|
12
|
+
6. Never append an AI trailer or footer.
|
|
13
|
+
7. Identifiers in the PR title and body come from this list and nothing else, because reviewers have
|
|
14
|
+
never seen okstra and cannot open its artifacts:
|
|
15
|
+
|
|
16
|
+
| allowed | example |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| repo-relative source path, optionally with a line | `src/commands/pr/pr.mts:42` |
|
|
19
|
+
| symbol name that exists in the diff | `resolveTemplate()` |
|
|
20
|
+
| branch name, commit subject, commit SHA | `feature/dev-9436`, `a1b2c3d` |
|
|
21
|
+
| issue-tracker ticket id the reviewer can open | `dev-9436` |
|
|
22
|
+
|
|
23
|
+
okstra's own identifiers are out of the list — drop them:
|
|
24
|
+
|
|
25
|
+
- report item ids — `F-001`, `C-001`, `CA-001`, `R-001`, `D-0001`, `PREP-001`
|
|
26
|
+
- run artifact names and their `<task-type>-<seq>` suffixes —
|
|
27
|
+
`final-report-implementation-3.data.json`, `run-manifest-implementation-3.json`
|
|
28
|
+
- phase / stage / worker labels — `final-verification`, `stage-2`, `stage 1 of 2`, `codex-worker`
|
|
29
|
+
- any path under `.okstra/` — reports, decisions, glossary, user-response sidecars
|
|
30
|
+
|
|
31
|
+
When the only source for a claim is such an artifact, restate its substance in the reviewer's
|
|
32
|
+
terms — what changed in the code, and why — instead of citing the id.
|
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
okstra
|
|
2
|
+
okstra default PR body template — the single default for `okstra pr gen` and release-handoff.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
1. The per-run override path entered in okstra-run
|
|
4
|
+
release-handoff resolves its template in this order, and uses this file only when none is configured:
|
|
5
|
+
1. The per-run override path entered in okstra-run
|
|
6
6
|
2. `prTemplatePath` of <project-root>/.okstra/project.json
|
|
7
7
|
3. `prTemplatePath` of ~/.okstra/config.json
|
|
8
8
|
4. This default file
|
|
9
|
+
`okstra pr gen --template default` (or no `--template`) reads this file too.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
The placeholder is filled in directly by the Okstra lead for the release-handoff based on the following inputs:
|
|
13
|
-
- The intent and scope of the run brief
|
|
14
|
-
- The grounds for the verdict in the referenced final-verification report
|
|
15
|
-
- The commit range from `git log --oneline <base>..HEAD`
|
|
16
|
-
- The file change statistics from `git diff <base>..HEAD --stat`
|
|
11
|
+
Fill it from `okstra pr gen` and the full diff, following the bundle's `Drafting rules` section.
|
|
17
12
|
-->
|
|
18
13
|
|
|
19
14
|
## **Please check if the PR fulfills these requirements**
|
|
20
15
|
- [ ] Commits have a single intent
|
|
21
16
|
- [ ] Tests for the changes have been added (for bug fixes / features)
|
|
22
|
-
- [
|
|
17
|
+
- [ ] I reviewed my own code
|
|
23
18
|
- [ ] I tested the changes (if not, explain why in the "Other information" section)
|
|
24
19
|
- [ ] Docs have been added / updated
|
|
25
20
|
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
## **Please check if the PR fulfills these requirements**
|
|
2
|
-
- [ ] Commits have a single intent
|
|
3
|
-
- [ ] Tests for the changes have been added (for bug fixes / features)
|
|
4
|
-
- [ ] I reviewed my own code
|
|
5
|
-
- [ ] I tested the changes (if not, explain why in the "Other information" section)
|
|
6
|
-
- [ ] Docs have been added / updated
|
|
7
|
-
|
|
8
|
-
## **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
|
|
9
|
-
<pr-kind>
|
|
10
|
-
|
|
11
|
-
## **What is the current behavior?** (You can also link to an open issue here)
|
|
12
|
-
<current-behavior>
|
|
13
|
-
|
|
14
|
-
## **What is the new behavior (if this is a feature change)?**
|
|
15
|
-
<new-behavior>
|
|
16
|
-
|
|
17
|
-
## **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)
|
|
18
|
-
<breaking-change>
|
|
19
|
-
|
|
20
|
-
## **Other information**:
|
|
21
|
-
<other-information>
|