Skip to content

docs: FOC board rule updates from 2026-05-05 sweep#37

Merged
BigLep merged 13 commits into
masterfrom
biglep/2026-05-04-foc-board-rule-sweep
May 8, 2026
Merged

docs: FOC board rule updates from 2026-05-05 sweep#37
BigLep merged 13 commits into
masterfrom
biglep/2026-05-04-foc-board-rule-sweep

Conversation

@BigLep
Copy link
Copy Markdown
Contributor

@BigLep BigLep commented May 6, 2026

Summary

Rule and workflow improvements discovered during FOC board sweeps on 2026-05-05, 2026-05-06, and 2026-05-07:

Rule updates

  • R-SL-001: Add re-requested reviewer exception — if a reviewer who requested changes is re-requested, their objection is not superseded by another approval
  • R-SL-008: Require linked PR to be In Progress or later before moving an issue to "Issue awaiting PR merge"; add cycle inheritance from linked PRs regardless of milestone; use has:linked-pull-requests board filter to narrow queries to only issues with linked PRs
  • R-SL-008 unlinked PR discovery: Use no:linked-pull-requests filter on In Progress issues, then targeted timelineItems GraphQL
  • R-PR-007: Require Phase 2 before flagging — empty reviewRequests is ambiguous (pending requests are consumed when a review is submitted); do not flag based on Phase 1 data alone
  • R-PR-007 (external items): Exclude repos outside blessed orgs — cannot request reviewers, so flagging is noise
  • README rule 4: Require hyperlinks on all item references in reports/flags

Playbook improvements

  • Stage 0 (new): Create a unique sweep workspace directory (/tmp/foc-board-sweep@<timestamp>) so all file writes target new files, avoiding Write tool read-first issues
  • Stage 1 ordering: Run cycle-gap queries after status mutations so newly in-flight items get caught
  • Stage 1 cross-referencing: Use format: "compact" + Write-to-disk + jq reconstruction workflow; add R-PR-007 to Phase 2 candidate action lists
  • Stage 1 Phase 2 batching: 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
  • Stage 4 R-SL-008: Use has:linked-pull-requests filter instead of fetching all non-Done issues with verbose "Linked pull requests" field
  • Stage 5 targeted queries: Replace bulk Done-item fetch with targeted gap queries to avoid wasting context on 100+ items

Agent prompt updates

FilOzzy MCP server (filozzy-mcp)

  • format: "compact": New columnar JSON format for list_board_items — field names appear once, rows are value arrays (~40-60% fewer tokens than format: "json")
  • format: "json": New object-per-item JSON format with pagination metadata
  • Refactored display item building into shared _build_display_items() helper
  • Unit tests: 15 tests for _format_json and _format_compact (roundtrip, sparse rows, pagination, size comparison, unicode)
  • Document pseudo-fields (Node ID, Repository, Id, Number, url, Title, Kind, Assignees) in list_board_items docstring

GitHub Projects Client (github-projects-client)

  • Trim linked PR objects: GitHub Projects v2 REST API returns full PR payloads (~8KB each) for "Linked pull requests" field. Now trimmed to compact JSON with just {repo, number, state, draft, title, author} (~100 bytes each)
  • Unit tests: 8 tests for linked PR trimming (valid JSON output, kept/stripped fields, size comparison, backwards compatibility)
  • README: Document field value trimming behavior

Future ideas

  • Async result refs: Documented design for server-side result storage with ref-based fetch, eliminating token I/O for large results when MCP server goes external

Other

  • Regenerate filozzy-mcp/uv.lock for Python >=3.13 constraint

Test plan

  • Rules applied successfully in full board sweeps on 2026-05-05, 2026-05-06, and 2026-05-07
  • _format_compact unit tests pass (15/15)
  • Linked PR trimming unit tests pass (15/15)
  • Next sweep agent session uses format: "compact", $SWEEP/ workspace, and batched Phase 2

@FilOzzy FilOzzy added this to FOC May 6, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC May 6, 2026
@BigLep BigLep force-pushed the biglep/2026-05-04-foc-board-rule-sweep branch from f4573f0 to 9c32964 Compare May 6, 2026 05:10
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>
@BigLep BigLep requested a review from Copilot May 6, 2026 05:22
@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC May 6, 2026
@BigLep BigLep self-assigned this May 6, 2026
@BigLep BigLep force-pushed the biglep/2026-05-04-foc-board-rule-sweep branch from 9c32964 to cc80515 Compare May 6, 2026 05:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 reviewDecision as 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.

Comment thread foc-board-rules/sweep-playbook.md Outdated
Comment thread foc-board-rules/sweep-playbook.md Outdated
Comment thread foc-board-rules/sweep-playbook.md
Comment thread foc-board-rules/status-lifecycle.md Outdated
BigLep and others added 5 commits May 6, 2026 09:08
- 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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_items accepts a format parameter but only handles format == "json"; any other value (including "compact") silently returns the human JSONL format. To avoid surprising behavior, consider either (a) validating format and erroring on unsupported values here, or (b) adding support for "compact" for parity with list_board_items.

    if not items:
        msg = f"No items found for view URL: {view_url}"
        if order_warning:
            msg = order_warning + "\n\n" + msg

Comment thread foc-board-rules/sweep-playbook.md
Comment thread foc-board-rules/sweep-playbook.md Outdated
Comment thread foc-board-rules/sweep-playbook.md Outdated
Comment thread foc-board-rules/sweep-playbook.md Outdated
Comment thread filozzy-mcp/filozzy_mcp/server.py
BigLep and others added 3 commits May 7, 2026 11:24
- 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>
@BigLep BigLep requested a review from Copilot May 8, 2026 05:36
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.

Comment thread foc-board-rules/status-lifecycle.md Outdated
Comment thread filozzy-mcp/filozzy_mcp/server.py
Comment thread github-projects-client/github_projects_client/items.py Outdated
@rjan90 rjan90 added this to the M4.2: mainnet GA milestone May 8, 2026
- 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],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed — I have a follow-up PR that discards compact entirely, so I won't fix this now.

Copy link
Copy Markdown
Contributor

@rjan90 rjan90 left a comment

Choose a reason for hiding this comment

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

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.

@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC May 8, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BigLep
Copy link
Copy Markdown
Contributor Author

BigLep commented May 8, 2026

I will merge this, but I have a followup PR to simplify and clean things up.

@BigLep BigLep merged commit 0b51650 into master May 8, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

4 participants