diff --git a/.agents/skills/ask-matt/SKILL.md b/.agents/skills/ask-matt/SKILL.md new file mode 100644 index 00000000000..70b807b35f8 --- /dev/null +++ b/.agents/skills/ask-matt/SKILL.md @@ -0,0 +1,78 @@ +--- +name: ask-matt +description: Ask which skill or flow fits your situation. A router over the skills in this repo. +disable-model-invocation: true +--- + +# Ask Matt + +You don't remember every skill, so ask. + +A **flow** is a path through the skills. Most paths run along one **main flow**, and two **on-ramps** merge onto it. Everything else is standalone, or a vocabulary layer that runs underneath. + +## The main flow: idea → ship + +The route most work travels. You have an idea and want it built. + +1. **`/grill-with-docs`** — sharpen the idea by interview. Start here when you **have a codebase**: it's stateful, retaining what it learns in `CONTEXT.md` and ADRs. (No codebase? Use `/grill-me` — see Standalone. Both run the same `/grilling` primitive; `grill-with-docs` is the one that leaves a paper trail.) +2. **Branch — can you settle every question in conversation?** If a question needs a runnable answer (state, business logic, a UI you have to see), detour through a prototype, bridged by **`/handoff`** in both directions (see Crossing sessions): + - **`/handoff`** out, then open a fresh session against that file, + - **`/prototype`** to answer the question with throwaway code, + - **`/handoff`** back what you learned, and reference it from the original idea thread. +3. **Branch — is this a multi-session build?** + - **Yes** → **`/to-spec`** (turn the thread into a spec), then **`/to-tickets`** to split it into tracer-bullet tickets, each declaring its **blocking edges**. On a local tracker that's one file per ticket under `.scratch//issues/`, worked blockers-first by hand; on a real tracker the edges become native blocking links, so any ticket whose blockers are done can be grabbed — kick off **`/implement`** per ticket, **clearing context between each one**. + - **No** → **`/implement`** right here, in the same context window. + + Either way, **`/implement`** builds each issue by driving **`/tdd`** internally — one red-green slice at a time — then closes out by running **`/code-review`**, a two-axis review (Standards + Spec) of the diff, before committing. Reach for **`/tdd`** on its own when you just want to build a concrete behaviour test-first without a full spec, and **`/code-review`** on its own whenever you want to review a branch or PR against a fixed point. + +### Context hygiene + +Keep steps 1–3 in **one unbroken context window** — don't compact or clear until after `/to-tickets` — so the grilling, spec, and tickets all build on the same thinking. Each `/implement` then starts fresh, working from the ticket. + +The limit on this is the **[smart zone](https://www.aihero.dev/ai-coding-dictionary/smart-zone)**: the window (~120k tokens on state-of-the-art models) within which the model still reasons sharply. If a session approaches it before `/to-tickets`, don't push on degraded — `/handoff` and continue in a fresh thread. + +## On-ramps + +A starting situation that generates work, then merges onto the main flow. + +- **Bugs and requests piling up** → **`/triage`**. It moves issues through triage roles and produces agent-ready issues, which **`/implement`** later picks up. + + Triage is only for issues **you didn't create** — bug reports, incoming feature requests, anything that arrives raw. Tickets that `/to-tickets` produced are already agent-ready, so **don't triage them**. + +- **Something's broken** → **`/diagnosing-bugs`**. For the hard ones: the bug that resists a first glance, the intermittent flake, the regression that crept in between two known-good states. It refuses to theorise until it has a **tight feedback loop** — one command that already goes red on *this* bug — then fixes with a regression test. Its post-mortem hands off to **`/improve-codebase-architecture`** when the real finding is that there's no good seam to lock the bug down. + +- **A huge, foggy effort — a greenfield project or a huge feature build, too big for one session** → **`/wayfinder`**, the most cognitively demanding flow here. When the way from here to the destination isn't visible yet, it charts a **shared map** of **decision tickets** on the issue tracker and resolves them one at a time — producing **decisions, not deliverables** — until the fog is pushed back and the way is clear. Where **`/grill-with-docs`** sharpens an idea you can hold in one session, wayfinder is for the idea you can't — and it's slower and denser, so save it for exactly that, never a well-scoped feature. + + When the map clears, **it hands off, it doesn't build**: merge onto the main flow at **`/to-spec`**, which collapses the map's linked decisions into a buildable plan, then `/to-tickets` and `/implement` as usual. Looping the map straight into `/implement` skips that collapse and throws the linked detail away — go straight to `/implement` only when the effort turned out genuinely small. + +## Codebase health + +Not feature work — upkeep. + +- **`/improve-codebase-architecture`** — run whenever you have a spare moment to keep the codebase good for agents to operate in. It surfaces **deepening opportunities**; picking one _generates an idea_ you can take into the main flow at `/grill-with-docs`. It's the survey that finds the candidates; **`/codebase-design`** (below) is the bench you design the chosen one on. + +## Vocabulary underneath + +Two model-invoked references that run *beneath* the other skills — each the single source of truth for its vocabulary. Reach for them directly when the **words**, not the process, are the problem; or let the skills above pull them in. + +- **`/domain-modeling`** — sharpen the project's *domain* language: challenge a fuzzy term, resolve an overloaded word ("account" doing three jobs), record a hard-to-reverse decision as an ADR. It's the active discipline `/grill-with-docs` drives to keep `CONTEXT.md` a clean glossary. +- **`/codebase-design`** — the deep-module vocabulary (module, interface, depth, seam, adapter, leverage, locality) for designing a module's *shape*: a lot of behaviour behind a small interface at a clean seam. `/tdd` and `/improve-codebase-architecture` both speak it. + +## Crossing sessions + +- **`/handoff`** — when a thread is full or you need to branch off (e.g. into a `/prototype` session), this compacts the conversation into a markdown file. You don't continue in place — you **open a new session and reference that file** to carry the context across. It's the bridge between context windows, in either direction. Use it when you want a **fresh session** but need the **current conversation preserved**. +- **`/compact`** (built-in) — stay in the **same conversation**, letting the earlier turns be summarized. Use it at **intentional breaks between phases**, when you don't mind losing the verbatim history. Don't compact mid-phase — the agent can lose its way. `/handoff` forks; `/compact` continues. + +## Standalone + +Off the main flow entirely. + +- **`/grill-me`** — the same relentless interview as `/grill-with-docs`, but for when you have **no codebase**. Stateless: it saves nothing locally, builds no `CONTEXT.md`. Reach for it to sharpen any plan or design that doesn't live in a repo. +- **`/prototype`** — a small, throwaway program that answers one design question: does this state model feel right, or what should this UI look like. Throwaway from day one — keep the answer, delete the code. It's the detour in step 2 of the main flow, but reach for it any time a design question is hard to settle on paper. +- **`/research`** — delegate reading legwork to a **background agent**: it investigates a question against **primary sources**, then leaves a cited Markdown file in the repo. Keep working while it reads. The file it produces is something to take *into* the main flow at `/grill-with-docs` — research feeds the thinking, it doesn't replace it. +- **`/teach`** — learn a concept over multiple sessions, using the current directory as a stateful workspace. +- **`/writing-great-skills`** — reference for writing and editing skills well. + +## Precondition + +**`/setup-matt-pocock-skills`** — run before your first engineering flow to configure the issue tracker, triage labels, and doc layout the other skills assume. Custom issue trackers also work. diff --git a/.agents/skills/ask-matt/agents/openai.yaml b/.agents/skills/ask-matt/agents/openai.yaml new file mode 100644 index 00000000000..5c60d51b5b1 --- /dev/null +++ b/.agents/skills/ask-matt/agents/openai.yaml @@ -0,0 +1,5 @@ +interface: + display_name: "Ask Matt" + short_description: "Find the right skill or workflow" +policy: + allow_implicit_invocation: false diff --git a/.agents/skills/code-review/SKILL.md b/.agents/skills/code-review/SKILL.md new file mode 100644 index 00000000000..2a0b5240731 --- /dev/null +++ b/.agents/skills/code-review/SKILL.md @@ -0,0 +1,89 @@ +--- +name: code-review +description: Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X". +--- + +Two-axis review of the diff between `HEAD` and a fixed point the user supplies: + +- **Standards** — does the code conform to this repo's documented coding standards? +- **Spec** — does the code faithfully implement the originating issue / PRD / spec? + +Both axes run as **parallel sub-agents** so they don't pollute each other's context, then this skill aggregates their findings. + +The issue tracker should have been provided to you — run `/setup-matt-pocock-skills` if `docs/agents/issue-tracker.md` is missing. + +## Process + +### 1. Pin the fixed point + +Whatever the user said is the fixed point — a commit SHA, branch name, tag, `main`, `HEAD~5`, etc. If they didn't specify one, ask for it. + +Capture the diff command once: `git diff ...HEAD` (three-dot, so the comparison is against the merge-base). Also note the list of commits via `git log ..HEAD --oneline`. + +Before going further, confirm the fixed point resolves (`git rev-parse `) and the diff is non-empty. A bad ref or empty diff should fail here — not inside two parallel sub-agents. + +### 2. Identify the spec source + +Look for the originating spec, in this order: + +1. Issue references in the commit messages (`#123`, `Closes #45`, GitLab `!67`, etc.) — fetch via the workflow in `docs/agents/issue-tracker.md`. +2. A path the user passed as an argument. +3. A PRD/spec file under `docs/`, `specs/`, or `.scratch/` matching the branch name or feature. +4. If nothing is found, ask the user where the spec is. If they say there isn't one, the **Spec** sub-agent will skip and report "no spec available". + +### 3. Identify the standards sources + +Anything in the repo that documents how code should be written, such as `CODING_STANDARDS.md` or `CONTRIBUTING.md`. + +On top of whatever the repo documents, the Standards axis always carries the **smell baseline** below — a fixed set of Fowler code smells (_Refactoring_, ch.3) that applies even when a repo documents nothing. Two rules bind it: + +- **The repo overrides.** A documented repo standard always wins; where it endorses something the baseline would flag, suppress the smell. +- **Always a judgement call.** Each smell is a labelled heuristic ("possible Feature Envy"), never a hard violation — and, like any standard here, skip anything tooling already enforces. + +Each smell reads *what it is* → *how to fix*; match it against the diff: + +- **Mysterious Name** — a function, variable, or type whose name doesn't reveal what it does or holds. → rename it; if no honest name comes, the design's murky. +- **Duplicated Code** — the same logic shape appears in more than one hunk or file in the change. → extract the shared shape, call it from both. +- **Feature Envy** — a method that reaches into another object's data more than its own. → move the method onto the data it envies. +- **Data Clumps** — the same few fields or params keep travelling together (a type wanting to be born). → bundle them into one type, pass that. +- **Primitive Obsession** — a primitive or string standing in for a domain concept that deserves its own type. → give the concept its own small type. +- **Repeated Switches** — the same `switch`/`if`-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share. +- **Shotgun Surgery** — one logical change forces scattered edits across many files in the diff. → gather what changes together into one module. +- **Divergent Change** — one file or module is edited for several unrelated reasons. → split so each module changes for one reason. +- **Speculative Generality** — abstraction, parameters, or hooks added for needs the spec doesn't have. → delete it; inline back until a real need shows. +- **Message Chains** — long `a.b().c().d()` navigation the caller shouldn't depend on. → hide the walk behind one method on the first object. +- **Middle Man** — a class or function that mostly just delegates onward. → cut it, call the real target direct. +- **Refused Bequest** — a subclass or implementer that ignores or overrides most of what it inherits. → drop the inheritance, use composition. + +### 4. Spawn both sub-agents in parallel + +Send a single message with two `Agent` tool calls. Use the `general-purpose` subagent for both. + +**Standards sub-agent prompt** — include: + +- The full diff command and commit list. +- The list of standards-source files you found in step 3, **plus the smell baseline from step 3** pasted in full — the sub-agent has no other access to it. +- The brief: "Report — per file/hunk where relevant — (a) every place the diff violates a documented standard: cite the standard (file + the rule); and (b) any baseline smell you spot: name it and quote the hunk. Distinguish hard violations from judgement calls — documented-standard breaches can be hard, but baseline smells are always judgement calls, and a documented repo standard overrides the baseline. Skip anything tooling enforces. Under 400 words." + +**Spec sub-agent prompt** — include: + +- The diff command and commit list. +- The path or fetched contents of the spec. +- The brief: "Report: (a) requirements the spec asked for that are missing or partial; (b) behaviour in the diff that wasn't asked for (scope creep); (c) requirements that look implemented but where the implementation looks wrong. Quote the spec line for each finding. Under 400 words." + +If the spec is missing, skip the Spec sub-agent and note this in the final report. + +### 5. Aggregate + +Present the two reports under `## Standards` and `## Spec` headings, verbatim or lightly cleaned. Do **not** merge or rerank findings — the two axes are deliberately separate (see _Why two axes_). + +End with a one-line summary: total findings per axis, and the worst issue _within each axis_ (if any). Don't pick a single winner across axes — that's the reranking the separation exists to prevent. + +## Why two axes + +A change can pass one axis and fail the other: + +- Code that follows every standard but implements the wrong thing → **Standards pass, Spec fail.** +- Code that does exactly what the issue asked but breaks the project's conventions → **Spec pass, Standards fail.** + +Reporting them separately stops one axis from masking the other. diff --git a/.agents/skills/code-review/agents/openai.yaml b/.agents/skills/code-review/agents/openai.yaml new file mode 100644 index 00000000000..9076774ba32 --- /dev/null +++ b/.agents/skills/code-review/agents/openai.yaml @@ -0,0 +1,3 @@ +interface: + display_name: "Code Review" + short_description: "Review a diff on standards and spec" diff --git a/.agents/skills/codebase-design/DEEPENING.md b/.agents/skills/codebase-design/DEEPENING.md new file mode 100644 index 00000000000..3938457b88d --- /dev/null +++ b/.agents/skills/codebase-design/DEEPENING.md @@ -0,0 +1,37 @@ +# Deepening + +How to deepen a cluster of shallow modules safely, given its dependencies. Assumes the vocabulary in [SKILL.md](SKILL.md) — **module**, **interface**, **seam**, **adapter**. + +## Dependency categories + +When assessing a candidate for deepening, classify its dependencies. The category determines how the deepened module is tested across its seam. + +### 1. In-process + +Pure computation, in-memory state, no I/O. Always deepenable — merge the modules and test through the new interface directly. No adapter needed. + +### 2. Local-substitutable + +Dependencies that have local test stand-ins (PGLite for Postgres, in-memory filesystem). Deepenable if the stand-in exists. The deepened module is tested with the stand-in running in the test suite. The seam is internal; no port at the module's external interface. + +### 3. Remote but owned (Ports & Adapters) + +Your own services across a network boundary (microservices, internal APIs). Define a **port** (interface) at the seam. The deep module owns the logic; the transport is injected as an **adapter**. Tests use an in-memory adapter. Production uses an HTTP/gRPC/queue adapter. + +Recommendation shape: *"Define a port at the seam, implement an HTTP adapter for production and an in-memory adapter for testing, so the logic sits in one deep module even though it's deployed across a network."* + +### 4. True external (Mock) + +Third-party services (Stripe, Twilio, etc.) you don't control. The deepened module takes the external dependency as an injected port; tests provide a mock adapter. + +## Seam discipline + +- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a port unless at least two adapters are justified (typically production + test). A single-adapter seam is just indirection. +- **Internal seams vs external seams.** A deep module can have internal seams (private to its implementation, used by its own tests) as well as the external seam at its interface. Don't expose internal seams through the interface just because tests use them. + +## Testing strategy: replace, don't layer + +- Old unit tests on shallow modules become waste once tests at the deepened module's interface exist — delete them. +- Write new tests at the deepened module's interface. The **interface is the test surface**. +- Tests assert on observable outcomes through the interface, not internal state. +- Tests should survive internal refactors — they describe behaviour, not implementation. If a test has to change when the implementation changes, it's testing past the interface. diff --git a/.agents/skills/codebase-design/DESIGN-IT-TWICE.md b/.agents/skills/codebase-design/DESIGN-IT-TWICE.md new file mode 100644 index 00000000000..49a7c42a2cc --- /dev/null +++ b/.agents/skills/codebase-design/DESIGN-IT-TWICE.md @@ -0,0 +1,44 @@ +# Design It Twice + +When the user wants to explore alternative interfaces for a chosen deepening candidate, use this parallel sub-agent pattern. Based on "Design It Twice" (Ousterhout) — your first idea is unlikely to be the best. + +Uses the vocabulary in [SKILL.md](SKILL.md) — **module**, **interface**, **seam**, **adapter**, **leverage**. + +## Process + +### 1. Frame the problem space + +Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate: + +- The constraints any new interface would need to satisfy +- The dependencies it would rely on, and which category they fall into (see [DEEPENING.md](DEEPENING.md)) +- A rough illustrative code sketch to ground the constraints — not a proposal, just a way to make the constraints concrete + +Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel. + +### 2. Spawn sub-agents + +Spawn 3+ sub-agents in parallel using the Agent tool. Each must produce a **radically different** interface for the deepened module. + +Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint: + +- Agent 1: "Minimize the interface — aim for 1–3 entry points max. Maximise leverage per entry point." +- Agent 2: "Maximise flexibility — support many use cases and extension." +- Agent 3: "Optimise for the most common caller — make the default case trivial." +- Agent 4 (if applicable): "Design around ports & adapters for cross-seam dependencies." + +Include both [SKILL.md](SKILL.md) vocabulary and CONTEXT.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language. + +Each sub-agent outputs: + +1. Interface (types, methods, params — plus invariants, ordering, error modes) +2. Usage example showing how callers use it +3. What the implementation hides behind the seam +4. Dependency strategy and adapters (see [DEEPENING.md](DEEPENING.md)) +5. Trade-offs — where leverage is high, where it's thin + +### 3. Present and compare + +Present designs sequentially so the user can absorb each one, then compare them in prose. Contrast by **depth** (leverage at the interface), **locality** (where change concentrates), and **seam placement**. + +After comparing, give your own recommendation: which design you think is strongest and why. If elements from different designs would combine well, propose a hybrid. Be opinionated — the user wants a strong read, not a menu. diff --git a/.agents/skills/codebase-design/SKILL.md b/.agents/skills/codebase-design/SKILL.md new file mode 100644 index 00000000000..16620c24528 --- /dev/null +++ b/.agents/skills/codebase-design/SKILL.md @@ -0,0 +1,114 @@ +--- +name: codebase-design +description: Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary. +--- + +# Codebase Design + +Design **deep modules**: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. Use this language and these principles wherever code is being designed or restructured. The aim is leverage for callers, locality for maintainers, and testability for everyone. + +## Glossary + +Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point. + +**Module** — anything with an interface and an implementation. Deliberately scale-agnostic: a function, class, package, or tier-spanning slice. _Avoid_: unit, component, service. + +**Interface** — everything a caller must know to use the module correctly: the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics. _Avoid_: API, signature (too narrow — they refer only to the type-level surface). + +**Implementation** — what's inside a module, its body of code. Distinct from **Adapter**: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for "adapter" when the seam is the topic; "implementation" otherwise. + +**Depth** — leverage at the interface: the amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is **deep** when a large amount of behaviour sits behind a small interface, **shallow** when the interface is nearly as complex as the implementation. + +**Seam** _(Michael Feathers)_ — a place where you can alter behaviour without editing in that place; the *location* at which a module's interface lives. Where to put the seam is its own design decision, distinct from what goes behind it. _Avoid_: boundary (overloaded with DDD's bounded context). + +**Adapter** — a concrete thing that satisfies an interface at a seam. Describes *role* (what slot it fills), not substance (what's inside). + +**Leverage** — what callers get from depth: more capability per unit of interface they learn. One implementation pays back across N call sites and M tests. + +**Locality** — what maintainers get from depth: change, bugs, knowledge, and verification concentrate in one place rather than spreading across callers. Fix once, fixed everywhere. + +## Deep vs shallow + +**Deep module** = small interface + lots of implementation: + +``` +┌─────────────────────┐ +│ Small Interface │ ← Few methods, simple params +├─────────────────────┤ +│ │ +│ Deep Implementation│ ← Complex logic hidden +│ │ +└─────────────────────┘ +``` + +**Shallow module** = large interface + little implementation (avoid): + +``` +┌─────────────────────────────────┐ +│ Large Interface │ ← Many methods, complex params +├─────────────────────────────────┤ +│ Thin Implementation │ ← Just passes through +└─────────────────────────────────┘ +``` + +When designing an interface, ask: + +- Can I reduce the number of methods? +- Can I simplify the parameters? +- Can I hide more complexity inside? + +## Principles + +- **Depth is a property of the interface, not the implementation.** A deep module can be internally composed of small, mockable, swappable parts — they just aren't part of the interface. A module can have **internal seams** (private to its implementation, used by its own tests) as well as the **external seam** at its interface. +- **The deletion test.** Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep. +- **The interface is the test surface.** Callers and tests cross the same seam. If you want to test *past* the interface, the module is probably the wrong shape. +- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a seam unless something actually varies across it. + +## Designing for testability + +Good interfaces make testing natural: + +1. **Accept dependencies, don't create them.** + + ```typescript + // Testable + function processOrder(order, paymentGateway) {} + + // Hard to test + function processOrder(order) { + const gateway = new StripeGateway(); + } + ``` + +2. **Return results, don't produce side effects.** + + ```typescript + // Testable + function calculateDiscount(cart): Discount {} + + // Hard to test + function applyDiscount(cart): void { + cart.total -= discount; + } + ``` + +3. **Small surface area.** Fewer methods = fewer tests needed. Fewer params = simpler test setup. + +## Relationships + +- A **Module** has exactly one **Interface** (the surface it presents to callers and tests). +- **Depth** is a property of a **Module**, measured against its **Interface**. +- A **Seam** is where a **Module**'s **Interface** lives. +- An **Adapter** sits at a **Seam** and satisfies the **Interface**. +- **Depth** produces **Leverage** for callers and **Locality** for maintainers. + +## Rejected framings + +- **Depth as ratio of implementation-lines to interface-lines** (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead. +- **"Interface" as the TypeScript `interface` keyword or a class's public methods**: too narrow — interface here includes every fact a caller must know. +- **"Boundary"**: overloaded with DDD's bounded context. Say **seam** or **interface**. + +## Going deeper + +- **Deepening a cluster given its dependencies** — see [DEEPENING.md](DEEPENING.md): dependency categories, seam discipline, and replace-don't-layer testing. +- **Exploring alternative interfaces** — see [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md): spin up parallel sub-agents to design the interface several radically different ways, then compare on depth, locality, and seam placement. diff --git a/.agents/skills/codebase-design/agents/openai.yaml b/.agents/skills/codebase-design/agents/openai.yaml new file mode 100644 index 00000000000..3180715edb3 --- /dev/null +++ b/.agents/skills/codebase-design/agents/openai.yaml @@ -0,0 +1,3 @@ +interface: + display_name: "Codebase Design" + short_description: "Vocabulary for deep-module design" diff --git a/.agents/skills/diagnosing-bugs/SKILL.md b/.agents/skills/diagnosing-bugs/SKILL.md new file mode 100644 index 00000000000..f400de7c193 --- /dev/null +++ b/.agents/skills/diagnosing-bugs/SKILL.md @@ -0,0 +1,134 @@ +--- +name: diagnosing-bugs +description: Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow. +--- + +# Diagnosing Bugs + +A discipline for hard bugs. Skip phases only when explicitly justified. + +When exploring the codebase, read `CONTEXT.md` (if it exists) to get a clear mental model of the relevant modules, and check ADRs in the area you're touching. + +## Phase 1 — Build a feedback loop + +**This is the skill.** Everything else is mechanical. If you have a **tight** pass/fail signal for the bug — one that goes red on _this_ bug — you will find the cause; bisection, hypothesis-testing, and instrumentation all just consume it. If you don't have one, no amount of staring at code will save you. + +Spend disproportionate effort here. **Be aggressive. Be creative. Refuse to give up.** + +### Ways to construct one — try them in roughly this order + +1. **Failing test** at whatever seam reaches the bug — unit, integration, e2e. +2. **Curl / HTTP script** against a running dev server. +3. **CLI invocation** with a fixture input, diffing stdout against a known-good snapshot. +4. **Headless browser script** (Playwright / Puppeteer) — drives the UI, asserts on DOM/console/network. +5. **Replay a captured trace.** Save a real network request / payload / event log to disk; replay it through the code path in isolation. +6. **Throwaway harness.** Spin up a minimal subset of the system (one service, mocked deps) that exercises the bug code path with a single function call. +7. **Property / fuzz loop.** If the bug is "sometimes wrong output", run 1000 random inputs and look for the failure mode. +8. **Bisection harness.** If the bug appeared between two known states (commit, dataset, version), automate "boot at state X, check, repeat" so you can `git bisect run` it. +9. **Differential loop.** Run the same input through old-version vs new-version (or two configs) and diff outputs. +10. **HITL bash script.** Last resort. If a human must click, drive _them_ with `scripts/hitl-loop.template.sh` so the loop is still structured. Captured output feeds back to you. + +Build the right feedback loop, and the bug is 90% fixed. + +### Tighten the loop + +Treat the loop as a product. Once you have _a_ loop, **tighten** it: + +- Can I make it faster? (Cache setup, skip unrelated init, narrow the test scope.) +- Can I make the signal sharper? (Assert on the specific symptom, not "didn't crash".) +- Can I make it more deterministic? (Pin time, seed RNG, isolate filesystem, freeze network.) + +A 30-second flaky loop is barely better than no loop; a 2-second deterministic one is tight — a debugging superpower. + +### Non-deterministic bugs + +The goal is not a clean repro but a **higher reproduction rate**. Loop the trigger 100×, parallelise, add stress, narrow timing windows, inject sleeps. A 50%-flake bug is debuggable; 1% is not — keep raising the rate until it's debuggable. + +### When you genuinely cannot build a loop + +Stop and say so explicitly. List what you tried. Ask the user for: (a) access to whatever environment reproduces it, (b) a captured artifact (HAR file, log dump, core dump, screen recording with timestamps), or (c) permission to add temporary production instrumentation. Do **not** proceed to hypothesise without a loop. + +### Completion criterion — a tight loop that goes red + +Phase 1 is done when the loop is **tight** and **red-capable**: you can name **one command** — a script path, a test invocation, a curl — that you have **already run at least once** (paste the invocation and its output), and that is: + +- [ ] **Red-capable** — it drives the actual bug code path and asserts the **user's exact symptom**, so it can go red on this bug and green once fixed. Not "runs without erroring" — it must be able to _catch this specific bug_. +- [ ] **Deterministic** — same verdict every run (flaky bugs: a pinned, high reproduction rate, per above). +- [ ] **Fast** — seconds, not minutes. +- [ ] **Agent-runnable** — you can run it unattended; a human in the loop only via `scripts/hitl-loop.template.sh`. + +If you catch yourself reading code to build a theory before this command exists, **stop — jumping straight to a hypothesis is the exact failure this skill prevents.** No red-capable command, no Phase 2. + +## Phase 2 — Reproduce + minimise + +Run the loop. Watch it go red — the bug appears. + +Confirm: + +- [ ] The loop produces the failure mode the **user** described — not a different failure that happens to be nearby. Wrong bug = wrong fix. +- [ ] The failure is reproducible across multiple runs (or, for non-deterministic bugs, reproducible at a high enough rate to debug against). +- [ ] You have captured the exact symptom (error message, wrong output, slow timing) so later phases can verify the fix actually addresses it. + +### Minimise + +Once it's red, shrink the repro to the **smallest scenario that still goes red**. Cut inputs, callers, config, data, and steps **one at a time**, re-running the loop after each cut — keep only what's load-bearing for the failure. + +Why bother: a minimal repro shrinks the hypothesis space in Phase 3 (fewer moving parts left to suspect) and becomes the clean regression test in Phase 5. + +Done when **every remaining element is load-bearing** — removing any one of them makes the loop go green. + +Do not proceed until you have reproduced **and** minimised. + +## Phase 3 — Hypothesise + +Generate **3–5 ranked hypotheses** before testing any of them. Single-hypothesis generation anchors on the first plausible idea. + +Each hypothesis must be **falsifiable**: state the prediction it makes. + +> Format: "If is the cause, then will make the bug disappear / will make it worse." + +If you cannot state the prediction, the hypothesis is a vibe — discard or sharpen it. + +**Show the ranked list to the user before testing.** They often have domain knowledge that re-ranks instantly ("we just deployed a change to #3"), or know hypotheses they've already ruled out. Cheap checkpoint, big time saver. Don't block on it — proceed with your ranking if the user is AFK. + +## Phase 4 — Instrument + +Each probe must map to a specific prediction from Phase 3. **Change one variable at a time.** + +Tool preference: + +1. **Debugger / REPL inspection** if the env supports it. One breakpoint beats ten logs. +2. **Targeted logs** at the boundaries that distinguish hypotheses. +3. Never "log everything and grep". + +**Tag every debug log** with a unique prefix, e.g. `[DEBUG-a4f2]`. Cleanup at the end becomes a single grep. Untagged logs survive; tagged logs die. + +**Perf branch.** For performance regressions, logs are usually wrong. Instead: establish a baseline measurement (timing harness, `performance.now()`, profiler, query plan), then bisect. Measure first, fix second. + +## Phase 5 — Fix + regression test + +Write the regression test **before the fix** — but only if there is a **correct seam** for it. + +A correct seam is one where the test exercises the **real bug pattern** as it occurs at the call site. If the only available seam is too shallow (single-caller test when the bug needs multiple callers, unit test that can't replicate the chain that triggered the bug), a regression test there gives false confidence. + +**If no correct seam exists, that itself is the finding.** Note it. The codebase architecture is preventing the bug from being locked down. Flag this for the next phase. + +If a correct seam exists: + +1. Turn the minimised repro into a failing test at that seam. +2. Watch it fail. +3. Apply the fix. +4. Watch it pass. +5. Re-run the Phase 1 feedback loop against the original (un-minimised) scenario. + +## Phase 6 — Cleanup + post-mortem + +Required before declaring done: + +- [ ] Original repro no longer reproduces (re-run the Phase 1 loop) +- [ ] Regression test passes (or absence of seam is documented) +- [ ] All `[DEBUG-...]` instrumentation removed (`grep` the prefix) +- [ ] Throwaway prototypes deleted (or moved to a clearly-marked debug location) +- [ ] The hypothesis that turned out correct is stated in the commit / PR message — so the next debugger learns + +**Then ask: what would have prevented this bug?** If the answer involves architectural change (no good test seam, tangled callers, hidden coupling) hand off to the `/improve-codebase-architecture` skill with the specifics. Make the recommendation **after** the fix is in, not before — you have more information now than when you started. diff --git a/.agents/skills/diagnosing-bugs/agents/openai.yaml b/.agents/skills/diagnosing-bugs/agents/openai.yaml new file mode 100644 index 00000000000..a13a755a776 --- /dev/null +++ b/.agents/skills/diagnosing-bugs/agents/openai.yaml @@ -0,0 +1,3 @@ +interface: + display_name: "Diagnosing Bugs" + short_description: "Diagnose hard bugs and regressions" diff --git a/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh b/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh new file mode 100644 index 00000000000..40afc4652f6 --- /dev/null +++ b/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# Human-in-the-loop reproduction loop. +# Copy this file, edit the steps below, and run it. +# The agent runs the script; the user follows prompts in their terminal. +# +# Usage: +# bash hitl-loop.template.sh +# +# Two helpers: +# step "" → show instruction, wait for Enter +# capture VAR "" → show question, read response into VAR +# +# At the end, captured values are printed as KEY=VALUE for the agent to parse. + +set -euo pipefail + +step() { + printf '\n>>> %s\n' "$1" + read -r -p " [Enter when done] " _ +} + +capture() { + local var="$1" question="$2" answer + printf '\n>>> %s\n' "$question" + read -r -p " > " answer + printf -v "$var" '%s' "$answer" +} + +# --- edit below --------------------------------------------------------- + +step "Open the app at http://localhost:3000 and sign in." + +capture ERRORED "Click the 'Export' button. Did it throw an error? (y/n)" + +capture ERROR_MSG "Paste the error message (or 'none'):" + +# --- edit above --------------------------------------------------------- + +printf '\n--- Captured ---\n' +printf 'ERRORED=%s\n' "$ERRORED" +printf 'ERROR_MSG=%s\n' "$ERROR_MSG" diff --git a/.agents/skills/domain-modeling/ADR-FORMAT.md b/.agents/skills/domain-modeling/ADR-FORMAT.md new file mode 100644 index 00000000000..da7e78ec1c2 --- /dev/null +++ b/.agents/skills/domain-modeling/ADR-FORMAT.md @@ -0,0 +1,47 @@ +# ADR Format + +ADRs live in `docs/adr/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc. + +Create the `docs/adr/` directory lazily — only when the first ADR is needed. + +## Template + +```md +# {Short title of the decision} + +{1-3 sentences: what's the context, what did we decide, and why.} +``` + +That's it. An ADR can be a single paragraph. The value is in recording *that* a decision was made and *why* — not in filling out sections. + +## Optional sections + +Only include these when they add genuine value. Most ADRs won't need them. + +- **Status** frontmatter (`proposed | accepted | deprecated | superseded by ADR-NNNN`) — useful when decisions are revisited +- **Considered Options** — only when the rejected alternatives are worth remembering +- **Consequences** — only when non-obvious downstream effects need to be called out + +## Numbering + +Scan `docs/adr/` for the highest existing number and increment by one. + +## When to offer an ADR + +All three of these must be true: + +1. **Hard to reverse** — the cost of changing your mind later is meaningful +2. **Surprising without context** — a future reader will look at the code and wonder "why on earth did they do it this way?" +3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons + +If a decision is easy to reverse, skip it — you'll just reverse it. If it's not surprising, nobody will wonder why. If there was no real alternative, there's nothing to record beyond "we did the obvious thing." + +### What qualifies + +- **Architectural shape.** "We're using a monorepo." "The write model is event-sourced, the read model is projected into Postgres." +- **Integration patterns between contexts.** "Ordering and Billing communicate via domain events, not synchronous HTTP." +- **Technology choices that carry lock-in.** Database, message bus, auth provider, deployment target. Not every library — just the ones that would take a quarter to swap out. +- **Boundary and scope decisions.** "Customer data is owned by the Customer context; other contexts reference it by ID only." The explicit no-s are as valuable as the yes-s. +- **Deliberate deviations from the obvious path.** "We're using manual SQL instead of an ORM because X." Anything where a reasonable reader would assume the opposite. These stop the next engineer from "fixing" something that was deliberate. +- **Constraints not visible in the code.** "We can't use AWS because of compliance requirements." "Response times must be under 200ms because of the partner API contract." +- **Rejected alternatives when the rejection is non-obvious.** If you considered GraphQL and picked REST for subtle reasons, record it — otherwise someone will suggest GraphQL again in six months. diff --git a/.agents/skills/domain-modeling/CONTEXT-FORMAT.md b/.agents/skills/domain-modeling/CONTEXT-FORMAT.md new file mode 100644 index 00000000000..eaf2a18573f --- /dev/null +++ b/.agents/skills/domain-modeling/CONTEXT-FORMAT.md @@ -0,0 +1,60 @@ +# CONTEXT.md Format + +## Structure + +```md +# {Context Name} + +{One or two sentence description of what this context is and why it exists.} + +## Language + +**Order**: +{A one or two sentence description of the term} +_Avoid_: Purchase, transaction + +**Invoice**: +A request for payment sent to a customer after delivery. +_Avoid_: Bill, payment request + +**Customer**: +A person or organization that places orders. +_Avoid_: Client, buyer, account +``` + +## Rules + +- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`. +- **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does. +- **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs. +- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine. + +## Single vs multi-context repos + +**Single context (most repos):** One `CONTEXT.md` at the repo root. + +**Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other: + +```md +# Context Map + +## Contexts + +- [Ordering](./src/ordering/CONTEXT.md) — receives and tracks customer orders +- [Billing](./src/billing/CONTEXT.md) — generates invoices and processes payments +- [Fulfillment](./src/fulfillment/CONTEXT.md) — manages warehouse picking and shipping + +## Relationships + +- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking +- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices +- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money` +``` + +The skill infers which structure applies: + +- If `CONTEXT-MAP.md` exists, read it to find contexts +- If only a root `CONTEXT.md` exists, single context +- If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved + +When multiple contexts exist, infer which one the current topic relates to. If unclear, ask. diff --git a/.agents/skills/domain-modeling/SKILL.md b/.agents/skills/domain-modeling/SKILL.md new file mode 100644 index 00000000000..d0f7e1a5ccb --- /dev/null +++ b/.agents/skills/domain-modeling/SKILL.md @@ -0,0 +1,74 @@ +--- +name: domain-modeling +description: Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model. +--- + +# Domain Modeling + +Actively build and sharpen the project's domain model as you design. This is the *active* discipline — challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely *reading* `CONTEXT.md` for vocabulary is not this skill — that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.) + +## File structure + +Most repos have a single context: + +``` +/ +├── CONTEXT.md +├── docs/ +│ └── adr/ +│ ├── 0001-event-sourced-orders.md +│ └── 0002-postgres-for-write-model.md +└── src/ +``` + +If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives: + +``` +/ +├── CONTEXT-MAP.md +├── docs/ +│ └── adr/ ← system-wide decisions +├── src/ +│ ├── ordering/ +│ │ ├── CONTEXT.md +│ │ └── docs/adr/ ← context-specific decisions +│ └── billing/ +│ ├── CONTEXT.md +│ └── docs/adr/ +``` + +Create files lazily — only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved. If no `docs/adr/` exists, create it when the first ADR is needed. + +## During the session + +### Challenge against the glossary + +When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?" + +### Sharpen fuzzy language + +When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account' — do you mean the Customer or the User? Those are different things." + +### Discuss concrete scenarios + +When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts. + +### Cross-reference with code + +When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible — which is right?" + +### Update CONTEXT.md inline + +When a term is resolved, update `CONTEXT.md` right there. Don't batch these up — capture them as they happen. Use the format in [CONTEXT-FORMAT.md](./CONTEXT-FORMAT.md). + +`CONTEXT.md` should be totally devoid of implementation details. Do not treat `CONTEXT.md` as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else. + +### Offer ADRs sparingly + +Only offer to create an ADR when all three are true: + +1. **Hard to reverse** — the cost of changing your mind later is meaningful +2. **Surprising without context** — a future reader will wonder "why did they do it this way?" +3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons + +If any of the three is missing, skip the ADR. Use the format in [ADR-FORMAT.md](./ADR-FORMAT.md). diff --git a/.agents/skills/domain-modeling/agents/openai.yaml b/.agents/skills/domain-modeling/agents/openai.yaml new file mode 100644 index 00000000000..7f1522d2f11 --- /dev/null +++ b/.agents/skills/domain-modeling/agents/openai.yaml @@ -0,0 +1,3 @@ +interface: + display_name: "Domain Modeling" + short_description: "Build and sharpen a domain model" diff --git a/.agents/skills/grill-me/SKILL.md b/.agents/skills/grill-me/SKILL.md new file mode 100644 index 00000000000..9470cfcfe23 --- /dev/null +++ b/.agents/skills/grill-me/SKILL.md @@ -0,0 +1,7 @@ +--- +name: grill-me +description: A relentless interview to sharpen a plan or design. +disable-model-invocation: true +--- + +Run a `/grilling` session. diff --git a/.agents/skills/grill-me/agents/openai.yaml b/.agents/skills/grill-me/agents/openai.yaml new file mode 100644 index 00000000000..4d6fb0c746c --- /dev/null +++ b/.agents/skills/grill-me/agents/openai.yaml @@ -0,0 +1,5 @@ +interface: + display_name: "Grill Me" + short_description: "Sharpen a plan through interview" +policy: + allow_implicit_invocation: false diff --git a/.agents/skills/grill-with-docs/SKILL.md b/.agents/skills/grill-with-docs/SKILL.md new file mode 100644 index 00000000000..bed05d2bd32 --- /dev/null +++ b/.agents/skills/grill-with-docs/SKILL.md @@ -0,0 +1,7 @@ +--- +name: grill-with-docs +description: A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go. +disable-model-invocation: true +--- + +Run a `/grilling` session, using the `/domain-modeling` skill. diff --git a/.agents/skills/grill-with-docs/agents/openai.yaml b/.agents/skills/grill-with-docs/agents/openai.yaml new file mode 100644 index 00000000000..5dbe2780a51 --- /dev/null +++ b/.agents/skills/grill-with-docs/agents/openai.yaml @@ -0,0 +1,5 @@ +interface: + display_name: "Grill with Docs" + short_description: "Grill a design and write its docs" +policy: + allow_implicit_invocation: false diff --git a/.agents/skills/grilling/SKILL.md b/.agents/skills/grilling/SKILL.md new file mode 100644 index 00000000000..52d8eb3cadd --- /dev/null +++ b/.agents/skills/grilling/SKILL.md @@ -0,0 +1,12 @@ +--- +name: grilling +description: Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases. +--- + +Interview me relentlessly about every aspect of this until we reach a shared understanding. Walk down each branch of the decision tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer. + +Ask the questions one at a time, waiting for feedback on each question before continuing. Asking multiple questions at once is bewildering. + +If a *fact* can be found by exploring the environment (filesystem, tools, etc.), look it up rather than asking me. The *decisions*, though, are mine — put each one to me and wait for my answer. + +Do not act on it until I confirm we have reached a shared understanding. diff --git a/.agents/skills/grilling/agents/openai.yaml b/.agents/skills/grilling/agents/openai.yaml new file mode 100644 index 00000000000..85b12607d00 --- /dev/null +++ b/.agents/skills/grilling/agents/openai.yaml @@ -0,0 +1,3 @@ +interface: + display_name: "Grilling" + short_description: "Stress-test thinking one question at a time" diff --git a/.agents/skills/handoff/SKILL.md b/.agents/skills/handoff/SKILL.md new file mode 100644 index 00000000000..043d9e13dc7 --- /dev/null +++ b/.agents/skills/handoff/SKILL.md @@ -0,0 +1,16 @@ +--- +name: handoff +description: Compact the current conversation into a handoff document for another agent to pick up. +argument-hint: "What will the next session be used for?" +disable-model-invocation: true +--- + +Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace. + +Include a "suggested skills" section in the document, which suggests skills that the agent should invoke. + +Do not duplicate content already captured in other artifacts (specs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead. + +Redact any sensitive information, such as API keys, passwords, or personally identifiable information. + +If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly. diff --git a/.agents/skills/handoff/agents/openai.yaml b/.agents/skills/handoff/agents/openai.yaml new file mode 100644 index 00000000000..6e1d8da121b --- /dev/null +++ b/.agents/skills/handoff/agents/openai.yaml @@ -0,0 +1,5 @@ +interface: + display_name: "Handoff" + short_description: "Compact a conversation into a handoff" +policy: + allow_implicit_invocation: false diff --git a/.agents/skills/implement/SKILL.md b/.agents/skills/implement/SKILL.md new file mode 100644 index 00000000000..7a0b11f5f4f --- /dev/null +++ b/.agents/skills/implement/SKILL.md @@ -0,0 +1,15 @@ +--- +name: implement +description: "Implement a piece of work based on a spec or set of tickets." +disable-model-invocation: true +--- + +Implement the work described by the user in the spec or tickets. + +Use /tdd where possible, at pre-agreed seams. + +Run typechecking regularly, single test files regularly, and the full test suite once at the end. + +Once done, use /code-review to review the work. + +Commit your work to the current branch. diff --git a/.agents/skills/implement/agents/openai.yaml b/.agents/skills/implement/agents/openai.yaml new file mode 100644 index 00000000000..f8794dc153b --- /dev/null +++ b/.agents/skills/implement/agents/openai.yaml @@ -0,0 +1,5 @@ +interface: + display_name: "Implement" + short_description: "Build work from a spec or tickets" +policy: + allow_implicit_invocation: false diff --git a/.agents/skills/improve-codebase-architecture/HTML-REPORT.md b/.agents/skills/improve-codebase-architecture/HTML-REPORT.md new file mode 100644 index 00000000000..17f6d2c7b83 --- /dev/null +++ b/.agents/skills/improve-codebase-architecture/HTML-REPORT.md @@ -0,0 +1,123 @@ +# HTML Report Format + +The architectural review is rendered as a single self-contained HTML file in the OS temp directory. Tailwind and Mermaid both come from CDNs. Mermaid handles graph-shaped diagrams reliably; hand-built divs and inline SVG handle the more editorial visuals (mass diagrams, cross-sections). Mix the two — don't lean on Mermaid for everything, it'll start to look generic. + +## Scaffold + +```html + + + + + Architecture review — {{repo name}} + + + + + +
+
...
+
...
+
...
+
+ + +``` + +## Header + +Repo name, date, and a compact legend: solid box = module, dashed line = seam, red arrow = leakage, thick dark box = deep module. No introduction paragraph — straight into the candidates. + +## Candidate card + +The diagrams carry the weight. Prose is sparse, plain, and uses the glossary terms (from the `/codebase-design` skill) without ceremony. + +Each candidate is one `
`: + +- **Title** — short, names the deepening (e.g. "Collapse the Order intake pipeline"). +- **Badge row** — recommendation strength (`Strong` = emerald, `Worth exploring` = amber, `Speculative` = slate), plus a tag for the dependency category (`in-process`, `local-substitutable`, `ports & adapters`, `mock`). +- **Files** — monospaced list, `font-mono text-sm`. +- **Before / After diagram** — the centrepiece. Two columns, side by side. See patterns below. +- **Problem** — one sentence. What hurts. +- **Solution** — one sentence. What changes. +- **Wins** — bullets, ≤6 words each. e.g. "Tests hit one interface", "Pricing logic stops leaking", "Delete 4 shallow wrappers". +- **ADR callout** (if applicable) — one line in an amber-tinted box. + +No paragraphs of explanation. If the diagram needs a paragraph to be understood, redraw the diagram. + +## Diagram patterns + +Pick the pattern that fits the candidate. Mix them. Don't make every diagram look the same — variety is part of the point. + +### Mermaid graph (the workhorse for dependencies / call flow) + +Use a Mermaid `flowchart` or `graph` when the point is "X calls Y calls Z, and look at the mess." Wrap it in a Tailwind-styled card so it doesn't feel parachuted in. Style with classDef to colour leakage edges red and the deep module dark. Sequence diagrams work well for "before: 6 round-trips; after: 1." + +```html +
+
+    flowchart LR
+      A[OrderHandler] --> B[OrderValidator]
+      B --> C[OrderRepo]
+      C -.leak.-> D[PricingClient]
+      classDef leak stroke:#dc2626,stroke-width:2px;
+      class C,D leak
+  
+
+``` + +### Hand-built boxes-and-arrows (when Mermaid's layout fights you) + +Modules as `
`s with borders and labels. Arrows as inline SVG `` or `` elements positioned absolutely over a relative container. Reach for this when you want the "after" diagram to feel like one thick-bordered deep module with greyed-out internals — Mermaid won't render that with the right weight. + +### Cross-section (good for layered shallowness) + +Stack horizontal bands (`h-12 border-l-4`) to show layers a call passes through. Before: 6 thin layers each doing nothing. After: 1 thick band labelled with the consolidated responsibility. + +### Mass diagram (good for "interface as wide as implementation") + +Two rectangles per module — one for interface surface area, one for implementation. Before: interface rectangle is nearly as tall as the implementation rectangle (shallow). After: interface rectangle is short, implementation rectangle is tall (deep). + +### Call-graph collapse + +Before: a tree of function calls rendered as nested boxes. After: the same tree collapsed into one box, with the now-internal calls shown faded inside it. + +## Style guidance + +- Lean editorial, not corporate-dashboard. Generous whitespace. Serif optional for headings (`font-serif` works well with stone/slate). +- Colour sparingly: one accent (emerald or indigo) plus red for leakage and amber for warnings. +- Keep diagrams ~320px tall so before/after sits comfortably side by side without scrolling. +- Use `text-xs uppercase tracking-wider` for module labels inside diagrams — they should read as schematic, not as UI. +- The only scripts are the Tailwind CDN and the Mermaid ESM import. The report is otherwise static — no app code, no interactivity beyond Mermaid's own rendering. + +## Top recommendation section + +One larger card. Candidate name, one sentence on why, anchor link to its card. That's it. + +## Tone + +Plain English, concise — but the architectural nouns and verbs come straight from the `/codebase-design` skill. Concision is not an excuse to drift. + +**Use exactly:** module, interface, implementation, depth, deep, shallow, seam, adapter, leverage, locality. + +**Never substitute:** component, service, unit (for module) · API, signature (for interface) · boundary (for seam) · layer, wrapper (for module, when you mean module). + +**Phrasings that fit the style:** + +- "Order intake module is shallow — interface nearly matches the implementation." +- "Pricing leaks across the seam." +- "Deepen: one interface, one place to test." +- "Two adapters justify the seam: HTTP in prod, in-memory in tests." + +**Wins bullets** name the gain in glossary terms: *"locality: bugs concentrate in one module"*, *"leverage: one interface, N call sites"*, *"interface shrinks; implementation absorbs the wrappers"*. Don't write *"easier to maintain"* or *"cleaner code"* — those terms aren't in the glossary and don't earn their place. + +No hedging, no throat-clearing, no "it's worth noting that…". If a sentence could be a bullet, make it a bullet. If a bullet could be cut, cut it. If a term isn't in the `/codebase-design` glossary, reach for one that is before inventing a new one. diff --git a/.agents/skills/improve-codebase-architecture/SKILL.md b/.agents/skills/improve-codebase-architecture/SKILL.md new file mode 100644 index 00000000000..b56969e92f0 --- /dev/null +++ b/.agents/skills/improve-codebase-architecture/SKILL.md @@ -0,0 +1,71 @@ +--- +name: improve-codebase-architecture +description: Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick. +disable-model-invocation: true +--- + +# Improve Codebase Architecture + +Surface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability. + +This command is _informed_ by the project's domain model and built on a shared design vocabulary: + +- Run the `/codebase-design` skill for the architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and its principles (the deletion test, "the interface is the test surface", "one adapter = hypothetical seam, two = real"). Use these terms exactly in every suggestion — don't drift into "component," "service," "API," or "boundary." +- The domain language in `CONTEXT.md` gives names to good seams; ADRs in `docs/adr/` record decisions this command should not re-litigate. + +## Process + +### 1. Explore + +**Scope before you scan — YAGNI.** Deepening a module pays off by making future changes to it easier, so put extra weight on the parts of the codebase that have recently changed. Decide *where* to look before you look: + +- If the user named a direction — a module, a subsystem, a pain point — take it, and skip the inference below. +- Otherwise, walk back a good stretch of the commit history (`git log --oneline`) to find the codebase's hot spots — the files and areas that keep coming up — and let those paths pull your attention first. If the changes are scattered with no clear hot spot, widen the net. + +Read the project's domain glossary (`CONTEXT.md`) and any ADRs in the area you're touching first. + +Then use the Agent tool with `subagent_type=Explore` to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction: + +- Where does understanding one concept require bouncing between many small modules? +- Where are modules **shallow** — interface nearly as complex as the implementation? +- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)? +- Where do tightly-coupled modules leak across their seams? +- Which parts of the codebase are untested, or hard to test through their current interface? + +Apply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want. + +### 2. Present candidates as an HTML report + +Write a self-contained HTML file to the OS temp directory so nothing lands in the repo. Resolve the temp dir from `$TMPDIR`, falling back to `/tmp` (or `%TEMP%` on Windows), and write to `/architecture-review-.html` so each run gets a fresh file. Open it for the user — `xdg-open ` on Linux, `open ` on macOS, `start ` on Windows — and tell them the absolute path. + +The report uses **Tailwind via CDN** for layout and styling, and **Mermaid via CDN** for diagrams where a graph/flow/sequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS/SVG visuals — use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs/SVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a **before/after visualisation**. Be visual. + +For each candidate, render a card with: + +- **Files** — which files/modules are involved +- **Problem** — why the current architecture is causing friction +- **Solution** — plain English description of what would change +- **Benefits** — explained in terms of locality and leverage, and how tests would improve +- **Before / After diagram** — side-by-side, custom-drawn, illustrating the shallowness and the deepening +- **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge + +End the report with a **Top recommendation** section: which candidate you'd tackle first and why. + +**Use CONTEXT.md vocabulary for the domain, and the `/codebase-design` vocabulary for the architecture.** If `CONTEXT.md` defines "Order," talk about "the Order intake module" — not "the FooBarHandler," and not "the Order service." + +**ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the card (e.g. a warning callout: _"contradicts ADR-0007 — but worth reopening because…"_). Don't list every theoretical refactor an ADR forbids. + +See [HTML-REPORT.md](HTML-REPORT.md) for the full HTML scaffold, diagram patterns, and styling guidance. + +Do NOT propose interfaces yet. After the file is written, ask the user: "Which of these would you like to explore?" + +### 3. Grilling loop + +Once the user picks a candidate, run the `/grilling` skill to walk the decision tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive. + +Side effects happen inline as decisions crystallize — run the `/domain-modeling` skill to keep the domain model current as you go: + +- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md`. Create the file lazily if it doesn't exist. +- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there. +- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons ("not worth it right now") and self-evident ones. +- **Want to explore alternative interfaces for the deepened module?** Run the `/codebase-design` skill and use its design-it-twice parallel sub-agent pattern. diff --git a/.agents/skills/improve-codebase-architecture/agents/openai.yaml b/.agents/skills/improve-codebase-architecture/agents/openai.yaml new file mode 100644 index 00000000000..706fdca096d --- /dev/null +++ b/.agents/skills/improve-codebase-architecture/agents/openai.yaml @@ -0,0 +1,5 @@ +interface: + display_name: "Improve Codebase Architecture" + short_description: "Find and grill architecture improvements" +policy: + allow_implicit_invocation: false diff --git a/.agents/skills/prototype/LOGIC.md b/.agents/skills/prototype/LOGIC.md new file mode 100644 index 00000000000..fe9a2c29f77 --- /dev/null +++ b/.agents/skills/prototype/LOGIC.md @@ -0,0 +1,79 @@ +# Logic Prototype + +A tiny interactive terminal app that lets the user drive a state model by hand. Use this when the question is about **business logic, state transitions, or data shape** — the kind of thing that looks reasonable on paper but only feels wrong once you push it through real cases. + +## When this is the right shape + +- "I'm not sure if this state machine handles the edge case where X then Y." +- "Does this data model actually let me represent the case where..." +- "I want to feel out what the API should look like before writing it." +- Anything where the user wants to **press buttons and watch state change**. + +If the question is "what should this look like" — wrong branch. Use [UI.md](UI.md). + +## Process + +### 1. State the question + +Before writing code, write down what state model and what question you're prototyping. One paragraph, in the prototype's README or a comment at the top of the file. A logic prototype that answers the wrong question is pure waste — make the question explicit so it can be checked later, whether the user is watching now or returning to it AFK. + +### 2. Pick the language + +Use whatever the host project uses. If the project has no obvious runtime (e.g. a docs repo), ask. + +Match the project's existing conventions for tooling — don't add a new package manager or runtime just for the prototype. + +### 3. Isolate the logic in a portable module + +Put the actual logic — the bit that's answering the question — behind a small, pure interface that could be lifted out and dropped into the real codebase later. The TUI around it is throwaway; the logic module shouldn't be. + +The right shape depends on the question: + +- **A pure reducer** — `(state, action) => state`. Good when actions are discrete events and state is a single value. +- **A state machine** — explicit states and transitions. Good when "which actions are even legal right now" is part of the question. +- **A small set of pure functions** over a plain data type. Good when there's no implicit current state — just transformations. +- **A class or module with a clear method surface** when the logic genuinely owns ongoing internal state. + +Pick whichever shape best fits the question being asked, *not* whichever is easiest to wire to a TUI. Keep it pure: no I/O, no terminal code, no `console.log` for control flow. The TUI imports it and calls into it; nothing flows the other direction. + +This is what makes the prototype useful past its own lifetime: when the question's been answered, the validated reducer / machine / function set can be lifted into the real module on its own. + +### 4. Build the smallest TUI that exposes the state + +Build it as a **lightweight TUI** — on every tick, clear the screen (`console.clear()` / `print("\033[2J\033[H")` / equivalent) and re-render the whole frame. The user should always see one stable view, not an ever-growing scrollback. + +Each frame has two parts, in this order: + +1. **Current state**, pretty-printed and diff-friendly (one field per line, or formatted JSON). Use **bold** for field names or section headers and **dim** for less important context (timestamps, IDs, derived values). Native ANSI escape codes are fine — `\x1b[1m` bold, `\x1b[2m` dim, `\x1b[0m` reset. No need to pull in a styling library unless one is already in the project. +2. **Keyboard shortcuts**, listed at the bottom: `[a] add user [d] delete user [t] tick clock [q] quit`. Bold the key, dim the description, or vice-versa — whatever reads cleanly. + +Behaviour: + +1. **Initialise state** — a single in-memory object/struct. Render the first frame on start. +2. **Read one keystroke (or one line)** at a time, dispatch to a handler that mutates state. +3. **Re-render** the full frame after every action — don't append, replace. +4. **Loop until quit.** + +The whole frame should fit on one screen. + +### 5. Make it runnable in one command + +Add a script to the project's existing task runner (`package.json` scripts, `Makefile`, `justfile`, `pyproject.toml`). The user should run `pnpm run ` or equivalent — never need to remember a path. + +If the host project has no task runner, just put the command at the top of the prototype's README. + +### 6. Hand it over + +Give the user the run command. They'll drive it themselves; the interesting moments are when they say "wait, that shouldn't be possible" or "huh, I assumed X would be different" — those are the bugs in the _idea_, which is the whole point. If they want new actions added, add them. Prototypes evolve. + +### 7. Capture the answer and the prototype + +Once the prototype has answered its question, capture the answer, then capture the prototype the way the [SKILL](SKILL.md) describes. The logic-specific mapping: the validated reducer / machine / function set lifts into the real module (the decision, absorbed); the TUI shell rides along to the throwaway branch that keeps the prototype as a primary source. + +## Anti-patterns + +- **Don't add tests.** A prototype that needs tests is no longer a prototype. +- **Don't wire it to the real database.** Use an in-memory store unless the question is specifically about persistence. +- **Don't generalise.** No "what if we wanted to support X later." The prototype answers one question. +- **Don't blur the logic and the TUI together.** If the reducer / state machine references `console.log`, prompts, or terminal escape codes, it's no longer portable. Keep the TUI as a thin shell over a pure module. +- **Don't ship the TUI shell into production.** The shell is optimised for being driven by hand from a terminal. The logic module behind it is the bit worth keeping. diff --git a/.agents/skills/prototype/SKILL.md b/.agents/skills/prototype/SKILL.md new file mode 100644 index 00000000000..e75d5331cef --- /dev/null +++ b/.agents/skills/prototype/SKILL.md @@ -0,0 +1,26 @@ +--- +name: prototype +description: Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like. +--- + +# Prototype + +A prototype is **throwaway code that answers a question**. The question decides the shape. + +## Pick a branch + +Identify which question is being answered — from the user's prompt, the surrounding code, or by asking if the user is around: + +- **"Does this logic / state model feel right?"** → [LOGIC.md](LOGIC.md). Build a tiny interactive terminal app that pushes the state machine through cases that are hard to reason about on paper. +- **"What should this look like?"** → [UI.md](UI.md). Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar. + +The two branches produce very different artifacts — getting this wrong wastes the whole prototype. If the question is genuinely ambiguous and the user isn't reachable, default to whichever branch better matches the surrounding code (a backend module → logic; a page or component → UI) and state the assumption at the top of the prototype. + +## Rules that apply to both + +1. **Throwaway from day one, and clearly marked as such.** Locate the prototype code close to where it will actually be used (next to the module or page it's prototyping for) so context is obvious — but name it so a casual reader can see it's a prototype, not production. For throwaway UI routes, obey whatever routing convention the project already uses; don't invent a new top-level structure. +2. **One command to run.** Whatever the project's existing task runner supports — `pnpm `, `python `, `bun `, etc. The user must be able to start it without thinking. +3. **No persistence by default.** State lives in memory. Persistence is the thing the prototype is _checking_, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE — wipe me" name. +4. **Skip the polish.** No tests, no error handling beyond what makes the prototype _runnable_, no abstractions. The point is to learn something fast. +5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed. +6. **Capture it when done.** Fold any validated decision into the real code, then capture the prototype itself as a **primary source**: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too — the verdict and the question it settled — in the issue or a commit. The main branch keeps only the validated decision. diff --git a/.agents/skills/prototype/UI.md b/.agents/skills/prototype/UI.md new file mode 100644 index 00000000000..76c0f6012b0 --- /dev/null +++ b/.agents/skills/prototype/UI.md @@ -0,0 +1,112 @@ +# UI Prototype + +Generate **several radically different UI variations** on a single route, switchable from a floating bottom bar. The user flips between variants in the browser, picks one (or steals bits from each), then throws the rest away. + +If the question is about logic/state rather than what something looks like — wrong branch. Use [LOGIC.md](LOGIC.md). + +## When this is the right shape + +- "What should this page look like?" +- "I want to see a few options for this dashboard before committing." +- "Try a different layout for the settings screen." +- Any time the user would otherwise spend a day picking between three vague mockups in their head. + +## Two sub-shapes — strongly prefer sub-shape A + +A UI prototype is much easier to judge when it's **butting up against the rest of the app** — real header, real sidebar, real data, real density. A throwaway route on its own is a vacuum: every variant looks fine in isolation. Default to sub-shape A whenever there's a plausible existing page to host the variants. Only reach for sub-shape B if the prototype genuinely has no nearby home. + +### Sub-shape A — adjustment to an existing page (preferred) + +The route already exists. Variants are rendered **on the same route**, gated by a `?variant=` URL search param. The existing data fetching, params, and auth all stay — only the rendering swaps. This is the default; pick it unless there's a specific reason not to. + +If the prototype is for something that doesn't yet have a page but *would naturally live inside one* (a new section of the dashboard, a new card on the settings screen, a new step in an existing flow) — that's still sub-shape A. Mount the variants inside the host page. + +### Sub-shape B — a new page (last resort) + +Only use this when the thing being prototyped genuinely has no existing page to live inside — e.g. an entirely new top-level surface, or a flow that can't be embedded anywhere sensible. + +Create a **throwaway route** following whatever routing convention the project already uses — don't invent a new top-level structure. Name it so it's obviously a prototype (e.g. include the word `prototype` in the path or filename). Same `?variant=` pattern. + +Before committing to sub-shape B, sanity-check: is there really no existing page this could be embedded in? An empty route hides design problems that a populated one would expose. + +In both sub-shapes the floating bottom bar is identical. + +## Process + +### 1. State the question and pick N + +Default to **3 variants**. More than 5 stops being radically different and starts being noise — cap there. + +Write down the plan in one line, in the prototype's location or a top-of-file comment: + +> "Three variants of the settings page, switchable via `?variant=`, on the existing `/settings` route." + +This works whether the user is here to push back or not. + +### 2. Generate radically different variants + +Draft each variant. Hold each one to: + +- The page's purpose and the data it has access to. +- The project's component library / styling system (TailwindCSS, shadcn, MUI, plain CSS, whatever). +- A clear exported component name, e.g. `VariantA`, `VariantB`, `VariantC`. + +Variants must be **structurally different** — different layout, different information hierarchy, different primary affordance, not just different colours. Three slightly-tweaked card grids isn't a UI prototype, it's wallpaper. If two drafts come out too similar, redo one with explicit "do not use a card grid" guidance. + +### 3. Wire them together + +Create a single switcher component on the route: + +```tsx +// pseudo-code — adapt to the project's framework +const variant = searchParams.get('variant') ?? 'A'; +return ( + <> + {variant === 'A' && } + {variant === 'B' && } + {variant === 'C' && } + + +); +``` + +For sub-shape A (existing page): keep all the existing data fetching above the switcher; only the rendered subtree changes per variant. + +For sub-shape B (new page): the throwaway route under `/prototype/` mounts the same switcher. + +### 4. Build the floating switcher + +A small fixed-position bar at the bottom-centre of the screen with three pieces: + +- **Left arrow** — cycles to the previous variant (wraps around). +- **Variant label** — shows the current variant key and, if the variant exports a name, that name too. e.g. `B — Sidebar layout`. +- **Right arrow** — cycles forward (wraps around). + +Behaviour: + +- Clicking an arrow updates the URL search param (use the framework's router — `router.replace` on Next, `navigate` on React Router, etc) so the variant is shareable and reload-stable. +- Keyboard: `←` and `→` arrow keys also cycle. Don't intercept arrow keys when an ``, ` + +
+
+ Usage 62% of daily cap +
+
+ + +
+
+

PoB Agent

+ Composer 2.5 + +
+
+ + + +
+
+
+
You · build thread
+ Can we squeeze more DPS without losing spell suppression? +
+
+
Agent · streaming…
+ I’d trade a bit of life for cluster jewels on the right side — suppression stays ≥100% if we keep the Watcher’s Eye. + poewiki · Spell Suppression + poe.ninja/poe1 · similar trees +
+
+
+
+ Proposal · multi-surface · all-or-nothing + ops JSON +
+
+
+ tree: allocate Midpoint (12 nodes) +− tree: refund Heart of Oak path ++ item: Large Cluster — Spell Blast ++ config: bossing = true
+
+
+ + + +
+
+
+ + +
+
+ Usage 62% of daily cap +
+
+
+ + + + + +
+ + Agent + Build + + +
+ + + + + + + + + diff --git a/docs/research/cursor-sdk-pob-agent.md b/docs/research/cursor-sdk-pob-agent.md new file mode 100644 index 00000000000..3b733cd2265 --- /dev/null +++ b/docs/research/cursor-sdk-pob-agent.md @@ -0,0 +1,215 @@ +# Research: Cursor SDK for a personal PoB desktop agent + +**Ticket:** [waltersmike/PathOfBuilding#3](https://github.com/waltersmike/PathOfBuilding/issues/3) +**Date:** 2026-07-17 +**Scope:** Primary sources only (Cursor docs / help / dashboard pages). No implementation. + +## Question + +What does the Cursor SDK / agent APIs allow for a **personal desktop** integration that must: + +1. Bill only against the **owner’s Cursor subscription** +2. Support a **floating chat UX with history** (prefer reusing Cursor history if feasible) +3. Run via a **non-LLM local sidecar** talking to Lua Path of Building +4. Support **usage guardrails** + +## Verdict (short) + +**Feasible architecture:** a local Node/Python **sidecar** owns the floating chat UI and PoB IPC; it drives Cursor via **`@cursor/sdk` / `cursor-sdk` local runtime** with the owner’s **user API key**. Inference is always Cursor-hosted; the sidecar is non-LLM plumbing. + +**Not feasible from Cursor APIs alone:** embedding Cursor’s IDE chat UI, reading **Cursor IDE** chat history, or hard spend caps on individual plans without **app-level** metering (SDK token usage + plan limits / `RateLimitError`). + +--- + +## 1. Auth model (API keys) + +| Claim | Source | +| --- | --- | +| SDK auth is `CURSOR_API_KEY` env or explicit `apiKey` / `api_key` | [TypeScript SDK — Authentication](https://cursor.com/docs/sdk/typescript) | +| Accepted key types: **user API keys** and **team service-account keys**; **Team Admin API keys are not yet supported** | [TypeScript SDK — Authentication](https://cursor.com/docs/sdk/typescript), [Python SDK](https://cursor.com/docs/sdk/python) | +| User keys: Cursor Dashboard → API Keys (`https://cursor.com/dashboard/api`) | [TypeScript SDK — Authentication](https://cursor.com/docs/sdk/typescript), [API Overview](https://cursor.com/docs/api) | +| Service-account keys: team settings (team/enterprise path) | [TypeScript SDK — Authentication](https://cursor.com/docs/sdk/typescript), [Cloud Agents API overview](https://cursor.com/docs/cloud-agent/api/overview) | +| REST APIs use Basic auth (`API_KEY` as username, empty password); Cloud Agents API also accepts Bearer | [API Overview](https://cursor.com/docs/api) | +| Cloud Agents API keys: user key or service-account key | [Cloud Agents API](https://cursor.com/docs/cloud-agent/api/endpoints) | +| `Cursor.me()` / `GET /v1/me` (and legacy `GET /v0/me`) return API key / caller identity metadata | [TypeScript SDK — Cursor.me()](https://cursor.com/docs/sdk/typescript), [Cloud Agents API — API Key Info](https://cursor.com/docs/cloud-agent/api/endpoints), [v0 API Key Info](https://cursor.com/docs/cloud-agent/api/v0) | + +**Implication for PoB:** use a **user API key** belonging to the subscription owner so spend lands on that user’s plan (see §5). Do not use Team Admin keys. Friend handoff = share that key out-of-band (product decision; docs do not provide a delegated-user OAuth flow for SDK). + +--- + +## 2. Local vs cloud runtimes + +| Claim | Source | +| --- | --- | +| One SDK interface for **local** and **cloud** | [TypeScript SDK — Overview](https://cursor.com/docs/sdk/typescript) | +| **Local:** agent loop runs in the caller process; files from disk/`cwd` | [TypeScript SDK — Overview](https://cursor.com/docs/sdk/typescript) | +| **Cloud:** Cursor-hosted VM; repo cloned; survives caller disconnect | [TypeScript SDK — Overview](https://cursor.com/docs/sdk/typescript), [Cloud Agents API](https://cursor.com/docs/cloud-agent/api/endpoints) | +| **“Local” ≠ local model** — all inference goes through Cursor-hosted models in both modes | [TypeScript SDK — Local means local agent loop, not local model](https://cursor.com/docs/sdk/typescript) | +| Same `CURSOR_API_KEY` for either runtime | [TypeScript SDK — Overview](https://cursor.com/docs/sdk/typescript) | +| Local agent IDs: `agent-…`; cloud: `bc-…` | [TypeScript SDK — Creating agents / resume](https://cursor.com/docs/sdk/typescript) | +| TS SDK requires **Node.js 22.13+**; ships platform binaries (sandbox/ripgrep) | [TypeScript SDK — Installation](https://cursor.com/docs/sdk/typescript) | +| Cloud Agents API is **public beta**; oriented at repository workflows (repos, PRs, artifacts) | [Cloud Agents API overview](https://cursor.com/docs/cloud-agent/api/overview) | +| Cloud create can omit repos for a **no-repo** agent, but still runs in Cursor’s cloud environment | [Cloud Agents API — Create An Agent](https://cursor.com/docs/cloud-agent/api/endpoints) | + +**Implication for PoB:** prefer **local runtime**. The live Lua PoB process and build state live on the desktop; cloud VMs cannot attach to that process. Cloud remains useful only for repo-bound chores (e.g. editing the fork), not for the advisor sitting beside PoB. + +--- + +## 3. History / conversation APIs + +### What exists (SDK / Cloud Agents) + +| Capability | Notes | Source | +| --- | --- | --- | +| **Agent** = durable conversation container across prompts | Follow-ups via `agent.send` keep context | [TypeScript SDK — Core concepts / Sending messages](https://cursor.com/docs/sdk/typescript) | +| **`Agent.resume(agentId)`** | Continue after process restart; runtime from ID prefix | [TypeScript SDK — Resuming agents](https://cursor.com/docs/sdk/typescript) | +| **`run.conversation()`** | Structured turns for the current run | [TypeScript SDK — conversation()](https://cursor.com/docs/sdk/typescript) | +| **`Agent.messages.list(agentId)`** (local) | Stored user/assistant messages for a local agent | [TypeScript SDK — Agent.messages.list()](https://cursor.com/docs/sdk/typescript) | +| Python: **`agent.list_messages()`** | Same idea on the agent handle | [Python SDK](https://cursor.com/docs/sdk/python) | +| Local persistence | Default on-disk SQLite under home; optional JSONL / custom `local.store` | [TypeScript SDK — Conversation context / Local store](https://cursor.com/docs/sdk/typescript) | +| Cloud persistence | Server-side; list/get/archive/delete agents | [TypeScript SDK — Cloud agent lifecycle](https://cursor.com/docs/sdk/typescript), [Cloud Agents API](https://cursor.com/docs/cloud-agent/api/endpoints) | +| Legacy **`GET /v0/agents/{id}/conversation`** | Full cloud agent transcript (user + assistant texts) | [Cloud Agents API v0 — Agent Conversation](https://cursor.com/docs/cloud-agent/api/v0) | +| v1 Cloud API | Agents + runs + stream + usage; conversation continuity via follow-up runs on the same agent | [Cloud Agents API endpoints](https://cursor.com/docs/cloud-agent/api/endpoints) | + +### What is **not** documented + +| Gap | Impact | +| --- | --- | +| **No API to read Cursor IDE / Composer chat history** | “Reuse Cursor history” cannot mean IDE threads; only **SDK/Cloud agent** transcripts | +| **No embeddable Cursor chat widget** | Floating UX must be **custom UI** in the sidecar (or other host), streaming `run.stream()` / Python `run.messages()` | +| Cookbook mentions “embedded in-product agents” as a use case for the SDK (caller builds the product surface) | [TypeScript SDK — Cookbook](https://cursor.com/docs/sdk/typescript) | + +**Implication for PoB:** map **per-build threads** → durable SDK `agentId`s (one agent per build thread + one for research). Persist/resume those IDs in the sidecar. Render history from `Agent.messages.list` / stream events — not from the Cursor IDE. + +--- + +## 4. Sidecar ↔ PoB (non-LLM local bridge) + +| Claim | Source | +| --- | --- | +| Local agents can register **`local.customTools`** (in-process functions exposed as MCP `custom-user-tools`) | [TypeScript SDK — Custom tools](https://cursor.com/docs/sdk/typescript) | +| Custom tools are **local-only**; on cloud they throw `ConfigurationError` | [TypeScript SDK — Custom tools](https://cursor.com/docs/sdk/typescript) | +| MCP servers (stdio/HTTP) can be passed inline on create/send | [TypeScript SDK — MCP servers](https://cursor.com/docs/sdk/typescript), [Cursor MCP](https://cursor.com/docs/mcp) | +| Hooks are **file-based only** (`.cursor/hooks.json`); no programmatic hook callbacks | [TypeScript SDK — Hooks](https://cursor.com/docs/sdk/typescript) | +| Default local sandbox is **off**; headless runs have no human approval UI | [TypeScript SDK — Sandbox options](https://cursor.com/docs/sdk/typescript) | +| Optional `local.sandboxOptions.enabled` + `local.autoReview` for safer tool execution | [TypeScript SDK — Sandbox / Auto-review](https://cursor.com/docs/sdk/typescript) | + +**Implication for PoB:** the **sidecar** (Node 22+ or Python) should: + +1. Own IPC to Lua PoB (export build, apply confirmed diffs, etc.) +2. Expose PoB operations to the agent via **custom tools** and/or a **stdio MCP** server +3. Keep LLM calls exclusively through Cursor SDK (satisfies “no second LLM vendor”) + +Cursor does not need to know about Lua; the sidecar is the adapter. + +--- + +## 5. Pricing / subscription pooling + +| Claim | Source | +| --- | --- | +| SDK runs use the **same pricing, request pools, and Privacy Mode rules** as IDE and Cloud Agents | [TypeScript SDK — Usage and billing](https://cursor.com/docs/sdk/typescript) | +| Spend appears on the usage dashboard under an **SDK** tag | [TypeScript SDK — Usage and billing](https://cursor.com/docs/sdk/typescript) → [usage dashboard](https://cursor.com/dashboard/usage) | +| **User API keys bill to that user’s plan**; service-account keys bill to the **team** | [TypeScript SDK — Usage and billing](https://cursor.com/docs/sdk/typescript) | +| Individual plans: two pools — **First-party models** (Auto, Composer 2.5, Grok 4.5) and **API** (model API rates); included amounts by tier (e.g. Pro $20 API / month) | [Models & Pricing](https://cursor.com/docs/models-and-pricing), [Usage and limits](https://cursor.com/help/models-and-usage/usage-limits) | +| Over included usage → on-demand pay-as-you-go or upgrade | [Models & Pricing](https://cursor.com/docs/models-and-pricing), [Usage and limits](https://cursor.com/help/models-and-usage/usage-limits) | +| Usage resets with billing cycle; unused does not roll over | [Usage and limits](https://cursor.com/help/models-and-usage/usage-limits), [Billing](https://cursor.com/help/account-and-billing/billing) | +| Team spend limits / Admin spend APIs are **Teams/Enterprise** features | [Team dashboard](https://cursor.com/docs/account/teams/dashboard), [Admin API](https://cursor.com/docs/account/teams/admin-api), [API Overview](https://cursor.com/docs/api) | +| Cloud Agents API + TS/Python SDKs listed as available to **All users** (Cloud Agents beta) | [API Overview](https://cursor.com/docs/api) | + +**Implication for PoB:** owner’s **user key** → owner’s subscription pools. No separate Cursor “product billing” for a personal sidecar. Friend using the owner’s key also draws from the **owner’s** pools (same key → same plan). There is **no documented subscription pooling** across separate individual accounts without a Team/Enterprise arrangement. + +--- + +## 6. Usage guardrails (what Cursor gives vs what you build) + +### Provided by Cursor + +| Mechanism | Source | +| --- | --- | +| Per-run **`TokenUsage`** (`inputTokens`, `outputTokens`, cache, `totalTokens`) on `run.usage` / `result.usage` and `"usage"` stream events | [TypeScript SDK — Token usage](https://cursor.com/docs/sdk/typescript) | +| Cloud **`GET /v1/agents/{id}/usage`** (totals + per-run) | [Cloud Agents API — Get Agent Usage](https://cursor.com/docs/cloud-agent/api/endpoints) | +| Plan monthly included usage + dashboard visibility | [Usage and limits](https://cursor.com/help/models-and-usage/usage-limits), [Models & Pricing](https://cursor.com/docs/models-and-pricing) | +| SDK **`RateLimitError`** for burst limits or **usage limit exceeded** | [TypeScript SDK — Errors](https://cursor.com/docs/sdk/typescript) (via docs error table) | +| HTTP **429** on REST APIs when rate-limited | [API Overview — Rate Limits](https://cursor.com/docs/api) | +| Cloud Agents: “Standard rate limiting” (not a fixed published RPM in the overview table) | [API Overview](https://cursor.com/docs/api) | +| Hooks / sandbox / auto-review for **tool-call** policy (not dollar caps) | [TypeScript SDK — Hooks / Sandbox / Auto-review](https://cursor.com/docs/sdk/typescript) | +| Team Admin **user spend limits** (Enterprise Admin API) — not the personal Hobby/Pro path | [Admin API](https://cursor.com/docs/account/teams/admin-api) | + +### Not provided (hard gap for “usage guardrails”) + +- No documented **SDK method to set a personal hard dollar/token budget** before a run. +- No documented API for an individual Pro user to programmatically read **remaining monthly allowance** (Admin/Analytics spend endpoints are team/enterprise-oriented). +- Guardrails for the PoB product must be **implemented in the sidecar**: sum `TokenUsage`, stop/warn before `send`, choose cheaper models (`Cursor.models.list` / prefer First-party pool models), and handle `RateLimitError`. + +--- + +## 7. Constraints & hard blockers for embedding beside PoB + +### Hard blockers / non-starters + +1. **No Cursor-hosted floating chat UI or IDE embed API** — you build the window; SDK is headless. ([TypeScript SDK](https://cursor.com/docs/sdk/typescript) describes programmatic agent control, not UI embedding.) +2. **No access to Cursor IDE chat history** — only SDK/Cloud agent transcripts (§3). +3. **Cloud runtime cannot drive live PoB** — isolated VM / repo workflow; no path to the local Lua process. ([Cloud Agents API](https://cursor.com/docs/cloud-agent/api/endpoints), [SDK local vs cloud](https://cursor.com/docs/sdk/typescript)) +4. **Inference is never fully local** — “local” agent still bills Cursor-hosted models. ([SDK — Local means local agent loop](https://cursor.com/docs/sdk/typescript)) +5. **Team Admin keys unsupported** by SDK. ([SDK Authentication](https://cursor.com/docs/sdk/typescript)) + +### Soft constraints (design around them) + +| Constraint | Mitigation | +| --- | --- | +| Node **22.13+** for `@cursor/sdk` | Bundle/require that runtime in the sidecar, or use Python SDK | +| Local tools unrestricted by default | Enable sandbox/auto-review; prefer confirm-before-apply in **your** UX (product already wants propose → confirm → apply) | +| Inline MCP secrets not persisted across `resume` | Re-pass MCP/custom tools on resume ([SDK resume notes](https://cursor.com/docs/sdk/typescript)) | +| Large context (full PoB export every turn) burns included usage quickly | Prefer First-party pool models where possible; meter tokens; optimize later | +| Public beta surfaces (SDK + Cloud Agents API) | Expect breaking changes before GA ([Cloud Agents overview](https://cursor.com/docs/cloud-agent/api/overview); SDKs marked public beta in skill/docs) | + +### Fit vs requirements checklist + +| Requirement | Fit | +| --- | --- | +| (1) Bill only owner subscription | **Yes** with owner **user API key** | +| (2) Floating chat + history | **Yes** with custom UI + SDK agent history; **No** reusing IDE history | +| (3) Non-LLM sidecar ↔ Lua PoB | **Yes** (local SDK + custom tools / MCP) | +| (4) Usage guardrails | **Partial** — telemetry + plan limits + app-enforced caps; no first-class personal budget API | + +--- + +## 8. Recommended integration shape (research-only) + +``` +┌─────────────────────┐ IPC ┌──────────────────────────────┐ +│ Path of Building │◄────────────►│ Local sidecar (Node/Python) │ +│ (Lua, desktop) │ export/apply│ • floating chat UI │ +└─────────────────────┘ │ • thread → agentId map │ + │ • usage metering/guardrails │ + │ • customTools / MCP → PoB │ + └──────────────┬───────────────┘ + │ @cursor/sdk local + │ CURSOR_API_KEY (user) + ▼ + ┌──────────────────────────────┐ + │ Cursor hosted models / pools │ + └──────────────────────────────┘ +``` + +Do **not** route the advisor through Cloud Agents for day-to-day build advice. + +--- + +## Primary sources consulted + +- [Cursor TypeScript SDK](https://cursor.com/docs/sdk/typescript) +- [Cursor Python SDK](https://cursor.com/docs/sdk/python) +- [Cursor APIs Overview](https://cursor.com/docs/api) +- [Cloud Agents API (v1)](https://cursor.com/docs/cloud-agent/api/endpoints) +- [Cloud Agents API v0 (legacy conversation endpoint)](https://cursor.com/docs/cloud-agent/api/v0) +- [Models & Pricing](https://cursor.com/docs/models-and-pricing) +- [Usage and limits (help)](https://cursor.com/help/models-and-usage/usage-limits) +- [Pricing / plans (help)](https://cursor.com/help/account-and-billing/pricing) +- [Billing (help)](https://cursor.com/help/account-and-billing/billing) +- [Team dashboard (spend limits context)](https://cursor.com/docs/account/teams/dashboard) +- [Admin API (team spend limits)](https://cursor.com/docs/account/teams/admin-api) +- Cursor Dashboard links referenced by docs: [API Keys](https://cursor.com/dashboard/api), [Usage](https://cursor.com/dashboard/usage) + +Also cross-checked against the in-Cursor `/sdk` skill (`~/.cursor/skills-cursor/sdk/SKILL.md`), which points at the same official SDK docs as canonical. diff --git a/docs/research/pob-agent-integration-surfaces.md b/docs/research/pob-agent-integration-surfaces.md new file mode 100644 index 00000000000..dd21513fd61 --- /dev/null +++ b/docs/research/pob-agent-integration-surfaces.md @@ -0,0 +1,266 @@ +# Research: PoB integration surfaces for an agent bridge + +**Ticket:** [#4](https://github.com/waltersmike/PathOfBuilding/issues/4) (part of [#1](https://github.com/waltersmike/PathOfBuilding/issues/1)) +**Question:** In this Path of Building codebase, what are the realistic integration surfaces for (1) a floating window open/close at will, (2) a full build export/snapshot every agent turn, (3) applying a confirmed proposal that mutates tree, items/gems, and Configuration, (4) optional handoff into the Compare tab, and (5) a non-LLM sidecar process talking to the Lua app? +**Scope:** Identify seams, gaps, and what would have to be invented. Do **not** implement the agent. +**Primary sources:** this repo's Lua app (`src/`), docs, and runtime host artifacts under `runtime/`. +**Date:** 2026-07-17 + +--- + +## Executive summary + +| Need | Realistic surface today | Verdict | +|------|-------------------------|---------| +| (1) Floating window | In-app `PopupDialog` / controls only; **one** OS window (`SimpleGraphic`) | **Invent** non-modal in-app panel *or* put the UI in an external sidecar window | +| (2) Full build snapshot | `buildMode:SaveDB` → XML; optional Deflate+base64 share code | **Reuse** — strongest existing seam | +| (3) Apply confirmed proposal | Full wipe via `Init`+XML, **or** per-tab Load/undo/copy helpers | **Partial reuse** — no cross-tab “proposal transaction” | +| (4) Compare handoff | `CompareTab:ImportBuild` / Import-tab “Import as comparison” | **Reuse** — optional path already exists | +| (5) Sidecar ↔ Lua | `LaunchSubScript`, `SpawnProcess`, files, clipboard, HTTP (`lcurl`); unused `socket.dll` | **Invent** the bridge protocol; host has primitives but no agent IPC | + +--- + +## Host / UI architecture (context for all five) + +PoB is a LuaJIT app hosted by **SimpleGraphic** (see `docs/rundown.md`, `src/Launch.lua` `#@ SimpleGraphic`). There is a single OS window (`SetWindowTitle`, `vid_resizable`). The Lua UI is a custom control tree (`Control` / `ControlHost`), not a native widget toolkit. + +Two top-level modes live under `main.modes`: `LIST` (`Modules/BuildList`) and `BUILD` (`Modules/Build`). Inside BUILD, `build.viewMode` switches tabs (`TREE`, `SKILLS`, `ITEMS`, `CONFIG`, `IMPORT`, `COMPARE`, …) and each tab draws into a shared viewport (`buildMode:OnFrame`). + +Modal UI is a stack of in-window overlays: `main.popups` processed/drawn before normal controls (`main:OnFrame`, `main:OpenPopup` / `ClosePopup`). When a popup is open, input is consumed by the popup only. + +```text +OS window (SimpleGraphic) +└── main viewPort (full screen) + ├── mode UI (LIST or BUILD tabs) + ├── ToastNotification (non-blocking messages) + └── main.popups[1] (modal PopupDialog — blocks input underneath) +``` + +There is **no** Lua API in this tree for creating a second OS window or docking an external HWND. + +--- + +## (1) Floating window open/close at will + +### Existing seams + +- **`PopupDialog`** (`src/Classes/PopupDialog.lua`) + **`main:OpenPopup` / `ClosePopup` / `OpenConfirmPopup` / `OpenMessagePopup`** (`src/Modules/Main.lua`): centered modal dialogs with controls, Escape/Enter handling. Used heavily (Options, Import Comparison, Save As, etc.). +- **`ToastNotification`** (`src/Modules/ToastNotification.lua`): non-modal, auto-dismissing messages at the bottom of the main window — not a chat/workspace surface. +- **Tab panels**: each BUILD tab is a `ControlHost` drawing into `tabViewPort` (`buildMode:OnFrame`). A new “Agent” tab would fit this pattern but is a full tab, not a floating window. +- Window chrome is limited to title text (`main:SetWindowTitleSubtext`, `PassiveSpec:SetWindowTitleWithBuildClass`). + +### Gaps + +- Popups are **modal**: `main:OnFrame` routes all input to `self.popups[1]` and wipes events, so the user cannot edit the tree/items while a popup is open. That conflicts with “open/close at will” while continuing to use PoB. +- No multi-window / always-on-top floating panel primitive in the Lua host surface documented in this repo. +- No persisted window-placement system for arbitrary panels (placement persistence is listed as unspecified on the map issue). + +### What would have to be invented + +1. **In-app non-modal floating panel** (recommended if UI must live inside PoB): a new control host drawn on a high draw layer, with its own show/hide flag, that does **not** go through `main.popups` (so it does not steal all input). Would need hit-testing rules so clicks on the panel vs. the tab underneath behave correctly — pattern does not exist today (toasts are display-only). +2. **External window owned by a sidecar** (fits “non-LLM sidecar OK”): agent UI is outside PoB; PoB only exposes snapshot/apply APIs. Avoids inventing non-modal overlay UX inside SimpleGraphic. +3. **Misuse of `PopupDialog`**: technically open/close works, but modality makes it a poor fit for an advisor that must stay open while the user inspects the build. + +--- + +## (2) Full build export / snapshot every agent turn + +### Existing seams (strong) + +Canonical serialization is XML with root element `PathOfBuilding`: + +- **`buildMode:SaveDB(fileName)`** (`src/Modules/Build.lua`): builds `{ elem = "PathOfBuilding" }`, writes the `Build` section via `buildMode:Save`, then each registered saver’s `Save`, then `common.xml.ComposeXML`. Returns the XML **string** (or shows an error). +- **Savers registered in `buildMode:Init`**: + + | XML elem | Object | + |----------|--------| + | `Config` | `configTab` | + | `Notes` | `notesTab` | + | `Party` | `partyTab` | + | `Tree` | `treeTab` | + | `TreeView` | `treeTab.viewer` | + | `Items` | `itemsTab` | + | `Skills` | `skillsTab` | + | `Calcs` | `calcsTab` | + | `Import` | `importTab` | + +- **Share-code encoding** (Import/Export tab): + `common.base64.encode(Deflate(self.build:SaveDB("code"))):gsub("+","-"):gsub("/","_")` + (`ImportTab` generate-code button; same pattern in `CompareTab:ImportFromCode` decode path). +- **File persistence**: `SaveDBFile` / `LoadDBFile` read/write `*.xml` under the user’s build path. +- **Headless helpers**: `HeadlessWrapper.loadBuildFromXML` / `newBuild` for offline loading (testing), not for talking to a live GUI session. + +Calling `SaveDB` does not require UI interaction; it reads live tab state. After edits, calcs refresh when `buildFlag` is set (`buildMode:OnFrame` → `calcsTab:BuildOutput`). + +### Gaps / caveats + +- **Compare entries are not savers**: comparison builds live only in `compareTab.compareEntries` memory; they are not part of `SaveDB` XML. +- Snapshot size can be large (full items + tree + config). Product notes already say monitor usage — no compression-for-agent path beyond the existing Deflate share code. +- `SaveDB` argument is only used for error messages; it does not change content. +- Party “Export Support” buffs are optional via `partyTab.enableExportBuffs` (ImportTab checkbox); usually irrelevant for a solo build advisor. + +### What would have to be invented + +- A thin **agent-facing export API** (e.g. always return XML and/or share code + metadata like `dbFileName`, `buildName`, `outputRevision`) — wrapping existing `SaveDB`. +- Optional **delta/hash** if full XML every turn becomes too large for the LLM context (optimization later; not required for a first bridge). +- A place to dump the snapshot for a sidecar (clipboard, temp file, HTTP body) — see (5). + +--- + +## (3) Applying a confirmed proposal (tree, items/gems, Configuration) + +### Existing seams + +**A. Full-build replace (nuclear, already used for Import)** + +`ImportTab` “Import to this build”: + +1. Confirm popup warning that import erases **ALL** existing data. +2. `build:Shutdown()` then `build:Init(dbFileName, buildName, importCodeXML, …)`. + +That reloads the entire BUILD mode from XML. Correct for “replace whole build with proposed XML,” heavy-handed for partial proposals, and destroys unsaved in-memory-only state that isn’t in the XML path you supply. + +**B. Per-domain mutation / undo (granular)** + +Each major surface already has Load/Save and (usually) undo: + +| Domain | Load/Save | Undo | Notable mutators | +|--------|-----------|------|------------------| +| Passive tree | `TreeTab:Load` / `Save`; `PassiveSpec` | `PassiveSpec:CreateUndoState` / `RestoreUndoState`; `AllocNode` / `DeallocNode` | Compare: `CopyCompareSpecToPrimary` | +| Items | `ItemsTab:Load` / `Save` | `CreateUndoState` / `RestoreUndoState`; `AddItem`, slot `SetSelItemId` | Compare: `CopyCompareItemToPrimary` | +| Skills/gems | `SkillsTab:Load` / `Save` | `CreateUndoState` / `RestoreUndoState` | Socket-group structures in skills tab | +| Configuration | `ConfigTab:Load` / `Save` | undo of `configSets[…].input`; `UpdateControls` + `BuildModList` | `ConfigOptions` var list drives keys | + +After mutations, callers typically set `build.buildFlag = true` so the next frame rebuilds calcs. + +**C. Compare → primary copy helpers (partial apply patterns)** + +`CompareTab:CopyCompareSpecToPrimary` and `CopyCompareItemToPrimary` show how to push pieces from a secondary XML-derived `CompareEntry` into the live build (with explicit limitations — e.g. jewels not copied with the tree because item IDs differ). + +**D. Undo model** + +`UndoHandler` (`src/Classes/UndoHandler.lua`) is **per object** (items tab, skills tab, config tab, passive spec, …), depth-capped (~100), not a single transactional undo spanning tree+items+skills+config. + +### Gaps + +- **No proposal/diff/apply API**: nothing accepts an agent “proposal” object and applies tree + items + gems + config atomically. +- **No cross-tab undo**: map issue still lists undo/rollback semantics as unspecified; the code supports per-tab Ctrl+Z style undo only. +- Full `Init` from XML is all-or-nothing and remounts UI. +- Applying by writing a temp `.xml` and calling `LoadDB` mid-session is not a supported hot-reload path without going through `Init`/`Shutdown` (section load happens during `Init`). +- Skills and items are coupled (socket groups, jewel sockets on the tree); order of application matters (tree deferred after items on load for jewel reasons — see comments in `buildMode:Init`). + +### What would have to be invented + +1. **Proposal representation** (likely proposed XML sections, or structured patches) owned by the agent UI — not present in PoB. +2. **Apply orchestrator** that either: + - builds a full XML and runs the Import-to-this-build path, **or** + - applies section-wise via tab Load/RestoreUndoState / copy helpers, then sets `buildFlag`, with a documented order (Items → Skills → Tree → Config mirrors load constraints). +3. **Rollback policy**: snapshot `SaveDB` before apply and re-`Init`, or push coordinated undo states on each tab (fragile), or rely on PoB Save + user revert. +4. Agent-owned **diff display** (product decision: agent window owns the proposal diff; Compare is optional). + +--- + +## (4) Optional handoff into the Compare tab + +### Existing seams (strong) + +- **`CompareTab:ImportBuild(xmlText, label)`** (`src/Classes/CompareTab.lua`): constructs `CompareEntry` from XML, appends to `compareEntries`, selects it. Returns success if calcs produced `mainOutput`. +- **`CompareTab:ImportFromCode(code)`**: Deflate+base64 decode → `ImportBuild`. +- **Import tab mode** `"Import as comparison"`: calls `compareTab:ImportBuild` and sets `build.viewMode = "COMPARE"`. +- **UI import paths**: `OpenImportPopup` (paste code/URL), `OpenImportFolderPopup` (local `.xml` files via `BuildListHelpers.ScanFolder`). +- **`CompareEntry`** (`src/Classes/CompareEntry.lua`): lightweight build wrapper — loads XML, creates tabs, runs calcs **without** primary BUILD chrome. Good model for “secondary build in memory.” +- Compare sub-views: Summary / Tree / Skills / Items / Calcs / Config; tree overlay; power report; copy-to-primary helpers (see §3). + +### Gaps + +- Compare state is **not persisted** in the primary build’s `SaveDB`. +- Handoff is manual today (user imports). Programmatic handoff only needs a caller to `ImportBuild` + optionally `viewMode = "COMPARE"` — small glue, not a new subsystem. +- Compare is for **side-by-side analysis**, not for owning the proposal diff (aligned with product notes). + +### What would have to be invented + +- Optional one-liner bridge from the agent “Apply preview” / “Send to Compare” action → `ImportBuild(proposedXml, label)` (+ maybe switch tab). No deep Compare changes required for MVP. + +--- + +## (5) Non-LLM sidecar talking to the Lua app + +### Existing host primitives + +| Primitive | Location | Role | +|-----------|----------|------| +| `LaunchSubScript` | SimpleGraphic host; used in `Launch:DownloadPage`, `CheckForUpdate`, `TreeTab`, `PoBArchivesProvider` | In-process Lua worker; callbacks via `launch:OnSubFinished` / `RegisterSubScript`. **Not** a long-lived external process server. | +| `SpawnProcess` | `Launch:ApplyUpdate`, `UpdateApply.lua`; stubbed in `HeadlessWrapper` | Fire-and-forget OS process (updater). | +| `launch:DownloadPage` | `lcurl` inside a subscript | Outbound HTTPS. | +| `Copy` / `Paste` | Host clipboard | Manual or scripted exchange. | +| `io.open` | Widespread | Read/write build XML and settings on disk. | +| `HeadlessWrapper.lua` | CLI/test entry | Separate process loads PoB headless; **does not attach to a running GUI**. | +| `socket.dll` | `runtime/socket.dll` | Present in the Windows runtime bundle; **no `require("socket")` (or similar) usage anywhere under `src/`**. Latent capability, not an existing API. | + +There is **no** first-party agent bridge, named-pipe protocol, localhost RPC, or message bus in the Lua codebase. + +### Gaps + +- GUI session and sidecar are separate processes with no shared memory API exposed to Lua. +- Subscripts cannot replace a durable sidecar (they run short scripts and return). +- Headless PoB cannot drive the user’s open build; it can only load another copy of XML offline. + +### What would have to be invented + +A bridge design choosing one (or combining) of: + +1. **File mailbox**: sidecar writes commands / reads snapshots under a known directory; Lua polls each `OnFrame` (or on a timer). Uses only `io.*` — lowest invention cost, highest latency/races. +2. **Clipboard protocol**: fragile UX; already available via `Copy`/`Paste`. +3. **Local HTTP**: sidecar listens; Lua uses `lcurl` or a new `LaunchSubScript` loop to POST/GET. Outbound from PoB is proven; inbound server **inside** the GUI process would need sockets (possibly via unused `socket.dll`) or the sidecar is the server and PoB only polls/pushes. +4. **Lua `socket` module**: verify loadability from the shipped runtime, then invent a small JSON line protocol. Currently unused — treat as R&D, not a seam. +5. **Injected Lua module in this fork**: e.g. `Modules/AgentBridge.lua` started from `Main:Init`, owning poll/connect logic — all fork-local (map forbids upstream merge). + +Cursor-side integration (SDK, chat history) is **outside** this PoB codebase and out of scope for this ticket’s primary sources. + +--- + +## Recommended integration shape (research conclusion only) + +Without implementing anything, the lowest-friction architecture consistent with the code is: + +```text +┌─────────────────────────────┐ snapshot XML / share code ┌──────────────────┐ +│ PoB GUI (SimpleGraphic) │ ─────────────────────────────────► │ Non-LLM sidecar │ +│ SaveDB every turn │ │ ↔ Cursor agent │ +│ Apply via Init or tab APIs │ ◄───────────────────────────────── │ proposal XML │ +│ optional CompareTab import │ │ (own UI window) │ +└─────────────────────────────┘ invented IPC └──────────────────┘ +``` + +- **Reuse:** `SaveDB`, Import encode/decode, `CompareTab:ImportBuild`, per-tab Load/undo mutators, `buildFlag` recalc. +- **Invent:** agent UI window (prefer sidecar-owned OS window **or** new non-modal in-app panel), IPC protocol, proposal apply orchestrator + rollback policy, optional AgentBridge Lua module in this fork. + +--- + +## Source index (primary) + +| Topic | Paths / symbols | +|-------|-----------------| +| Host entry | `src/Launch.lua` (`SetWindowTitle`, `LaunchSubScript`, `SpawnProcess`, `DownloadPage`) | +| Main loop / popups | `src/Modules/Main.lua` (`OnFrame`, `OpenPopup`, `ClosePopup`, `popups`) | +| Popup UI | `src/Classes/PopupDialog.lua` | +| Build lifecycle | `src/Modules/Build.lua` (`Init`, `Shutdown`, `SaveDB`, `LoadDB`, `savers`, `viewMode`, `OnFrame`, `buildFlag`) | +| Import/Export | `src/Classes/ImportTab.lua` (generate code, import modes, confirm wipe) | +| Share sites | `src/Modules/BuildSiteTools.lua` | +| Compare | `src/Classes/CompareTab.lua` (`ImportBuild`, `ImportFromCode`, copy helpers); `src/Classes/CompareEntry.lua` | +| Config | `src/Classes/ConfigTab.lua` (`Load`/`Save`, `RestoreUndoState`, `BuildModList`) | +| Tree | `src/Classes/TreeTab.lua`, `src/Classes/PassiveSpec.lua` | +| Items / skills | `src/Classes/ItemsTab.lua`, `src/Classes/SkillsTab.lua` | +| Undo | `src/Classes/UndoHandler.lua` | +| Headless | `src/HeadlessWrapper.lua` | +| Runtime host | `docs/rundown.md` (SimpleGraphic, lcurl, lzip); `runtime/socket.dll` (unused by `src/`) | +| Layout docs | `docs/rundown.md` | + +--- + +## Explicit non-findings + +- No existing “agent”, “Cursor”, or “sidecar bridge” module in `src/`. +- No second-window API in the Lua bindings used by this app. +- No `require("socket")` call sites despite `runtime/socket.dll`. +- Implementation of the agent remains out of scope (per ticket and map issue #1). diff --git a/docs/research/poe1-knowledge-sources-patch-notes.md b/docs/research/poe1-knowledge-sources-patch-notes.md new file mode 100644 index 00000000000..bbe60027e5e --- /dev/null +++ b/docs/research/poe1-knowledge-sources-patch-notes.md @@ -0,0 +1,289 @@ +# Research: PoE1 knowledge sources and patch-notes feeds + +**Ticket:** https://github.com/waltersmike/PathOfBuilding/issues/5 +**Branch:** `research/poe1-knowledge-sources` +**Date:** 2026-07-17 +**Scope:** Facts for Knowledge Pack allowlist/denylist and Patch-Notes Sync design. No scraper or agent implementation. + +**Critical constraint:** Path of Exile 1 only. Treating PoE2 data (including same-named items/skills) as PoE1 truth is a catastrophic failure mode for the planned agent. + +--- + +## Question + +What high-trust PoE1 sources should seed the Knowledge Pack allowlist/denylist, and what machine-readable or scrapable PoE1 patch-notes feeds exist for Patch-Notes Sync? + +--- + +## Short answers + +1. **Allowlist seeds (PoE1):** official `pathofexile.com` (especially the Patch Notes forum + news RSS as a secondary signal), `poewiki.net`, `poe.ninja/poe1/*`, Reddit `r/pathofexile` + `r/PathOfExileBuilds`, and PoB-adjacent community tools that already namespace PoE1 (`poedb.tw`, `maxroll.gg/poe`, `pobb.in`). +2. **Denylist / PoE2 lookalike traps:** `pathofexile2.com`, GGG forum id `2212` (“Early Access Patch Notes”, `0.x` versions), `poe2wiki.net`, `poe2db.tw`, `poe.ninja/poe2/*`, `maxroll.gg/poe2`, `r/PathOfExile2`, and `grindinggear/poe2-skilltree-export`. Same skill/item **names** exist on both wikis with different mechanics. +3. **Patch-Notes Sync:** there is **no** official dedicated patch-notes API or RSS. The durable primary surface is HTML forum listing + thread pages under `https://www.pathofexile.com/forum/view-forum/patch-notes`. Official news RSS exists but is incomplete for hotfixes and can mention PoE2. Discriminate games by **forum section** and **version scheme** (`3.x` PoE1 vs `0.x` PoE2 EA). + +--- + +## 1. Official GGG / Path of Exile 1 + +### 1.1 Site and forums (primary for patch notes) + +| Surface | URL | Role | +| --- | --- | --- | +| PoE1 site | https://www.pathofexile.com/ | Official home; news, forums, trade, shop | +| **PoE1 Patch Notes forum** | https://www.pathofexile.com/forum/view-forum/patch-notes | Canonical chronological list of PoE1 patch/hotfix threads | +| Example PoE1 thread | https://www.pathofexile.com/forum/view-thread/3985151 | `3.28.0k Patch Notes` (verified 2026-07-17) | +| Example league patch | https://www.pathofexile.com/forum/view-thread/3985332 | `Content Update 3.29.0 - Path of Exile: Curse of the Allflame` | +| Developer docs | https://www.pathofexile.com/developer/docs | OAuth API policies; **no patch-notes resource** | +| Data exports | https://www.pathofexile.com/developer/docs/data | Official passive/atlas tree exports only | +| PoE1 passive tree export | https://github.com/grindinggear/skilltree-export | First-party tree JSON | +| PoE1 atlas tree export | https://github.com/grindinggear/atlastree-export | First-party atlas tree (linked from data docs) | +| Trade leagues JSON | https://www.pathofexile.com/api/trade/data/leagues | Official league list (PoE1 trade stack) | + +**Observed (2026-07-17):** the Patch Notes forum listing currently shows PoE1 `3.28.x` / `3.29.0` threads (e.g. `3.28.0k`, Curse of the Allflame `3.29.0`). Thread bodies are ordinary HTML forum posts authored by GGG staff accounts — scrapable, not machine-schema’d. + +### 1.2 Official news RSS (partial, not patch-notes-complete) + +| Feed | URL | Notes | +| --- | --- | --- | +| PoE1 site news RSS | https://www.pathofexile.com/news/rss | Valid RSS 2.0; channel title `Path of Exile News`; category typically `news` | +| PoE2 site news RSS | https://pathofexile2.com/news/rss | Separate host; **denylist for PoE1 sync** | + +**Facts:** + +- Feed is live and returns XML (HTTP 200 probed 2026-07-17). +- Items link to forum news threads (e.g. expansion announcements), not every Patch Notes hotfix. +- Community asked for a dedicated patch-notes RSS category; thread archived without an official feed: https://www.pathofexile.com/forum/view-thread/3554274 +- Cloudflare has historically blocked some RSS clients (`403` challenges reported): https://www.pathofexile.com/forum/view-thread/3648166 +- Sample titles on 2026-07-17 were mostly PoE1 league/marketing, but the same feed can carry PoE2-adjacent headlines (e.g. “Path of Exile 2: Return of the Ancients FAQ”). **Do not treat news RSS as a pure PoE1 patch-notes stream.** + +### 1.3 What GGG does *not* provide for patch notes + +From https://www.pathofexile.com/developer/docs : + +- Supported resources are only those in the API reference and data exports. +- Reverse-engineering undocumented internal endpoints is against Terms of Use §7i. +- Data exports explicitly cover **passive/atlas trees**, not patch notes, skill gems, or item text: https://www.pathofexile.com/developer/docs/data + +**Implication for Patch-Notes Sync:** design around **forum HTML polling** (list → thread), optionally using news RSS as a noisy secondary hint — not as the sole source of truth. + +--- + +## 2. poewiki (PoE1) — high-trust community encyclopedia + +| Surface | URL | Role | +| --- | --- | --- | +| PoE1 wiki | https://www.poewiki.net/ | Canonical community wiki for Path of Exile 1 | +| MediaWiki API | https://www.poewiki.net/w/api.php | Standard MW API (query, parse, etc.) | +| Cargo / data query docs | https://www.poewiki.net/wiki/Path_of_Exile_Wiki:Data_query_API | Structured item/skill/mod queries (Cargo) | +| PoB deep-link precedent | `src/Modules/ItemTools.lua` opens `https://www.poewiki.net/wiki/...` on F1 | First-party PoB integration signal | + +**Bot protection:** HTML and API fetches from this environment received Anubis proof-of-work interstitial pages (“Making sure you're not a bot!”). Design implication: allowlist the domain, but plan for polite human-browser or authenticated access patterns, caching, and rate limits — not naive bulk scrape. + +**Legacy Fandom host:** `pathofexile.fandom.com` is a historical Gamepedia/Fandom surface; not the current community home. Prefer `poewiki.net` only for PoE1 wiki facts. + +--- + +## 3. poe.ninja — economy / builds (PoE1 namespace) + +poe.ninja hosts **both** games with explicit path prefixes: + +| PoE1 (allow) | PoE2 (deny) | +| --- | --- | +| https://poe.ninja/poe1/ | https://poe.ninja/poe2/ | +| https://poe.ninja/poe1/builds | https://poe.ninja/poe2/builds | +| https://poe.ninja/poe1/data | (PoE2 equivalents under `/poe2/`) | + +### Machine-readable PoE1 economy endpoints (verified 2026-07-17) + +Example (HTTP 200, JSON): + +```text +https://poe.ninja/poe1/api/economy/stash/current/currency/overview?league=Standard&type=Currency +``` + +League index-ish JSON: + +```text +https://poe.ninja/poe1/api/data/index-state +``` + +**Breaking change vs older community docs:** legacy URLs such as + +```text +https://poe.ninja/api/data/currencyoverview?league=Standard&type=Currency +``` + +returned **HTTP 404** on 2026-07-17. Community trackers report the migration to `/poe1/api/...` paths (e.g. https://github.com/exilence-ce/exilence-ce/issues/49). Knowledge Pack tooling must prefer the **`/poe1/`** prefix. + +**PoB already namespaces PoE1 PoB share URLs** under `poe.ninja/poe1/pob/...` (`src/Modules/BuildSiteTools.lua`). + +--- + +## 4. Reddit community surfaces + +| Subreddit | PoE game | Seed | +| --- | --- | --- | +| https://www.reddit.com/r/pathofexile/ | PoE1 primary discussion | **Allow** | +| https://www.reddit.com/r/PathOfExileBuilds/ | PoE1 builds | **Allow** | +| https://www.reddit.com/r/pathofexiledev/ | Tooling / API discussion | **Allow** (lower weight for build truth) | +| https://www.reddit.com/r/pathofexile/wiki/tools | Community tool index | **Allow** as discovery, not ground truth | +| https://www.reddit.com/r/PathOfExile2/ | PoE2 | **Deny** | + +**Notes:** + +- Reddit JSON endpoints often return `403` to non-browser clients; design sync/research around official Reddit API or browser-grade access, not anonymous scraping assumptions. +- Community Discord (`discord.gg/pathofexile`) is mixed PoE1+PoE2; treat as low-trust / optional, not allowlist-default for factual claims. + +--- + +## 5. Other PoE1-friendly community tools (secondary allow) + +These are not “official,” but are high-signal and already used by PoB or the PoE1 ecosystem. Prefer paths that **encode PoE1 in the URL**: + +| Tool | PoE1 URL pattern | PoE2 lookalike | +| --- | --- | --- | +| PoEDB | https://poedb.tw/ | https://poe2db.tw/ | +| Maxroll | https://maxroll.gg/poe/ | https://maxroll.gg/poe2/ | +| pobb.in | https://pobb.in/ | (PoB share; confirm content is PoE1 before trusting) | +| FilterBlade / Awakened PoE Trade / etc. | listed on r/pathofexile wiki/tools | N/A — verify game | + +PoB’s own import/export allowlist (`src/Modules/BuildSiteTools.lua`) already distinguishes `maxroll.gg/poe/...` and `poe.ninja/poe1/...`. + +--- + +## 6. PoE2 lookalike traps (denylist seeds) + +### 6.1 Domain / path traps + +| Trap | Why catastrophic | +| --- | --- | +| https://pathofexile2.com/ (+ `/news/rss`) | Separate official PoE2 site and news feed | +| https://www.pathofexile.com/forum/view-forum/2212 | Title: **“Early Access Patch Notes”**; threads are `0.5.x` PoE2 patches (e.g. `0.5.4c`) — same GGG forum chrome as PoE1 | +| https://www.poe2wiki.net/ | Parallel wiki; pages like `/wiki/Spark` exist with **PoE2** gem data | +| https://poe2db.tw/ | Parallel DB site (e.g. `/us/Lightning_Strike`) | +| https://poe.ninja/poe2/ | Explicit PoE2 builds/economy UI | +| https://maxroll.gg/poe2/ | Explicit PoE2 Maxroll namespace | +| https://github.com/grindinggear/poe2-skilltree-export | Official PoE2 tree export (pair of PoE1 `skilltree-export`) | +| `r/PathOfExile2` | PoE2 subreddit | +| Fandom / mirror pages that do not resolve to `poewiki.net` | Easy to confuse with PoE1 wiki | + +### 6.2 Same-name, wrong-game content (examples) + +These names exist as distinct entities in both games; wiki/DB pages are **not interchangeable**: + +| Name | PoE1 | PoE2 | +| --- | --- | --- | +| Spark | https://www.poewiki.net/wiki/Spark | https://www.poe2wiki.net/wiki/Spark | +| Lightning Strike | (poewiki) | https://poe2db.tw/us/Lightning_Strike | +| Ball Lightning / Flame Dash / many legacy skill names | PoE1 gems | Reworked / weapon-gated PoE2 skills | + +**Exclusion rule for implementers:** host + game namespace beats item/skill string equality. Never resolve a bare skill name to the first search hit across games. + +### 6.3 Version-scheme discriminator (patch notes) + +| Game | Typical version strings on GGG forums | Forum | +| --- | --- | --- | +| PoE1 | `3.28.0k`, `3.29.0`, `Content Update 3.x` | `/forum/view-forum/patch-notes` | +| PoE2 EA | `0.5.4c`, `0.5.3 Hotfix N` | `/forum/view-forum/2212` | + +Sync should **hard-fail** (or quarantine) any candidate patch thread whose version matches `^0\.` or whose forum id is `2212`. + +--- + +## 7. Patch-Notes Sync — feed / scrape options ranked + +| Rank | Source | Machine-readable? | PoE1 purity | Completeness for balance changes | Recommendation | +| --- | --- | --- | --- | --- | --- | +| 1 | Forum list + threads: `/forum/view-forum/patch-notes` | HTML only (scrape) | High if scoped to this forum | High (includes hotfixes) | **Primary sync input** | +| 2 | News RSS: `/news/rss` | RSS/XML | Medium (PoE2 mentions possible) | Low–medium (misses many hotfixes) | Secondary “new post” hint only | +| 3 | GGG OAuth / developer API | JSON (other resources) | N/A | **None for patch notes** | Do not use for notes | +| 4 | Unofficial third-party “patch notes APIs” | Varies | Untrusted / often PoE2-focused | Unknown | Not for Knowledge Pack truth | +| 5 | PoE2 forum `2212` or `pathofexile2.com/news/rss` | HTML/RSS | **Wrong game** | N/A | **Deny** | + +### Practical sync shape (design only) + +1. Poll `https://www.pathofexile.com/forum/view-forum/patch-notes` (and paginate if needed). +2. Extract thread ids/titles/dates; filter by title/version heuristics (`3.` / `Content Update`). +3. Fetch each new thread HTML; extract the first staff post body as the note text. +4. Optionally cross-check news RSS for large league announcements — never as the only source. +5. Reject anything from forum `2212`, `pathofexile2.com`, or `0.x` version strings. + +Cloudflare/WAF and forum markup changes are operational risks; there is no first-party schema guarantee. + +--- + +## 8. Suggested Knowledge Pack seed lists + +### Allowlist (domains / path prefixes) + +```text +pathofexile.com # prefer PoE1 paths; still filter patch forum vs 2212 +pathofexile.com/forum/view-forum/patch-notes +pathofexile.com/news/rss # secondary; content-filter required +pathofexile.com/developer/docs +pathofexile.com/api/trade # PoE1 trade API family +github.com/grindinggear/skilltree-export +github.com/grindinggear/atlastree-export +poewiki.net +poe.ninja/poe1/ +reddit.com/r/pathofexile +reddit.com/r/PathOfExileBuilds +reddit.com/r/pathofexiledev +poedb.tw # not poe2db.tw +maxroll.gg/poe/ # not /poe2/ +pobb.in +``` + +### Denylist (domains / path prefixes) + +```text +pathofexile2.com +pathofexile.com/forum/view-forum/2212 +poe2wiki.net +poe2db.tw +poe.ninja/poe2/ +maxroll.gg/poe2/ +github.com/grindinggear/poe2-skilltree-export +reddit.com/r/PathOfExile2 +# Plus any URL whose path or title clearly encodes PoE2 / Early Access 0.x patch notes +``` + +### Content-level exclusion (beyond hosts) + +- Same-named skills/items: require `poewiki.net` / `poe.ninja/poe1` / PoE1 forum evidence before accepting claims. +- Mixed Discord / YouTube / random guides: deny-by-default unless host is allowlisted. + +--- + +## 9. Open risks for later tickets + +- **Anubis on poewiki.net** may block Cargo/API automation; need an access strategy before relying on live wiki sync. +- **News RSS ≠ patch notes**; players already requested a dedicated feed and did not get one. +- **poe.ninja API paths changed**; older community documentation is stale — pin `/poe1/api/...`. +- **Shared GGG forum chrome** makes PoE1 vs PoE2 threads easy to confuse if filtering by “site:pathofexile.com” alone. +- Whether Patch-Notes Sync auto-applies Knowledge Pack edits vs flags for human review remains a product decision (map issue #1). + +--- + +## Sources consulted (primary) + +1. https://www.pathofexile.com/forum/view-forum/patch-notes +2. https://www.pathofexile.com/forum/view-forum/2212 +3. https://www.pathofexile.com/news/rss +4. https://pathofexile2.com/news/rss +5. https://www.pathofexile.com/developer/docs +6. https://www.pathofexile.com/developer/docs/data +7. https://www.pathofexile.com/developer/docs/reference +8. https://www.pathofexile.com/api/trade/data/leagues +9. https://www.pathofexile.com/forum/view-thread/3554274 +10. https://www.pathofexile.com/forum/view-thread/3648166 +11. https://www.poewiki.net/ (incl. Anubis interstitial; Data query API page) +12. https://www.poe2wiki.net/wiki/Spark +13. https://poe.ninja/poe1/ , `/poe1/builds`, `/poe1/api/economy/...`, `/poe1/api/data/index-state` +14. https://poe.ninja/poe2/builds +15. https://github.com/grindinggear/skilltree-export +16. https://github.com/grindinggear/poe2-skilltree-export +17. https://poedb.tw/ , https://poe2db.tw/ +18. https://maxroll.gg/poe , https://maxroll.gg/poe2 +19. https://www.reddit.com/r/pathofexile/wiki/tools +20. In-repo PoB references: `src/Modules/BuildSiteTools.lua`, `src/Modules/ItemTools.lua` diff --git a/knowledge-pack/README.md b/knowledge-pack/README.md new file mode 100644 index 00000000000..b0ce5fe4bbb --- /dev/null +++ b/knowledge-pack/README.md @@ -0,0 +1,26 @@ +# Knowledge Pack + +Versioned PoE1 knowledge layer for the PoB Cursor Agent. Design: [docs/pob-cursor-agent/KNOWLEDGE-PACK.md](../docs/pob-cursor-agent/KNOWLEDGE-PACK.md). + +## Layout + +| Path | Kind | Purpose | +| --- | --- | --- | +| `policy/allowlist.yaml` | Allowlist | Hosts and path prefixes the agent may fetch or cite for PoE1 | +| `policy/denylist.yaml` | Denylist | PoE2 and lookalike traps (hosts, path prefixes) | +| `policy/exclusion.yaml` | Exclusion extras | Forum ids, version patterns for non-URL gates | +| `notes/*.md` | Notes | Mechanic/pitfall notes with YAML frontmatter | +| `meta.yaml` | Meta | `current_patch`, `generation`, pack version | + +## Note frontmatter + +Every note under `notes/` must include: + +```yaml +status: active | possibly_stale | retired +verified_against_patch: "" +``` + +## Runtime enforcement + +Policy **data** lives here. PoE2 Exclusion **evaluators** live in `sidecar/src/policy/` and load these files. diff --git a/knowledge-pack/meta.yaml b/knowledge-pack/meta.yaml new file mode 100644 index 00000000000..676ddc40384 --- /dev/null +++ b/knowledge-pack/meta.yaml @@ -0,0 +1,5 @@ +# Pack-level staleness signals for the agent (see docs/pob-cursor-agent/KNOWLEDGE-PACK.md). +pack_version: "0.1.0" +current_patch: "3.29.0" +generation: 1 +last_sync: null diff --git a/knowledge-pack/notes/poe-ninja-api-paths.md b/knowledge-pack/notes/poe-ninja-api-paths.md new file mode 100644 index 00000000000..4103fba2be9 --- /dev/null +++ b/knowledge-pack/notes/poe-ninja-api-paths.md @@ -0,0 +1,17 @@ +--- +status: active +verified_against_patch: "3.29.0" +--- + +# poe.ninja API paths migrated to /poe1/ + +Legacy URLs such as `https://poe.ninja/api/data/currencyoverview` return 404. +Use the **`/poe1/api/...`** prefix for economy and index endpoints. + +Example: + +```text +https://poe.ninja/poe1/api/economy/stash/current/currency/overview?league=Standard&type=Currency +``` + +Do not use `/poe2/` paths — those are PoE2 namespace. diff --git a/knowledge-pack/policy/allowlist.yaml b/knowledge-pack/policy/allowlist.yaml new file mode 100644 index 00000000000..042a3b7c005 --- /dev/null +++ b/knowledge-pack/policy/allowlist.yaml @@ -0,0 +1,22 @@ +# PoE1 sources the agent may fetch or cite. See docs/research/poe1-knowledge-sources-patch-notes.md. +version: 1 +hosts: + - pathofexile.com + - poewiki.net + - poe.ninja + - reddit.com + - poedb.tw + - maxroll.gg + - pobb.in +path_prefixes: + - pathofexile.com/forum/view-forum/patch-notes + - pathofexile.com/news/rss + - pathofexile.com/developer/docs + - pathofexile.com/api/trade + - github.com/grindinggear/skilltree-export + - github.com/grindinggear/atlastree-export + - poe.ninja/poe1/ + - reddit.com/r/pathofexile + - reddit.com/r/PathOfExileBuilds + - reddit.com/r/pathofexiledev + - maxroll.gg/poe/ diff --git a/knowledge-pack/policy/denylist.yaml b/knowledge-pack/policy/denylist.yaml new file mode 100644 index 00000000000..f220118ea36 --- /dev/null +++ b/knowledge-pack/policy/denylist.yaml @@ -0,0 +1,12 @@ +# PoE2 and lookalike traps — host/namespace beats name equality. +version: 1 +hosts: + - pathofexile2.com + - poe2wiki.net + - poe2db.tw +path_prefixes: + - pathofexile.com/forum/view-forum/2212 + - poe.ninja/poe2/ + - maxroll.gg/poe2/ + - github.com/grindinggear/poe2-skilltree-export + - reddit.com/r/PathOfExile2 diff --git a/knowledge-pack/policy/exclusion.yaml b/knowledge-pack/policy/exclusion.yaml new file mode 100644 index 00000000000..d5c6f180a81 --- /dev/null +++ b/knowledge-pack/policy/exclusion.yaml @@ -0,0 +1,6 @@ +# Non-URL exclusion rules for gates (forum ids, version schemes). +version: 1 +denied_forum_ids: + - "2212" +deny_version_patterns: + - "^0\\." diff --git a/sidecar/.gitignore b/sidecar/.gitignore new file mode 100644 index 00000000000..b9470778764 --- /dev/null +++ b/sidecar/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +dist/ diff --git a/sidecar/README.md b/sidecar/README.md new file mode 100644 index 00000000000..f319d80f563 --- /dev/null +++ b/sidecar/README.md @@ -0,0 +1,13 @@ +# PoB Cursor Agent sidecar + +Non-LLM sidecar process (Node 22.13+). Policy evaluators load `knowledge-pack/policy/` at runtime. + +## Policy tests + +```bash +npm install +npm test +npm run typecheck +``` + +Fail-closed acceptance suite: URL/domain deny, mixed citation refuse, same-name Apply refuse. diff --git a/sidecar/package-lock.json b/sidecar/package-lock.json new file mode 100644 index 00000000000..94fc21e47a6 --- /dev/null +++ b/sidecar/package-lock.json @@ -0,0 +1,1641 @@ +{ + "name": "@pob-cursor-agent/sidecar", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@pob-cursor-agent/sidecar", + "version": "0.1.0", + "devDependencies": { + "@types/node": "^22.13.0", + "typescript": "^5.8.2", + "vitest": "^3.0.9", + "yaml": "^2.7.0" + }, + "engines": { + "node": ">=22.13.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz", + "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz", + "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz", + "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz", + "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz", + "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz", + "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz", + "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz", + "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz", + "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz", + "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz", + "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz", + "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz", + "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz", + "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz", + "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz", + "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz", + "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz", + "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz", + "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz", + "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz", + "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz", + "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz", + "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz", + "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz", + "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz", + "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.2.tgz", + "integrity": "sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.2.tgz", + "integrity": "sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.2.tgz", + "integrity": "sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.2.tgz", + "integrity": "sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.2.tgz", + "integrity": "sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.2.tgz", + "integrity": "sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.2.tgz", + "integrity": "sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.2.tgz", + "integrity": "sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.2.tgz", + "integrity": "sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.2.tgz", + "integrity": "sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.2.tgz", + "integrity": "sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.2.tgz", + "integrity": "sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.2.tgz", + "integrity": "sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.2.tgz", + "integrity": "sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.2.tgz", + "integrity": "sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.2.tgz", + "integrity": "sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.2.tgz", + "integrity": "sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.2.tgz", + "integrity": "sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.2.tgz", + "integrity": "sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.2.tgz", + "integrity": "sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.2.tgz", + "integrity": "sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.2.tgz", + "integrity": "sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.2.tgz", + "integrity": "sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.2.tgz", + "integrity": "sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.2.tgz", + "integrity": "sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.20.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz", + "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@vitest/expect": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.7.tgz", + "integrity": "sha512-E8eBXaKibuvH2pSZErOjdVb5vF4PbKYcrnluBTYxEk1l/VhhwZg1kZQsdtjq+CsF5CFydf2Rdkz7jDHKSisi3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.7", + "@vitest/utils": "3.2.7", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.7.tgz", + "integrity": "sha512-Trr0hYO9CM3Wj6ksWHRhK9IZpIY6wTMO5u/MqXurMxT57sWBaOPEtP3Oq60ihZuh5JsiagKfz95OcxdEP6dBrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.7", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.7.tgz", + "integrity": "sha512-KUHlwqVu0sRlhCdyPdQ/wBoTfRahjUky1MubOmYw9fWfIZy1gNoHpuaaQBPAaMaVYdQYHJLurzj8ECCj5OwTqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.7.tgz", + "integrity": "sha512-sB9y4ovltoQP+WaUPwmSxO9WIg9Ig694Di5PalVPsYHklAdE027mehpWF2SQSVq+k6sFgaivbTjTJwZLSHbedA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "3.2.7", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.7.tgz", + "integrity": "sha512-7C+MwShwtBSI5Buwoyg3s/iY1eHL9PKAf+O1wVh/TdnjXUtkoL/9YQtre90i4MtNXM6edP1wJ2zOBpfCyhIS7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.7", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.7.tgz", + "integrity": "sha512-Q2eQGI6d2L/hBtZ0qNuKcAGid68XK6cv1xsoaIma6PaJhHPoqcEJhYpXZ/5myCMqkNgtP6UKuBhbc0nHKnrkuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^4.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.7.tgz", + "integrity": "sha512-x6BDOd7dyo3PFLY3I9/HJ25X/6OurhGXk2/B9gOZNPF7XDVjeBK4k01lQE5uvDpbuheErh91qYuE1E2OEjK3Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.7", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chai": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", + "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/check-error": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz", + "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", + "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.1", + "@esbuild/android-arm": "0.28.1", + "@esbuild/android-arm64": "0.28.1", + "@esbuild/android-x64": "0.28.1", + "@esbuild/darwin-arm64": "0.28.1", + "@esbuild/darwin-x64": "0.28.1", + "@esbuild/freebsd-arm64": "0.28.1", + "@esbuild/freebsd-x64": "0.28.1", + "@esbuild/linux-arm": "0.28.1", + "@esbuild/linux-arm64": "0.28.1", + "@esbuild/linux-ia32": "0.28.1", + "@esbuild/linux-loong64": "0.28.1", + "@esbuild/linux-mips64el": "0.28.1", + "@esbuild/linux-ppc64": "0.28.1", + "@esbuild/linux-riscv64": "0.28.1", + "@esbuild/linux-s390x": "0.28.1", + "@esbuild/linux-x64": "0.28.1", + "@esbuild/netbsd-arm64": "0.28.1", + "@esbuild/netbsd-x64": "0.28.1", + "@esbuild/openbsd-arm64": "0.28.1", + "@esbuild/openbsd-x64": "0.28.1", + "@esbuild/openharmony-arm64": "0.28.1", + "@esbuild/sunos-x64": "0.28.1", + "@esbuild/win32-arm64": "0.28.1", + "@esbuild/win32-ia32": "0.28.1", + "@esbuild/win32-x64": "0.28.1" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/loupe": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", + "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", + "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.19.tgz", + "integrity": "sha512-Mz8SaolMd8nB+G13WkORcxQKHZ/NE4xXevtkJHVuG+guo9/wYKlIMTKAqGdEmYOXR2ijPjTYNHssizdaVSUNdQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rollup": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.2.tgz", + "integrity": "sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.62.2", + "@rollup/rollup-android-arm64": "4.62.2", + "@rollup/rollup-darwin-arm64": "4.62.2", + "@rollup/rollup-darwin-x64": "4.62.2", + "@rollup/rollup-freebsd-arm64": "4.62.2", + "@rollup/rollup-freebsd-x64": "4.62.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.62.2", + "@rollup/rollup-linux-arm-musleabihf": "4.62.2", + "@rollup/rollup-linux-arm64-gnu": "4.62.2", + "@rollup/rollup-linux-arm64-musl": "4.62.2", + "@rollup/rollup-linux-loong64-gnu": "4.62.2", + "@rollup/rollup-linux-loong64-musl": "4.62.2", + "@rollup/rollup-linux-ppc64-gnu": "4.62.2", + "@rollup/rollup-linux-ppc64-musl": "4.62.2", + "@rollup/rollup-linux-riscv64-gnu": "4.62.2", + "@rollup/rollup-linux-riscv64-musl": "4.62.2", + "@rollup/rollup-linux-s390x-gnu": "4.62.2", + "@rollup/rollup-linux-x64-gnu": "4.62.2", + "@rollup/rollup-linux-x64-musl": "4.62.2", + "@rollup/rollup-openbsd-x64": "4.62.2", + "@rollup/rollup-openharmony-arm64": "4.62.2", + "@rollup/rollup-win32-arm64-msvc": "4.62.2", + "@rollup/rollup-win32-ia32-msvc": "4.62.2", + "@rollup/rollup-win32-x64-gnu": "4.62.2", + "@rollup/rollup-win32-x64-msvc": "4.62.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", + "dev": true, + "license": "MIT" + }, + "node_modules/strip-literal": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz", + "integrity": "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.4.tgz", + "integrity": "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "7.3.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.6.tgz", + "integrity": "sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.27.0 || ^0.28.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.7.tgz", + "integrity": "sha512-KrxIJ62Fd89gfysR4WotlgZABiz2dqFPgqGzX7s+CwsqLFomRH7777ZcrOD6+WVAh7khPQP41A+BKbpcJFrdEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.7", + "@vitest/mocker": "3.2.7", + "@vitest/pretty-format": "^3.2.7", + "@vitest/runner": "3.2.7", + "@vitest/snapshot": "3.2.7", + "@vitest/spy": "3.2.7", + "@vitest/utils": "3.2.7", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.7", + "@vitest/ui": "3.2.7", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yaml": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "dev": true, + "license": "ISC", + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + } + } +} diff --git a/sidecar/package.json b/sidecar/package.json new file mode 100644 index 00000000000..fbba5abbb23 --- /dev/null +++ b/sidecar/package.json @@ -0,0 +1,20 @@ +{ + "name": "@pob-cursor-agent/sidecar", + "version": "0.1.0", + "private": true, + "type": "module", + "engines": { + "node": ">=22.13.0" + }, + "scripts": { + "typecheck": "tsc --noEmit", + "test": "vitest run", + "test:watch": "vitest" + }, + "devDependencies": { + "@types/node": "^22.13.0", + "typescript": "^5.8.2", + "vitest": "^3.0.9", + "yaml": "^2.7.0" + } +} diff --git a/sidecar/src/policy/apply.ts b/sidecar/src/policy/apply.ts new file mode 100644 index 00000000000..a222344f6d3 --- /dev/null +++ b/sidecar/src/policy/apply.ts @@ -0,0 +1,45 @@ +import type { ApplyOp, PolicyOutcome } from "./types.js"; + +export function evaluateApplyOps( + ops: ApplyOp[], + knownPoe1Ids: ReadonlySet, + knownBuildNames: ReadonlySet, +): PolicyOutcome { + const rejectedOps: ApplyOp[] = []; + + for (const op of ops) { + if (op.entityId && !knownPoe1Ids.has(op.entityId)) { + rejectedOps.push(op); + continue; + } + + if (!op.entityId && op.entityName && !knownBuildNames.has(op.entityName)) { + rejectedOps.push(op); + } + } + + if (rejectedOps.length === 0) { + return { kind: "allowed" }; + } + + const first = rejectedOps[0]!; + const name = first.entityName ?? first.entityId ?? "unknown entity"; + + if (first.entityId && !knownPoe1Ids.has(first.entityId)) { + return { + kind: "refused", + reason: `Apply refused: unknown PoE1 entity id "${first.entityId}" (possible PoE2 smuggle)`, + rule: "apply.unknown_id", + path: "apply", + rejectedOps, + }; + } + + return { + kind: "refused", + reason: `Apply refused: same-named entity "${name}" is not present in the loaded build or PoE1 id set (PoE2 collision risk)`, + rule: "apply.same_name", + path: "apply", + rejectedOps, + }; +} diff --git a/sidecar/src/policy/citation.ts b/sidecar/src/policy/citation.ts new file mode 100644 index 00000000000..ddac69ca806 --- /dev/null +++ b/sidecar/src/policy/citation.ts @@ -0,0 +1,73 @@ +import type { PolicyOutcome, PolicyPack } from "./types.js"; +import { classifyUrl } from "./url.js"; + +const URL_PATTERN = + /https?:\/\/[^\s<>"')\]]+/gi; + +export function extractUrls(input: string | string[]): string[] { + if (Array.isArray(input)) { + return input; + } + const matches = input.match(URL_PATTERN) ?? []; + return [...new Set(matches)]; +} + +export function evaluateCitations( + input: string | string[], + policy: PolicyPack, +): PolicyOutcome { + const urls = extractUrls(input); + if (urls.length === 0) { + return { kind: "allowed" }; + } + + const classifications = urls.map((url) => ({ + url, + classification: classifyUrl(url, policy), + })); + + const denied = classifications.filter((entry) => entry.classification === "deny"); + const allowed = classifications.filter((entry) => entry.classification === "allow"); + const neutral = classifications.filter((entry) => entry.classification === "neutral"); + + if (denied.length === 0 && neutral.length === 0) { + return { kind: "allowed" }; + } + + const contaminatedUrls = [ + ...denied.map((entry) => entry.url), + ...neutral.map((entry) => entry.url), + ]; + + if (allowed.length > 0 && denied.length > 0) { + return { + kind: "refused", + reason: + "Mixed PoE1 and PoE2 citations detected — refuse answer and re-ask on allowlisted PoE1 sources only", + rule: "citation.mixed", + path: "research", + action: "re-ask", + contaminatedUrls: denied.map((entry) => entry.url), + }; + } + + if (denied.length > 0) { + return { + kind: "refused", + reason: "Answer cites denylisted PoE2 or lookalike sources", + rule: "citation.denylisted", + path: "research", + action: "re-ask", + contaminatedUrls: denied.map((entry) => entry.url), + }; + } + + return { + kind: "refused", + reason: "Answer cites sources outside the PoE1 allowlist", + rule: "citation.not_allowlisted", + path: "research", + action: "re-ask", + contaminatedUrls: neutral.map((entry) => entry.url), + }; +} diff --git a/sidecar/src/policy/index.ts b/sidecar/src/policy/index.ts new file mode 100644 index 00000000000..d34cf623773 --- /dev/null +++ b/sidecar/src/policy/index.ts @@ -0,0 +1,11 @@ +export type { + ApplyOp, + PolicyAllow, + PolicyOutcome, + PolicyPack, + PolicyRefusal, +} from "./types.js"; +export { loadPolicyPack } from "./load.js"; +export { evaluateUrl, evaluateUrls, classifyUrl, evaluateVersionString } from "./url.js"; +export { evaluateCitations, extractUrls } from "./citation.js"; +export { evaluateApplyOps } from "./apply.js"; diff --git a/sidecar/src/policy/load.ts b/sidecar/src/policy/load.ts new file mode 100644 index 00000000000..b340b358f52 --- /dev/null +++ b/sidecar/src/policy/load.ts @@ -0,0 +1,66 @@ +import fs from "node:fs"; +import path from "node:path"; +import { parse as parseYaml } from "yaml"; +import type { + AllowlistPolicy, + DenylistPolicy, + ExclusionPolicy, + PolicyPack, +} from "./types.js"; + +function readYamlFile(filePath: string): T { + const raw = fs.readFileSync(filePath, "utf8"); + return parseYaml(raw) as T; +} + +export function loadPolicyPack(repoRoot: string): PolicyPack { + const policyDir = path.join(repoRoot, "knowledge-pack", "policy"); + return { + allowlist: readYamlFile( + path.join(policyDir, "allowlist.yaml"), + ), + denylist: readYamlFile( + path.join(policyDir, "denylist.yaml"), + ), + exclusion: readYamlFile( + path.join(policyDir, "exclusion.yaml"), + ), + }; +} + +export function normalizeUrl(raw: string): { host: string; pathKey: string } { + const withScheme = raw.includes("://") ? raw : `https://${raw}`; + const url = new URL(withScheme); + const host = url.hostname.replace(/^www\./, "").toLowerCase(); + const pathKey = `${host}${url.pathname}`.replace(/\/+$/, "").toLowerCase(); + return { host, pathKey }; +} + +export function matchesHost(host: string, candidates: string[]): boolean { + return candidates.some( + (candidate) => host === candidate || host.endsWith(`.${candidate}`), + ); +} + +export function matchesPathPrefix( + pathKey: string, + prefixes: string[], +): boolean { + return prefixes.some((prefix) => { + const normalized = prefix.toLowerCase().replace(/\/+$/, ""); + return pathKey === normalized || pathKey.startsWith(`${normalized}/`); + }); +} + +export function matchesForumId( + rawUrl: string, + deniedForumIds: string[], +): string | null { + for (const forumId of deniedForumIds) { + const pattern = new RegExp(`/forum/view-forum/${forumId}(?:/|$)`, "i"); + if (pattern.test(rawUrl)) { + return forumId; + } + } + return null; +} diff --git a/sidecar/src/policy/types.ts b/sidecar/src/policy/types.ts new file mode 100644 index 00000000000..15873b7b730 --- /dev/null +++ b/sidecar/src/policy/types.ts @@ -0,0 +1,45 @@ +export type PolicyAllow = { kind: "allowed" }; + +export type PolicyRefusal = { + kind: "refused"; + reason: string; + rule: string; + path?: "apply" | "research"; + action?: "re-ask"; + contaminatedUrls?: string[]; + rejectedOps?: ApplyOp[]; +}; + +export type PolicyOutcome = PolicyAllow | PolicyRefusal; + +export type AllowlistPolicy = { + version: number; + hosts: string[]; + path_prefixes: string[]; +}; + +export type DenylistPolicy = { + version: number; + hosts: string[]; + path_prefixes: string[]; +}; + +export type ExclusionPolicy = { + version: number; + denied_forum_ids: string[]; + deny_version_patterns: string[]; +}; + +export type PolicyPack = { + allowlist: AllowlistPolicy; + denylist: DenylistPolicy; + exclusion: ExclusionPolicy; +}; + +export type ApplyOp = { + surface: "skills" | "items" | "tree" | "config"; + entityId?: string; + entityName?: string; +}; + +export type UrlClassification = "allow" | "deny" | "neutral"; diff --git a/sidecar/src/policy/url.ts b/sidecar/src/policy/url.ts new file mode 100644 index 00000000000..93bc8b0dcc0 --- /dev/null +++ b/sidecar/src/policy/url.ts @@ -0,0 +1,97 @@ +import type { PolicyOutcome, PolicyPack, UrlClassification } from "./types.js"; +import { + matchesForumId, + matchesHost, + matchesPathPrefix, + normalizeUrl, +} from "./load.js"; + +export function classifyUrl( + rawUrl: string, + policy: PolicyPack, +): UrlClassification { + const { host, pathKey } = normalizeUrl(rawUrl); + + if (matchesForumId(rawUrl, policy.exclusion.denied_forum_ids)) { + return "deny"; + } + + if ( + matchesHost(host, policy.denylist.hosts) || + matchesPathPrefix(pathKey, policy.denylist.path_prefixes) + ) { + return "deny"; + } + + if ( + matchesHost(host, policy.allowlist.hosts) || + matchesPathPrefix(pathKey, policy.allowlist.path_prefixes) + ) { + return "allow"; + } + + return "neutral"; +} + +export function evaluateUrl(rawUrl: string, policy: PolicyPack): PolicyOutcome { + const classification = classifyUrl(rawUrl, policy); + + if (classification === "deny") { + const forumId = matchesForumId(rawUrl, policy.exclusion.denied_forum_ids); + if (forumId) { + return { + kind: "refused", + reason: `PoE2 Early Access forum ${forumId} is denylisted for PoE1 agent`, + rule: `exclusion.forum.${forumId}`, + }; + } + + const { host, pathKey } = normalizeUrl(rawUrl); + return { + kind: "refused", + reason: `URL is on the PoE2/denylist: ${host}${pathKey.slice(host.length) || "/"}`, + rule: "denylist.url", + }; + } + + if (classification === "neutral") { + const { host } = normalizeUrl(rawUrl); + return { + kind: "refused", + reason: `URL host is not on the PoE1 allowlist: ${host}`, + rule: "allowlist.missing", + }; + } + + return { kind: "allowed" }; +} + +export function evaluateUrls( + urls: string[], + policy: PolicyPack, +): PolicyOutcome { + for (const url of urls) { + const result = evaluateUrl(url, policy); + if (result.kind === "refused") { + return result; + } + } + return { kind: "allowed" }; +} + +export function evaluateVersionString( + version: string, + policy: PolicyPack, +): PolicyOutcome { + for (const pattern of policy.exclusion.deny_version_patterns) { + const regex = new RegExp(pattern); + if (regex.test(version)) { + return { + kind: "refused", + reason: `Version "${version}" matches PoE2 Early Access pattern (${pattern})`, + rule: "exclusion.version_pattern", + }; + } + } + return { kind: "allowed" }; +} diff --git a/sidecar/test/apply.test.ts b/sidecar/test/apply.test.ts new file mode 100644 index 00000000000..b7402284a15 --- /dev/null +++ b/sidecar/test/apply.test.ts @@ -0,0 +1,71 @@ +import { describe, expect, it } from "vitest"; +import { evaluateApplyOps } from "../src/policy/apply.js"; +import type { ApplyOp } from "../src/policy/types.js"; + +const knownPoe1Ids = new Set(["Metadata/Items/Gems/GemDexterity3"]); +const knownBuildNames = new Set(["Spark", "Arc"]); + +describe("same-name Apply refuse (fail-closed)", () => { + it("allows ops referencing entities present in PoB by id and name", () => { + const ops: ApplyOp[] = [ + { + surface: "skills", + entityId: "Metadata/Items/Gems/GemDexterity3", + entityName: "Spark", + }, + ]; + const result = evaluateApplyOps(ops, knownPoe1Ids, knownBuildNames); + expect(result).toEqual({ kind: "allowed" }); + }); + + it("hard-refuses unknown entity id (possible PoE2 smuggle)", () => { + const ops: ApplyOp[] = [ + { + surface: "skills", + entityId: "Metadata/Items/Gems/PoE2OnlyGem", + entityName: "Spark", + }, + ]; + const result = evaluateApplyOps(ops, knownPoe1Ids, knownBuildNames); + expect(result).toMatchObject({ + kind: "refused", + reason: expect.stringMatching(/unknown|PoE2|id/i), + path: "apply", + }); + }); + + it("hard-refuses same-named skill absent from build (Spark collision)", () => { + const ops: ApplyOp[] = [ + { surface: "skills", entityName: "Lightning Strike" }, + ]; + const result = evaluateApplyOps(ops, knownPoe1Ids, knownBuildNames); + expect(result).toMatchObject({ + kind: "refused", + reason: expect.stringMatching(/same-name|Lightning Strike|PoE2/i), + path: "apply", + }); + }); + + it("does not partially apply — entire proposal refused", () => { + const ops: ApplyOp[] = [ + { surface: "skills", entityId: "Metadata/Items/Gems/GemDexterity3", entityName: "Spark" }, + { surface: "skills", entityName: "Ball Lightning" }, + ]; + const result = evaluateApplyOps(ops, knownPoe1Ids, knownBuildNames); + expect(result.kind).toBe("refused"); + if (result.kind === "refused" && result.rejectedOps) { + expect(result.rejectedOps).toHaveLength(1); + expect(result.rejectedOps[0]?.entityName).toBe("Ball Lightning"); + } + }); + + it("refusal is explicit — no silent stripping of bad ops", () => { + const ops: ApplyOp[] = [{ surface: "items", entityName: "Tabula Rasa" }]; + const result = evaluateApplyOps(ops, knownPoe1Ids, knownBuildNames); + expect(result.kind).toBe("refused"); + if (result.kind === "refused") { + expect(result.reason.length).toBeGreaterThan(0); + expect(result.rejectedOps?.length).toBeGreaterThan(0); + } + }); +}); diff --git a/sidecar/test/citation.test.ts b/sidecar/test/citation.test.ts new file mode 100644 index 00000000000..8c17ed381b1 --- /dev/null +++ b/sidecar/test/citation.test.ts @@ -0,0 +1,83 @@ +import { describe, expect, it } from "vitest"; +import { evaluateCitations } from "../src/policy/citation.js"; +import { loadPolicyPack } from "../src/policy/load.js"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const repoRoot = path.resolve( + path.dirname(fileURLToPath(import.meta.url)), + "../..", +); + +describe("mixed citation refuse (fail-closed)", () => { + const policy = loadPolicyPack(repoRoot); + + it("allows answer with only PoE1 citations", () => { + const result = evaluateCitations( + [ + "https://www.poewiki.net/wiki/Spark", + "https://www.pathofexile.com/forum/view-forum/patch-notes", + ], + policy, + ); + expect(result).toEqual({ kind: "allowed" }); + }); + + it("refuses when PoE1 and PoE2 links appear together", () => { + const result = evaluateCitations( + [ + "https://www.poewiki.net/wiki/Spark", + "https://www.poe2wiki.net/wiki/Spark", + ], + policy, + ); + expect(result).toMatchObject({ + kind: "refused", + reason: expect.stringMatching(/mixed/i), + action: "re-ask", + }); + }); + + it("refuses PoE2-only answer explicitly (not silent strip)", () => { + const result = evaluateCitations( + ["https://pathofexile2.com/news/rss"], + policy, + ); + expect(result.kind).toBe("refused"); + if (result.kind === "refused") { + expect(result.reason).toBeTruthy(); + expect(result.contaminatedUrls).toContain( + "https://pathofexile2.com/news/rss", + ); + } + }); + + it("extracts URLs from prose and refuses mixed citations", () => { + const text = ` + Spark works differently in PoE1 (see https://www.poewiki.net/wiki/Spark) + vs PoE2 (see https://www.poe2wiki.net/wiki/Spark for comparison). + `; + const result = evaluateCitations(text, policy); + expect(result).toMatchObject({ + kind: "refused", + reason: expect.stringMatching(/mixed/i), + action: "re-ask", + }); + }); + + it("does not show PoE2 link as allowed when mixed — full refuse", () => { + const result = evaluateCitations( + [ + "https://poe.ninja/poe1/builds", + "https://poe.ninja/poe2/builds", + ], + policy, + ); + expect(result.kind).toBe("refused"); + if (result.kind === "refused") { + expect(result.contaminatedUrls).toEqual( + expect.arrayContaining(["https://poe.ninja/poe2/builds"]), + ); + } + }); +}); diff --git a/sidecar/test/url.test.ts b/sidecar/test/url.test.ts new file mode 100644 index 00000000000..d7d6d1859ca --- /dev/null +++ b/sidecar/test/url.test.ts @@ -0,0 +1,90 @@ +import { describe, expect, it } from "vitest"; +import { evaluateUrl } from "../src/policy/url.js"; +import { loadPolicyPack } from "../src/policy/load.js"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const repoRoot = path.resolve( + path.dirname(fileURLToPath(import.meta.url)), + "../..", +); + +describe("URL/domain deny (fail-closed)", () => { + const policy = loadPolicyPack(repoRoot); + + it("allows PoE1 patch notes forum", () => { + const result = evaluateUrl( + "https://www.pathofexile.com/forum/view-forum/patch-notes", + policy, + ); + expect(result).toEqual({ kind: "allowed" }); + }); + + it("allows poewiki.net", () => { + const result = evaluateUrl("https://www.poewiki.net/wiki/Spark", policy); + expect(result).toEqual({ kind: "allowed" }); + }); + + it("allows poe.ninja/poe1 paths", () => { + const result = evaluateUrl( + "https://poe.ninja/poe1/api/data/index-state", + policy, + ); + expect(result).toEqual({ kind: "allowed" }); + }); + + it("refuses pathofexile2.com explicitly", () => { + const result = evaluateUrl("https://pathofexile2.com/news/rss", policy); + expect(result.kind).toBe("refused"); + if (result.kind === "refused") { + expect(result.reason).toMatch(/PoE2|denylist/i); + expect(result.rule).toBeTruthy(); + } + }); + + it("refuses poe2wiki.net explicitly", () => { + const result = evaluateUrl("https://www.poe2wiki.net/wiki/Spark", policy); + expect(result).toMatchObject({ + kind: "refused", + reason: expect.stringMatching(/PoE2|denylist/i), + }); + }); + + it("refuses poe.ninja/poe2 paths", () => { + const result = evaluateUrl("https://poe.ninja/poe2/builds", policy); + expect(result.kind).toBe("refused"); + }); + + it("refuses GGG forum 2212 (PoE2 Early Access patch notes)", () => { + const result = evaluateUrl( + "https://www.pathofexile.com/forum/view-forum/2212", + policy, + ); + expect(result).toMatchObject({ + kind: "refused", + reason: expect.stringMatching(/2212|PoE2|denylist/i), + }); + }); + + it("refuses maxroll.gg/poe2/", () => { + const result = evaluateUrl("https://maxroll.gg/poe2/builds", policy); + expect(result.kind).toBe("refused"); + }); + + it("refuses non-allowlisted hosts explicitly", () => { + const result = evaluateUrl("https://www.youtube.com/watch?v=example", policy); + expect(result).toMatchObject({ + kind: "refused", + rule: "allowlist.missing", + }); + }); + + it("does not silently strip — denial carries rule id and reason", () => { + const result = evaluateUrl("https://poe2db.tw/us/Lightning_Strike", policy); + expect(result.kind).toBe("refused"); + if (result.kind === "refused") { + expect(result.rule).toBeTruthy(); + expect(result.reason.length).toBeGreaterThan(0); + } + }); +}); diff --git a/sidecar/test/version.test.ts b/sidecar/test/version.test.ts new file mode 100644 index 00000000000..45716b92fe2 --- /dev/null +++ b/sidecar/test/version.test.ts @@ -0,0 +1,28 @@ +import { describe, expect, it } from "vitest"; +import { evaluateVersionString } from "../src/policy/url.js"; +import { loadPolicyPack } from "../src/policy/load.js"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const repoRoot = path.resolve( + path.dirname(fileURLToPath(import.meta.url)), + "../..", +); + +describe("version pattern exclusion", () => { + const policy = loadPolicyPack(repoRoot); + + it("refuses PoE2 Early Access 0.x version strings", () => { + const result = evaluateVersionString("0.5.4c", policy); + expect(result).toMatchObject({ + kind: "refused", + reason: expect.stringMatching(/0\.5\.4c|PoE2/i), + rule: "exclusion.version_pattern", + }); + }); + + it("allows PoE1 3.x version strings", () => { + const result = evaluateVersionString("3.29.0", policy); + expect(result).toEqual({ kind: "allowed" }); + }); +}); diff --git a/sidecar/tsconfig.json b/sidecar/tsconfig.json new file mode 100644 index 00000000000..c23f04c99de --- /dev/null +++ b/sidecar/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "strict": true, + "noUncheckedIndexedAccess": true, + "skipLibCheck": true, + "rootDir": ".", + "outDir": "dist", + "declaration": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["src/**/*.ts", "test/**/*.ts"] +} diff --git a/sidecar/vitest.config.ts b/sidecar/vitest.config.ts new file mode 100644 index 00000000000..8b5840acac7 --- /dev/null +++ b/sidecar/vitest.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["test/**/*.test.ts"], + }, +}); diff --git a/skills-lock.json b/skills-lock.json new file mode 100644 index 00000000000..0dce9cb8650 --- /dev/null +++ b/skills-lock.json @@ -0,0 +1,137 @@ +{ + "version": 1, + "skills": { + "ask-matt": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/ask-matt/SKILL.md", + "computedHash": "5ec84a4c2d9021d99780e5222b2a9f532b53cca8237024eb6cb40ad370c667c5" + }, + "code-review": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/code-review/SKILL.md", + "computedHash": "7c3170d8b1b904418358af0474f82e74c89a2dd66c12c956caefdc0aa81ea09f" + }, + "codebase-design": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/codebase-design/SKILL.md", + "computedHash": "cdc3d683881cbe5ca367c954571e158861176aa9af8adad1b2c5edd9eb72fe05" + }, + "diagnosing-bugs": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/diagnosing-bugs/SKILL.md", + "computedHash": "44417076a76b40331f3816f21e76ea7c9d129e3f73cca2e159b69a56aaa838b2" + }, + "domain-modeling": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/domain-modeling/SKILL.md", + "computedHash": "b747e8b4dcd0f367ef940c290b14f858bf9576ad9961fd6684bacff5688f4a2b" + }, + "grill-me": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/productivity/grill-me/SKILL.md", + "computedHash": "7edd436132b43ea2973710f0c28a9879c9b0910651eb89a991a7e98cb6dbbacb" + }, + "grill-with-docs": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/grill-with-docs/SKILL.md", + "computedHash": "96718e0a89e48c7d76cc9759c7094a82ff34eb89ddc46a30388063fa9812356f" + }, + "grilling": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/productivity/grilling/SKILL.md", + "computedHash": "ac63b22655a6fa4a59468dda21415b773c0aaf5a7e2e27e2259eaabf02a840bc" + }, + "handoff": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/productivity/handoff/SKILL.md", + "computedHash": "7b03a812d5ca10fa8fe69d4cf8a34542684db51f5db0271254b96074e9f3a243" + }, + "implement": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/implement/SKILL.md", + "computedHash": "130cac2d72bfde8cd526bf3b754211e2fe00e84bc4d9f9c56f749b9541a3afad" + }, + "improve-codebase-architecture": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/improve-codebase-architecture/SKILL.md", + "computedHash": "569299a60c8e93880f3b3c1eca55578f58f7e1a4155876edb4cb814da3d6b3ea" + }, + "prototype": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/prototype/SKILL.md", + "computedHash": "aa385376b4bf4b5d69378e606f1cce3d98578ecba02c25273cd4a3e4deaceedb" + }, + "research": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/research/SKILL.md", + "computedHash": "0ce7d7a48175ab30c80240df350a73c216489f775324c8d27c8a10b1b38a49bf" + }, + "resolving-merge-conflicts": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/resolving-merge-conflicts/SKILL.md", + "computedHash": "6a005119c18c477c2122321a380a43d40242bae3cc7027125f13497d90875be2" + }, + "setup-matt-pocock-skills": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/setup-matt-pocock-skills/SKILL.md", + "computedHash": "509889c1c4970485fdd558df50142d4bf28d6f40866923637c32e64689c9fbda" + }, + "tdd": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/tdd/SKILL.md", + "computedHash": "7ac19bf391ceb23266ed5b4f81068201eaa38dcf76d0b59850d49c2c9e426d63" + }, + "teach": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/productivity/teach/SKILL.md", + "computedHash": "0c06821a21052b8a054f04c74223db2f1fb5868bbe0da76674d0892a872b3c56" + }, + "to-spec": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/to-spec/SKILL.md", + "computedHash": "4049d9955a79642ca945e844362d889060787167719bcca0b0cd6f53a95dc9e0" + }, + "to-tickets": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/to-tickets/SKILL.md", + "computedHash": "733df2a51c28078b6b3b8b96ee0c0a70e846163444bf202422d5a1f17bfabea6" + }, + "triage": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/triage/SKILL.md", + "computedHash": "8695824ffe756567f6cf3b758853a094a9c974bf96226cde88b0b6c08099dabc" + }, + "wayfinder": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/engineering/wayfinder/SKILL.md", + "computedHash": "731db837ef3b7e03d6742b296a58ab48c8a0867320d5af269611e21a80059607" + }, + "writing-great-skills": { + "source": "mattpocock/skills", + "sourceType": "github", + "skillPath": "skills/productivity/writing-great-skills/SKILL.md", + "computedHash": "141d1a43348257160910bdb5d828ca6f404fb8bb1dff72ec7c619434381fde6d" + } + } +}