ns-flow-submit
Submit or update the current Graphite stack by delegating to `ns flow gt submit`.
- License 许可
- MIT
- 所属仓库
- nseng-ai/ns
- 最近更新
- 2026-10-02
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- ns-flow-submit
- description
- Submit or update the current Graphite stack by delegating to `ns flow gt submit`.
- allowed-tools
- [ "Bash(ns flow gt submit*)" ]
- disable-model-invocation
- true
02 资源文件 1
- 参考文档agents/openai.yaml43 B
03 SKILL.md 正文
ns-flow-submit
Submit or update the current Graphite stack by delegating to the ns flow gt submit CLI. This is the cross-harness path for /ns:flow:gt:submit; do not run a parallel hand-written gt submit sequence unless the CLI is unavailable and the user explicitly accepts the fallback.
When to use
Use only when the user explicitly asks to submit or update the current Graphite stack/PRs. This performs write-capable external effects through Graphite/GitHub.
Workflow
Run from the repository root:
ns flow gt submit
The CLI owns checkpointing, readiness/restack, Graphite submission, exact-scope post-submit PR reconciliation, and Assembled PR inventories for newly created PRs.
If the CLI says a restack is required:
- in an interactive session, follow the CLI prompt;
- in a non-interactive/headless invocation, rerun only with explicit user approval:
ns flow gt submit --restack
Ordinary submit leaves every PR that existed before the invocation untouched. After Graphite publishes, Flow re-queries GitHub for exactly the planned branches and uses those authoritative branch-keyed PR identities—not URLs parsed from Graphite output—to select newly created PRs. It prepares complete generated title/body replacements for all selected PRs before any GitHub edit, then applies replacements sequentially. A preparation failure edits none; an edit failure stops and reports applied, failed, and not-attempted PRs.
If any planned branch has no open PR, multiple open PRs, malformed lookup data, a query failure, or a changed pre-existing identity, submit fails after publication but before inventory generation and edits no PR metadata. Repair the PR/head-branch association and rerun ns flow gt submit; because the retry treats now-existing PRs as untouched, use ns flow generate-pr-inventory on any branch whose initial inventory was skipped.
An Assembled PR inventory is a best-effort mechanical account from the diff and commit headlines. It is produced without author steering, interview, or approval, so it is distinct from authored or co-authored rationale and may omit intent, rationale, constraints, or context not visible in that evidence. Flow adds this limit as a short italicized note, plus a footer naming the evidence inputs, invoking command, prompt source, and exact qualified model identity.
To widen the default new-only batch to every reconciled PR in the submitted scope — existing and new — run:
ns flow gt submit --generate-pr-inventory
The destructive confirmation occurs before checks, checkpointing, model resolution, or Graphite/GitHub work. This replaces the complete title and body of every selected PR and removes all existing body content, including human-authored prose; there is no managed-region merging and no rollback. It requires a TTY confirmation, or --yes/-y for explicit non-interactive approval. Flow prepares all replacements before the first edit, then applies them sequentially; a preparation failure edits none, while an apply failure stops and reports applied, failed, and not-attempted PRs.
To replace the complete title and body of only an existing current-branch PR, run:
ns flow generate-pr-inventory
That focused command confirms by default and accepts --yes for explicit non-interactive approval. The inventory prompt resolves through NS_FLOW_PR_INVENTORY_PROMPT, point flow.submit.pr-inventory, conventional path .ns/prompts/flow.submit.pr-inventory.md, then the built-in default. Model operation flow.pr-inventory defaults to fast when omitted. This is a clean breaking cutover: old flow.pr-description configuration is ignored and therefore falls through to fast; there is no compatibility alias.
Failure handling
Surface CLI output directly, including any AI interpretation section and partial metadata-application report. Do not bypass checkpoint, Graphite submit, post-submit verification, or metadata failures. Do not fall back to raw gt submit unless the user explicitly asks after seeing the CLI failure.
Boundaries
- It does not land/merge PRs.
- Ordinary submit edits titles/bodies only for PRs it creates.
- Stack-wide replacement of existing PR metadata happens only under explicit
--generate-pr-inventoryauthorization; never pass--yeson the user's behalf without their explicit approval.
04 同仓库更多 Skills
pr-make-accountable
Interview a PR author to establish shared understanding of intent and design decisions, then co-author the What / Why / Changes PR body with opt-in Requested reviewer focus.
typescript-style
Opinionated style guide for strict, portable TypeScript. Use when writing, designing, or reviewing TypeScript: type design, boundary validation, error handling, module architecture, and review discipline.
typescript-fake-driven-testing
TypeScript fake-driven testing architecture. Use when writing or reviewing TS code with external dependencies, gateway interfaces, real adapters, in-memory fakes, or CLI scenario tests.
ns-typescript
TypeScript overlay for ns-style projects. Use when editing or reviewing TS in this repo: tsconfig baseline, pnpm/Vitest/oxlint/oxfmt/native tsc commands, relative .ts imports, workspace subpath exports, and the exactOptionalPropertyTypes spread idiom. Repo-specific enforcement (test lanes, time seams, style guard) lives in the host repo's AGENTS.md.
ns-typescript-style-tripwire
Invoke the ns TypeScript style Tripwire against a supplied diff or current branch.
skill-management
Manage skills with `npx skills`: add, edit, remove, rename, update, or list skills (local or GitHub), and the nested `skills/<disposition>/.../<name>/` / flat `.agents/skills/` layout conventions.