Skip to content

docs(skill): correct upstream-sync file mapping and add omit-vs-null pitfall#116

Merged
krukow merged 1 commit into
mainfrom
docs/upstream-sync-skill-self-review
Jun 2, 2026
Merged

docs(skill): correct upstream-sync file mapping and add omit-vs-null pitfall#116
krukow merged 1 commit into
mainfrom
docs/upstream-sync-skill-self-review

Conversation

@krukow
Copy link
Copy Markdown
Collaborator

@krukow krukow commented Jun 2, 2026

Generated via Copilot on behalf of @krukow

Phase 10 self-review of the update-upstream skill, following the v1.0.0-beta.12 sync (#115). Documentation-only — corrects drift between the skill's reference material and the actual codebase.

Changes

  • AGENTS.md (.github/copilot-instructions.md) — the Project Structure tree was missing two real files: tool_set.clj and the top-level public namespace src/github/copilot_sdk.clj (home of the curated public event-types / session-events sets that sync work depends on).
  • references/PROJECT.md — the upstream↔Clojure mapping pointed the public event-types set at client.clj (it lives in copilot_sdk.clj) and referenced a non-existent subscribe-events!. Corrected, split the curated-vs-generated event sets into distinct rows, and added the toolSet.tstool_set.clj mapping.
  • SKILL.md — adds pitfall [docs] Populate documentation.instructions.md for AI agents #5: outbound optional wire fields must match upstream's omit-vs-null behavior per RPC. The contextTier lesson from Upstream sync: copilot-sdk v1.0.0-beta.12 (schema 1.0.57) #115, generalized — compute the wire value and gate on (some? v) when the request schema has no null variant (e.g. session.model.switchTo), rather than contains?-gating and emitting JSON null.

Validation

bb validate-docs ✓ (13 files, 0 warnings). No source or test changes.

Phase 10 self-review of the update-upstream skill after the v1.0.0-beta.12
sync surfaced documentation drift:

- AGENTS.md Project Structure tree was missing `tool_set.clj` and the
  top-level `github.copilot-sdk` namespace (`copilot_sdk.clj`), which holds
  the curated public `event-types` / `session-events` sets.
- references/PROJECT.md mapped the public `event-types` set to `client.clj`
  (it lives in `copilot_sdk.clj`) and referenced a non-existent
  `subscribe-events!`. Corrected, split curated-vs-generated event sets, and
  added the `toolSet.ts` -> `tool_set.clj` mapping.
- SKILL.md gains pitfall #5: outbound optional wire fields must match
  upstream's omit-vs-null behavior per RPC (compute the value and gate on
  `(some? v)` when the request schema has no null variant, as with
  `session.model.switchTo`).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 2, 2026 09:26
Copy link
Copy Markdown
Contributor

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

Documentation-only update to the update-upstream skill reference material, correcting drift between the skill docs and the current codebase (notably around event set locations and tool filtering), and capturing a recurring wire-level pitfall (omit vs null for optional RPC fields).

Changes:

  • Add a new “omit-vs-null” pitfall for outbound optional RPC fields, with guidance to mirror upstream undefined-omission semantics when schemas don’t allow null.
  • Fix the upstream↔Clojure mapping to point curated public event sets at src/github/copilot_sdk.clj, distinguish curated vs generated event sources, and add the toolSet.tstool_set.clj mapping.
  • Update the project-structure listing used by Copilot instructions to include src/github/copilot_sdk.clj and tool_set.clj.
Show a summary per file
File Description
.github/skills/update-upstream/SKILL.md Adds a concrete, generalized pitfall about omitting optional wire fields vs emitting JSON null, aligned with upstream behavior and schema unions.
.github/skills/update-upstream/references/PROJECT.md Corrects sync mapping for curated event sets and tool filtering helpers; removes references to non-existent APIs and clarifies generated vs curated event sources.
.github/copilot-instructions.md Brings the documented project structure in line with the actual src/ layout by listing the top-level public namespace file and tool_set.clj.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

@krukow krukow merged commit ff922b8 into main Jun 2, 2026
2 checks passed
@krukow krukow deleted the docs/upstream-sync-skill-self-review branch June 2, 2026 09:32
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.

2 participants