Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
68b42e3
feat(external-skills): preview, trust policy, safety lint, and rollba…
sumithr Oct 3, 2026
e7ba943
fix(external-skills): normalise source identity, scope rollback, and …
sumithr Oct 4, 2026
bdf1611
fix(external-skills): fail closed on dangerous command shapes and sco…
sumithr Oct 4, 2026
9ce4fbd
fix(external-skills): lint joined lines with a length cap, and keep r…
sumithr Oct 4, 2026
0fffc55
fix(external-skills): lint long lines in windows, keep paragraphs to …
sumithr Oct 4, 2026
c8d1f83
fix(external-skills): read instruction rules over the whole collapsed…
sumithr Oct 4, 2026
1196f24
fix(external-skills): roll back single-agent installs only, and join …
sumithr Oct 4, 2026
adcdbe8
fix(external-skills): treat a skill recorded for two agents as shared…
sumithr Oct 4, 2026
bbb42f2
test(external-skills): refuse a restore when a newer version lands be…
sumithr Oct 4, 2026
4065138
feat(external-skills): ask the user through MCP elicitation before an…
sumithr Oct 4, 2026
1efecec
fix(external-skills): lint every payload byte, close port and link es…
sumithr Oct 4, 2026
c11d2b8
fix(external-skills): block over-cap files, split lines like a shell,…
sumithr Oct 4, 2026
234bd82
fix(external-skills): keep the content digest platform independent, r…
sumithr Oct 5, 2026
97b39bd
fix(external-skills): skip the executable check for records written o…
sumithr Oct 5, 2026
5e24c81
fix(external-skills): create nothing before the user's yes on an empt…
sumithr Oct 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ All take an optional `[path]` and `--json`; `report` renders honest not-availabl

## When sumo-qa doesn't fit

If your QA intent has no native fit (Playwright E2E, accessibility audits, k6 load testing, type checking), sumo-qa searches for an external skill through its MCP server, offers a `[y/N]` install gate, checks out the source at a resolved commit itself and installs that checkout through a pinned Skills CLI version, records the installed content's digest, then loads the installed `SKILL.md` back into the conversation once that digest still matches.
If your QA intent has no native fit (Playwright E2E, accessibility audits, k6 load testing, type checking), sumo-qa searches for an external skill through its MCP server, offers a `[y/N]` install gate, previews the exact payload (files, digest, source trust, safety-lint findings) for a second `[y/N]`, has the MCP server ask you directly through MCP elicitation before it writes anything (a host that cannot show that prompt is refused, never approved by the agent), checks out the source at a resolved commit itself and installs that checkout through a pinned Skills CLI version, records the approved content's digest, then loads the installed `SKILL.md` back into the conversation, marked untrusted, once that digest still matches. The safety lint matches known dangerous shapes deterministically; it is not a malware detector and a skill can evade it, so the preview, the approval and the untrusted handoff are the controls that matter. A rollback restores the previous approved version or removes a first install.

The host never runs `npx` directly; four MCP tools own the lifecycle (search → `[y/N]` gate → install → load), and search returns the Skills CLI output verbatim, so there's no parser to drift. Node.js is required; if `npx` is missing the tool returns an actionable error rather than elevating. Any machine-level install the external skill suggests is translated to sumo-qa's repo-pinned, CI-reproducible standard, and sumo-qa keeps its confirmation gates, test evidence, and risk-to-test mapping.
The host never runs `npx` directly; MCP tools own the lifecycle (search → `[y/N]` gate → preview → `[y/N]` payload approval → install → load, plus rollback), and search returns the Skills CLI output verbatim, so there's no parser to drift. Node.js is required; if `npx` is missing the tool returns an actionable error rather than elevating. Any machine-level install the external skill suggests is translated to sumo-qa's repo-pinned, CI-reproducible standard, and sumo-qa keeps its confirmation gates, test evidence, and risk-to-test mapping.

## Support

Expand Down
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ the skill.

