[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D4TYK0M2KFXMD10ZS3MNQN":3,"skill-same:01M7D4TYK0M2KFXMD10ZS3MNQN":45},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7D4TYK0M2KFXMD10ZS3MNQN","write-tests-100-coverage",null,"Write tests that keep agentic-platform at 100% branch coverage without gaming the metric.","sm2774us\u002Fagentic-platform","sm2774us","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2208675?v=4","01M7D4TKFED2FY63WEZZ7B3RMP","Shaikat Majumdar","01M7D4TKG2E10V6X3VNQFTYTES",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsm2774us\u002Fagentic-platform\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwrite-tests-100-coverage\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: write-tests-100-coverage\ndescription: Write tests that keep agentic-platform at 100% branch coverage without gaming the metric.\n---\n\n# Write tests to maintain 100% branch coverage\n\nThis repo enforces `--cov-fail-under=100` with `branch = true`. This skill\ndescribes how to hit that bar honestly.\n\n## Process\n\n1. After writing\u002Fchanging code, run:\n   ```bash\n   python -m pytest --cov-report=term-missing\n   ```\n   The `Missing` column shows exact uncovered line numbers and, for\n   partial branches, `line->line` branch pairs (e.g. `67->76` means the\n   branch from line 67 to line 76 was never taken).\n\n2. **For a missing line**: write a test that exercises that code path\n   directly. Prefer the smallest, most targeted test — one assertion, one\n   scenario — over a large end-to-end test that happens to touch the line.\n\n3. **For a missing branch** (`X->Y` in the report): you need a test where\n   the condition takes the *other* path than your existing tests cover.\n   Common cases in this codebase:\n   - An `if`\u002F`elif`\u002F`else` chain in `eval\u002Fframework.py` — write one test\n     per branch (see `test_eval_framework.py` for the pattern: one test per\n     verdict path).\n   - A `try`\u002F`except` — write a test that triggers the exception (e.g.\n     `test_graph_handles_blocked_tool_call` in `test_graph.py`).\n   - A loop that sometimes runs zero times — test the empty-input case.\n\n4. **When a branch is genuinely unreachable** (defensive code that cannot\n   be triggered given the function's own invariants — e.g. see the comment\n   above the `while` loop in `rag\u002Fpipeline.py`), mark it explicitly:\n   ```python\n   while start \u003C len(words):  # pragma: no branch - loop always exits via the break below\n   ```\n   Always include a one-line justification in the pragma comment. **Never**\n   add a blanket `# pragma: no cover` to a function just to make coverage\n   pass — that hides real gaps. Only use it on lines you can justify are\n   truly unreachable or untestable (e.g. an optional dependency's import\n   line in `eval\u002Fmlflow_tracking.py`).\n\n5. **Test placement**:\n   - `tests\u002Funit\u002F` — one module in isolation, all collaborators faked\u002Fmocked.\n   - `tests\u002Fintegration\u002F` — two or more real modules wired together (e.g.\n     the graph + a real `HybridRetriever` + `MockLLMClient`).\n   - `tests\u002Fe2e\u002F` — through the FastAPI `TestClient`, full HTTP round-trip.\n\n6. Use `MockLLMClient(settings, canned_responses={...})` for deterministic\n   LLM behavior in tests — never call a real LLM API in the test suite.\n\n7. Run `make ci` (lint + typecheck + test) before finishing — a change\n   that hits 100% coverage but fails ruff\u002Fmypy is not done.\n","# Write tests to maintain 100% branch coverage\n\nThis repo enforces `--cov-fail-under=100` with `branch = true`. This skill\ndescribes how to hit that bar honestly.\n\n## Process\n\n1. After writing\u002Fchanging code, run:\n   ```bash\n   python -m pytest --cov-report=term-missing\n   ```\n   The `Missing` column shows exact uncovered line numbers and, for\n   partial branches, `line->line` branch pairs (e.g. `67->76` means the\n   branch from line 67 to line 76 was never taken).\n\n2. **For a missing line**: write a test that exercises that code path\n   directly. Prefer the smallest, most targeted test — one assertion, one\n   scenario — over a large end-to-end test that happens to touch the line.\n\n3. **For a missing branch** (`X->Y` in the report): you need a test where\n   the condition takes the *other* path than your existing tests cover.\n   Common cases in this codebase:\n   - An `if`\u002F`elif`\u002F`else` chain in `eval\u002Fframework.py` — write one test\n     per branch (see `test_eval_framework.py` for the pattern: one test per\n     verdict path).\n   - A `try`\u002F`except` — write a test that triggers the exception (e.g.\n     `test_graph_handles_blocked_tool_call` in `test_graph.py`).\n   - A loop that sometimes runs zero times — test the empty-input case.\n\n4. **When a branch is genuinely unreachable** (defensive code that cannot\n   be triggered given the function's own invariants — e.g. see the comment\n   above the `while` loop in `rag\u002Fpipeline.py`), mark it explicitly:\n   ```python\n   while start \u003C len(words):  # pragma: no branch - loop always exits via the break below\n   ```\n   Always include a one-line justification in the pragma comment. **Never**\n   add a blanket `# pragma: no cover` to a function just to make coverage\n   pass — that hides real gaps. Only use it on lines you can justify are\n   truly unreachable or untestable (e.g. an optional dependency's import\n   line in `eval\u002Fmlflow_tracking.py`).\n\n5. **Test placement**:\n   - `tests\u002Funit\u002F` — one module in isolation, all collaborators faked\u002Fmocked.\n   - `tests\u002Fintegration\u002F` — two or more real modules wired together (e.g.\n     the graph + a real `HybridRetriever` + `MockLLMClient`).\n   - `tests\u002Fe2e\u002F` — through the FastAPI `TestClient`, full HTTP round-trip.\n\n6. Use `MockLLMClient(settings, canned_responses={...})` for deterministic\n   LLM behavior in tests — never call a real LLM API in the test suite.\n\n7. Run `make ci` (lint + typecheck + test) before finishing — a change\n   that hits 100% coverage but fails ruff\u002Fmypy is not done.\n",{"name":5,"description":7},"main","8ca705ded1c3333837f5b517e5d1e68224a68c07",".agents\u002Fskills\u002Fwrite-tests-100-coverage","https:\u002F\u002Fgithub.com\u002Fsm2774us\u002Fagentic-platform","https:\u002F\u002Fgithub.com\u002Fsm2774us","https:\u002F\u002Fsm2774us.wixsite.com\u002Fsmajumdar","2026-09-21 07:16:18",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add sm2774us\u002Fagentic-platform --skill write-tests-100-coverage",{"tool":37,"command":38},"bunx","bunx skills add sm2774us\u002Fagentic-platform --skill write-tests-100-coverage",{"tool":40,"command":41},"pnpm","pnpm dlx skills add sm2774us\u002Fagentic-platform --skill write-tests-100-coverage","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsm2774us\u002Fagentic-platform\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwrite-tests-100-coverage\u002FSKILL.md",true,[],[46,51,58,65,72,77],{"skillNo":47,"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":48,"categories":49,"keywords":50,"publishedAt":19},"01M7D4VB1HR5JBJ866WZ1EEPE0","https:\u002F\u002Fgithub.com\u002Fsm2774us\u002Fagentic-platform\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwrite-tests-100-coverage\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7D4V7EQN21QPVVCREW04TQT","add-rag-source","Add a new document source into the HybridRetriever knowledge base in agentic-platform.","https:\u002F\u002Fgithub.com\u002Fsm2774us\u002Fagentic-platform\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fadd-rag-source\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7D4V61WG2ZDBQ5BBW5DM8C6","add-fastapi-endpoint","Add a new endpoint to the agentic-platform FastAPI service in src\u002Fagentic_platform\u002Fapi\u002Fmain.py.","https:\u002F\u002Fgithub.com\u002Fsm2774us\u002Fagentic-platform\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fadd-fastapi-endpoint\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7D4V2EVFGMHRWPEHGTHQ42F","add-agent-node","Add a new node (agent role) to the multi-agent SimpleGraph in agentic-platform, with routing and tests.","https:\u002F\u002Fgithub.com\u002Fsm2774us\u002Fagentic-platform\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fadd-agent-node\u002FSKILL.md",[],[],{"skillNo":73,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7D4TTZB0BXDN4TG0W27MDW6","https:\u002F\u002Fgithub.com\u002Fsm2774us\u002Fagentic-platform\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fadd-rag-source\u002FSKILL.md",[],[],{"skillNo":78,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7D4TQWM3EYEAPYS827MZNTT","https:\u002F\u002Fgithub.com\u002Fsm2774us\u002Fagentic-platform\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fadd-fastapi-endpoint\u002FSKILL.md",[],[]]