[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6N86GJ02CZ8N3FN2PR3KN46":3,"skill-same:01M6N86GJ02CZ8N3FN2PR3KN46":63},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":23,"linkOnly":24,"markdownContent":25,"markdownBody":26,"frontMatter":27,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M6N86GJ02CZ8N3FN2PR3KN46","mh-cto-sdlc-tdd-session",null,"Imad-Oute\u002FMicroHard","Imad-Oute","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F139675528?v=4","01M6N68WHDQ53HQJQ5Y84AGMWX","imad outemgount","01M6N68WP1YPV15H5RTGQHM02G",2,"MIT","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-6-implementation\u002Fmh-cto-sdlc-tdd-session\u002FSKILL.md",[],[18,19,20,21,22],"tdd","sdlc","session","cto","mh cto sdlc tdd session","2026-11-10 10:12:30",false,"---\nname: mh-cto-sdlc-tdd-session\ndescription: TDD Session — executes the red-green-refactor feedback loop for the in-progress story. One behavior at a time. Validates against acceptance criteria. Enforces tdd-discipline.md. Advances story to review on clean exit. Trigger phrases: \"tdd session\", \"implement story\", \"red green refactor\", \"write tests\", \"code the story\", \"implement\", \"build the feature\", \"tdd loop\".\nmetadata:\n  author: MicroHard\n  version: 1.0.0\n  phase: 6-implementation\n  module: cto-sdlc\n---\n\n# TDD Session\n\n**Mode: execution.** The kickoff is done. The feedback loop is ready. This skill drives the tracer-bullet implementation cycle: one test → one behavior → repeat.\n\n**Elite character:** TDD is not a test-first ceremony — it is a feedback engineering discipline. The loop is the skill. A tight, deterministic loop transforms debugging from archaeology into surgery. Every passing test is a verified behavior contract. Every refactor is safe because the test suite is the proof.\n\n**Contract with tdd-discipline.md:** Every step in this skill embeds the TDD discipline reference. The checklist per cycle is not optional — it is the definition of \"done for this behavior.\"\n\n## The Iron Law\n\n```\nNO PRODUCTION CODE WITHOUT A FAILING TEST FIRST\n```\n\nWrite code before the test? **Delete it. Start over.**\n\n- Not \"keep it as reference while writing the test\" — that's still code-first. Delete means delete.\n- Not \"adapt it while writing tests\" — same violation.\n- Not \"just this one behavior\" — the exception weakens every future boundary.\n\n**Violating the letter of this law is violating the spirit of it.**\n\nThe rationalization table and red flags are in `tdd-discipline.md`. Read them before beginning.\nBefore claiming this session is complete, run the verification checklist in `verification-discipline.md`.\n\n## Step 1 — Confirm Context\n\nLoad the current story from `.mh-state\u002Fstories\u002F{story-id}\u002Fstory.md`.\n\nConfirm:\n\n- Feedback loop is ready (from story-kickoff)\n- First failing test is identified\n- Acceptance criteria are clear\n\nIf story status is not `in-progress`: \"No story is in-progress. Run `\u002Fmh-cto-sdlc-story-kickoff` first.\"\n\n## Step 2 — Execute the Tracer Bullet Loop\n\nFor each behavior in the story's scope, execute the RED → GREEN → LOOP cycle:\n\n**RED phase:**\n\n- Write ONE test for ONE behavior\n- The test must:\n  - Describe behavior, not implementation detail\n  - Use public interface only (not internal methods)\n  - Be written to survive an internal refactor\n- Run the test. Confirm it fails for the RIGHT reason (not a syntax error or import failure — a genuine assertion failure).\n- \"The test fails because: {specific failure message}. This is the correct failure.\"\n\n**GREEN phase:**\n\n- Write the MINIMUM code to make this test pass\n- No speculative features\n- No code not required by this test\n- Run the test. It passes.\n- \"Test passes. Code written: {one sentence description — interface name, not file path}\"\n\n**REFACTOR phase (after all tests for this behavior pass):**\n\n- Extract duplication if it exists\n- Deepen modules (move complexity behind simpler interfaces) where warranted\n- Apply SOLID principles where natural, not where forced\n- Run tests after each refactor step\n- Never refactor while RED\n\n**Per-behavior checklist:**\n\n- [ ] Test describes behavior, not implementation detail\n- [ ] Test uses public interface only\n- [ ] Test survives an internal refactor\n- [ ] Code is minimum to pass this test\n- [ ] No speculative features added\n- [ ] Tests pass after refactor\n\nRepeat for the next behavior. One behavior at a time.\n\n## Step 3 — Instrumentation Discipline\n\nEvery debug log added during this session must be tagged: `[DEBUG-{short-hash}]`\n\nExample: `[DEBUG-a4f2] token validation reached`\n\nDo not add untagged logs. Cleanup is a grep-and-delete operation.\n\nTrack all debug tags added in this session so cleanup is verifiable.\n\n## Step 4 — Validate Against Acceptance Criteria\n\nAfter all behaviors are implemented:\n\nFor each acceptance criterion in the story's scope:\n\n- [ ] Is this criterion verifiably met by the test suite?\n- [ ] Does the corresponding E2E scenario pass (or will it pass once the full stack is assembled)?\n- [ ] Is there a test that would fail if this criterion was violated?\n\nIf a criterion has no corresponding test: \"AC-{id} '{criterion text}' has no corresponding test. Add the test before advancing to review.\"\n\n## Step 5 — Cleanup Checklist\n\nBefore declaring implementation complete:\n\n- [ ] All `[DEBUG-...]` tags removed (grep for `\\[DEBUG-` to verify)\n- [ ] Throwaway harnesses and prototype files deleted\n- [ ] Commit message drafted: states the root cause or the behavior delivered (the hypothesis that proved correct)\n- [ ] Regression test exists for any bug fixed, or absence of correct seam is documented\n\n## Step 6 — TDD-Unready Story Flag\n\nIf at any point during implementation a story criterion proves untestable or ambiguous:\n\n\"Story criterion AC-{id} '{text}' is not testable as written: {specific reason}. Pausing implementation. Returning this story to create-story for revision.\"\n\nUpdate sprint-status.yaml: story status → `ready-for-dev`.\nClear session_state.\nDo not advance to review with an untestable criterion.\n\n## Red Flags — STOP Before Advancing\n\nIf any of these are true, do not advance to review:\n\n- Any behavior was implemented before its failing test was written and watched fail\n- Any test was written after its implementation (even \"just to verify\")\n- The cleanup checklist in Step 5 was not run\n- Any acceptance criterion has no corresponding test\n- Debug tags were not grepped and removed\n- You are about to say \"done\" or \"complete\" without running the test suite fresh in this turn\n\n**If any of these apply:** address it before Step 7. Advancing with unchecked items is a false completion.\nSee `verification-discipline.md` for the evidence-before-claims standard.\n\n## Step 7 — Advance to Review\n\nWhen all behaviors are implemented, all criteria are tested, and cleanup is complete:\n\nUpdate sprint-status.yaml: story status → `review`.\n\nUpdate story.md dev-agent-record:\n\n```yaml\nstatus: review\nsession_state: ~\nlast_updated: { YYYY-MM-DD }\nimplementation_notes: '{key decisions made during implementation — module names, pattern choices, tradeoffs}'\n```\n\n## Step 8 — Present Summary\n\n**TDD Session complete.**\n\n**Behaviors implemented:** {N}\n\n**Tests written:** {N} (unit: {N}, integration: {N})\n\n**Acceptance criteria verified:** {N}\u002F{N}\n\n**Debug tags cleaned:** {list of removed tags}\n\n**Story advanced to:** review\n\n**Next step:** Run `\u002Fmh-cto-sdlc-code-review` to review this story before merging.\n","# TDD Session\n\n**Mode: execution.** The kickoff is done. The feedback loop is ready. This skill drives the tracer-bullet implementation cycle: one test → one behavior → repeat.\n\n**Elite character:** TDD is not a test-first ceremony — it is a feedback engineering discipline. The loop is the skill. A tight, deterministic loop transforms debugging from archaeology into surgery. Every passing test is a verified behavior contract. Every refactor is safe because the test suite is the proof.\n\n**Contract with tdd-discipline.md:** Every step in this skill embeds the TDD discipline reference. The checklist per cycle is not optional — it is the definition of \"done for this behavior.\"\n\n## The Iron Law\n\n```\nNO PRODUCTION CODE WITHOUT A FAILING TEST FIRST\n```\n\nWrite code before the test? **Delete it. Start over.**\n\n- Not \"keep it as reference while writing the test\" — that's still code-first. Delete means delete.\n- Not \"adapt it while writing tests\" — same violation.\n- Not \"just this one behavior\" — the exception weakens every future boundary.\n\n**Violating the letter of this law is violating the spirit of it.**\n\nThe rationalization table and red flags are in `tdd-discipline.md`. Read them before beginning.\nBefore claiming this session is complete, run the verification checklist in `verification-discipline.md`.\n\n## Step 1 — Confirm Context\n\nLoad the current story from `.mh-state\u002Fstories\u002F{story-id}\u002Fstory.md`.\n\nConfirm:\n\n- Feedback loop is ready (from story-kickoff)\n- First failing test is identified\n- Acceptance criteria are clear\n\nIf story status is not `in-progress`: \"No story is in-progress. Run `\u002Fmh-cto-sdlc-story-kickoff` first.\"\n\n## Step 2 — Execute the Tracer Bullet Loop\n\nFor each behavior in the story's scope, execute the RED → GREEN → LOOP cycle:\n\n**RED phase:**\n\n- Write ONE test for ONE behavior\n- The test must:\n  - Describe behavior, not implementation detail\n  - Use public interface only (not internal methods)\n  - Be written to survive an internal refactor\n- Run the test. Confirm it fails for the RIGHT reason (not a syntax error or import failure — a genuine assertion failure).\n- \"The test fails because: {specific failure message}. This is the correct failure.\"\n\n**GREEN phase:**\n\n- Write the MINIMUM code to make this test pass\n- No speculative features\n- No code not required by this test\n- Run the test. It passes.\n- \"Test passes. Code written: {one sentence description — interface name, not file path}\"\n\n**REFACTOR phase (after all tests for this behavior pass):**\n\n- Extract duplication if it exists\n- Deepen modules (move complexity behind simpler interfaces) where warranted\n- Apply SOLID principles where natural, not where forced\n- Run tests after each refactor step\n- Never refactor while RED\n\n**Per-behavior checklist:**\n\n- [ ] Test describes behavior, not implementation detail\n- [ ] Test uses public interface only\n- [ ] Test survives an internal refactor\n- [ ] Code is minimum to pass this test\n- [ ] No speculative features added\n- [ ] Tests pass after refactor\n\nRepeat for the next behavior. One behavior at a time.\n\n## Step 3 — Instrumentation Discipline\n\nEvery debug log added during this session must be tagged: `[DEBUG-{short-hash}]`\n\nExample: `[DEBUG-a4f2] token validation reached`\n\nDo not add untagged logs. Cleanup is a grep-and-delete operation.\n\nTrack all debug tags added in this session so cleanup is verifiable.\n\n## Step 4 — Validate Against Acceptance Criteria\n\nAfter all behaviors are implemented:\n\nFor each acceptance criterion in the story's scope:\n\n- [ ] Is this criterion verifiably met by the test suite?\n- [ ] Does the corresponding E2E scenario pass (or will it pass once the full stack is assembled)?\n- [ ] Is there a test that would fail if this criterion was violated?\n\nIf a criterion has no corresponding test: \"AC-{id} '{criterion text}' has no corresponding test. Add the test before advancing to review.\"\n\n## Step 5 — Cleanup Checklist\n\nBefore declaring implementation complete:\n\n- [ ] All `[DEBUG-...]` tags removed (grep for `\\[DEBUG-` to verify)\n- [ ] Throwaway harnesses and prototype files deleted\n- [ ] Commit message drafted: states the root cause or the behavior delivered (the hypothesis that proved correct)\n- [ ] Regression test exists for any bug fixed, or absence of correct seam is documented\n\n## Step 6 — TDD-Unready Story Flag\n\nIf at any point during implementation a story criterion proves untestable or ambiguous:\n\n\"Story criterion AC-{id} '{text}' is not testable as written: {specific reason}. Pausing implementation. Returning this story to create-story for revision.\"\n\nUpdate sprint-status.yaml: story status → `ready-for-dev`.\nClear session_state.\nDo not advance to review with an untestable criterion.\n\n## Red Flags — STOP Before Advancing\n\nIf any of these are true, do not advance to review:\n\n- Any behavior was implemented before its failing test was written and watched fail\n- Any test was written after its implementation (even \"just to verify\")\n- The cleanup checklist in Step 5 was not run\n- Any acceptance criterion has no corresponding test\n- Debug tags were not grepped and removed\n- You are about to say \"done\" or \"complete\" without running the test suite fresh in this turn\n\n**If any of these apply:** address it before Step 7. Advancing with unchecked items is a false completion.\nSee `verification-discipline.md` for the evidence-before-claims standard.\n\n## Step 7 — Advance to Review\n\nWhen all behaviors are implemented, all criteria are tested, and cleanup is complete:\n\nUpdate sprint-status.yaml: story status → `review`.\n\nUpdate story.md dev-agent-record:\n\n```yaml\nstatus: review\nsession_state: ~\nlast_updated: { YYYY-MM-DD }\nimplementation_notes: '{key decisions made during implementation — module names, pattern choices, tradeoffs}'\n```\n\n## Step 8 — Present Summary\n\n**TDD Session complete.**\n\n**Behaviors implemented:** {N}\n\n**Tests written:** {N} (unit: {N}, integration: {N})\n\n**Acceptance criteria verified:** {N}\u002F{N}\n\n**Debug tags cleaned:** {list of removed tags}\n\n**Story advanced to:** review\n\n**Next step:** Run `\u002Fmh-cto-sdlc-code-review` to review this story before merging.\n",{},"main","2ec3bbf5ba353f3fdd2c6d842b791fd75d08a635","src\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-6-implementation\u002Fmh-cto-sdlc-tdd-session",0,"https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard","https:\u002F\u002Fgithub.com\u002FImad-Oute","https:\u002F\u002Fimad369.vercel.app\u002F","I'm just starting my Journey.","2026-05-13 03:02:22",{"source":7,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Imad-Oute\u002FMicroHard --skill mh-cto-sdlc-tdd-session",{"tool":43,"command":44},"bunx","bunx skills add Imad-Oute\u002FMicroHard --skill mh-cto-sdlc-tdd-session",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Imad-Oute\u002FMicroHard --skill mh-cto-sdlc-tdd-session","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-6-implementation\u002Fmh-cto-sdlc-tdd-session\u002FSKILL.md",true,[51,57],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"customize.toml","OTHER","其他",337,"https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-6-implementation\u002Fmh-cto-sdlc-tdd-session\u002Fcustomize.toml",{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"mh-skill-manifest.yaml","REFERENCE","参考文档",254,"https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-6-implementation\u002Fmh-cto-sdlc-tdd-session\u002Fmh-skill-manifest.yaml",[64,91,108,122,139,156],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":23},"01M6N8JYRPSHVW4Y76X5SAGRDX","mh-vo-vault-brief","Weekly vault intelligence report — health score, pipeline status, OS alignment, and top issues. Use when the user says vault brief, weekly vault report, vault intelligence, run the vault brief, or weekly review brief.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F5-report\u002Fmh-vo-vault-brief\u002FSKILL.md",[],[71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],"mh vo vault brief","brief","vault","intelligence report","top","weekly","os","pipeline","health","issues","report","run","status","review","weekly review","user","use","pipeline status","alignment","intelligence",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":23},"01M6N8JCK7E7Y19940RBB51R96","mh-vo-output-bridge","Scan _mh-output\u002F for new artifacts and create or update corresponding vault entries. Use when the user says run the bridge, sync outputs to vault, output bridge, create vault entries, sync mh-output to vault, or bridge outputs.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F4-bridge\u002Fmh-vo-output-bridge\u002FSKILL.md",[],[98,99,100,73,101,102,82,103,104,105,86,106,107,87],"bridge","output","mh vo output bridge","artifacts","update","create","sync","for","entries","scan",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":23},"01M6N8HXW3ENQ939C93R59W371","mh-vo-moc-builder","Create or update Maps of Content for vault sections and ensure every note is reachable from a MOC. Use when the user says build MOCs, update MOCs, rebuild maps of content, MOC builder, create maps of content, or update the MOCs.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F3-connect\u002Fmh-vo-moc-builder\u002FSKILL.md",[],[115,116,105,117,118,119,120,103,87,73,121,102,86],"builder","mh vo moc builder","note","build","rebuild","maps","content",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":23},"01M6N8HHZ30706B2ZS33X3MR42","mh-vo-link-architect","Identify missing vault connections and generate precise link recommendations. Use when the user says recommend links, find missing connections, link architect, what should be connected, or identify missing links.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F3-connect\u002Fmh-vo-link-architect\u002FSKILL.md",[],[129,130,131,86,132,133,134,135,136,87,137,73,138],"mh vo link architect","link","architect","recommend","links","missing","recommendations","connections","find","generate",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":23},"01M6N8H6FKWGTNFWS5PTPPTEN0","mh-vo-base-builder","Generate Obsidian Bases (.base files) for live database views of vault data. Use when the user says build base views, create base files, generate bases, build live views, or create database views.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F3-connect\u002Fmh-vo-base-builder\u002FSKILL.md",[],[146,147,148,115,73,149,150,151,138,103,152,86,105,153,118,154,155,87],"mh vo base builder","base builder","base","obsidian bases","data","database","obsidian","live","files","bases",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":23},"01M6N8GSRETQW3B9C843F1S1CP","mh-vo-taxonomy-enforcer","Audit vault tags and frontmatter, find drift, and apply corrections. Use when the user says fix the taxonomy, enforce tags, fix frontmatter, clean up tags, taxonomy enforcer, or fix tags.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F2-route\u002Fmh-vo-taxonomy-enforcer\u002FSKILL.md",[],[163,164,165,166,167,168,169,170,171,172,87,173,86,137,73,174],"mh vo taxonomy enforcer","taxonomy","enforce","apply","frontmatter","tags","drift","clean","vault tags","up","fix","audit"]