Skip to content

feat: add project-status task for accurate *status command#559

Open
csjusto wants to merge 2 commits intoSynkraAI:mainfrom
csjusto:feat/project-status-task
Open

feat: add project-status task for accurate *status command#559
csjusto wants to merge 2 commits intoSynkraAI:mainfrom
csjusto:feat/project-status-task

Conversation

@csjusto
Copy link

@csjusto csjusto commented Mar 5, 2026

Summary

  • The *status command lacks a formal task definition, causing agents to report inaccurate story statuses
  • Agents rely on stale epic metadata, gitStatus snapshots, or subagent summaries instead of reading the actual ## Status field from each story file
  • Added project-status.md task that enforces reading every story file as the single source of truth, with divergence detection between epic metadata and actual story statuses

Changes

.aiox-core/development/tasks/project-status.md — New Task

3 Critical Rules:

  1. Source of Truth: Only the ## Status field in each story file — never epic metadata, git log, or cached data
  2. Read Every File: Every *status execution MUST read every story file. No shortcuts, no sampling
  3. Divergence Detection: Flag mismatches between epic progress counts and actual story statuses

5-Step Workflow:

  1. Discover epics via Glob (docs/stories/epic-*.md)
  2. Discover stories via Glob (docs/stories/[0-9]*.md)
  3. Read lines 1-6 of EACH story file to extract status (MANDATORY, cannot be delegated)
  4. Cross-reference with epic metadata, detect divergences
  5. Format output with icons, counts, and divergence warnings

6 Anti-Patterns documented to prevent recurrence of inaccurate reporting

Root Cause

The *status command had no formal task workflow. Agents improvised the data gathering, leading to:

  • Reading epic files (stale summaries) instead of story files (source of truth)
  • Using gitStatus snapshot (frozen at conversation start) as if it were current
  • Assuming stories without files didn't exist, without running Glob first
  • Delegating to subagents that cached old data

Test plan

  • Run *status on a project with known story statuses — verify 100% accuracy
  • Intentionally make epic metadata stale (e.g., epic says "1/2 done" but both stories are Done) — verify divergence warning appears
  • Add a story file not referenced in any epic — verify it appears as orphan
  • Remove a story file that is referenced in an epic — verify "No story file" indicator

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive project-status documentation defining workflows for generating a real-time panorama of epics and stories.
    • Describes usage modes (full panorama, single epic, summary), mandates reading each story’s status from the source of truth, and specifies divergence detection and normalization rules.
    • Includes output format with status icons, divergence resolution guidance, error handling, quality metrics, and performance/anti-pattern tips.

@vercel
Copy link

vercel bot commented Mar 5, 2026

@csjusto is attempting to deploy a commit to the Pedro Valério Lopez's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

Walkthrough

A new project-status.md document was added, specifying a standardized workflow for generating real-time project status panoramas. It mandates reading status from each story file as the single source of truth, requires divergence detection between epic metadata and story statuses, and prescribes output formatting, error handling, and performance guidance.

Changes

