---
id: 10646
title: Require live open-queue sweep in ticket-create
state: CLOSED
labels:
  - documentation
  - enhancement
  - ai
  - architecture
assignees:
  - neo-gpt
createdAt: '2026-05-03T14:36:07Z'
updatedAt: '2026-06-05T13:59:05Z'
githubUrl: 'https://github.com/neomjs/neo/issues/10646'
author: neo-gpt
commentsCount: 2
parentIssue: null
subIssues: []
subIssuesCompleted: 0
subIssuesTotal: 0
blockedBy: []
blocking: []
closedAt: '2026-06-05T13:59:05Z'
---
# Require live open-queue sweep in ticket-create

## Context

During follow-up ticket creation on 2026-05-03, @tobiu surfaced a live creation-side gap:

> our ask tool can be stale. a dup sweep MUST include to at least read the latest 20 open ticket titles, authors and labels.

This correction matters immediately. `ask_knowledge_base(type: 'ticket')` and local `resources/content/issues/**` are useful, but both can lag behind GitHub reality. A ticket-create duplicate sweep that only uses stale indexed/local state can still file a near-duplicate against work opened minutes earlier by another swarm agent.

I applied the stricter rule before filing this ticket: the latest 20 open queue was fetched live from GitHub with number, title, author, labels, and URL. No open ticket in that list covered this exact `ticket-create` live-open-queue mandate.

## The Problem

`.agents/skills/ticket-create/references/ticket-create-workflow.md §1a` currently makes `ask_knowledge_base(type: 'ticket')` the primary semantic duplicate search and local grep/query fallback the exact-match layer. That is insufficient under active swarm conditions because:

- the Knowledge Base can be stale after recent issue creation or sync lag;
- local `resources/content/issues/**` can be stale for the same reason;
- multiple agents can create tickets minutes apart while operating from different harnesses/clones;
- the most likely duplicates are often in the newest open queue, before sync/indexing catches up.

The result is a false sense of duplicate-sweep safety: the agent performs a sweep, but the sweep is not live enough to protect the current tracker.

## The Architectural Reality

Relevant protocol surfaces:

- `AGENTS.md §6 Meta Gate: Deduplication & Linking` — currently mandates local duplicate sweeps before issue/discussion creation.
- `.agents/skills/ticket-create/references/ticket-create-workflow.md §1a` — creation-side Content Sweep, currently KB-primary plus local exact-match fallback.
- `.agents/skills/ticket-create/SKILL.md` — lightweight Progressive Disclosure router; per `create-skill`, this should stay small and point at the reference payload.
- `.agents/skills/create-skill/references/skill-authoring-guide.md` — confirms operational lessons should be promoted into the relevant skill payload, not bloated into the router.

Adjacent but not duplicate:

- #10276 adds adjacency sweep discipline to `ideation-sandbox`; this ticket is specifically about issue creation and live open-ticket freshness.
- #10104 created the `ticket-create` skill itself; it is closed and does not contain the latest-20 live queue rule.

## The Fix

Update the ticket creation protocol so every `create_issue` path must include a live open-queue sweep before filing.

Concrete prescription:

1. In `.agents/skills/ticket-create/references/ticket-create-workflow.md §1a`, add a mandatory live GitHub sweep step:

```bash
gh issue list --state open --limit 20 --json number,title,author,labels,url
```

or the equivalent GitHub MCP/API call returning the same fields.

2. State that this live sweep is additive, not a replacement:
   - keep semantic search (`ask_knowledge_base(type: 'ticket')`) for conceptual adjacency;
   - keep local `rg`/grep over issues, archives, and discussions for exact historical checks;
   - require the live latest-20 open queue because KB/local sync can be stale.

3. Add failure handling:
   - if the live latest-20 call fails due sandbox/network/auth, retry with the appropriate approved/escalated path;
   - if it still cannot be fetched, stop before `create_issue` and report the blocker rather than filing from stale evidence only.

4. Update `AGENTS.md §6` so the per-turn invariant also names live latest-open queue freshness, not only local grep.

5. Keep `SKILL.md` unchanged unless the trigger wording itself needs a tiny pointer. The heavy rule belongs in `references/ticket-create-workflow.md` per Progressive Disclosure.

## Acceptance Criteria

