[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AVBRR9HE0RAG3YFDTCWSBY":3,"skill-same:01M7AVBRR9HE0RAG3YFDTCWSBY":49},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7AVBRR9HE0RAG3YFDTCWSBY","ci-validation-gates",null,"Defensive CI\u002FCD patterns: semver validation, token checks, retry logic, draft detection — earned from v0.8.22","alonf\u002FKeyContextAI","alonf","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F554150?v=4","01M7ATEPSCNKG13BVTKA74VG59","Alon Fliess","01M7ATEPSZ4YMBM9W25SKM3GES",0,"MIT","https:\u002F\u002Fgithub.com\u002Falonf\u002FKeyContextAI\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Fci-validation-gates\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"ci-validation-gates\"\ndescription: \"Defensive CI\u002FCD patterns: semver validation, token checks, retry logic, draft detection — earned from v0.8.22\"\ndomain: \"ci-cd\"\nconfidence: \"high\"\nsource: \"extracted from Drucker and Trejo charters — earned knowledge from v0.8.22 release incident\"\n---\n\n## Context\n\nCI workflows must be defensive. These patterns were learned from the v0.8.22 release disaster where invalid semver, wrong token types, missing retry logic, and draft releases caused a multi-hour outage. Both Drucker (CI\u002FCD) and Trejo (Release Manager) carried this knowledge in their charters — now centralized here.\n\n## Patterns\n\n### Semver Validation Gate\nEvery publish workflow MUST validate version format before `npm publish`. 4-part versions (e.g., 0.8.21.4) are NOT valid semver — npm mangles them.\n\n```yaml\n- name: Validate semver\n  run: |\n    VERSION=\"${{ github.event.release.tag_name }}\"\n    VERSION=\"${VERSION#v}\"\n    if ! npx semver \"$VERSION\" > \u002Fdev\u002Fnull 2>&1; then\n      echo \"❌ Invalid semver: $VERSION\"\n      echo \"Only 3-part versions (X.Y.Z) or prerelease (X.Y.Z-tag.N) are valid.\"\n      exit 1\n    fi\n    echo \"✅ Valid semver: $VERSION\"\n```\n\n### NPM Token Type Verification\nNPM_TOKEN MUST be an Automation token, not a User token with 2FA:\n- User tokens require OTP — CI can't provide it → EOTP error\n- Create Automation tokens at npmjs.com → Settings → Access Tokens → Automation\n- Verify before first publish in any workflow\n\n### Retry Logic for npm Registry Propagation\nnpm registry uses eventual consistency. After `npm publish` succeeds, the package may not be immediately queryable.\n- Propagation: typically 5-30s, up to 2min in rare cases\n- All verify steps: 5 attempts, 15-second intervals\n- Log each attempt: \"Attempt 1\u002F5: Checking package...\"\n- Exit loop on success, fail after max attempts\n\n```yaml\n- name: Verify package (with retry)\n  run: |\n    MAX_ATTEMPTS=5\n    WAIT_SECONDS=15\n    for attempt in $(seq 1 $MAX_ATTEMPTS); do\n      echo \"Attempt $attempt\u002F$MAX_ATTEMPTS: Checking $PACKAGE@$VERSION...\"\n      if npm view \"$PACKAGE@$VERSION\" version > \u002Fdev\u002Fnull 2>&1; then\n        echo \"✅ Package verified\"\n        exit 0\n      fi\n      [ $attempt -lt $MAX_ATTEMPTS ] && sleep $WAIT_SECONDS\n    done\n    echo \"❌ Failed to verify after $MAX_ATTEMPTS attempts\"\n    exit 1\n```\n\n### Draft Release Detection\nDraft releases don't emit `release: published` event. Workflows MUST:\n- Trigger on `release: published` (NOT `created`)\n- If using workflow_dispatch: verify release is published via GitHub API before proceeding\n\n### Build Script Protection\nSet `SKIP_BUILD_BUMP=1` (or `$env:SKIP_BUILD_BUMP = \"1\"` on Windows) before ANY release build. bump-build.mjs is for dev builds ONLY — it silently mutates versions.\n\n## Known Failure Modes (v0.8.22 Incident)\n\n| # | What Happened | Root Cause | Prevention |\n|---|---------------|-----------|------------|\n| 1 | 4-part version published, npm mangled it | No semver validation gate | `npx semver` check before every publish |\n| 2 | CI failed 5+ times with EOTP | User token with 2FA | Automation token only |\n| 3 | Verify returned false 404 | No retry logic for propagation | 5 attempts, 15s intervals |\n| 4 | Workflow never triggered | Draft release doesn't emit event | Never create draft releases |\n| 5 | Version mutated during release | bump-build.mjs ran in release | SKIP_BUILD_BUMP=1 |\n\n## Anti-Patterns\n- ❌ Publishing without semver validation gate\n- ❌ Single-shot verification without retry\n- ❌ Hard-coded secrets in workflows\n- ❌ Silent CI failures — every error needs actionable output with remediation\n- ❌ Assuming npm publish is instantly queryable\n","## Context\n\nCI workflows must be defensive. These patterns were learned from the v0.8.22 release disaster where invalid semver, wrong token types, missing retry logic, and draft releases caused a multi-hour outage. Both Drucker (CI\u002FCD) and Trejo (Release Manager) carried this knowledge in their charters — now centralized here.\n\n## Patterns\n\n### Semver Validation Gate\nEvery publish workflow MUST validate version format before `npm publish`. 4-part versions (e.g., 0.8.21.4) are NOT valid semver — npm mangles them.\n\n```yaml\n- name: Validate semver\n  run: |\n    VERSION=\"${{ github.event.release.tag_name }}\"\n    VERSION=\"${VERSION#v}\"\n    if ! npx semver \"$VERSION\" > \u002Fdev\u002Fnull 2>&1; then\n      echo \"❌ Invalid semver: $VERSION\"\n      echo \"Only 3-part versions (X.Y.Z) or prerelease (X.Y.Z-tag.N) are valid.\"\n      exit 1\n    fi\n    echo \"✅ Valid semver: $VERSION\"\n```\n\n### NPM Token Type Verification\nNPM_TOKEN MUST be an Automation token, not a User token with 2FA:\n- User tokens require OTP — CI can't provide it → EOTP error\n- Create Automation tokens at npmjs.com → Settings → Access Tokens → Automation\n- Verify before first publish in any workflow\n\n### Retry Logic for npm Registry Propagation\nnpm registry uses eventual consistency. After `npm publish` succeeds, the package may not be immediately queryable.\n- Propagation: typically 5-30s, up to 2min in rare cases\n- All verify steps: 5 attempts, 15-second intervals\n- Log each attempt: \"Attempt 1\u002F5: Checking package...\"\n- Exit loop on success, fail after max attempts\n\n```yaml\n- name: Verify package (with retry)\n  run: |\n    MAX_ATTEMPTS=5\n    WAIT_SECONDS=15\n    for attempt in $(seq 1 $MAX_ATTEMPTS); do\n      echo \"Attempt $attempt\u002F$MAX_ATTEMPTS: Checking $PACKAGE@$VERSION...\"\n      if npm view \"$PACKAGE@$VERSION\" version > \u002Fdev\u002Fnull 2>&1; then\n        echo \"✅ Package verified\"\n        exit 0\n      fi\n      [ $attempt -lt $MAX_ATTEMPTS ] && sleep $WAIT_SECONDS\n    done\n    echo \"❌ Failed to verify after $MAX_ATTEMPTS attempts\"\n    exit 1\n```\n\n### Draft Release Detection\nDraft releases don't emit `release: published` event. Workflows MUST:\n- Trigger on `release: published` (NOT `created`)\n- If using workflow_dispatch: verify release is published via GitHub API before proceeding\n\n### Build Script Protection\nSet `SKIP_BUILD_BUMP=1` (or `$env:SKIP_BUILD_BUMP = \"1\"` on Windows) before ANY release build. bump-build.mjs is for dev builds ONLY — it silently mutates versions.\n\n## Known Failure Modes (v0.8.22 Incident)\n\n| # | What Happened | Root Cause | Prevention |\n|---|---------------|-----------|------------|\n| 1 | 4-part version published, npm mangled it | No semver validation gate | `npx semver` check before every publish |\n| 2 | CI failed 5+ times with EOTP | User token with 2FA | Automation token only |\n| 3 | Verify returned false 404 | No retry logic for propagation | 5 attempts, 15s intervals |\n| 4 | Workflow never triggered | Draft release doesn't emit event | Never create draft releases |\n| 5 | Version mutated during release | bump-build.mjs ran in release | SKIP_BUILD_BUMP=1 |\n\n## Anti-Patterns\n- ❌ Publishing without semver validation gate\n- ❌ Single-shot verification without retry\n- ❌ Hard-coded secrets in workflows\n- ❌ Silent CI failures — every error needs actionable output with remediation\n- ❌ Assuming npm publish is instantly queryable\n",{"name":5,"domain":24,"source":25,"confidence":26,"description":7},"ci-cd","extracted from Drucker and Trejo charters — earned knowledge from v0.8.22 release incident","high","main","176da577bfd98859f793bdd1312690c6c3940c67",".squad\u002Ftemplates\u002Fskills\u002Fci-validation-gates","https:\u002F\u002Fgithub.com\u002Falonf\u002FKeyContextAI","https:\u002F\u002Fgithub.com\u002Falonf","http:\u002F\u002Falonfliess.me","CTO & Founder of Zionet.\r\nMicrosoft Regional Director and Foundry MVP.\r\n","2026-08-28 05:21:35",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add alonf\u002FKeyContextAI --skill ci-validation-gates",{"tool":41,"command":42},"bunx","bunx skills add alonf\u002FKeyContextAI --skill ci-validation-gates",{"tool":44,"command":45},"pnpm","pnpm dlx skills add alonf\u002FKeyContextAI --skill ci-validation-gates","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Falonf\u002FKeyContextAI\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Fci-validation-gates\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7AVHRWWXA0BQ5PXNA8FG30W","windows-compatibility","Cross-platform path handling and command patterns","https:\u002F\u002Fgithub.com\u002Falonf\u002FKeyContextAI\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Fwindows-compatibility\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7AVHABPRYXYM3GWJY1RW92A","versioning-policy","Semver versioning rules for Squad SDK and CLI — prevents prerelease version incidents","https:\u002F\u002Fgithub.com\u002Falonf\u002FKeyContextAI\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Fversioning-policy\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7AVH4KNP3TCVQDRVS70VP19","tiered-memory","Three-tier agent memory model (hot\u002Fcold\u002Fwiki) for context reduction per spawn","https:\u002F\u002Fgithub.com\u002Falonf\u002FKeyContextAI\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Ftiered-memory\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7AVH18JDSA55Z7KK2GH6X49","test-discipline","Update tests when changing APIs — no exceptions","https:\u002F\u002Fgithub.com\u002Falonf\u002FKeyContextAI\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Ftest-discipline\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7AVGVGWYD7NBNXAV4PAZJ92","squad","Squad's command catalog and interactive menu. Invoke via \u002Fsquad (slash command) or natural language (\"squad commands\", \"what can squad do\", \"show me squad options\"). Presents categorized operations (Install & Upgrade, Team Management, Issues & PRs, Plugins & Skills, Model & Cost, Sessions & State) as an interactive picker. Routes to the right squad CLI command or the Squad coordinator agent.","https:\u002F\u002Fgithub.com\u002Falonf\u002FKeyContextAI\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Fsquad\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7AVGPSFT1WHW3PK35DHS5XK","squad-version-check","Internals of how @bradygaster\u002Fsquad-cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt.","https:\u002F\u002Fgithub.com\u002Falonf\u002FKeyContextAI\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Fsquad-version-check\u002FSKILL.md",[],[]]