business-ops
Business operations: strategy, technology, growth, competitive intelligence, support, finance, HR, legal, operations, sales, productivity, product management.
Analyze agent/skill reference depth and generate missing domain-specific reference files.
$ npx -y skills add notque/vexjoy-agent --skill reference-enrichment --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/reference-enrichmentContext preview
The summary Claude sees to decide when to auto-load this skill.
Analyze agent/skill reference depth and generate missing domain-specific reference files.
name: reference-enrichment
description: "Analyze agent/skill reference depth and generate missing domain-specific reference files."
user-invocable: true
argument-hint: "<agent-or-skill-name> [--decompose]"
allowed-tools:
- Read
- Write
- Edit
- Bash
- Grep
- Glob
- Agent
routing:
triggers:
- "enrich references"
- "improve reference depth"
- "generate references"
- "add reference files"
- "reference enrichment"
- "decompose skill"
- "extract references"
- "slim down skill"
- "skill too long"
- "move content to references"
category: meta-tooling
complexity: medium
pairs_with:
- verification-before-completionEnrich an agent or skill's reference files from Level 0-2 to Level 3+, or decompose bloated body files by extracting domain content into references. Enrichment adds knowledge; decomposition moves knowledge to where progressive disclosure says it belongs. The enrichment pipeline runs five phases with explicit gates because each phase feeds the next — starting Phase 3 without Phase 2 research produces filler, not depth.
**Goal**: Extract domain-heavy content from a bloated SKILL.md or agent body into reference files.
**When to use**: When a component's body exceeds ~500 lines and contains catalogs, code examples, specification tables, or agent rosters that should live in `references/` per PHILOSOPHY.md's progressive disclosure architecture.
**Trigger**: Invoke with `--decompose` argument, or when the request matches "decompose", "extract references", "slim down", "too long", or "move to references".
1. Run the detection script to identify extractable content:
python3 scripts/detect-decomposition-targets.py --skill {name}(or `--agent {name}`)
2. If no extractable blocks found, report "nothing to decompose" and stop
3. Save a snapshot of the original file: `cp {path} /tmp/decomp-before-{name}.md`
4. For each extractable block identified by the detection script: a. Read the content block and its surrounding context b. Determine the best reference filename:
c. Create or update the reference file following `references/reference-file-template.md` d. Remove the content from the body (MOVE, not copy) e. Add a loading table entry in the body that maps task signals to the new reference file
5. Ensure the body retains:
6. Validate the decomposition:
python3 scripts/validate-decomposition.py \
--before /tmp/decomp-before-{name}.md \
--after {path} \
--refs {refs_dir}/7. If validation FAILS: restore from snapshot and report the failure. Do not proceed.
8. If validation PASSES: run structural checks:
python3 scripts/validate-references.py --skill {name} # or --agent {name}
python3 scripts/audit-reference-depth.py --skill {name} --verbose # or --agent {name}**Gate**: Validation passes. Body line count reduced. All extracted content exists in reference files. Loading table entries exist for all new references.
---
**Goal**: Identify which sub-domains are missing reference coverage.
1. Run the gap analyzer: `python3 skills/meta/reference-enrichment/scripts/gap-analyzer.py --agent {name}` (or `--skill {name}`) 2. Read the component's .md file to understand its stated purpose, triggers, and domain claims 3. Read any existing reference files to map current coverage 4. Compare stated domains against covered domains to identify gaps
Output format:
DISCOVER: {name}
Current level: {0-3}
Existing references: [{filenames}]
Stated domains: [{domains from description and body}]
Gaps: [{sub-domains with no reference coverage}]
Recommended files: [{filename} → {why}]**Gate**: Gap report exists with at least one identified gap. If no gaps exist (Level 3 already), report and stop — over-generating creates noise, not signal.
---
**Goal**: Compile concrete, domain-specific content for each gap.
For each identified gap: 1. Read existing Level 3 reference files in this repo as exemplars — golang-general-engineer's references/ is the benchmark: version-specific patterns, grep commands, error-fix mappings 2. Identify: version-specific patterns (what changed in version X.Y), common failure modes with detection commands (`grep -rn "pattern" --include="*.ext"`), error-fix mappings (error message → root cause → fix), project-specific conventions visible in the codebase
Dispatch up to 5 parallel research agents — one per sub-domain gap — because sequential research bottlenecks the pipeline. Each agent receives: the sub-domain, the component's .md as context, and a path to an exemplar Level 3 reference file.
**Gate**: Each gap has at least 10 concrete findings (version numbers, function names, grep patterns, code examples). Generic advice ("follow best practices") does not count toward this gate.
---
**Goal**: Assemble research into structured reference files.
For each gap, create one reference file following `references/reference-file-template.md`:
load and easier to update as language versions change
detection commands, error-fix mappings where applicable
Essays and writing behind this toolkit live at vexjoy.com. VexJoy Agent connects plain-English requests to specialist agents, skills, and workflows. /do selects the knowledge and tools needed for your task.
Repo: notque/vexjoy-agent
Business operations: strategy, technology, growth, competitive intelligence, support, finance, HR, legal, operations, sales, productivity, product management.
Design workflows — UX copy, design systems, design critique, accessibility review, design handoff, user research synthesis. Use when writing UI copy, reviewing…
Marketing: SEO audits, campaign planning, content strategy, email sequences, competitive analysis, brand review, performance reporting.