impl-api-contracts
Generate the API_CONTRACTS manifest — an endpoint table by module (method, path, auth, request/response shapes, cache keys, invalidation). Optional tool a developer may use anytime when implementing endpoints or data fetching; not required before code (TASK-230, 2026-09-16 human decision). Vendored Spine skill; see src/manifest-policy.js.
- License 许可
- MIT
- 最近更新
- 2026-10-10
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- impl-api-contracts
- description
- Generate the API_CONTRACTS manifest — an endpoint table by module (method, path, auth, request/response shapes, cache keys, invalidation). Optional tool a developer may use anytime when implementing endpoints or data fetching; not required before code (TASK-230, 2026-09-16 human decision). Vendored Spine skill; see src/manifest-policy.js.
03 SKILL.md 正文
Sources & manifest status (hivemind)
Vendored from implementation-engine. In hivemind the "context" this skill reads is the project's
knowledge surface — PROJECT.md, the wisearcher brain graph (kb_search/kb_answer, or the local
knowledge/ KB when the brain is offline), and the ticket's scope + acceptance criteria. Where the
body below refers to context/<file>.md, read the equivalent from that surface. Output goes to
implementation/API_CONTRACTS.md.
Status (TASK-230, 2026-09-16 human decision): optional tool, not a gate. No verification_tier
requires this manifest before code — see src/manifest-policy.js (requiresManifest always returns
false). Generate/update it whenever it helps, in whatever order the Developer chooses; the
reviewer does NOT treat a missing manifest as a finding. Preserve epistemic markers
([EXPLICIT]/[INFERRED:strong|weak]/[ASSUMED]) and respect source tiers.
impl-api-contracts
Generates implementation/API_CONTRACTS.md — an inferred REST endpoint table per module, derived from the KB scope and integration context.
Read first
Read these files from context/ (and only from context/):
context/integration.md— external integrations, data flows, API communication patternscontext/technical.md— API protocol decisions, auth mechanism, caching strategycontext/scope.md— which features/modules exist and what data they operate oncontext/estimation.md— work blocks to ensure all modules are coveredcontext/gaps.md— open gaps that block endpoint definition
Output: implementation/API_CONTRACTS.md
Organize by module (one section per scope item S-##). For each inferred endpoint:
## <Module Name> (S-##)
| Method | Path | Description | Auth | Request | Response | Cache key | Notes |
|--------|------|-------------|------|---------|----------|-----------|-------|
| GET | /campaigns | List campaigns with filters | Bearer | `?status=&brand=` | `Campaign[]` | `["campaigns", filters]` | |
| POST | /campaigns/:id/apply | Submit campaign application | Bearer | `{ proposal }` | `Application` | — | invalidates campaigns list |
Endpoint field rules
- Method + Path: infer from feature semantics. If unknown, write
[MISSING_INFO] - Auth: "Bearer" if the feature requires authentication; "Public" if not;
[MISSING_INFO]if unknown - Request: describe shape in compact TypeScript-like notation or plain English; use
[MISSING_INFO]if blocked by a gap - Response: same as request
- Cache key: suggest a query key using array notation (e.g.,
["campaigns", id]); use—for mutations - Notes: invalidation rules, polling interval, or link to a gap (G-##)
Third-party integrations
After the module table, add a section for non-REST integrations (push notifications, analytics, crash reporting) describing the integration pattern and any open gaps.
Rules
- Do not invent endpoint shapes. Infer from feature semantics and mark as
[INFERRED]. - If an endpoint is entirely unknown, write a placeholder row with
[MISSING_INFO]and cite the gap. - Do not assume a specific HTTP client library — say "HTTP client" not "Axios" unless quoting an ADR decision.
- Reference gaps (G-##, GT-##) from
context/gaps.mdwherever they block an endpoint definition.
After writing
Report: total endpoints inferred, modules covered, number of [MISSING_INFO] entries, and which gaps most affect completeness.
04 同仓库更多 Skills
unknown-skill
A demo skill with no license signal at all, used to exercise the "unknown" classification branch of the human license gate (TASK-135).
spoofed-license-skill
A demo skill used to test TASK-150's SPDX-header-vs-LICENSE-file conflict surfacing.
permissive-skill
A demo skill used to test assimilation of a permissively-licensed third party skill.
malicious-skill
A fixture skill deliberately carrying risky content patterns, used only to exercise src/skill-scan.js (TASK-122). Never assimilated for real.
copyleft-skill
A demo skill used to test the human license gate for a copyleft third party skill.
watch
Watch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video. (assimilated for Hivemind)