/skill-write accepts research docs as prerequisites but never records them as sources. Skills built from /research output have no provenance chain from upstream docs → research files → skill is silently broken.
Steps to reproduce
Run /research agentskills.io plugins/kyberforge/docs/research/docs/agentskillsio/ — produces topic files + sources.md
Run /skill-write with those research docs as input
Inspect the output — no provenance present
Root cause
Missing skill-write step — skill-write has no step/template instructing the agent to read the research sources.md and create sources.md files for the skill.
The provenance chain mirrors the research skill's output format:
/research writes sources.md to plugin-level docs (e.g. plugins/<plugin>/docs/research/docs/<topic>/)
/skill-author reads those docs and records provenance in the new skill
Changes to skill-author:
assets/templates/references/sources.md — new scaffold template mirroring the research sources.md format exactly (slug → URL, Description, Contributing files, Status). One placeholder entry with FILL IN: values. Comment instructs: fill in after writing skill files, or delete if no research was provided.
assets/templates/SKILL.md — add source_keys as a commented-out optional field under metadata, same treatment as license and compatibility.
SKILL.md (skill-author itself) — new Step 5 in the "Creating a new skill" flow:
If research sources.md is in conversation context: filter to extracted entries, populate references/sources.md with Contributing files pointing to skill files (not research topic files); add source_keys to SKILL.md metadata and to each references/*.md file
If no research sources in context: delete references/sources.md
Current Step 5 (validate) becomes Step 6
Key design decisions:
Trigger: only when research sources.md is present in conversation context — skip silently otherwise
Discovery: conversation context only, no filesystem search
Format: filter out no content extracted entries; Contributing files lists skill files, not research topic files
Attribution happens after skill content is written (Step 5), so the agent knows what files were produced
source_keys in SKILL.md and references/*.md frontmatter links back to slugs in references/sources.md
references/*.md files also get source_keys frontmatter, mirroring research topic file format
skill-audit validation of the chain deferred to issue #8
## Summary
`/skill-write` accepts research docs as prerequisites but never records them as sources. Skills built from `/research` output have no provenance chain from upstream docs → research files → skill is silently broken.
## Steps to reproduce
1. Run `/research agentskills.io plugins/kyberforge/docs/research/docs/agentskillsio/` — produces topic files + `sources.md`
2. Run `/skill-write` with those research docs as input
3. Inspect the output — no provenance present
## Root cause
**Missing skill-write step** — `skill-write` has no step/template instructing the agent to read the research `sources.md` and create sources.md files for the skill.
## Solution
Agreed approach from grill session (2026-06-26):
**Convention: `references/sources.md` + `source_keys` frontmatter**
The provenance chain mirrors the research skill's output format:
- `/research` writes `sources.md` to plugin-level docs (e.g. `plugins/<plugin>/docs/research/docs/<topic>/`)
- `/skill-author` reads those docs and records provenance in the new skill
**Changes to `skill-author`:**
1. **`assets/templates/references/sources.md`** — new scaffold template mirroring the research `sources.md` format exactly (slug → URL, Description, Contributing files, Status). One placeholder entry with `FILL IN:` values. Comment instructs: fill in after writing skill files, or delete if no research was provided.
2. **`assets/templates/SKILL.md`** — add `source_keys` as a commented-out optional field under `metadata`, same treatment as `license` and `compatibility`.
3. **`SKILL.md` (skill-author itself)** — new Step 5 in the "Creating a new skill" flow:
- If research `sources.md` is in conversation context: filter to `extracted` entries, populate `references/sources.md` with `Contributing files` pointing to skill files (not research topic files); add `source_keys` to `SKILL.md` metadata and to each `references/*.md` file
- If no research sources in context: delete `references/sources.md`
- Current Step 5 (validate) becomes Step 6
**Key design decisions:**
- Trigger: only when research `sources.md` is present in conversation context — skip silently otherwise
- Discovery: conversation context only, no filesystem search
- Format: filter out `no content extracted` entries; `Contributing files` lists skill files, not research topic files
- Attribution happens after skill content is written (Step 5), so the agent knows what files were produced
- `source_keys` in SKILL.md and `references/*.md` frontmatter links back to slugs in `references/sources.md`
- `references/*.md` files also get `source_keys` frontmatter, mirroring research topic file format
- `skill-audit` validation of the chain deferred to issue #8
Claude
changed title from bug: skill-write loses source provenance — research output not recorded in SKILL.md frontmatter to bug: skill-author loses source provenance — research output not recorded in skill references2026-06-26 20:37:52 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
/skill-writeaccepts research docs as prerequisites but never records them as sources. Skills built from/researchoutput have no provenance chain from upstream docs → research files → skill is silently broken.Steps to reproduce
/research agentskills.io plugins/kyberforge/docs/research/docs/agentskillsio/— produces topic files +sources.md/skill-writewith those research docs as inputRoot cause
Missing skill-write step —
skill-writehas no step/template instructing the agent to read the researchsources.mdand create sources.md files for the skill.Solution
Agreed approach from grill session (2026-06-26):
Convention:
references/sources.md+source_keysfrontmatterThe provenance chain mirrors the research skill's output format:
/researchwritessources.mdto plugin-level docs (e.g.plugins/<plugin>/docs/research/docs/<topic>/)/skill-authorreads those docs and records provenance in the new skillChanges to
skill-author:assets/templates/references/sources.md— new scaffold template mirroring the researchsources.mdformat exactly (slug → URL, Description, Contributing files, Status). One placeholder entry withFILL IN:values. Comment instructs: fill in after writing skill files, or delete if no research was provided.assets/templates/SKILL.md— addsource_keysas a commented-out optional field undermetadata, same treatment aslicenseandcompatibility.SKILL.md(skill-author itself) — new Step 5 in the "Creating a new skill" flow:sources.mdis in conversation context: filter toextractedentries, populatereferences/sources.mdwithContributing filespointing to skill files (not research topic files); addsource_keystoSKILL.mdmetadata and to eachreferences/*.mdfilereferences/sources.mdKey design decisions:
sources.mdis present in conversation context — skip silently otherwiseno content extractedentries;Contributing fileslists skill files, not research topic filessource_keysin SKILL.md andreferences/*.mdfrontmatter links back to slugs inreferences/sources.mdreferences/*.mdfiles also getsource_keysfrontmatter, mirroring research topic file formatskill-auditvalidation of the chain deferred to issue #8bug: skill-write loses source provenance — research output not recorded in SKILL.md frontmatterto bug: skill-author loses source provenance — research output not recorded in skill references