From ca73a63c720f74a30f7c21440218fca1c2e5edf6 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Fri, 26 Jun 2026 20:42:46 +0000 Subject: [PATCH] feat(skill-author): record research sources as skill provenance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a sources provenance step to the skill creation workflow so the chain from research output to skill content is traceable. Closes #4. - New scaffold template `assets/templates/references/sources.md` mirroring the research skill's sources.md format (slug → URL, description, contributing files, status) - `source_keys` commented-out optional field added to the SKILL.md template, mirroring how research topic files link back to sources - New Step 5 in the creation workflow: populate references/sources.md from research input (attributing contributing skill files) or delete it if no research was provided; add source_keys to SKILL.md and any references/*.md files Co-Authored-By: Claude Sonnet 4.6 --- plugins/kyberforge/skills/skill-author/README.md | 1 + plugins/kyberforge/skills/skill-author/SKILL.md | 16 ++++++++++++++-- .../skill-author/assets/templates/SKILL.md | 7 +++++++ .../assets/templates/references/sources.md | 13 +++++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 plugins/kyberforge/skills/skill-author/assets/templates/references/sources.md diff --git a/plugins/kyberforge/skills/skill-author/README.md b/plugins/kyberforge/skills/skill-author/README.md index 94ac0dd..6b4eeb4 100644 --- a/plugins/kyberforge/skills/skill-author/README.md +++ b/plugins/kyberforge/skills/skill-author/README.md @@ -40,6 +40,7 @@ If the destination is inside a plugin directory, read `references/deployment-mod | `assets/templates/README.md` | Annotated README template for the new skill | | `assets/templates/scripts/README.md` | Placeholder for bundled scripts | | `assets/templates/references/README.md` | Placeholder for reference docs | +| `assets/templates/references/sources.md` | Sources provenance template for new skills | | `assets/templates/assets/README.md` | Placeholder for static assets | | `assets/templates/tests/README.md` | Placeholder for test files | | `tests/new-skill.bats` | Bats test suite for `scripts/new-skill.sh` | diff --git a/plugins/kyberforge/skills/skill-author/SKILL.md b/plugins/kyberforge/skills/skill-author/SKILL.md index fd6db88..9ffbc70 100644 --- a/plugins/kyberforge/skills/skill-author/SKILL.md +++ b/plugins/kyberforge/skills/skill-author/SKILL.md @@ -47,7 +47,7 @@ Extract the skill from a real task you've done — a skill refined from real exe If any are missing, stop and ask the user before proceeding. -**Requires `/skill-audit`** — used in Step 5 for final validation. Both skills ship in the kyberforge plugin and are co-installed. If `/skill-audit` is unavailable, stop and ask the user to install the kyberforge plugin before continuing. +**Requires `/skill-audit`** — used in Step 6 for final validation. Both skills ship in the kyberforge plugin and are co-installed. If `/skill-audit` is unavailable, stop and ask the user to install the kyberforge plugin before continuing. ### Step 1 — Scaffold @@ -180,7 +180,19 @@ not in `scripts/`. See `tests/README.md` for setup instructions. If not needed, delete the placeholder READMEs and their directories. -### Step 5 — Validate and close +### Step 5 — Populate or delete `references/sources.md` + +If a research `sources.md` is present in the conversation context: + +1. Read it and filter to entries with `` `extracted` `` status only. +2. For each entry, determine which skill files it contributed to (SKILL.md and any files in references/ that drew from it). Update `Contributing files` accordingly — list skill files, not research topic files. +3. Write the updated content to `references/sources.md`. +4. Add `source_keys` to the frontmatter of `SKILL.md` (under `metadata`) listing the slugs of sources that informed it. +5. For each file in `references/` that was informed by research sources, add `source_keys` frontmatter (same format as research topic files) listing the relevant slugs. + +If no research `sources.md` is in context, delete `references/sources.md`. + +### Step 6 — Validate and close Run `/skill-audit` on `/`. diff --git a/plugins/kyberforge/skills/skill-author/assets/templates/SKILL.md b/plugins/kyberforge/skills/skill-author/assets/templates/SKILL.md index be7f799..7ce4455 100644 --- a/plugins/kyberforge/skills/skill-author/assets/templates/SKILL.md +++ b/plugins/kyberforge/skills/skill-author/assets/templates/SKILL.md @@ -31,6 +31,13 @@ description: > # Optional. Arbitrary key-value map. Common keys: author, version, category. # No restrictions on keys or values. +# source_keys: +# - source-slug-one +# - source-slug-two +# Optional. Populated when this skill was built from /research output. +# Lists slugs from references/sources.md that informed this file. +# Also add source_keys to each references/*.md file that was informed by research. + # allowed-tools: Bash Read Write # Optional (experimental — support varies by client). # Space-separated list of pre-approved tools. diff --git a/plugins/kyberforge/skills/skill-author/assets/templates/references/sources.md b/plugins/kyberforge/skills/skill-author/assets/templates/references/sources.md new file mode 100644 index 0000000..f0237f5 --- /dev/null +++ b/plugins/kyberforge/skills/skill-author/assets/templates/references/sources.md @@ -0,0 +1,13 @@ +# Sources + + + +## FILL IN: source-slug + +- **URL:** FILL IN +- **Description:** FILL IN +- **Contributing files:** FILL IN: list skill files this source informed (e.g. SKILL.md, references/foo.md) +- **Status:** `extracted`