The tools are all thin. Skill tools (one per SKILL.md) and knowledge loaders (`sumo_qa_load_*`)
return markdown catalogues as text. A read-only progressive-loading pair (`sumo_qa_list_skill_manifests`, `sumo_qa_load_skill_context`) indexes each SKILL.md's sections/modules and serves a single slice (manifest / section / module / full, or a `bundle` of a routed skill's body, modules, classification entries, standards and rules in one call) as a JSON string so a host can load just the routing summary or one section rather than the whole body; `mode="full"` returns the same bytes as the skill tool, except that a body over the host's per-response token cap is served through both paths as a compact `oversize` pointer to the manifest/section/module slices instead of the over-cap body the host would refuse. `sumo_qa_list_skill_manifests` is a *compact* all-skill routing aid by default (`detail="compact"`: per-skill metadata only, no section/module arrays); the full all-skill index is an explicit `detail="full_index"` opt-in, while the per-skill manifest/section/module/full slices of `sumo_qa_load_skill_context` are the progressive-loading ladder a host climbs once it has chosen a skill. Each partial slice carries a `content_hash` (sha256 of the returned text) and `estimated_tokens`; a caller can pass `known_hash` to get a derived `changed` flag (body omitted when unchanged). This change-detection is stateless; there is no server-side session cache, because MCP session identity is not reliable across the supported hosts, so re-hashing the live slice per call is preferred over a cache keyed on an unstable identity. The same index is additionally exposed as additive MCP resources/resource-templates (`sumoqa://skills`, `sumoqa://skills/{name}/manifest|sections/{id}|modules/{id}|full`) whose bodies are byte-for-byte the loader output, for hosts that surface resources; the model-callable tools stay the canonical, unchanged path. A capabilities-discovery tool (`sumo_qa_capabilities`) returns a compact, typed map of the core QA workflows, plus the active tool profile and how to enable the capability groups it leaves out. Repo-map tools build and consume the QA-native `.sumo-qa/repo-map.json` artifact, each returning a compact typed summary rather than the full map. A risk-to-test ledger formatter (`sumo_qa_format_risk_ledger`) validates host-supplied risk rows and renders the structured verdict appendix: no inference, file/format plumbing only. A context-bundle formatter (`sumo_qa_format_context_bundle`) validates a host-neutral issue/PR context bundle and renders its brief plus its freshness/conflict signals (an optional review/planning *input*, never a network call or GitHub dependency). A QA-readiness-scorecard composer (`sumo_qa_format_qa_scorecard`) reuses those two artifacts plus optional coverage/mutation signals to *derive* a readiness recommendation (ready / ready_with_accepted_residuals / blocked / insufficient_evidence). It is an evidence summary, not a predictive quality score; it invents no numeric score and refuses a ready state while a risk is an uncovered blocker or evidence is stale. A QA-artifact exporter (`sumo_qa_export_test_cases`) deterministically renders host-supplied, already-structured test cases into versioned JSON, a markdown table, or (for flat outlines) CSV. Markdown stays the default human-facing output, exports are side-effect free, and there is no vendor lock-in or new mandatory dependency. A local QA-report composer (`sumo_qa_generate_qa_report`, CLI mirror `sumo-qa report`) projects the persisted `.sumo-qa` artifacts into one self-contained static HTML page with honest not-available states and a readiness verdict derived by the `QaScorecard` engine (the single source of truth, so the report and the scorecard can never disagree): no inference, no network, the HTML body only lands on disk via `write_to`. Test-data tools read/write the local
known-good catalogue under `knowledge/test_data/`. An ingestion tool materialises runtime knowledge packs into a user-writable location. External-skill lifecycle tools search, install, locate, and load external skills through one pinned Skills CLI version while preserving the skill-level confirmation gate; sumo-qa clones the source at a resolved commit and hands the CLI only that checkout, and each install is recorded with a content digest that is re-verified before a skill is loaded. The search tool returns ANSI-stripped CLI output verbatim (no structured parsing) so Skills CLI format drift doesn't break the flow.
known-good catalogue under `knowledge/test_data/`. An ingestion tool materialises runtime knowledge packs into a user-writable location. External-skill lifecycle tools search, preview, install, locate, load, and roll back external skills through one pinned Skills CLI version while preserving the skill-level confirmation gates; sumo-qa clones the source at a resolved commit and hands the CLI only that checkout, an install must match the digest of the payload the user approved in a preview and pass a deterministic safety lint and source trust policy, the server asks the user directly through MCP elicitation before an install, restore or removal writes anything (a host without elicitation is refused, never approved by the agent), and each install is recorded with that digest, re-verified before a skill is loaded and handed over as untrusted content. The search tool returns ANSI-stripped CLI output verbatim (no structured parsing) so Skills CLI format drift doesn't break the flow.

