Markdown Branch Commit
Workflow
Treat this as an execution command, not a planning-only request. Keep moving until every ordered Markdown file in every requested folder has been implemented, reviewed, and committed locally. Do not push.
- Resolve every folder path from the user request as a normal filesystem path.
- Run preflight once in the target repository:
- Inspect
git status --short --branch,git remote -v, andgit branch --show-current. - If an
originremote exists, rungit fetch origin --prune. - Verify
origin/mainormainexists. - Inspect the available
/reviewinterface andcodex review --helpbefore review. Prefer/reviewwhen available. Usecodex review --uncommittedonly when that CLI path is known to be healthy in the current environment. - If using CLI review, use config value
model_reasoning_effort="xhigh"for Extra High. Never useextra_high, and never append a prompt argument tocodex review --uncommitted; apply design-focused review criteria when reading the result.
- Inspect
- List Markdown files in each folder using
rg --fileswhen available, otherwisefind.- Include
*.mdand*.markdown. - Ignore directories such as
.git,node_modules,dist,build,.venv, andvenv. - Read file contents directly from disk.
- Detect image references in each Markdown file, including
, HTML<img src="...">, reference-style image links, and Obsidian-style embeds such as![[image.png]]. - Resolve local image paths relative to the Markdown file first, then the requested folder. Inspect referenced local images with the available image viewing/perception tool before implementation.
- Treat images as part of the requirements. If a required image is missing, unreadable, or remote-only and cannot be inspected, stop and ask for user input instead of guessing.
- Include
- When multiple folders are provided, start one independent development lane per folder and run those lanes in parallel when the active environment and repository state make that safe.
- Treat the user's multiple-folder request as permission to use parallel folder lanes.
- Use one
git worktreeor isolated Codex CLI workspace per folder lane. Never run parallel lanes in the same dirty working tree. - If safe isolation is unavailable, process lanes sequentially and report that parallelism was skipped.
- Within each folder lane, sort files by explicit ordering in the filename or title: numeric prefixes such as
1.,01,001, then date prefixes, then lexical order as a fallback. - Treat each Markdown file as exactly one implementation unit. Do not split a file into smaller planned units unless the user explicitly asks.
- For each file, create one working branch before editing:
- Fetch remote state first when an
originremote exists. - Base the branch on the latest
origin/mainwhen available, otherwise on localmain. - Use a short branch name derived from the folder and file order/title while preserving the repo's branch naming style when obvious.
- Ensure the lane worktree is clean before editing that branch.
- Fetch remote state first when an
- For each file branch:
- Use GPT-5.5 Extra High for the initial implementation when model switching is available. If not available, use the strongest available model and report the fallback.
- Read the Markdown file and any referenced images, infer the requested implementation from those requirements, inspect the existing code first, and make minimal, scoped edits.
- Run
/reviewbefore tests as the primary quality gate when available. If non-interactive CLI review is healthy and appropriate, runcodex review --uncommitted -c model="gpt-5.5" -c model_reasoning_effort="xhigh"with no prompt argument. - Review must cover correctness, edge cases, public API compatibility, maintainability, cohesion, naming, abstraction boundaries, unnecessary coupling, and whether the code design is easy to evolve.
- If
codex review --uncommittedis known to hang or is currently blocked, do not run it; use/reviewor stop and report review as blocked. - Use GPT-5.5 Extra High for actionable review fixes.
- Address all actionable review findings or explicitly justify non-actionable findings.
- Run
/reviewagain after meaningful fixes and repeat until there are no actionable findings. - Skip broad validation by default. Run only a narrow, cheap check when review feedback or the touched code makes it clearly necessary.
- Commit only the files for that Markdown file with a specific commit message.
- Leave each file branch local and continue with the next ordered file in that folder lane.
Guardrails
- Do not push.
- Never combine unrelated Markdown files into one branch or commit just to move faster.
- Do not commit with unresolved review findings unless the final response names and justifies them.
- Never claim parallel execution, review, or commit happened unless the command/session actually completed successfully.
- Do not rewrite or revert user changes outside the current file's implementation scope.
- If the working tree is dirty before starting a file branch, inspect it and preserve user work. Ask only if those changes block branch creation or commit isolation.
- If a Markdown file is ambiguous, infer conservatively from the codebase and note the assumption in the commit or final summary.
- If safe parallelism is not available, process folder lanes sequentially and say why in the final response.
- Stop and ask for user input if authentication for an existing remote, missing folders, empty Markdown folders, missing/unreadable required images, unavailable review command, or irreconcilable branch conflicts prevent safe local commits.
Final Response
Report each folder/file, branch name, commits created, reviews run, model/reasoning fallbacks, optional focused checks, whether lanes ran in parallel or sequentially, and any remaining risks. Explicitly state that no push or main integration was performed.