Update target capabilities

From sampleXbro/agentsmesh · View interactive version

Update target capabilities is an AI agent skill from the GitHub repository sampleXbro/agentsmesh. Use when an AI tool gains support for a feature agentsmesh does not yet expose — or exposes wrongly — and you must raise or correct an existing target's capability for project and/or global scope (rules, additionalRules, commands, agents, skills, mcp, hooks, ignore, permissions). Also use to audit e

How to use this skill

Skill file

Purpose

Update Target Capabilities

Use this skill when an existing target already lives in src/targets/<target>/ and the underlying tool has started supporting a canonical feature that agentsmesh declares as none (or under-declares as partial/embedded) — or declares as native but doesn't actually work (wrong path, wrong key, wrong shape, generate-only with no importer, or a file the tool never reads). The job is to raise or correct that capability — for the right scope(s), with the generate and import sides symmetric — and to prove it.

The meta-rule: verify the claim before you build it. Most invocations of this skill act on a claim — an audit row, a feature-request, a changelog rumor, or a comment in our own code. In real use, a large fraction of those claims are wrong: the surface is fabricated (no such file exists), already-correct (the claim is stale), wrong-scoped (claimed "both scopes" but the tool only reads it globally), or GUI-only (no writable file → partial, not native). Treat every claim as a hypothesis and confirm it against the tool's own primary docs/source before writing a line. Rejecting a bad finding is a successful outcome — ship a guess and you ship a broken capability the matrix now advertises as real.

This is the skill add-agent-target defers to under "changing capability levels for an existing target." Use add-agent-target only for a brand-new target id; use add-global-mode-target only for first-time global wiring of a target that predates global support.

Read .agentsmesh/skills/update-target-capabilities/references/capability-update-checklist.md before editing code. It holds the decision matrices, the format/path-change blast-radius list, and the full touchpoint/test/review list.

When To Use

Do Not Use This Skill For

Non-Negotiable Rules

MUST

MUST NOT

Workflow (audit-driven)

Run superpowers:subagent-driven-development when touching more than one (target, feature).

  1. Audit (deterministic, ~0 tokens): pnpm capabilities:audit --json. It joins descriptors × the capability ledger (src/targets/catalog/capability-ledger.json) and returns four buckets:
  1. Research ONLY STALE + MISSING against the tool's OWN primary docs (the §0 verification rules below still apply — reject fabricated / GUI-only / wrong-scope claims). Update the ledger cell's path, ext, format, fingerprint, source (primary-doc URL), verifiedAt (today), maxAchievable, and verdict: "confirmed". Never re-research a cell whose provenance is fresh. Directory/projection features (commands, agents, skills) and extensionless ignore files are intentionally unseeded — research those by hand and add cells (or leave none).
  2. Fix BROKEN — correct the generator/importer until pnpm test conformance passes for that cell.
  3. Flip GAPS — for each, follow references/capability-update-checklist.md in full (TDD generator + importer, round-trip symmetry, blast-radius). The format is already in the ledger — do not re-research it. A flip to native still requires proven generate and import; the matrix never advertises an unproven native.
  4. Guard: pnpm capabilities:verify (every native/embedded cell has provenance) + pnpm matrix:verify + the full stack.

The ledger is an oracle, not a source of truth: current levels always come from the descriptor (the matrix derives from there); the ledger records where the tool's docs say the file/shape is, so we validate — never generate — against it. Re-run pnpm capabilities:seed after adding or changing a native/embedded feature to refresh fingerprint skeletons.

Fast Execution Playbook

Optimise for zero wasted tokens. Treat each phase as a gate: only enter the next if the previous signals real work.

Phase 0 — Deterministic triage (~0 tokens).

Run pnpm capabilities:audit --json then the full verification stack (pnpm typecheck, pnpm lint, pnpm test, pnpm matrix:verify, pnpm capabilities:verify), capturing the real exit codes — never pipe any of those commands through tail/grep; a non-zero exit masked by the pipeline is the single most common source of false-green audits. If the audit returns 0 gaps, 0 stale, 0 missing, 0 broken and all verification passes, stop — there is nothing to do.

Phase 1 — One pipelined pass per target.

Work only the targets that appear in the gaps/stale/missing/broken buckets or in the current diff. For each such target, execute research → primary-doc verification → ledger update → descriptor fix as one uninterrupted unit of work. Do not split into separate "research wave" then "fix wave" — that forces redundant diff re-reads and doubles context. Assignment rules:

Phase 2 — Single-writer close.

After all per-target fixes are in, merge ledger provenance in one pass, then run catalog:generate → matrix:generate sequentially. Follow with exactly one full-stack run: pnpm test to completion, then pnpm test:e2e — never concurrent with a build, never interleaved. If any command fails, diagnose before retrying; a second blind retry without root-cause analysis wastes more context than it saves.

Required Verification

Before claiming completion, every command must pass:

Run narrower target-scoped tests while iterating, but do not skip the full stack at the end. (Note: a few test runs rewrite tests/e2e/agents-last-run.md as a side effect — git checkout -- that file before committing so it doesn't ride along.)

Completion Standard

The task is not done until all of the following are true:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.