Cohort / File(s) Summary
Project Status Specification
.aiox-core/development/tasks/project-status.md
Added a comprehensive policy document defining: discovery of epics and stories; mandatory per-story Status reads as the source of truth; divergence detection and normalization rules; output formats (full panorama, single-epic, summary) with status icons; error handling for missing fields/files and orphan stories; divergence resolution guidance; performance and parallelization tips; and related commands.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new project-status task document that defines a formal workflow for the *status command. It is concise, specific, and clearly conveys the primary purpose of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.aiox-core/development/tasks/project-status.md:
- Around line 91-92: Update the "Count stories by status" and "Compare with epic
file's stated progress" sections to require a deterministic status normalization
step before any counting or divergence checks: define and document a canonical
status set (e.g., Done, Ready, Draft, InProgress, InReview) and a normalization
map for common variants (e.g., "Ready to Start" -> "Ready", "In Review" ->
"InReview", case-insensitive trim, synonyms), state that normalization must be
applied to story text and epic progress values, and ensure the
counting/divergence logic references the normalized values only; include the
normalization rules in the doc and callouts that code consuming this doc must
implement the same mapping for lines referencing "Count stories by status" and
the epic comparison logic.
- Around line 113-139: The markdown file contains fenced code blocks holding the
"📊 Status Completo — {Project Name}" status template and a second similar block
later; these blocks lack a language identifier and trigger MD040. Fix by adding
a language tag (e.g., ```markdown or ```md or ```text) to each fenced block that
wraps the Status template and the later template so the linter recognizes the
block type; locate the fenced blocks by searching for the block that begins with
"📊 Status Completo — {Project Name}" and the second occurrence and add the
language identifier to the opening triple backticks.
- Around line 79-82: The doc currently mandates extracting Status from a fixed
line ("line 5 / lines 3-5") which is brittle and wrong; change the instructions
to recommend parsing the file by locating the metadata section or scanning all
lines for a Status label/pattern (e.g., a line containing "Status",
"**Status**", or "Status:") and extracting the value after the marker instead of
using a hardcoded line index; update the corresponding references (the lines
that read "Read lines 1-6..." and the duplicate at 234-235) to describe
metadata-section or label-based extraction and include a fallback behavior if no
Status is found.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8af38ac3-01d1-4232-9d19-a3d5fdb432d8

📥 Commits

Reviewing files that changed from the base of the PR and between c478234 and 0e74894.

📒 Files selected for processing (1)
  • .aiox-core/development/tasks/project-status.md

- Replace fixed line-number parsing with ## Status section search (robust)
- Add status vocabulary normalization before counting/divergence checks
- Add language identifiers to fenced code blocks (MD040)
- Update Performance section to match new parsing approach

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
.aiox-core/development/tasks/project-status.md (1)

210-210: ⚠️ Potential issue | 🟠 Major

Anti-pattern text is outdated and contradicts the current parsing rules.

“read lines 1-6” conflicts with the ## Status-based extraction guidance and should be removed.

Proposed doc fix
-3. **NEVER** delegate to a subagent without explicit instruction to "read lines 1-6 of EVERY story file"
+3. **NEVER** delegate to a subagent without explicit instruction to read each story file and extract status from the `## Status` section

As per coding guidelines, "Verify task follows AIOX task format with clear elicitation points."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/development/tasks/project-status.md at line 210, Remove the
outdated anti-pattern sentence that references "NEVER delegate to a subagent
without explicit instruction to \"read lines 1-6 of EVERY story file\"" and
replace it with a statement that aligns with the current parsing rule: instruct
contributors not to delegate to subagents unless explicitly instructed to
extract content from the document's "## Status" section; ensure the text
references the "## Status" extraction guidance (not line ranges) so there is no
conflict with existing parsing rules.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.aiox-core/development/tasks/project-status.md:
- Around line 79-84: The status-extraction logic currently caps the input to the
first 20 lines (the "Read the first 20 lines" behavior) which misses `## Status`
sections; update the routine that performs status extraction so it scans the
entire document (or searches for the "## Status" heading) rather than truncating
to 20 lines, then take the line immediately after that heading and trim "**" and
whitespace to produce the Status; ensure the change replaces any
fixed-line-limit code path used for "Story title / Status" extraction and add a
small unit test covering a Status beyond line 20.

---

Duplicate comments:
In @.aiox-core/development/tasks/project-status.md:
- Line 210: Remove the outdated anti-pattern sentence that references "NEVER
delegate to a subagent without explicit instruction to \"read lines 1-6 of EVERY
story file\"" and replace it with a statement that aligns with the current
parsing rule: instruct contributors not to delegate to subagents unless
explicitly instructed to extract content from the document's "## Status"
section; ensure the text references the "## Status" extraction guidance (not
line ranges) so there is no conflict with existing parsing rules.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b7c03754-5321-4b8e-aa16-36ad821b31f7

📥 Commits

Reviewing files that changed from the base of the PR and between 0e74894 and 97d3ab5.

📒 Files selected for processing (1)
  • .aiox-core/development/tasks/project-status.md

Comment on lines +79 to +84
Read the first 20 lines and extract:
- Story title: first line starting with "# "
- Status: the line immediately after "## Status" heading,
trimmed of "**" markers and whitespace.
Do NOT rely on fixed line numbers — the Status section
position may vary across story templates.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Remove the fixed 20-line cap for status extraction.

Limiting reads to the first 20 lines can miss valid ## Status sections and produce incorrect panorama results.

Proposed doc fix
-      For EACH story file found in Step 2:
-        Read the first 20 lines and extract:
+      For EACH story file found in Step 2:
+        Read progressively until `## Status` is found (or EOF), then extract:
           - Story title: first line starting with "# "
           - Status: the line immediately after "## Status" heading,
             trimmed of "**" markers and whitespace.
             Do NOT rely on fixed line numbers — the Status section
             position may vary across story templates.
-  Read only the first 20 lines of each story file (status is in the ## Status section).
+  Read minimally but safely: scan line-by-line until `## Status` is found, then stop.
+  If not found, mark as "⚠️ Status field missing".
   Use parallel Read calls for multiple story files.
   Cache nothing — always read fresh.

As per coding guidelines, "Check that deliverables are well-defined."

Also applies to: 244-245

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/development/tasks/project-status.md around lines 79 - 84, The
status-extraction logic currently caps the input to the first 20 lines (the
"Read the first 20 lines" behavior) which misses `## Status` sections; update
the routine that performs status extraction so it scans the entire document (or
searches for the "## Status" heading) rather than truncating to 20 lines, then
take the line immediately after that heading and trim "**" and whitespace to
produce the Status; ensure the change replaces any fixed-line-limit code path
used for "Story title / Status" extraction and add a small unit test covering a
Status beyond line 20.

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