docs: FOC board rule updates from 2026-05-05 sweep#37
Conversation
f4573f0 to
9c32964
Compare
Rule improvements discovered during a full board sweep: - R-SL-001: add re-requested reviewer exception to superseding logic - R-SL-008: require linked PR to be In Progress+ before moving issue; add cycle inheritance clause for existing "awaiting merge" items - README rule 4: require hyperlinks on item references - Playbook Stage 1: add jq cross-referencing guidance - Playbook Stage 4: update queries/rules for R-SL-008 changes - Agent prompt: make FilOzzy MCP + GitHub access a hard requirement; add pitfall about programmatic data joins Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9c32964 to
cc80515
Compare
There was a problem hiding this comment.
Pull request overview
Updates the FOC board rule documentation and sweep guidance based on the 2026-05-05 full-board sweep, aiming to reduce sweep errors and improve consistency when cross-referencing board items with GitHub PR metadata.
Changes:
- Added Stage 1 guidance for programmatically cross-referencing board PRs with GitHub “Phase 1” metadata using
jq. - Updated lifecycle rule R-SL-008 to only move issues to “⌚️ Issue awaiting PR merge” once a linked PR is actively in flight, and to inherit cycle from linked PRs even when milestone logic wouldn’t apply.
- Strengthened sweep-agent prerequisites/pitfalls and updated README guidance to require hyperlinks in reports and treat empty
reviewDecisionas ambiguous.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| foc-board-rules/sweep-playbook.md | Adds jq-based cross-referencing workflow and updates Stage 4 queries/rule notes to reflect R-SL-008 refinements. |
| foc-board-rules/sweep-agent-prompt.md | Tightens required tool prerequisites and adds a pitfall warning against manual JSON cross-referencing. |
| foc-board-rules/status-lifecycle.md | Updates R-SL-001 with a re-requested-reviewer exception and refines R-SL-008 semantics + cycle inheritance guidance. |
| foc-board-rules/README.md | Requires hyperlinks in reporting and clarifies how to interpret empty reviewDecision during Phase 1 triage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix invalid jq syntax (use IN() instead of pseudo "is in" operator) - Clarify that .board_status is added during the join step - Fix env.repo bug by using --arg repo instead of env.repo in jq - Update Stage 4 guidance to consistently require linked PR In Progress or later before moving issue to "Issue awaiting PR merge" - Replace confusing draft/status parenthetical in R-SL-008 with explicit enumeration of qualifying board statuses Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Document pseudo-fields (Node ID, etc.) in list_board_items docstring so MCP consumers can discover them without reading source code - Add R-PR-007 exclusion for external items (can't request reviewers) - Add ordering note: run cycle-gap queries after status mutations - Document that list_board_items output is JSONL with parsing recipe - Replace bulk Done-item fetch with targeted gap queries in Stage 5 - Regenerate uv.lock for Python >=3.13 constraint Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
In Progress issues with no formal "Linked pull requests" may still have
cross-referencing PRs that use informal language ("Addresses #N") instead
of closing keywords. Add a targeted check using GraphQL timelineItems,
scoped to only In Progress issues with empty linked PRs to keep queries
cheap. Findings are flagged for human, not auto-transitioned.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add format: "compact" option that returns columnar JSON (field names once, rows as value arrays) — ~40-60% fewer tokens than format: "json" for large result sets. This reduces context bloat when sweep agents write board query results to disk for jq processing. Also adds Stage 0 (sweep workspace) to the playbook, updates sweep docs to recommend format: "compact", and documents the async result ref idea for future when the MCP server goes external. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of querying all non-Done issues and checking for linked PRs, use has:linked-pull-requests board filter to get only the ~5-10 issues that actually have links. Keep timelineItems GraphQL targeted to In Progress issues with no:linked-pull-requests only. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
filozzy-mcp/filozzy_mcp/server.py:455
list_board_view_itemsaccepts aformatparameter but only handlesformat == "json"; any other value (including "compact") silently returns the human JSONL format. To avoid surprising behavior, consider either (a) validatingformatand erroring on unsupported values here, or (b) adding support for "compact" for parity withlist_board_items.
if not items:
msg = f"No items found for view URL: {view_url}"
if order_warning:
msg = order_warning + "\n\n" + msg
- Fix format recommendation inconsistency: recommend "compact" or "json" instead of only "json" for programmatic use - Add emoji prefixes to jq board_status selectors to match actual values - Rewrite join example to read from $SWEEP/ files instead of shell variable - Validate format parameter in list_board_items, raise ValueError on typos Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
R-PR-007: Empty reviewRequests is ambiguous — pending requests are consumed when a review is submitted. Always Phase 2 before flagging a PR as missing reviewer engagement. Playbook: Collect all Phase 2 candidates (R-PR-006, R-PR-007, empty reviewDecision) into a single list, then fetch in parallel instead of sequential per-rule lookups. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…response
GitHub's Projects v2 REST API returns complete PR objects (~8KB each)
for the "Linked pull requests" field — full body text, user objects
with avatar URLs, all API endpoints, labels, etc. Trim these down to
just {repo, number, state, draft, title, author} (~100 bytes each).
Adds unit tests and documents the trimming behavior in README.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- R-SL-008: remove "Issue awaiting PR merge" from linked PR in-flight statuses (PRs should never be in that status per R-SL-006) - list_board_view_items: add format validation and compact support, matching list_board_items behavior - items.py: change _KEEP_KEYS from set to tuple for stable iteration order Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| def _format_compact( | ||
| display_items: list[dict], | ||
| has_more: bool, | ||
| next_cursor: Optional[str], |
There was a problem hiding this comment.
I think compact pagination can still produce incompatible schemas across pages here. Since _build_display_items() strips empty values before _format_compact() builds columns, page 1 and page 2 can end up with different column sets for the same requested fields.
The playbook merge example keeps page 1’s .columns and just concatenates rows, so if a field is empty on page 1 but present on page 2, reconstruction can silently drop or mislabel values.
There was a problem hiding this comment.
Agreed — I have a follow-up PR that discards compact entirely, so I won't fix this now.
rjan90
left a comment
There was a problem hiding this comment.
Need to fix the lint-failure to make CI green at least. Also added another comment. But apart from that looks good to me, so will add the approval to not block merge, once lint-fix is in.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
I will merge this, but I have a followup PR to simplify and clean things up. |
Summary
Rule and workflow improvements discovered during FOC board sweeps on 2026-05-05, 2026-05-06, and 2026-05-07:
Rule updates
has:linked-pull-requestsboard filter to narrow queries to only issues with linked PRsno:linked-pull-requestsfilter on In Progress issues, then targetedtimelineItemsGraphQLreviewRequestsis ambiguous (pending requests are consumed when a review is submitted); do not flag based on Phase 1 data alonePlaybook improvements
/tmp/foc-board-sweep@<timestamp>) so all file writes target new files, avoiding Write tool read-first issuesformat: "compact"+ Write-to-disk +jqreconstruction workflow; add R-PR-007 to Phase 2 candidate action listshas:linked-pull-requestsfilter instead of fetching all non-Done issues with verbose "Linked pull requests" fieldAgent prompt updates
format: "compact", Write to$SWEEP/immediately, check paginationjqfor board + GitHub metadata joins (not manual reasoning)FilOzzy MCP server (
filozzy-mcp)format: "compact": New columnar JSON format forlist_board_items— field names appear once, rows are value arrays (~40-60% fewer tokens thanformat: "json")format: "json": New object-per-item JSON format with pagination metadata_build_display_items()helper_format_jsonand_format_compact(roundtrip, sparse rows, pagination, size comparison, unicode)list_board_itemsdocstringGitHub Projects Client (
github-projects-client){repo, number, state, draft, title, author}(~100 bytes each)Future ideas
Other
filozzy-mcp/uv.lockfor Python >=3.13 constraintTest plan
_format_compactunit tests pass (15/15)format: "compact",$SWEEP/workspace, and batched Phase 2