- [ ] `ticket-create-workflow.md §1a` requires reading at least the latest 20 open issue titles, authors, labels, issue numbers, and URLs from live GitHub before `create_issue`.
- [ ] The workflow says the live latest-20 sweep is mandatory even when `ask_knowledge_base` and local grep return no duplicates.
- [ ] The workflow documents retry/escalation behavior for sandbox/network/auth failures and forbids proceeding to `create_issue` if live latest-open state cannot be fetched.
- [ ] `AGENTS.md §6 Meta Gate` is updated to include the same live latest-open queue requirement for issue creation.
- [ ] The rule is placed in the reference payload, not expanded into `ticket-create/SKILL.md`, preserving Progressive Disclosure.
- [ ] The ticket body / creation notes pattern is updated to mention the live-open sweep result when filing future Fat Tickets.

## Out of Scope

- Replacing semantic duplicate search with live title scanning. Both are needed.
- Requiring exhaustive full-repo remote issue enumeration on every ticket. Latest 20 open is the minimum freshness guard; deeper searches remain keyword/semantic targeted.
- Changing `ideation-sandbox` adjacency sweep behavior; #10276 owns that lane.
- Building a new MCP tool solely for this workflow. Existing GitHub API / `gh issue list` / workflow MCP equivalents are sufficient.

## Avoided Traps

- **Trap: trust `ask_knowledge_base` because it is semantically richer.** Rejected. It can be stale, and freshness is the failure mode this rule addresses.
- **Trap: trust local synced markdown.** Rejected. `resources/content/**` can lag behind remote GitHub during active swarm work.
- **Trap: dump the rule into `SKILL.md`.** Rejected. `SKILL.md` is a lightweight router; the heavy operational rule belongs in the reference payload.
- **Trap: make latest-20 the only duplicate sweep.** Rejected. Newest open issues catch freshness; semantic/local sweeps catch older conceptual duplicates and archived/discussion adjacency.

## Related

- #10104 — created the `ticket-create` skill.
- #10276 — analogous adjacency sweep gap for `ideation-sandbox`.
- #10645 — ticket created immediately before this correction; future tickets should include the live-open sweep explicitly.

Origin Session ID: 89b259c3-27ec-4afb-baaf-fd39b55bffe1

Retrieval Hint: `ticket-create duplicate sweep latest 20 open issues titles authors labels stale ask_knowledge_base`.

## Timeline

- 2026-05-03T14:36:08Z @neo-gpt added the `documentation` label
- 2026-05-03T14:36:08Z @neo-gpt added the `enhancement` label
- 2026-05-03T14:36:08Z @neo-gpt added the `ai` label
- 2026-05-03T14:36:08Z @neo-gpt added the `architecture` label
- 2026-05-03T14:53:43Z @neo-gpt cross-referenced by #10647
- 2026-05-03T14:56:02Z @neo-gpt cross-referenced by #10650
### @neo-gpt - 2026-05-03T15:02:16Z

**Input from GPT-5.5 (Codex Desktop):**

> ● Context addition from @tobiu after creation:
> 
> The live latest-20 GitHub issue sweep is not just a generic duplicate-safety belt. It fills a specific freshness gap:
> 
> - `ask_knowledge_base(type: 'ticket')` depends on KB sync freshness.
> - Local `resources/content/issues/**`, `resources/content/discussions/**`, and future PR markdown files depend on GitHub Workflow MCP sync freshness.
> - During active swarm work, agents can create new tickets/discussions/PRs before either sync has happened.
> - Reading the latest 20 open GitHub issue titles/authors/labels/numbers/URLs from live GitHub gives the creation-side duplicate sweep a current remote reality check before `create_issue`.
> 
> This should be reflected in the eventual PR rationale and in `ticket-create-workflow.md §1a`: the live queue is the gap-filler between remote creation and local/KB ingestion, not a replacement for semantic/local historical search.
> 
> Related parallel insight: Memory Core has the same freshness shape. Active sessions are not necessarily summarized yet, so freshness-sensitive memory-mining should not rely on summaries alone; raw-memory queries can beat `query_summaries` for recent events.

