Skip to content

BACK-507 - CLI-first agent workflow refactor and local instruction surface#686

Merged
MrLesk merged 12 commits into
mainfrom
tasks/back-507-agent-cli-workflow
Jun 15, 2026
Merged

BACK-507 - CLI-first agent workflow refactor and local instruction surface#686
MrLesk merged 12 commits into
mainfrom
tasks/back-507-agent-cli-workflow

Conversation

@MrLesk

@MrLesk MrLesk commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

This PR completes the CLI-first agent workflow refactor for Backlog.md.

The new recommendation is: generated agent instruction files stay tiny and tell agents to load the current workflow from the installed backlog binary with backlog instructions overview. Agents and humans then use the same public CLI commands, backlog instructions guides, and --help schemas to discover reads, writes, accepted fields, examples, and recovery hints. MCP remains supported as an optional connector, but it is no longer the primary recommendation for new agent setup.

Included Tasks

  • BACK-507 - CLI-first agent workflow refactor and local instruction surface: introduces the overall CLI-first agent workflow refactor, with embedded instruction guides, public command schemas, local documentation entry points, and MCP compatibility retained as optional.
  • BACK-507.1 - Shared workflow instruction registry and CLI access: introduces backlog instructions, backlog instructions --list, and guide-specific output backed by the shared workflow guide registry.
  • BACK-507.2 - Short agent nudge and init default migration: replaces the long generated agent guide with a short nudge, makes CLI instructions the default backlog init AI integration, and preserves explicit MCP/no-AI choices.
  • BACK-507.3 - Text input schemas in public command help: introduces reusable help-schema rendering so public CLI help shows required fields, optional fields, reads, writes, output shape, and examples.
  • BACK-507.4 - Self-correcting CLI errors for agents and humans: improves common CLI failures with suggestions, accepted values, and exact help commands instead of opaque errors.
  • BACK-507.5 - Documentation and MCP compatibility updates: updates README/CLI docs so CLI instructions are the recommended AI workflow while MCP workflow resources and tests remain available.
  • BACK-507.6 - Root command local instruction hub: changes bare backlog and backlog instructions into plain-text local instruction entry points, restores the ASCII splash, and removes dependence on online docs for first-run guidance.
  • BACK-507.7 - Milestone CLI parity with MCP operations: introduces backlog milestone add, rename, and remove, including task update/reassign behavior aligned with MCP milestone handlers.
  • BACK-507.8 - Document search CLI parity with MCP operation: introduces backlog doc search <query> with validation, document-focused output, and follow-up backlog doc view hints.
  • BACK-507.9 - Task list CLI parity with MCP filters: adds backlog task list --labels, --search, and --limit, including help examples and guide updates so agents can search/filter before acting.
  • BACK-507.10 - Task complete CLI parity with MCP cleanup operation: introduces backlog task complete <taskId> as an explicit cleanup/archive-only command, with warnings that completed tasks disappear from the active Kanban board.
  • BACK-507.11 - Concrete CLI help values for agent schemas: updates command help so known choices render concrete accepted values, including configured statuses and fixed enum-like options.
  • BACK-507.12 - Use required overview nudge and configured prefixes in CLI guidance: strengthens generated nudges so agents read backlog instructions overview before any user request and renders examples with the project’s configured task prefix.
  • BACK-507.13 - Restore colorized root command splash for TTY output: restores color for interactive root output while keeping non-TTY, redirected, and NO_COLOR output plain.

Review Follow-Up Included

  • Preserved deterministic plain backlog --plain root output.
  • Applied task-list limits after global sorting/filtering before regrouping.
  • Kept Draft out of help surfaces for commands that reject it.
  • Removed hard-coded status assumptions from execution/finalization/task-complete guidance.
  • Fixed milestone add auto-commit behavior and generated instruction block migration.
  • Preserved empty document-search test arguments and normal interactive task-list focus.
  • Raised multi-process instruction-test timeouts for slower Bun runners.
  • Rendered help schemas and instruction examples from the runtime project cwd/BACKLOG_CWD.
  • Kept the full local task set available in interactive task-list while applying search, labels, and limit as initial UI filters.
  • Split slow milestone removal coverage into focused tests.

Validation

  • bun test (1315 pass, 2 skip, 0 fail)
  • bunx tsc --noEmit
  • bun run check .
  • bun run build

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d9c022732

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli.ts Outdated
Comment thread src/cli.ts
Comment thread src/agent-instructions.ts
Comment thread src/cli.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 792883caa7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli.ts Outdated
Comment thread src/commands/help-schema.ts Outdated
Comment thread src/guidelines/cli-instructions/task-finalization.md Outdated
Comment thread src/cli.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f72eb38c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli.ts
Comment thread src/guidelines/cli-instructions/task-execution.md Outdated
Comment thread src/test/cli-milestone-management.test.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9575c81a13

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/test/cli-doc-search.test.ts Outdated
Comment thread src/cli.ts Outdated
Comment thread src/cli.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f843a418d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/test/cli.test.ts
Comment thread src/commands/help-schema.ts Outdated
Comment thread src/cli.ts Outdated
@MrLesk MrLesk changed the title BACK-507 - CLI workflow guidance for agents and humans BACK-507 - CLI-first agent workflow refactor and local instruction surface Jun 14, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee20e0e07e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli.ts
Comment thread src/ui/task-viewer-with-search.ts
Comment thread src/cli.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eda299bdd7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/ui/task-viewer-with-search.ts Outdated
Comment thread src/ui/unified-view.ts
Comment thread src/core/backlog.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 080196e9f3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli.ts
Comment thread src/ui/unified-view.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ffb27d3bbf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/ui/board.ts
Comment thread src/ui/unified-view.ts Outdated
@MrLesk MrLesk merged commit 5a6d861 into main Jun 15, 2026
9 checks passed
@MrLesk MrLesk deleted the tasks/back-507-agent-cli-workflow branch June 15, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant