/** * Closing-keyword family GitHub recognizes (docs: "Linking a pull * request to an issue"). Covers close/closes/closed, fix/fixes/fixed, * resolve/resolves/resolved. */ export declare const CLOSING_KEYWORD = "(?:close(?:s|d)?|fix(?:es|ed)?|resolve(?:s|d)?)"; /** * A closing-keyword issue reference: `Closes #10`, `Closes: #10`, * `CLOSES #10` (colon optional, case-insensitive at use). */ export declare const ISSUE_REF = "(?:close(?:s|d)?|fix(?:es|ed)?|resolve(?:s|d)?)\\s*:?\\s*#\\d+"; /** `--title|-t` value must hold the ref (create). */ export declare const TITLE_WITH_REF: string; /** `--subject|-t` value must hold the ref (merge — the commit subject). */ export declare const SUBJECT_WITH_REF: string; /** `--body|-b` value must hold the ref (merge + inline fallback). */ export declare const BODY_WITH_REF: string; /** `pr-body-from-vault-file` anchor: pr create/new/edit. */ export declare const PR_BODY_ANCHOR: RegExp; /** `pr-create-needs-issue-link` anchor: pr create/new. */ export declare const PR_CREATE_ANCHOR: RegExp; /** * `pr-merge-needs-closing-keywords` pattern: fires unless the command * carries a closing-keyword ref in BOTH the `--subject` value and the * `--body` value (either flag order, short `-t`/`-b` forms, * `--flag=value` forms). */ export declare const PR_MERGE_PATTERN: RegExp; /** `issue-body-from-vault-file` anchor: issue create/edit. */ export declare const ISSUE_BODY_ANCHOR: RegExp; /** * `pr-body-from-vault-file` — PR bodies must come from a body file in * the napkin vault (create, new, and edit). Inline `--body` is * blocked; the file must be inside a napkin vault under a * `/prs/` directory. Placement only — the closing-keyword * content check belongs to `pr-create-needs-issue-link`. * * Strict — no override (schema default). */ export declare const prBodyFromVaultFile: { readonly name: "pr-body-from-vault-file"; readonly tool: "bash"; readonly field: "command"; readonly pattern: RegExp; readonly when: { readonly missingVaultBodyFile: { readonly section: "prs"; }; }; readonly reason: string; }; /** * `pr-create-needs-issue-link` — a PR may not be opened without at * least one attached issue: a closing keyword + `#N` in BOTH the * inline `--title` value and the body (vault body-file content, with * inline `--body` as a fallback). Fires when EITHER is missing * (`when.condition` is an OR — the pattern only anchors the command). * * Does NOT fire on other gh subcommands. Fires on draft PRs without * keywords too (a tracking issue is the allowed pattern while a draft * is open). Strict — no override (schema default). */ export declare const prCreateNeedsIssueLink: { readonly name: "pr-create-needs-issue-link"; readonly tool: "bash"; readonly field: "command"; readonly pattern: RegExp; readonly when: { readonly condition: (ctx: import("@cad0p/pi-steering").PredicateContext) => boolean; }; readonly reason: string; }; /** * `pr-merge-needs-closing-keywords` — a PR may not be merged without * the closing keywords in BOTH the `--subject` value (commit subject) * and the `--body` value (commit body). Fires unless both carry a * closing keyword + `#N` (either flag order, short `-t`/`-b` forms, * `--flag=value` forms). Passing both explicitly protects against PR * title/body edits between creation and merge; GitHub parses both * channels even with a Title-Only commit policy. * * Strict — no override (schema default). */ export declare const prMergeNeedsClosingKeywords: { readonly name: "pr-merge-needs-closing-keywords"; readonly tool: "bash"; readonly field: "command"; readonly pattern: RegExp; readonly reason: string; }; /** * `issue-body-from-vault-file` — issue bodies must come from a body * file in the napkin vault (create and edit). Inline `--body` is * blocked; the file must be inside a napkin vault under a * `/issues/` directory. No keyword requirement (issues close * nothing). * * Strict — no override (schema default). */ export declare const issueBodyFromVaultFile: { readonly name: "issue-body-from-vault-file"; readonly tool: "bash"; readonly field: "command"; readonly pattern: RegExp; readonly when: { readonly missingVaultBodyFile: { readonly section: "issues"; }; }; readonly reason: string; }; /** * Suggested rules for the github plugin. * * **Order matters — first-match-wins** (the engine routes on the * first matching rule): `pr-body-from-vault-file` FIRST so the agent * writes the vault body file before fiddling with keywords, then the * issue-link rule, then merge, then the issue body-file rule. * Reordering for stylistic reasons changes which rule an agent sees * when several match; pinned via `src/rules.test.ts` (pattern * contracts) and asserted end-to-end in `src/integration.test.ts`. */ export declare const rules: readonly [{ readonly name: "pr-body-from-vault-file"; readonly tool: "bash"; readonly field: "command"; readonly pattern: RegExp; readonly when: { readonly missingVaultBodyFile: { readonly section: "prs"; }; }; readonly reason: string; }, { readonly name: "pr-create-needs-issue-link"; readonly tool: "bash"; readonly field: "command"; readonly pattern: RegExp; readonly when: { readonly condition: (ctx: import("@cad0p/pi-steering").PredicateContext) => boolean; }; readonly reason: string; }, { readonly name: "pr-merge-needs-closing-keywords"; readonly tool: "bash"; readonly field: "command"; readonly pattern: RegExp; readonly reason: string; }, { readonly name: "issue-body-from-vault-file"; readonly tool: "bash"; readonly field: "command"; readonly pattern: RegExp; readonly when: { readonly missingVaultBodyFile: { readonly section: "issues"; }; }; readonly reason: string; }]; //# sourceMappingURL=rules.d.ts.map