[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CNDJ9EN804E4JW15FCKDBR":3,"skill-same:01M6CNDJ9EN804E4JW15FCKDBR":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":24,"linkOnly":25,"markdownContent":26,"markdownBody":27,"frontMatter":28,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":37,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M6CNDJ9EN804E4JW15FCKDBR","squad-conventions",null,"Core conventions and patterns used in the Squad codebase","londospark\u002FSquadTUI","londospark","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F88495?v=4","01M6CNDCKAN4MX8GZQA30RW2MN","Londo Spark","01M6CNDCQEJCK550VP6ZGXGD6R",7,"MIT","https:\u002F\u002Fgithub.com\u002Flondospark\u002FSquadTUI\u002Fblob\u002Fmain\u002F.ai-team-templates\u002Fskills\u002Fsquad-conventions\u002FSKILL.md",[],[19,20,21,22,23],"squad conventions","squad","core","project-conventions","patterns","2026-11-10 10:12:30",false,"---\nname: \"squad-conventions\"\ndescription: \"Core conventions and patterns used in the Squad codebase\"\ndomain: \"project-conventions\"\nconfidence: \"high\"\nsource: \"manual\"\n---\n\n## Context\nThese conventions apply to all work on the Squad CLI tool (`create-squad`). Squad is a zero-dependency Node.js package that adds AI agent teams to any project. Understanding these patterns is essential before modifying any Squad source code.\n\n## Patterns\n\n### Zero Dependencies\nSquad has zero runtime dependencies. Everything uses Node.js built-ins (`fs`, `path`, `os`, `child_process`). Do not add packages to `dependencies` in `package.json`. This is a hard constraint, not a preference.\n\n### Node.js Built-in Test Runner\nTests use `node:test` and `node:assert\u002Fstrict` — no test frameworks. Run with `npm test`. Test files live in `test\u002F`. The test command is `node --test test\u002F`.\n\n### Error Handling — `fatal()` Pattern\nAll user-facing errors use the `fatal(msg)` function which prints a red `✗` prefix and exits with code 1. Never throw unhandled exceptions or print raw stack traces. The global `uncaughtException` handler calls `fatal()` as a safety net.\n\n### ANSI Color Constants\nColors are defined as constants at the top of `index.js`: `GREEN`, `RED`, `DIM`, `BOLD`, `RESET`. Use these constants — do not inline ANSI escape codes.\n\n### File Structure\n- `.ai-team\u002F` — Team state (user-owned, never overwritten by upgrades)\n- `.ai-team-templates\u002F` — Template files copied from `templates\u002F` (Squad-owned, overwritten on upgrade)\n- `.github\u002Fagents\u002Fsquad.agent.md` — Coordinator prompt (Squad-owned, overwritten on upgrade)\n- `templates\u002F` — Source templates shipped with the npm package\n- `.ai-team\u002Fskills\u002F` — Team skills in SKILL.md format (user-owned)\n- `.ai-team\u002Fdecisions\u002Finbox\u002F` — Drop-box for parallel decision writes\n\n### Windows Compatibility\nAlways use `path.join()` for file paths — never hardcode `\u002F` or `\\` separators. Squad must work on Windows, macOS, and Linux. All tests must pass on all platforms.\n\n### Init Idempotency\nThe init flow uses a skip-if-exists pattern: if a file or directory already exists, skip it and report \"already exists.\" Never overwrite user state during init. The upgrade flow overwrites only Squad-owned files.\n\n### Copy Pattern\n`copyRecursive(src, target)` handles both files and directories. It creates parent directories with `{ recursive: true }` and uses `fs.copyFileSync` for files.\n\n## Examples\n\n```javascript\n\u002F\u002F Error handling\nfunction fatal(msg) {\n  console.error(`${RED}✗${RESET} ${msg}`);\n  process.exit(1);\n}\n\n\u002F\u002F File path construction (Windows-safe)\nconst agentDest = path.join(dest, '.github', 'agents', 'squad.agent.md');\n\n\u002F\u002F Skip-if-exists pattern\nif (!fs.existsSync(ceremoniesDest)) {\n  fs.copyFileSync(ceremoniesSrc, ceremoniesDest);\n  console.log(`${GREEN}✓${RESET} .ai-team\u002Fceremonies.md`);\n} else {\n  console.log(`${DIM}ceremonies.md already exists — skipping${RESET}`);\n}\n```\n\n## Anti-Patterns\n- **Adding npm dependencies** — Squad is zero-dep. Use Node.js built-ins only.\n- **Hardcoded path separators** — Never use `\u002F` or `\\` directly. Always `path.join()`.\n- **Overwriting user state on init** — Init skips existing files. Only upgrade overwrites Squad-owned files.\n- **Raw stack traces** — All errors go through `fatal()`. Users see clean messages, not stack traces.\n- **Inline ANSI codes** — Use the color constants (`GREEN`, `RED`, `DIM`, `BOLD`, `RESET`).\n","## Context\nThese conventions apply to all work on the Squad CLI tool (`create-squad`). Squad is a zero-dependency Node.js package that adds AI agent teams to any project. Understanding these patterns is essential before modifying any Squad source code.\n\n## Patterns\n\n### Zero Dependencies\nSquad has zero runtime dependencies. Everything uses Node.js built-ins (`fs`, `path`, `os`, `child_process`). Do not add packages to `dependencies` in `package.json`. This is a hard constraint, not a preference.\n\n### Node.js Built-in Test Runner\nTests use `node:test` and `node:assert\u002Fstrict` — no test frameworks. Run with `npm test`. Test files live in `test\u002F`. The test command is `node --test test\u002F`.\n\n### Error Handling — `fatal()` Pattern\nAll user-facing errors use the `fatal(msg)` function which prints a red `✗` prefix and exits with code 1. Never throw unhandled exceptions or print raw stack traces. The global `uncaughtException` handler calls `fatal()` as a safety net.\n\n### ANSI Color Constants\nColors are defined as constants at the top of `index.js`: `GREEN`, `RED`, `DIM`, `BOLD`, `RESET`. Use these constants — do not inline ANSI escape codes.\n\n### File Structure\n- `.ai-team\u002F` — Team state (user-owned, never overwritten by upgrades)\n- `.ai-team-templates\u002F` — Template files copied from `templates\u002F` (Squad-owned, overwritten on upgrade)\n- `.github\u002Fagents\u002Fsquad.agent.md` — Coordinator prompt (Squad-owned, overwritten on upgrade)\n- `templates\u002F` — Source templates shipped with the npm package\n- `.ai-team\u002Fskills\u002F` — Team skills in SKILL.md format (user-owned)\n- `.ai-team\u002Fdecisions\u002Finbox\u002F` — Drop-box for parallel decision writes\n\n### Windows Compatibility\nAlways use `path.join()` for file paths — never hardcode `\u002F` or `\\` separators. Squad must work on Windows, macOS, and Linux. All tests must pass on all platforms.\n\n### Init Idempotency\nThe init flow uses a skip-if-exists pattern: if a file or directory already exists, skip it and report \"already exists.\" Never overwrite user state during init. The upgrade flow overwrites only Squad-owned files.\n\n### Copy Pattern\n`copyRecursive(src, target)` handles both files and directories. It creates parent directories with `{ recursive: true }` and uses `fs.copyFileSync` for files.\n\n## Examples\n\n```javascript\n\u002F\u002F Error handling\nfunction fatal(msg) {\n  console.error(`${RED}✗${RESET} ${msg}`);\n  process.exit(1);\n}\n\n\u002F\u002F File path construction (Windows-safe)\nconst agentDest = path.join(dest, '.github', 'agents', 'squad.agent.md');\n\n\u002F\u002F Skip-if-exists pattern\nif (!fs.existsSync(ceremoniesDest)) {\n  fs.copyFileSync(ceremoniesSrc, ceremoniesDest);\n  console.log(`${GREEN}✓${RESET} .ai-team\u002Fceremonies.md`);\n} else {\n  console.log(`${DIM}ceremonies.md already exists — skipping${RESET}`);\n}\n```\n\n## Anti-Patterns\n- **Adding npm dependencies** — Squad is zero-dep. Use Node.js built-ins only.\n- **Hardcoded path separators** — Never use `\u002F` or `\\` directly. Always `path.join()`.\n- **Overwriting user state on init** — Init skips existing files. Only upgrade overwrites Squad-owned files.\n- **Raw stack traces** — All errors go through `fatal()`. Users see clean messages, not stack traces.\n- **Inline ANSI codes** — Use the color constants (`GREEN`, `RED`, `DIM`, `BOLD`, `RESET`).\n",{"name":5,"domain":22,"source":29,"confidence":30,"description":7},"manual","high","main","3b0c01a39250117cac9b310f56c48e268ff6bedb",".ai-team-templates\u002Fskills\u002Fsquad-conventions",0,"https:\u002F\u002Fgithub.com\u002Flondospark\u002FSquadTUI","https:\u002F\u002Fgithub.com\u002Flondospark","https:\u002F\u002Ftwitch.tv\u002Flondospark","2026-03-05 05:23:39",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add londospark\u002FSquadTUI --skill squad-conventions",{"tool":45,"command":46},"bunx","bunx skills add londospark\u002FSquadTUI --skill squad-conventions",{"tool":48,"command":49},"pnpm","pnpm dlx skills add londospark\u002FSquadTUI --skill squad-conventions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flondospark\u002FSquadTUI\u002Fblob\u002Fmain\u002F.ai-team-templates\u002Fskills\u002Fsquad-conventions\u002FSKILL.md",true,[53,59,65,69],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"agents\u002Fopenai.yaml","REFERENCE","参考文档",128,"https:\u002F\u002Fgithub.com\u002Fwindyroad\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fpackages\u002Fitil\u002Fskills\u002Fcapture-rfc\u002Fagents\u002Fopenai.yaml",{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"eval\u002Fgrade-llm-rubric.sh","SCRIPT","脚本",2989,"https:\u002F\u002Fgithub.com\u002Fwindyroad\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fpackages\u002Fitil\u002Fskills\u002Fcapture-rfc\u002Feval\u002Fgrade-llm-rubric.sh",{"path":66,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":67,"sourceHtmlUrl":68},"eval\u002Fpromptfooconfig.yaml",1914,"https:\u002F\u002Fgithub.com\u002Fwindyroad\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fpackages\u002Fitil\u002Fskills\u002Fcapture-rfc\u002Feval\u002Fpromptfooconfig.yaml",{"path":70,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":71,"sourceHtmlUrl":72},"eval\u002Frun-skill-eval.sh",1136,"https:\u002F\u002Fgithub.com\u002Fwindyroad\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fpackages\u002Fitil\u002Fskills\u002Fcapture-rfc\u002Feval\u002Frun-skill-eval.sh",[74,84],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":24},"01M6CNDMF9E3CDE4X4C92YF7D3","test-skill","A skill for testing purposes","https:\u002F\u002Fgithub.com\u002Flondospark\u002FSquadTUI\u002Fblob\u002Fmain\u002Ftests\u002FSquadTUI.Tests\u002FFixtures\u002F.ai-team\u002Fskills\u002Ftest-skill\u002FSKILL.md",[],[81,82,83],"test","Test Skill","testing",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":24},"01M6CNDEFW2RBZKA862BMD5WWA","{skill-name}","{what this skill teaches agents}","https:\u002F\u002Fgithub.com\u002Flondospark\u002FSquadTUI\u002Fblob\u002Fmain\u002F.ai-team-templates\u002Fskill.md",[],[91,92,83,93,94,95,96],"{skill name}","skill name","design","api","how","error-handling"]