See [TOOLS.md](TOOLS.md) for the full list.

Expand Down
34 changes: 32 additions & 2 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ All optional. Defaults work out of the box after `pip install sumo-qa && sumo-qa
| `QA_TEST_DATA_PATH` | `knowledge/test_data` (cwd) | Override the known-good test data catalogue. **No samples ship in the wheel**, the catalogue is empty on a fresh install; populate it per your team's domains. |
| `QA_KNOWLEDGE_PATH` | bundled `_data/knowledge` / repo `knowledge` | Override the canonical knowledge catalogues (classifications, approaches, principles, techniques) |
| `SUMO_QA_DEBUG_DIR` | unset | Directory to capture per-tool-call args + output as JSON for debugging / grading |
| `SUMO_QA_MCP_PROFILE` | the saved profile, else `full` | MCP tool profile: `full` (every tool) or `core` (the native QA workflow tools; no specialist tools or external-skill search/check/install/execute tools). Overrides the profile `sumo-qa-install --profile` saves. See [Tool profiles](#tool-profiles) |
| `SUMO_QA_MCP_PROFILE` | the saved profile, else `full` | MCP tool profile: `full` (every tool) or `core` (the native QA workflow tools; no specialist tools or external-skill search/preview/check/install/rollback/execute tools). Overrides the profile `sumo-qa-install --profile` saves. See [Tool profiles](#tool-profiles) |

These env vars are the lowest-level override and always win. For a no-clone way
to add custom content, see [Adding custom knowledge without cloning the
Expand Down Expand Up @@ -58,7 +58,7 @@ falls back to the saved file; with no saved file the profile is `full`.
`sumo_qa_export_test_cases`, `sumo_qa_ingest_knowledge_pack`) and the
external-skill tools. The external-skill workflow's tool,
`sumo_qa_suggesting_external_skill`, stays in the tool list, but the
search, check, install and execute tools it drives are absent, so it cannot
search, preview, check, install, rollback and execute tools it drives are absent, so it cannot
run under `core`: calling it, or loading it through
`sumo_qa_load_skill_context` or the skill resources, returns one activation
path instead of the skill:
Expand Down Expand Up @@ -252,6 +252,36 @@ and runs a converter skill to turn the source into markdown (the converter owns
any URL fetch), then re-ingests the result with an explicit `--type` /
`content_type`. Don't transcribe the source by hand.

## External-skill trust policy

An external skill install needs an explicit elevated-trust decision from the
user unless its source is trusted AND pinned to a full commit SHA (`#<sha>`).
The default source, `vercel-labs/skills`, is trusted; add or deny others in
`~/.sumo-qa/external-skills.policy.json`:

```json
{
"trusted_sources": ["acme/skills", "https://git.example.com/team/skills.git"],
"denied_sources": ["untrusted-org/skills"]
}
```

Entries use the install-source forms (`owner/repo` or a git URL) without a
`#ref` or `@skill` (an entry with one fails closed). An entry matches a source
when both name the same host and path once the scheme, user, the scheme's
default port (443 for https, 80 for http, 22 for ssh, 9418 for git), trailing
`/` and `.git` are dropped and the host is lowercased. On GitHub, `github.com`,
`www.github.com` and `ssh.github.com` on any port are one host and the owner
and repository are case-insensitive. On any other host any other port and a `www.`
prefix are kept, since either can name another server: trusting
`git.example.com` does not cover `git.example.com:8443` or
`www.git.example.com`, and the path keeps its case. A denied source is rejected by preview, install, and a
rollback that would restore it. The file is read only from your home
directory: a project cannot ship one that raises trust in its own sources. An
unreadable or invalid file fails closed. See
[TOOLS.md](TOOLS.md#external-skill-lifecycle) for the preview, safety lint, and
rollback it feeds.

## Review feedback memory

A team can promote a recurring review lesson, *"we always miss timezone
Expand Down
Loading
Loading