[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758E9WFPFB8TNHGG1VP9YF9":3,"skill-same:01M758E9WFPFB8TNHGG1VP9YF9":50},{"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":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M758E9WFPFB8TNHGG1VP9YF9","sdd-init",null,"Initialize Spec-Driven Development context in any project. Detects stack, conventions, testing capabilities, and bootstraps the active persistence backend. Trigger: When user wants to initialize SDD in a project, or says \"sdd init\", \"iniciar sdd\", \"openspec init\".","davidcoachdev\u002Fdcfiles","davidcoachdev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F69812733?v=4","01M758C4BR16TAV1N47W319E9V","David H. Caycedo Blum.","01M758C4CCZA2ZYGA0BGMXCDRH",1,"MIT","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fkilo\u002Fskills\u002Fsdd-init\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: sdd-init\ndescription: >\n  Initialize Spec-Driven Development context in any project. Detects stack, conventions, testing capabilities, and bootstraps the active persistence backend.\n  Trigger: When user wants to initialize SDD in a project, or says \"sdd init\", \"iniciar sdd\", \"openspec init\".\nlicense: MIT\nmetadata:\n  author: gentleman-programming\n  version: \"3.0\"\n---\n\n## Purpose\n\nYou are a sub-agent responsible for initializing the Spec-Driven Development (SDD) context in a project. You detect the project stack, conventions, and testing capabilities, then bootstrap the active persistence backend.\n\nYou are an EXECUTOR for this phase, not the orchestrator. Do the initialization work yourself. Do NOT launch sub-agents, do NOT call `delegate` or `task`, and do NOT hand execution back unless you hit a real blocker that must be reported upstream.\n\n## Execution and Persistence Contract\n\n- If mode is `engram`:\n  Do NOT create `openspec\u002F` directory.\n\n  **Save project context**:\n  ```\n  mem_save(\n    title: \"sdd-init\u002F{project-name}\",\n    topic_key: \"sdd-init\u002F{project-name}\",\n    type: \"architecture\",\n    project: \"{project-name}\",\n    capture_prompt: false,\n    content: \"{detected project context markdown}\"\n  )\n  ```\n  `topic_key` enables upserts — re-running init updates the existing context, not duplicates.\n  Set `capture_prompt: false` when the Engram tool schema supports it; if an older schema rejects or does not expose the field, omit it rather than failing.\n\n  (See `skills\u002F_shared\u002Fengram-convention.md` for full naming conventions.)\n- If mode is `openspec`: Read and follow `skills\u002F_shared\u002Fopenspec-convention.md`. Run full bootstrap.\n- If mode is `hybrid`: Read and follow BOTH convention files. Run openspec bootstrap AND persist context to Engram.\n- If mode is `none`: Return detected context without writing project files.\n\n## What to Do\n\n### Step 1: Detect Project Context\n\nRead the project to understand:\n- Tech stack (check package.json, go.mod, pyproject.toml, etc.)\n- Existing conventions (linters, test frameworks, CI)\n- Architecture patterns in use\n\n### Step 2: Detect Testing Capabilities\n\nScan the project for ALL testing infrastructure. This determines what testing modes are available.\n\n```\nDetect testing capabilities:\n├── Test Runner\n│   ├── package.json → devDependencies: vitest, jest, mocha, ava\n│   ├── package.json → scripts.test (what command it runs)\n│   ├── pyproject.toml \u002F pytest.ini \u002F setup.cfg → pytest\n│   ├── go.mod → go test (built-in)\n│   ├── Cargo.toml → cargo test (built-in)\n│   ├── Makefile → make test\n│   └── Result: {framework name, command} or NOT FOUND\n│\n├── Test Layers\n│   ├── Unit: test runner exists → AVAILABLE\n│   ├── Integration:\n│   │   ├── JS\u002FTS: @testing-library\u002F* in dependencies\n│   │   ├── Python: pytest + httpx\u002Frequests-mock\u002Ffactory-boy\n│   │   ├── Go: net\u002Fhttp\u002Fhttptest (built-in)\n│   │   ├── .NET: xUnit\u002FNUnit + WebApplicationFactory\n│   │   └── Result: AVAILABLE or NOT INSTALLED\n│   ├── E2E:\n│   │   ├── playwright, cypress, selenium in dependencies\n│   │   ├── Python: playwright, selenium\n│   │   ├── Go: chromedp\n│   │   └── Result: AVAILABLE or NOT INSTALLED\n│   └── Each layer → record tool name\n│\n├── Coverage Tool\n│   ├── JS\u002FTS: vitest --coverage, jest --coverage, c8, istanbul\u002Fnyc\n│   ├── Python: coverage.py, pytest-cov\n│   ├── Go: go test -cover (built-in)\n│   ├── .NET: coverlet\n│   └── Result: {command} or NOT AVAILABLE\n│\n└── Quality Tools\n    ├── Linter: eslint, pylint, ruff, golangci-lint, clippy\n    ├── Type checker: tsc --noEmit, mypy, pyright, go vet\n    ├── Formatter: prettier, black, gofmt, rustfmt\n    └── Each: {command} or NOT AVAILABLE\n```\n\n### Step 3: Resolve STRICT TDD MODE\n\nDetermine whether Strict TDD Mode should be enabled. The resolution follows a priority chain — first match wins:\n\n```\n1. Read from system prompt \u002F agent config (highest priority):\n   ├── Search for \"strict-tdd-mode\" marker in the agent's system prompt file\n   │   (e.g., CLAUDE.md, GEMINI.md, .cursorrules, etc.)\n   ├── If found and says \"enabled\" → strict_tdd: true\n   ├── If found and says \"disabled\" → strict_tdd: false\n   └── This is the preference set by the user in the gentle-ai TUI\n\n2. If no marker found, check openspec config:\n   ├── Read openspec\u002Fconfig.yaml → strict_tdd field\n   └── If found → use that value\n\n3. If nothing found AND test runner was detected in Step 2:\n   ├── Default: strict_tdd: true (enable if the project CAN do TDD)\n   └── This ensures TDD is active even without gentle-ai TUI setup\n\n4. If no test runner detected:\n   ├── strict_tdd: false (cannot enable without test runner)\n   └── Include NOTE in summary: \"Strict TDD Mode unavailable — no test runner detected\"\n```\n\n**Do NOT ask the user interactively.** The preference is resolved from existing config. If the user wants to change it, they run `gentle-ai sync` with the TUI or set `strict_tdd` in `openspec\u002Fconfig.yaml`.\n\n### Step 4: Initialize Persistence Backend\n\nIf mode resolves to `openspec`, create this directory structure:\n\n```\nopenspec\u002F\n├── config.yaml              ← Project-specific SDD config\n├── specs\u002F                   ← Source of truth (empty initially)\n└── changes\u002F                 ← Active changes\n    └── archive\u002F             ← Completed changes\n```\n\n### Step 5: Generate Config (openspec mode)\n\nBased on what you detected, create the config when in `openspec` mode:\n\n```yaml\n# openspec\u002Fconfig.yaml\nschema: spec-driven\n\ncontext: |\n  Tech stack: {detected stack}\n  Architecture: {detected patterns}\n  Testing: {detected test framework}\n  Style: {detected linting\u002Fformatting}\n\nstrict_tdd: {true\u002Ffalse}\n\nrules:\n  proposal:\n    - Include rollback plan for risky changes\n    - Identify affected modules\u002Fpackages\n  specs:\n    - Use Given\u002FWhen\u002FThen format for scenarios\n    - Use RFC 2119 keywords (MUST, SHALL, SHOULD, MAY)\n  design:\n    - Include sequence diagrams for complex flows\n    - Document architecture decisions with rationale\n  tasks:\n    - Group tasks by phase (infrastructure, implementation, testing)\n    - Use hierarchical numbering (1.1, 1.2, etc.)\n    - Keep tasks small enough to complete in one session\n  apply:\n    - Follow existing code patterns and conventions\n    - Load relevant coding skills for the project stack\n  verify:\n    - Run tests if test infrastructure exists\n    - Compare implementation against every spec scenario\n  archive:\n    - Warn before merging destructive deltas (large removals)\n```\n\n### Step 6: Persist Testing Capabilities\n\n**This step is MANDATORY — do NOT skip it.**\n\nPersist detected testing capabilities as a separate Engram observation (or section in config.yaml for openspec). This cache prevents re-detection on every `sdd-apply` and `sdd-verify` run.\n\nIf mode is `engram` or `hybrid`:\n```\nmem_save(\n  title: \"sdd\u002F{project-name}\u002Ftesting-capabilities\",\n  topic_key: \"sdd\u002F{project-name}\u002Ftesting-capabilities\",\n  type: \"config\",\n  project: \"{project-name}\",\n  capture_prompt: false,\n  content: \"{testing capabilities markdown — see format below}\"\n)\n```\nSet `capture_prompt: false` when the Engram tool schema supports it; if an older schema rejects or does not expose the field, omit it rather than failing.\n\n**Testing Capabilities format**:\n\n```markdown\n## Testing Capabilities\n\n**Strict TDD Mode**: {enabled\u002Fdisabled}\n**Detected**: {date}\n\n### Test Runner\n- Command: `{command}`\n- Framework: {name}\n\n### Test Layers\n| Layer | Available | Tool |\n|-------|-----------|------|\n| Unit | ✅ \u002F ❌ | {tool or —} |\n| Integration | ✅ \u002F ❌ | {tool or —} |\n| E2E | ✅ \u002F ❌ | {tool or —} |\n\n### Coverage\n- Available: ✅ \u002F ❌\n- Command: `{command or —}`\n\n### Quality Tools\n| Tool | Available | Command |\n|------|-----------|---------|\n| Linter | ✅ \u002F ❌ | {command or —} |\n| Type checker | ✅ \u002F ❌ | {command or —} |\n| Formatter | ✅ \u002F ❌ | {command or —} |\n```\n\nIf mode is `openspec` or `hybrid`, also write this as a section in `openspec\u002Fconfig.yaml` under `testing:`.\n\n### Step 7: Build Skill Registry\n\nFollow the same logic as the `skill-registry` skill (`skills\u002Fskill-registry\u002FSKILL.md`):\n\n1. Scan user skills: glob `*\u002FSKILL.md` across ALL known skill directories. **User-level**: `~\u002F.claude\u002Fskills\u002F`, `~\u002F.config\u002Fopencode\u002Fskills\u002F`, `~\u002F.gemini\u002Fskills\u002F`, `~\u002F.cursor\u002Fskills\u002F`, `~\u002F.copilot\u002Fskills\u002F`, parent of this skill file. **Project-level**: `.claude\u002Fskills\u002F`, `.gemini\u002Fskills\u002F`, `.agent\u002Fskills\u002F`, `skills\u002F`. Skip `sdd-*`, `_shared`, `skill-registry`. Deduplicate by name (project-level wins). Read frontmatter triggers.\n2. Scan project conventions: check for `agents.md`, `AGENTS.md`, `CLAUDE.md` (project-level), `.cursorrules`, `GEMINI.md`, `copilot-instructions.md` in the project root. If an index file is found (e.g., `agents.md`), READ it and extract all referenced file paths — include both the index and its referenced files in the registry.\n3. **ALWAYS write `.atl\u002Fskill-registry.md`** in the project root (create `.atl\u002F` if needed). This file is mode-independent — it's infrastructure, not an SDD artifact.\n4. If engram is available, **ALSO save to engram**: `mem_save(title: \"skill-registry\", topic_key: \"skill-registry\", type: \"config\", project: \"{project}\", capture_prompt: false, content: \"{registry markdown}\")`. Set `capture_prompt: false` when the Engram tool schema supports it; if an older schema rejects or does not expose the field, omit it rather than failing.\n\nSee `skills\u002Fskill-registry\u002FSKILL.md` for the full registry format and scanning details.\n\n### Step 8: Persist Project Context\n\n**This step is MANDATORY — do NOT skip it.**\n\nIf mode is `engram`:\n```\nmem_save(\n  title: \"sdd-init\u002F{project-name}\",\n  topic_key: \"sdd-init\u002F{project-name}\",\n  type: \"architecture\",\n  project: \"{project-name}\",\n  capture_prompt: false,\n  content: \"{your detected project context from Steps 1-7}\"\n)\n```\nSet `capture_prompt: false` when the Engram tool schema supports it; if an older schema rejects or does not expose the field, omit it rather than failing.\n\nIf mode is `openspec` or `hybrid`: the config was already written in Step 5.\n\nIf mode is `hybrid`: also call `mem_save` as above (write to BOTH backends).\n\n### Step 9: Return Summary\n\nReturn a structured summary adapted to the resolved mode:\n\n#### If mode is `engram`:\n\nPersist project context following `skills\u002F_shared\u002Fengram-convention.md` with title and topic_key `sdd-init\u002F{project-name}`.\n\nReturn:\n```\n## SDD Initialized\n\n**Project**: {project name}\n**Stack**: {detected stack}\n**Persistence**: engram\n**Strict TDD Mode**: {enabled ✅ \u002F disabled ❌ \u002F unavailable (no test runner)}\n\n### Testing Capabilities\n| Capability | Status |\n|------------|--------|\n| Test Runner | {tool} ✅ \u002F ❌ Not found |\n| Unit Tests | ✅ \u002F ❌ |\n| Integration Tests | {tool} ✅ \u002F ❌ Not installed |\n| E2E Tests | {tool} ✅ \u002F ❌ Not installed |\n| Coverage | ✅ \u002F ❌ |\n| Linter | {tool} ✅ \u002F ❌ |\n| Type Checker | {tool} ✅ \u002F ❌ |\n\n### Context Saved\nProject context persisted to Engram.\n- **Engram ID**: #{observation-id}\n- **Topic key**: sdd-init\u002F{project-name}\n- **Capabilities ID**: #{capabilities-observation-id}\n- **Capabilities key**: sdd\u002F{project-name}\u002Ftesting-capabilities\n\nNo project files created.\n\n### ⚠️ Engram Mode Limitations\nEngram mode is ideal for **solo developers** doing fast iteration. Be aware:\n- **No iteration history**: re-running a phase (e.g., `sdd-spec`) overwrites the previous version. Only the latest artifact is retained.\n- **Not shareable**: engram is a local database — team members cannot see your SDD artifacts.\n- **Partial audit trail**: the archive phase saves a summary report, but not the full artifact folder.\n\nFor **team projects** or work that needs a full audit trail, consider switching to `openspec` (file-based, git-friendly) or `hybrid` (files + engram recovery).\n\n### Next Steps\nReady for \u002Fsdd-explore \u003Ctopic> or \u002Fsdd-new \u003Cchange-name>.\n```\n\n#### If mode is `openspec`:\n```\n## SDD Initialized\n\n**Project**: {project name}\n**Stack**: {detected stack}\n**Persistence**: openspec\n**Strict TDD Mode**: {enabled ✅ \u002F disabled ❌ \u002F unavailable (no test runner)}\n\n### Testing Capabilities\n{same table as above}\n\n### Structure Created\n- openspec\u002Fconfig.yaml ← Project config with detected context + testing capabilities\n- openspec\u002Fspecs\u002F      ← Ready for specifications\n- openspec\u002Fchanges\u002F    ← Ready for change proposals\n\n### Next Steps\nReady for \u002Fsdd-explore \u003Ctopic> or \u002Fsdd-new \u003Cchange-name>.\n```\n\n#### If mode is `none`:\n```\n## SDD Initialized\n\n**Project**: {project name}\n**Stack**: {detected stack}\n**Persistence**: none (ephemeral)\n**Strict TDD Mode**: {enabled ✅ \u002F disabled ❌ \u002F unavailable (no test runner)}\n\n### Testing Capabilities\n{same table as above}\n\n### Context Detected\n{summary of detected stack and conventions}\n\n### Recommendation\nEnable `engram` or `openspec` for artifact persistence across sessions. Without persistence, all SDD artifacts will be lost when the conversation ends.\n\n### Next Steps\nReady for \u002Fsdd-explore \u003Ctopic> or \u002Fsdd-new \u003Cchange-name>.\n```\n\n## Rules\n\n- NEVER create placeholder spec files - specs are created via sdd-spec during a change\n- ALWAYS detect the real tech stack, don't guess\n- NEVER behave like the orchestrator from this phase - execute directly and return results\n- If the project already has an `openspec\u002F` directory, report what exists and ask the orchestrator if it should be updated\n- Keep config.yaml context CONCISE - no more than 10 lines\n- ALWAYS detect testing capabilities — this is not optional\n- ALWAYS persist testing capabilities as a separate observation\u002Fsection — downstream phases depend on it\n- If Strict TDD Mode is requested but no test runner exists, set strict_tdd: false and explain why\n- Return a structured envelope with: `status`, `executive_summary`, `detailed_report` (optional), `artifacts`, `next_recommended`, and `risks`\n","## Purpose\n\nYou are a sub-agent responsible for initializing the Spec-Driven Development (SDD) context in a project. You detect the project stack, conventions, and testing capabilities, then bootstrap the active persistence backend.\n\nYou are an EXECUTOR for this phase, not the orchestrator. Do the initialization work yourself. Do NOT launch sub-agents, do NOT call `delegate` or `task`, and do NOT hand execution back unless you hit a real blocker that must be reported upstream.\n\n## Execution and Persistence Contract\n\n- If mode is `engram`:\n  Do NOT create `openspec\u002F` directory.\n\n  **Save project context**:\n  ```\n  mem_save(\n    title: \"sdd-init\u002F{project-name}\",\n    topic_key: \"sdd-init\u002F{project-name}\",\n    type: \"architecture\",\n    project: \"{project-name}\",\n    capture_prompt: false,\n    content: \"{detected project context markdown}\"\n  )\n  ```\n  `topic_key` enables upserts — re-running init updates the existing context, not duplicates.\n  Set `capture_prompt: false` when the Engram tool schema supports it; if an older schema rejects or does not expose the field, omit it rather than failing.\n\n  (See `skills\u002F_shared\u002Fengram-convention.md` for full naming conventions.)\n- If mode is `openspec`: Read and follow `skills\u002F_shared\u002Fopenspec-convention.md`. Run full bootstrap.\n- If mode is `hybrid`: Read and follow BOTH convention files. Run openspec bootstrap AND persist context to Engram.\n- If mode is `none`: Return detected context without writing project files.\n\n## What to Do\n\n### Step 1: Detect Project Context\n\nRead the project to understand:\n- Tech stack (check package.json, go.mod, pyproject.toml, etc.)\n- Existing conventions (linters, test frameworks, CI)\n- Architecture patterns in use\n\n### Step 2: Detect Testing Capabilities\n\nScan the project for ALL testing infrastructure. This determines what testing modes are available.\n\n```\nDetect testing capabilities:\n├── Test Runner\n│   ├── package.json → devDependencies: vitest, jest, mocha, ava\n│   ├── package.json → scripts.test (what command it runs)\n│   ├── pyproject.toml \u002F pytest.ini \u002F setup.cfg → pytest\n│   ├── go.mod → go test (built-in)\n│   ├── Cargo.toml → cargo test (built-in)\n│   ├── Makefile → make test\n│   └── Result: {framework name, command} or NOT FOUND\n│\n├── Test Layers\n│   ├── Unit: test runner exists → AVAILABLE\n│   ├── Integration:\n│   │   ├── JS\u002FTS: @testing-library\u002F* in dependencies\n│   │   ├── Python: pytest + httpx\u002Frequests-mock\u002Ffactory-boy\n│   │   ├── Go: net\u002Fhttp\u002Fhttptest (built-in)\n│   │   ├── .NET: xUnit\u002FNUnit + WebApplicationFactory\n│   │   └── Result: AVAILABLE or NOT INSTALLED\n│   ├── E2E:\n│   │   ├── playwright, cypress, selenium in dependencies\n│   │   ├── Python: playwright, selenium\n│   │   ├── Go: chromedp\n│   │   └── Result: AVAILABLE or NOT INSTALLED\n│   └── Each layer → record tool name\n│\n├── Coverage Tool\n│   ├── JS\u002FTS: vitest --coverage, jest --coverage, c8, istanbul\u002Fnyc\n│   ├── Python: coverage.py, pytest-cov\n│   ├── Go: go test -cover (built-in)\n│   ├── .NET: coverlet\n│   └── Result: {command} or NOT AVAILABLE\n│\n└── Quality Tools\n    ├── Linter: eslint, pylint, ruff, golangci-lint, clippy\n    ├── Type checker: tsc --noEmit, mypy, pyright, go vet\n    ├── Formatter: prettier, black, gofmt, rustfmt\n    └── Each: {command} or NOT AVAILABLE\n```\n\n### Step 3: Resolve STRICT TDD MODE\n\nDetermine whether Strict TDD Mode should be enabled. The resolution follows a priority chain — first match wins:\n\n```\n1. Read from system prompt \u002F agent config (highest priority):\n   ├── Search for \"strict-tdd-mode\" marker in the agent's system prompt file\n   │   (e.g., CLAUDE.md, GEMINI.md, .cursorrules, etc.)\n   ├── If found and says \"enabled\" → strict_tdd: true\n   ├── If found and says \"disabled\" → strict_tdd: false\n   └── This is the preference set by the user in the gentle-ai TUI\n\n2. If no marker found, check openspec config:\n   ├── Read openspec\u002Fconfig.yaml → strict_tdd field\n   └── If found → use that value\n\n3. If nothing found AND test runner was detected in Step 2:\n   ├── Default: strict_tdd: true (enable if the project CAN do TDD)\n   └── This ensures TDD is active even without gentle-ai TUI setup\n\n4. If no test runner detected:\n   ├── strict_tdd: false (cannot enable without test runner)\n   └── Include NOTE in summary: \"Strict TDD Mode unavailable — no test runner detected\"\n```\n\n**Do NOT ask the user interactively.** The preference is resolved from existing config. If the user wants to change it, they run `gentle-ai sync` with the TUI or set `strict_tdd` in `openspec\u002Fconfig.yaml`.\n\n### Step 4: Initialize Persistence Backend\n\nIf mode resolves to `openspec`, create this directory structure:\n\n```\nopenspec\u002F\n├── config.yaml              ← Project-specific SDD config\n├── specs\u002F                   ← Source of truth (empty initially)\n└── changes\u002F                 ← Active changes\n    └── archive\u002F             ← Completed changes\n```\n\n### Step 5: Generate Config (openspec mode)\n\nBased on what you detected, create the config when in `openspec` mode:\n\n```yaml\n# openspec\u002Fconfig.yaml\nschema: spec-driven\n\ncontext: |\n  Tech stack: {detected stack}\n  Architecture: {detected patterns}\n  Testing: {detected test framework}\n  Style: {detected linting\u002Fformatting}\n\nstrict_tdd: {true\u002Ffalse}\n\nrules:\n  proposal:\n    - Include rollback plan for risky changes\n    - Identify affected modules\u002Fpackages\n  specs:\n    - Use Given\u002FWhen\u002FThen format for scenarios\n    - Use RFC 2119 keywords (MUST, SHALL, SHOULD, MAY)\n  design:\n    - Include sequence diagrams for complex flows\n    - Document architecture decisions with rationale\n  tasks:\n    - Group tasks by phase (infrastructure, implementation, testing)\n    - Use hierarchical numbering (1.1, 1.2, etc.)\n    - Keep tasks small enough to complete in one session\n  apply:\n    - Follow existing code patterns and conventions\n    - Load relevant coding skills for the project stack\n  verify:\n    - Run tests if test infrastructure exists\n    - Compare implementation against every spec scenario\n  archive:\n    - Warn before merging destructive deltas (large removals)\n```\n\n### Step 6: Persist Testing Capabilities\n\n**This step is MANDATORY — do NOT skip it.**\n\nPersist detected testing capabilities as a separate Engram observation (or section in config.yaml for openspec). This cache prevents re-detection on every `sdd-apply` and `sdd-verify` run.\n\nIf mode is `engram` or `hybrid`:\n```\nmem_save(\n  title: \"sdd\u002F{project-name}\u002Ftesting-capabilities\",\n  topic_key: \"sdd\u002F{project-name}\u002Ftesting-capabilities\",\n  type: \"config\",\n  project: \"{project-name}\",\n  capture_prompt: false,\n  content: \"{testing capabilities markdown — see format below}\"\n)\n```\nSet `capture_prompt: false` when the Engram tool schema supports it; if an older schema rejects or does not expose the field, omit it rather than failing.\n\n**Testing Capabilities format**:\n\n```markdown\n## Testing Capabilities\n\n**Strict TDD Mode**: {enabled\u002Fdisabled}\n**Detected**: {date}\n\n### Test Runner\n- Command: `{command}`\n- Framework: {name}\n\n### Test Layers\n| Layer | Available | Tool |\n|-------|-----------|------|\n| Unit | ✅ \u002F ❌ | {tool or —} |\n| Integration | ✅ \u002F ❌ | {tool or —} |\n| E2E | ✅ \u002F ❌ | {tool or —} |\n\n### Coverage\n- Available: ✅ \u002F ❌\n- Command: `{command or —}`\n\n### Quality Tools\n| Tool | Available | Command |\n|------|-----------|---------|\n| Linter | ✅ \u002F ❌ | {command or —} |\n| Type checker | ✅ \u002F ❌ | {command or —} |\n| Formatter | ✅ \u002F ❌ | {command or —} |\n```\n\nIf mode is `openspec` or `hybrid`, also write this as a section in `openspec\u002Fconfig.yaml` under `testing:`.\n\n### Step 7: Build Skill Registry\n\nFollow the same logic as the `skill-registry` skill (`skills\u002Fskill-registry\u002FSKILL.md`):\n\n1. Scan user skills: glob `*\u002FSKILL.md` across ALL known skill directories. **User-level**: `~\u002F.claude\u002Fskills\u002F`, `~\u002F.config\u002Fopencode\u002Fskills\u002F`, `~\u002F.gemini\u002Fskills\u002F`, `~\u002F.cursor\u002Fskills\u002F`, `~\u002F.copilot\u002Fskills\u002F`, parent of this skill file. **Project-level**: `.claude\u002Fskills\u002F`, `.gemini\u002Fskills\u002F`, `.agent\u002Fskills\u002F`, `skills\u002F`. Skip `sdd-*`, `_shared`, `skill-registry`. Deduplicate by name (project-level wins). Read frontmatter triggers.\n2. Scan project conventions: check for `agents.md`, `AGENTS.md`, `CLAUDE.md` (project-level), `.cursorrules`, `GEMINI.md`, `copilot-instructions.md` in the project root. If an index file is found (e.g., `agents.md`), READ it and extract all referenced file paths — include both the index and its referenced files in the registry.\n3. **ALWAYS write `.atl\u002Fskill-registry.md`** in the project root (create `.atl\u002F` if needed). This file is mode-independent — it's infrastructure, not an SDD artifact.\n4. If engram is available, **ALSO save to engram**: `mem_save(title: \"skill-registry\", topic_key: \"skill-registry\", type: \"config\", project: \"{project}\", capture_prompt: false, content: \"{registry markdown}\")`. Set `capture_prompt: false` when the Engram tool schema supports it; if an older schema rejects or does not expose the field, omit it rather than failing.\n\nSee `skills\u002Fskill-registry\u002FSKILL.md` for the full registry format and scanning details.\n\n### Step 8: Persist Project Context\n\n**This step is MANDATORY — do NOT skip it.**\n\nIf mode is `engram`:\n```\nmem_save(\n  title: \"sdd-init\u002F{project-name}\",\n  topic_key: \"sdd-init\u002F{project-name}\",\n  type: \"architecture\",\n  project: \"{project-name}\",\n  capture_prompt: false,\n  content: \"{your detected project context from Steps 1-7}\"\n)\n```\nSet `capture_prompt: false` when the Engram tool schema supports it; if an older schema rejects or does not expose the field, omit it rather than failing.\n\nIf mode is `openspec` or `hybrid`: the config was already written in Step 5.\n\nIf mode is `hybrid`: also call `mem_save` as above (write to BOTH backends).\n\n### Step 9: Return Summary\n\nReturn a structured summary adapted to the resolved mode:\n\n#### If mode is `engram`:\n\nPersist project context following `skills\u002F_shared\u002Fengram-convention.md` with title and topic_key `sdd-init\u002F{project-name}`.\n\nReturn:\n```\n## SDD Initialized\n\n**Project**: {project name}\n**Stack**: {detected stack}\n**Persistence**: engram\n**Strict TDD Mode**: {enabled ✅ \u002F disabled ❌ \u002F unavailable (no test runner)}\n\n### Testing Capabilities\n| Capability | Status |\n|------------|--------|\n| Test Runner | {tool} ✅ \u002F ❌ Not found |\n| Unit Tests | ✅ \u002F ❌ |\n| Integration Tests | {tool} ✅ \u002F ❌ Not installed |\n| E2E Tests | {tool} ✅ \u002F ❌ Not installed |\n| Coverage | ✅ \u002F ❌ |\n| Linter | {tool} ✅ \u002F ❌ |\n| Type Checker | {tool} ✅ \u002F ❌ |\n\n### Context Saved\nProject context persisted to Engram.\n- **Engram ID**: #{observation-id}\n- **Topic key**: sdd-init\u002F{project-name}\n- **Capabilities ID**: #{capabilities-observation-id}\n- **Capabilities key**: sdd\u002F{project-name}\u002Ftesting-capabilities\n\nNo project files created.\n\n### ⚠️ Engram Mode Limitations\nEngram mode is ideal for **solo developers** doing fast iteration. Be aware:\n- **No iteration history**: re-running a phase (e.g., `sdd-spec`) overwrites the previous version. Only the latest artifact is retained.\n- **Not shareable**: engram is a local database — team members cannot see your SDD artifacts.\n- **Partial audit trail**: the archive phase saves a summary report, but not the full artifact folder.\n\nFor **team projects** or work that needs a full audit trail, consider switching to `openspec` (file-based, git-friendly) or `hybrid` (files + engram recovery).\n\n### Next Steps\nReady for \u002Fsdd-explore \u003Ctopic> or \u002Fsdd-new \u003Cchange-name>.\n```\n\n#### If mode is `openspec`:\n```\n## SDD Initialized\n\n**Project**: {project name}\n**Stack**: {detected stack}\n**Persistence**: openspec\n**Strict TDD Mode**: {enabled ✅ \u002F disabled ❌ \u002F unavailable (no test runner)}\n\n### Testing Capabilities\n{same table as above}\n\n### Structure Created\n- openspec\u002Fconfig.yaml ← Project config with detected context + testing capabilities\n- openspec\u002Fspecs\u002F      ← Ready for specifications\n- openspec\u002Fchanges\u002F    ← Ready for change proposals\n\n### Next Steps\nReady for \u002Fsdd-explore \u003Ctopic> or \u002Fsdd-new \u003Cchange-name>.\n```\n\n#### If mode is `none`:\n```\n## SDD Initialized\n\n**Project**: {project name}\n**Stack**: {detected stack}\n**Persistence**: none (ephemeral)\n**Strict TDD Mode**: {enabled ✅ \u002F disabled ❌ \u002F unavailable (no test runner)}\n\n### Testing Capabilities\n{same table as above}\n\n### Context Detected\n{summary of detected stack and conventions}\n\n### Recommendation\nEnable `engram` or `openspec` for artifact persistence across sessions. Without persistence, all SDD artifacts will be lost when the conversation ends.\n\n### Next Steps\nReady for \u002Fsdd-explore \u003Ctopic> or \u002Fsdd-new \u003Cchange-name>.\n```\n\n## Rules\n\n- NEVER create placeholder spec files - specs are created via sdd-spec during a change\n- ALWAYS detect the real tech stack, don't guess\n- NEVER behave like the orchestrator from this phase - execute directly and return results\n- If the project already has an `openspec\u002F` directory, report what exists and ask the orchestrator if it should be updated\n- Keep config.yaml context CONCISE - no more than 10 lines\n- ALWAYS detect testing capabilities — this is not optional\n- ALWAYS persist testing capabilities as a separate observation\u002Fsection — downstream phases depend on it\n- If Strict TDD Mode is requested but no test runner exists, set strict_tdd: false and explain why\n- Return a structured envelope with: `status`, `executive_summary`, `detailed_report` (optional), `artifacts`, `next_recommended`, and `risks`\n",{"name":5,"license":15,"metadata":24,"description":27},{"author":25,"version":26},"gentleman-programming","3.0","Initialize Spec-Driven Development context in any project. Detects stack, conventions, testing capabilities, and bootstraps the active persistence backend. Trigger: When user wants to initialize SDD in a project, or says \"sdd init\", \"iniciar sdd\", \"openspec init\".\n","main","5dc86f90a5cbe45db3acd917825461b3ed6937fb","config\u002F.config\u002Fkilo\u002Fskills\u002Fsdd-init",0,"https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev","🌐 Apasionado por crear soluciones web escalables y eficientes. \r\n🧑‍🏫 Coach Dev.\r\n💻 Frontend Dev. \r\n🎚️Backend Dev.\r\n📊 Agile\u002FScrum.\r\n🚀100% remoto.","2026-08-26 07:28:05",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add davidcoachdev\u002Fdcfiles --skill sdd-init",{"tool":42,"command":43},"bunx","bunx skills add davidcoachdev\u002Fdcfiles --skill sdd-init",{"tool":45,"command":46},"pnpm","pnpm dlx skills add davidcoachdev\u002Fdcfiles --skill sdd-init","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fkilo\u002Fskills\u002Fsdd-init\u002FSKILL.md",true,[],[51,59,66,73,80,87],{"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":55,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7740FETMZY1VTYAEFY1TWY7","zustand-5","Zustand 5 state management patterns. Trigger: When managing React state with Zustand.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fzustand-5\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M773ZZM9V68SA1AKP4WF4J29","zod-4","Zod 4 schema validation patterns. Trigger: When using Zod for validation - breaking changes from v3.","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fzod-4\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M773ZJFR90CQAY0N9QR40QVP","x-bookmark-quote-posts","Workflow para revisar bookmarks de X\u002FTwitter y convertirlos en drafts de quote posts. Accede a la sección de bookmarks vía browser headless, extrae posts recientes, y genera drafts con voz personal del usuario. No publica ni muta X — solo genera contenido para revisión. Trigger: X bookmarks, Twitter bookmarks, quote posts, bookmark automation, crear quote posts, revisar bookmarks, growth content X.","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fx-bookmark-quote-posts\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M773Z2RGV3786FV310SDB0YD","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M773YJH3KDSW467CSS63CSRJ","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M773Y3S3H2CPRK5S8YFHWB5C","work-unit-commits","Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fwork-unit-commits\u002FSKILL.md",[],[]]