Manual verification steps for the skill-discovery sample.
- Node.js ≥ 20 installed
- Dependencies installed:
npm installfrom repo root - SDK built:
npm run buildfrom repo root
npx tsx samples/skill-discovery/index.tsExpected:
- Output starts with
═══heading: "Skill Discovery Demo" - Step 1 shows 3 loaded skills with confidence icons (🔴, 🟡, 🟢)
- Step 2 confirms 3 skills registered
- Step 3 shows match results for 4 different tasks
- Step 4 shows a new "Error Handling Patterns" skill discovered
- Step 5 shows the new skill matching an error-related task
- Step 6 shows the confidence lifecycle explanation
- Output ends with "Demo Complete" and cleanup message
- No errors or stack traces
After the demo runs:
# The temp directory printed in the output should not exist
# Check the path from "Cleaned up temporary directory: ..."Expected:
- Temp directory is removed after demo completes
- No leftover
.squad/skills/directories in temp
npx vitest run samples/skill-discovery/tests/skill-discovery.test.tsExpected:
- All tests pass (0 failures)
- Test suites: parseFrontmatter, parseSkillFile, loadSkillsFromDirectory, SkillRegistry, matchSkills, confidence lifecycle, end-to-end
- No temp files left behind (afterEach cleanup)
During demo output, verify:
- "Add TypeScript generics to the data layer" → TypeScript Patterns matches (triggers: typescript, generics)
- "Design a REST API endpoint" → API Design matches (triggers: api, rest, endpoint)
- "Write vitest coverage tests" → Testing Best Practices matches (triggers: vitest, coverage, test)
- Cross-domain task matches multiple skills with lead role getting role affinity boost
In a Node.js REPL or script:
import { loadSkillsFromDirectory } from '@bradygaster/squad-sdk/skills';
const skills = loadSkillsFromDirectory('/nonexistent/path');
console.log(skills); // Should be []Expected:
- Returns empty array, no error thrown