feat: add tabular Work summaries and CSV exports

This commit is contained in:
2026-11-16 15:59:26 +00:00
parent 1e440c12ee
commit 3c75ce70f6
21 changed files with 642 additions and 5 deletions
+24
View File
@@ -180,6 +180,30 @@ Legacy projects with none of the three entry files remain valid. Partial install
malformed/duplicate JSON fields, unknown manifest versions and unsupported paths are
validation failures. `onboard` refreshes the contract while backing up changed files.
`work list`, `status`, and `next-actions` support `--format table|csv|markdown|json`.
Their default Markdown output is a table; `table` aligns columns for terminals,
and CSV provides UTF-8 comma-separated records with stable headers and RFC 4180
quoting/CRLF record endings. CSV emits no project preamble and keeps original
multiline field values. Empty results still have headers. JSON retains its full
existing records (`Work[]`, `ProjectStatus`, and `Action[]`, respectively).
Work table/CSV/Markdown columns are `id`, `title`, `status`, `archived`, `steps`,
`pending_actions`, `validation`, and `next_action` (human formats use display
labels). Progress counts COMPLETED steps over all registered steps across Plans,
including cancelled steps in the denominator. No steps means `0/0`; unreadable
Plan data means `unavailable`, with invalid validation and a repair suggestion.
Pending actions count deterministic suggestions, including execution and
maintenance; they are not solely blockers or semantic progress. The next command
is the first existing suggestion, without a new prioritization algorithm.
Action columns are `work_id`, `code`, `message`, and `command`. A project-level
action has an empty `work_id`. Markdown escapes cell text; terminal tables flatten
line breaks/control characters without truncating field values.
`work list --open` filters every format to nonterminal, unarchived Works: OPEN,
ACTIVE, and BLOCKED. Unfiltered Work lists continue to include archived Works.
Tabular formats apply to these three read commands only; other commands retain
their existing format choices. No storage or protocol revision is required.
An agent begins with the guide, status, next-actions and selected Work context. These
are portable instructions, not an LLM plugin or enforcement mechanism. Without the
CLI, an agent can inspect the files directly. Agents must still inspect the entry