Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `brigade work bootstrap` to initialize and verify the dogfood-backed daily work loop in one command.
- `brigade work brief` and `brigade work brief --json` as a start-of-day entrypoint with git state, latest sessions, latest dogfood run, resolved next task, and suggested command.
- `brigade work tasks` plus `brigade work task add/show/done` to manage a gitignored local task ledger under `.brigade/work/tasks.json`.
- Typed task metadata and repeatable acceptance criteria for `brigade work task add`, plus `brigade work task plan` for the completion checklist.
- `brigade work run --queue-next` to queue the successful run's extracted next step, with duplicate pending task protection.
- `brigade work import add/list/show/promote` to manage a gitignored local import inbox for scanner-discovered candidate work.
- `brigade work import validate` and `brigade work import ingest` for scanner-authored JSONL import files.
Expand Down Expand Up @@ -92,6 +93,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Dogfood next-step extraction now handles markdown `## Next` sections and can fall back to `summary.md` when `final.txt` does not contain a next-step label.
- `brigade work run` now consumes the oldest pending ledger task before falling back to the latest extracted dogfood next step, and marks consumed tasks done after successful runs.
- `brigade work task add --from-next` now reuses an equivalent pending task instead of adding duplicates.
- `brigade work brief` now reports acceptance coverage for the next ledger task, and `brigade work run` passes accepted ledger criteria into the dogfood task prompt.
- `brigade work brief` now includes pending local work imports and import counts in both text and JSON output.
- `brigade work brief` now surfaces pending handoff ingest issue counts when the local handoff source config has an ingestor latest-run log.
- The managed gitignore block now treats `.brigade/dogfood.toml`, `.brigade/security.toml`, `.brigade/runs/`, and `.brigade/security/` as local state.
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ brigade work next
brigade work next --json
brigade work tasks
brigade work task add "build the next slice"
brigade work task add "build the next slice" --type feature --priority high --acceptance "focused tests pass"
brigade work task add --from-next
brigade work task plan <task-id>
brigade work task done <task-id>
brigade work import add --kind task --source slack "refresh the stale memory card"
brigade work import list
Expand Down Expand Up @@ -276,7 +278,9 @@ Task ledger commands:

- `brigade work tasks` lists `.brigade/work/tasks.json`.
- `brigade work task add "..."` queues a task manually.
- `brigade work task add "..." --type feature --priority high --acceptance "..."` queues typed work with repeatable acceptance criteria.
- `brigade work task add --from-next` promotes the latest extracted dogfood next step.
- `brigade work task plan <task-id>` shows the task metadata, acceptance checklist, and suggested run command.
- `brigade work task done <task-id>` closes queued work.

Import inbox commands:
Expand All @@ -297,6 +301,7 @@ For handoff-ingest issues, prefer `brigade handoff sync-issues` over repeated ra

Run the daily loop with `brigade work run`.
It opens a work session, resolves the next task, runs `brigade dogfood`, and closes completed ledger tasks after successful runs.
When the resolved ledger task has acceptance criteria, `work run` includes them in the task prompt as the definition of done.
Then it ends the session, writes a work-session Memory Handoff by default, and prints a recap.

Useful `work run` switches:
Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Brigade-specific additions:
Goal: make Brigade support a narrow issue lifecycle for daily work: pick one task, define acceptance, test first when practical, implement, review, refactor, and close.

- Add task templates for vertical-slice work, bugfix work, and RED/GREEN/REFACTOR loops.
- Let `brigade work run` consume structured acceptance criteria from the local task ledger or a GitHub issue mirror.
- Let `brigade work run` consume structured acceptance criteria from the local task ledger or a GitHub issue mirror. Status: started for local ledger tasks with typed priority, repeatable acceptance criteria, `work task plan`, brief coverage, and criteria injection into ledger-driven runs.
- Keep repo-shareable workflow rules separate from gitignored personal/global preferences.
- Add doctor checks for missing acceptance criteria or stale active issue context.

Expand Down
24 changes: 23 additions & 1 deletion src/brigade/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from . import __version__
from .dogfood_cmd import DEFAULT_TIMEOUT_SECONDS
from .work_cmd import TASK_PRIORITIES, TASK_TYPES
from .prompt import prompt_for_selection # imported here so tests can monkeypatch cli.prompt_for_selection


Expand Down Expand Up @@ -182,9 +183,21 @@ def _build_parser() -> argparse.ArgumentParser:
p_work_task_add.add_argument("text", nargs="*", help="Task text.")
p_work_task_add.add_argument("--target", "-t", type=Path, default=Path("."), help="Repo or workspace to update.")
p_work_task_add.add_argument("--from-next", action="store_true", help="Add the latest extracted dogfood next step.")
p_work_task_add.add_argument("--type", choices=TASK_TYPES, default="task", help="Task type.")
p_work_task_add.add_argument("--priority", choices=TASK_PRIORITIES, default="normal", help="Task priority.")
p_work_task_add.add_argument(
"--acceptance",
action="append",
default=[],
help="Acceptance criterion. Repeat for multiple criteria.",
)
p_work_task_show = task_sub.add_parser("show", help="Show one work task.")
p_work_task_show.add_argument("task_id", help="Task id or unique prefix.")
p_work_task_show.add_argument("--target", "-t", type=Path, default=Path("."), help="Repo or workspace to inspect.")
p_work_task_plan = task_sub.add_parser("plan", help="Show task acceptance criteria and run plan.")
p_work_task_plan.add_argument("task_id", help="Task id or unique prefix.")
p_work_task_plan.add_argument("--target", "-t", type=Path, default=Path("."), help="Repo or workspace to inspect.")
p_work_task_plan.add_argument("--json", action="store_true", help="Print machine-readable JSON.")
p_work_task_done = task_sub.add_parser("done", help="Mark one work task done.")
p_work_task_done.add_argument("task_id", help="Task id or unique prefix.")
p_work_task_done.add_argument("--target", "-t", type=Path, default=Path("."), help="Repo or workspace to update.")
Expand Down Expand Up @@ -748,9 +761,18 @@ def main(argv=None) -> int:
if args.work_command == "task":
if args.task_command == "add":
text = " ".join(args.text) if args.text else None
return work_cmd.task_add(target=args.target, text=text, from_next=args.from_next)
return work_cmd.task_add(
target=args.target,
text=text,
from_next=args.from_next,
task_type=args.type,
priority=args.priority,
acceptance=args.acceptance,
)
if args.task_command == "show":
return work_cmd.task_show(target=args.target, task_id=args.task_id)
if args.task_command == "plan":
return work_cmd.task_plan(target=args.target, task_id=args.task_id, json_output=args.json)
if args.task_command == "done":
return work_cmd.task_done(target=args.target, task_id=args.task_id)
parser.error(f"unknown task command: {args.task_command}")
Expand Down
Loading
Loading