- 2026-05-03T15:03:08Z @neo-gpt cross-referenced by #10651
- 2026-05-03T21:19:12Z @neo-gpt cross-referenced by #10666
- 2026-05-05T19:30:03Z @neo-opus-ada cross-referenced by #10494
- 2026-06-02T09:45:16Z @neo-gpt cross-referenced by PR #12374
- 2026-06-03T04:17:03Z @neo-opus-ada cross-referenced by PR #12404
- 2026-06-05T00:16:33Z @neo-gpt assigned to @neo-gpt
### @neo-gpt - 2026-06-05T00:16:53Z

**Input from GPT-5 (Codex Desktop):**

> ● ## Contract Ledger Addendum + Intake Refresh
> 
> This ticket predates the Contract Ledger gate, so I re-ran intake before branching.
> 
> ### Intake Classification
> 
> - `Ticket age`: created 2026-05-03T14:36:07Z; updated 2026-05-03T15:02:16Z.
> - `Bot stale-band`: `pre-stale`. `.github/workflows/close-inactive-issues.yml` defines 90 days to stale + 14 days to close; no `stale` / `no auto close` label is present.
> - `Currency / successor-risk evidence`: current `ticket-create-workflow.md §1a` still requires KB/local duplicate checks only; `rg` found no latest-20/live-open rule in `AGENTS.md` or `.agents/skills/ticket-create/**`; `gh pr list --search "10646 OR open-queue sweep OR ticket-create"` found no open implementation PR; live issue search found only adjacent #10276 for ideation-sandbox, not ticket-create.
> - `Existing enforcement sufficiency`: insufficient. Current enforcement layers catch semantic/local duplicates but do not cover the remote-freshness gap between GitHub issue creation and KB/local sync.
> - `Verdict`: `valid-as-written` after this Contract Ledger addendum. ROI remains positive: small substrate edit, direct reduction in duplicate-ticket churn during active swarm work.
> 
> ### Contract Ledger
> 
> | Target Surface | Source of Authority | Proposed Behavior | Fallback / Edge Case | Docs | Evidence |
> | :--- | :--- | :--- | :--- | :--- | :--- |
> | `.agents/skills/ticket-create/references/ticket-create-workflow.md §1a` | #10646 body + @tobiu correction quoted in the ticket | Require a live latest-open issue sweep before any `create_issue`: at least number, title, author, labels, and URL for the latest 20 open issues from GitHub, additive to KB/local duplicate checks. | If live GitHub state cannot be fetched after the normal retry/escalation path, stop before `create_issue` and report the blocker instead of filing from stale-only evidence. | Yes; update the workflow payload only, keeping `SKILL.md` as a router. | `rg` proves current absence; post-change `rg` / targeted file inspection proves the rule exists in §1a. |
> | `AGENTS.md` ticket-creation invariant / edge trigger | #10646 AC4 + `turn-memory-pre-flight` placement check | Add only a compact trigger/pointer that live latest-open queue freshness is required for issue creation; detailed mechanics stay in the ticket-create payload. | Avoid duplicating the full command/protocol in always-loaded `AGENTS.md`; if wording would bloat the turn substrate, compress to a pointer. | Yes; minimal always-loaded delta. | `rg` + line inspection proves pointer placement; PR body records load-effect audit. |
> | Future Fat Ticket creation notes | #10646 AC6 + ticket-create workflow | Ticket bodies/creation notes should mention the live-open sweep result when filing future Fat Tickets. | For non-issue Discussion paths, defer to ideation-sandbox adjacency rules; this ticket does not change #10276. | Yes; update workflow prose, not a new tool. | File inspection confirms the creation workflow tells future agents where to record the sweep result. |
> 
> ### Load-Effect / Progressive Disclosure Note
> 
> This is a workflow-specific ticket-create rule, not a new global invariant. The detailed mechanics belong in `.agents/skills/ticket-create/references/ticket-create-workflow.md`; `AGENTS.md` should receive at most a compact trigger/pointer. `ticket-create/SKILL.md` stays unchanged unless a tiny trigger wording adjustment proves necessary.

- 2026-06-05T00:23:01Z @neo-gpt cross-referenced by PR #12555
- 2026-06-05T13:59:05Z @tobiu referenced in commit `f3a6a98` - "docs(ticket-create): require live open-queue sweep (#10646) (#12555)

Co-authored-by: tobiu <tobiasuhlig78@gmail.com>"
- 2026-06-05T13:59:05Z @tobiu closed this issue

