Skip to content

knowledge: add the deferred repository-tree enumeration rung to map-corpus #7368

Description

@kyle-sexton

Problem

/knowledge:map-corpus discovers resources only through llms.txt or a sitemap (rungs 1-2), and V1 requires at least one origin seed. A GitHub repository has neither, so a request like "map the skills, agents and docs folders of this repo" cannot run through the mapper. Its own instructions route such corpora to one /knowledge:docpage-digest run per URL, enumerated by hand.

The recorded trigger for building the deferred repository-tree rung has fired: plugins/knowledge/reference/ingest-deferred-decisions.md §2 defers a git ls-tree / tree-API rung "until the first corpus whose repository half is too large to enumerate by hand". On 2026-10-13 the pstack plugin in cursor/plugins (167 files: 55 skills, 2 agents, 17 docs) was too large, and the session fell back to enumerating with gh api .../git/trees/<sha>?recursive=1 outside the skill.

Proposal

  • A repository-tree discovery rung: a repository seed (owner, repo, ref pinned to a SHA) plus include and exclude path globs, enumerated through the forge's tree listing behind an adapter (ADR 0060), written to discovery/ like the other rungs and parsed by a script so the URL denominator stays the script's, not the agent's.
  • Allow a corpus with only a repository seed (no origin seed) when this rung supplies the discovery basis.
  • Optional unit grouping (for example one unit per skill directory) so a downstream digest covers a directory, not a single file.

Acceptance

  • Mapping cursor/plugins at a pinned SHA with includes pstack/skills/**, pstack/agents/**, pstack/docs/** produces a gate-passing link-map.json with every enumerated file classified.
  • The existing gates (check_linkmap.py, check_inventory.py) pass unchanged or with a recorded schema bump.
  • The deferred-decision record §2 is updated to "taken", with the trigger evidence.

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 13, 2026
  2. github-actions commented on Oct 13, 2026

    @github-actions
    Contributor

    Thanks for the report. Automated triage handed this issue to a maintainer.

    Proposed work class: work-class: structural
    Basis: automated intake triage; a maintainer confirms or changes it.

    Automated triage. A maintainer reviews it.

  3. added
    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.
    and removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 13, 2026
  4. added
    status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.
    and removed
    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.
    on Oct 19, 2026
  5. kyle-sexton commented on Nov 2, 2026

    @kyle-sexton
    MemberAuthor

    Re-triage: the deferral's trigger fired (the pstack corpus in this body), and the rung is unbuilt (check_linkmap.py:36, SKILL.md:107). The criteria below replace the live mapping run with a fixture, so the lane can verify the work.

    Done when:

    • parse_discovery.py accepts a new --rung repo-tree that reads a forge tree listing (the JSON from the recursive git trees API), a repository seed (owner, repo, ref pinned to a SHA), and include and exclude globs. It writes the same discovery output shape, and the URL set is computed by the script.
    • The forge call sits behind an adapter per ADR 0060. SKILL.md names the adapter, not raw gh grammar.
    • check_linkmap.py accepts the new rung, and a corpus whose only seed is a repository seed passes when this rung supplies discovery. Any schema change is recorded in link-map-format.md.
    • A test over a committed tree-listing fixture (for example cursor/plugins at a pinned SHA, includes pstack/skills/**, pstack/agents/**, pstack/docs/**) produces a link map that check_linkmap.py passes with every enumerated file classified.
    • ingest-deferred-decisions.md §2 reads "taken", with the trigger evidence. The existing map-corpus tests pass, and the plugin has one changelog fragment.

    This was generated by AI.

  6. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor
    No description provided.
  7. melodic-automation-lanes commented on Nov 2, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started waited in its slot past a change to its lane workflow files on main, so it stopped before any model turn. The run's report-outcome removed and added agent-ready back to start a fresh run on main's workflow files. If this run ends the same way, it re-fires the issue again, waiting longer each time.

  8. added
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    and removed
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    on Nov 2, 2026
  9. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor
    No description provided.
  10. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor
    No description provided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions