Claude Skill

sdd-init

Trigger: sdd init, iniciar sdd, openspec init. Initialize SDD context, testing capabilities, registry, and persistence.

LLM Mart · 0 points · 10 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download gentleman-programming-gentle-ai-internal_assets_skills_sdd-init-d2e3443.zip · 5 KB
Part of gentleman-programming/gentle-ai — 36 skills

Install

skills CLI npx skills add https://github.com/Gentleman-Programming/gentle-ai/tree/main/internal/assets/skills/sdd-init
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install gentleman-programming-gentle-ai@llmmart
Git git clone https://github.com/Gentleman-Programming/gentle-ai.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole gentleman-programming/gentle-ai collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Execution Role

Confirm your role before acting. You are the dedicated sdd-init sub-agent unless you loaded this skill directly through the skill() tool.

  • If you are the sdd-init sub-agent, continue with the phase work below. Do not delegate. Do not call the Skill tool.
  • If you loaded this skill through the skill() tool, you are the orchestrator. Stop here and delegate to the dedicated sdd-init sub-agent using your platform's delegation primitive (for example, task(...) or a sub-agent invocation).

Language Domain Contract

Generated technical artifacts default to English. Do not inherit the user's conversational language or the active persona's regional voice for SDD artifacts unless the user explicitly requests that artifact language or the project convention requires it.

If technical artifacts are explicitly requested in another language, use a neutral/professional register unless the user explicitly requests a different tone or regional variant.

Public/contextual comments follow the target context language by default. Explicit user language or tone overrides win; otherwise use a neutral/professional register unless the target context clearly calls for another tone or regional variant.

Activation Contract

Run this phase when the orchestrator/user asks to initialize SDD in a project. You are the phase executor: do the work yourself, do not delegate, and do not behave like the orchestrator.

Hard Rules

  • Detect the real stack, conventions, architecture, testing tools, and persistence mode; never guess.
  • In engram mode, do not create openspec/.
  • In openspec mode, follow ../_shared/openspec-convention.md and write file artifacts.
  • In hybrid mode, write both openspec files and Engram observations.
  • Always persist testing capabilities separately as sdd/{project}/testing-capabilities or openspec/config.yaml testing:.
  • Always build .atl/skill-registry.md; also save skill-registry to Engram when available.
  • Use capture_prompt: false for automated SDD/config saves when supported; omit it if the tool schema lacks it.
  • If openspec/ already exists, report what exists and ask before updating it.

Decision Gates

Input Action
mode=engram Save context and capabilities to Engram only.
mode=openspec Create/update openspec bootstrap files only.
mode=hybrid Do both Engram and openspec persistence.
mode=none Return detected context only; write no SDD artifacts except registry if required.
explicit strict_tdd: false marker/config Preserve strict_tdd: false.
explicit strict_tdd: true marker/config and an explicit workspace-level test command covers every in-scope project Use strict_tdd: true.
explicit strict_tdd: true marker/config without that workspace-level command Fail closed to strict_tdd: false and explain that downstream execution requires a workspace-wide command.
no marker/config, non-empty discovered project set, and an explicit workspace-level test command covers every in-scope project Default strict_tdd: true.
zero projects are discovered or no explicit workspace-level test command covers every in-scope project Set strict_tdd: false; preserve and report every project-local command, including missing or independent commands; those local facts do not override a workspace-level command that covers every in-scope project. Explain the no-runner or workspace-wide-command fallback.

Execution Steps

  1. Identify the authoritative workspace root. Before classifying a stack or applying any no-runner fallback, discover every in-scope project root from that root using the bounded rules in references/init-details.md.
  2. Inspect each discovered project for package.json, go.mod, pyproject.toml, Cargo.toml, CI, and lint/test config; preserve its relative path and summarize its stack/conventions.
  3. Detect each project's test runner and command, test layers, coverage, linter, type checker, and formatter. Aggregate those project-to-tool associations in the one workspace-level result; never select one project runner for the workspace.
  4. Resolve Strict TDD from an agent marker or openspec/config.yaml only after every discovered project has been evaluated. Set it to true only for a non-empty discovered project set when one explicit workspace-level test command covers every in-scope project. Preserve and report every project-local command, including missing or independent commands; those local facts do not override a workspace-level command that covers every in-scope project. Use the false fallback only when zero projects are discovered or no explicit workspace-level test command covers every in-scope project.
  5. Initialize persistence for the resolved mode.
  6. Build .atl/skill-registry.md using the skill-registry scan rules.
  7. Persist testing capabilities and project context.
  8. Return the structured initialization envelope.

Output Contract

Return status, executive_summary, artifacts, next_recommended, and risks. Include project, stack, persistence mode, Strict TDD status, testing capability table, saved observation IDs/paths, registry path, and next /sdd-explore or /sdd-new step.

References

  • references/init-details.md — detection checklist, Engram payloads, config skeleton, and output templates.
  • ../_shared/engram-convention.md — Engram artifact naming.
  • ../_shared/openspec-convention.md — openspec layout and rules.
Files (gentle-ai)
  • references
    • init-details.md 7.6 KB
      # SDD Init Details
      
      ## Testing Capability Checklist
      
      - Test runner: `package.json` scripts/deps, `pyproject.toml`, `pytest.ini`, `go.mod`, `Cargo.toml`, `Makefile`.
      - Test layers: unit runner; integration libraries (`testing-library`, `httpx`, `httptest`, `WebApplicationFactory`); E2E tools (`playwright`, `cypress`, `selenium`, `chromedp`).
      - Coverage: `vitest --coverage`, `jest --coverage`, `c8`, `pytest-cov`, `go test -cover`, `coverlet`.
      - Quality: linter, type checker, formatter commands.
      
      ## Workspace Project Discovery
      
      Start at the authoritative workspace root. Complete this discovery before stack or test-runner classification and before applying the no-runner fallback.
      
      1. Read explicit workspace membership first when the workspace config declares it (for example package-manager workspaces or Cargo workspace members). Inspect each declared member that resolves inside the workspace root.
      2. If there is no explicit membership, inspect candidate project roots at the workspace root and at most two directory levels below it. This bounded fallback covers direct children such as `A/pyproject.toml` and `B/Cargo.toml`; do not recursively crawl beyond that depth.
      3. Never descend into VCS, dependency, generated/build, cache, virtual-environment, or nested-repository boundaries. At minimum exclude `.git`, `node_modules`, `vendor`, `dist`, `build`, `out`, `target`, `.cache`, `__pycache__`, `.venv`, `venv`, and directories that contain their own `.git` file or directory.
      4. Treat a directory with a supported project marker as one project root. For every discovered project, retain its workspace-relative path, stack, test command, test layers, coverage command, and quality-tool commands. Do not collapse multiple commands into a chosen workspace runner.
      
      Use one workspace-level project-context and testing-capabilities result. In the result, represent projects as a table with one entry per relative path and keep each project's commands in that entry. In `openspec/config.yaml` when it is written, use a `projects:` list with the same entries and commands. Existing consumers may only render the aggregate result, so do not imply that they can execute a single combined command.
      
      Resolve Strict TDD after the complete project list is evaluated; only then apply the no-runner fallback. An explicit workspace-level test command is an existing command or target defined by the workspace or explicit config that runs the complete in-scope set from the authoritative workspace root. Do not synthesize or concatenate independent project commands.
      
      - Preserve explicit `strict_tdd: false`.
      - Use explicit `strict_tdd: true` only when an explicit workspace-level test command covers every in-scope project; otherwise fail closed to false and explain that downstream execution requires a workspace-wide command.
      - Without an explicit value, default to true only when the discovered project set is non-empty and one explicit workspace-level test command covers every in-scope project.
      - When zero projects are discovered or no explicit workspace-level command covers every in-scope project, use `strict_tdd: false`. Preserve and report every project-local command, including missing or independent commands; those local facts do not override a workspace-level command that covers every in-scope project. Explain the no-runner or workspace-wide-command fallback.
      
      ## Skill Registry Scan Rules
      
      - Scan user skills: `~/.pi/agent/skills/`, `~/.config/agents/skills/`, `~/.agents/skills/`, `~/.kimi/skills/`, `~/.config/opencode/skills/`, `~/.config/kilo/skills/`, `~/.claude/skills/`, `~/.gemini/skills/`, `~/.gemini/antigravity/skills/`, `~/.cursor/skills/`, `~/.copilot/skills/`, `~/.codex/skills/`, `~/.codeium/windsurf/skills/`, `~/.qwen/skills/`, `~/.kiro/skills/`, and `~/.openclaw/skills/`.
      - Scan project skills: `{project-root}/skills/`, `{project-root}/.opencode/skills/`, `{project-root}/.claude/skills/`, `{project-root}/.gemini/skills/`, `{project-root}/.cursor/skills/`, `{project-root}/.github/skills/`, `{project-root}/.codex/skills/`, `{project-root}/.qwen/skills/`, `{project-root}/.kiro/skills/`, `{project-root}/.openclaw/skills/`, `{project-root}/.pi/skills/`, `{project-root}/.agent/skills/`, `{project-root}/.agents/skills/`, and `{project-root}/.atl/skills/`.
      - Skip `sdd-*`, `_shared`, and `skill-registry`; deduplicate by skill name, preferring project-level skills over user-level skills.
      - Read each selected `SKILL.md` frontmatter as needed.
      - Extract `name`, trigger text from `description`, full `SKILL.md` path, and scope.
      - Treat the registry as an index, not a generated summary; subagents receive exact paths and read the full skill source of truth.
      - Scan project convention files: `agents.md`, `AGENTS.md`, project-level `CLAUDE.md`, `.cursorrules`, `GEMINI.md`, and `copilot-instructions.md`.
      - For index files such as `AGENTS.md`, extract referenced file paths and include both the index and referenced files in the registry.
      
      ## LLM-First Skill Criteria
      
      - Treat skills as runtime instruction contracts, not human documentation.
      - Required structure: frontmatter, Activation Contract, Hard Rules, Decision Gates, Execution Steps, Output Contract, References.
      - Keep `description` quoted, one physical line, trigger-first, and no longer than 250 characters.
      - Target 180-450 body tokens; move examples, schemas, edge cases, and background into local `references/` or `assets/`.
      - References must be local files and stable relative to the skill directory when possible.
      - Quality gates: hard rules are observable, decision gates cover real forks, output contract states exactly what to return, and references resolve locally.
      
      ## Engram Saves
      
      ```text
      mem_save title/topic_key: sdd-init/{project}
      type: architecture
      content: detected project context markdown
      capture_prompt: false when available
      
      mem_save title/topic_key: sdd/{project}/testing-capabilities
      type: config
      content: testing capabilities markdown
      capture_prompt: false when available
      
      mem_save title/topic_key: skill-registry
      type: config
      content: registry markdown
      capture_prompt: false when available
      ```
      
      ## OpenSpec Skeleton
      
      ```text
      openspec/
      ├── config.yaml
      ├── specs/
      └── changes/
          └── archive/
      ```
      
      `config.yaml` should include concise context, `strict_tdd`, testing capabilities, and phase rules for proposal/spec/design/tasks/apply/verify/archive. Keep `context:` under 10 lines.
      
      ## Testing Capabilities Format
      
      ```markdown
      ## Testing Capabilities
      
      **Strict TDD Mode**: {enabled/disabled}
      **Detected**: {date}
      
      ### Projects
      
      | Relative path | Stack | Test command | Framework |
      | ------------- | ----- | ------------ | --------- |
      | `{path}` | {stack} | `{command or —}` | {name or —} |
      
      ### Test Layers
      
      | Relative path | Layer       | Available | Tool        |
      | ------------- | ----------- | --------- | ----------- |
      | `{path}` | Unit        | ✅ / ❌   | {tool or —} |
      | `{path}` | Integration | ✅ / ❌   | {tool or —} |
      | `{path}` | E2E         | ✅ / ❌   | {tool or —} |
      
      ### Coverage
      
      | Relative path | Available | Command |
      | ------------- | --------- | ------- |
      | `{path}` | ✅ / ❌ | `{command or —}` |
      
      ### Quality Tools
      
      | Relative path | Tool         | Available | Command        |
      | ------------- | ------------ | --------- | -------------- |
      | `{path}` | Linter       | ✅ / ❌   | {command or —} |
      | `{path}` | Type checker | ✅ / ❌   | {command or —} |
      | `{path}` | Formatter    | ✅ / ❌   | {command or —} |
      ```
      
      ## Output Templates
      
      For each mode, include project, stack, persistence, Strict TDD Mode, Testing Capabilities table, artifacts created/saved, limitations where relevant, and next steps. Engram mode must mention local/non-shareable limitations; none mode must recommend enabling persistence.
      
  • SKILL.md 5.7 KB
    ---
    name: sdd-init
    description: "Trigger: sdd init, iniciar sdd, openspec init. Initialize SDD context, testing capabilities, registry, and persistence."
    disable-model-invocation: true
    user-invocable: false
    license: MIT
    metadata:
      author: gentleman-programming
      version: "3.0"
      delegate_only: true
    ---
    
    ## Execution Role
    
    Confirm your role before acting. You are the dedicated `sdd-init` sub-agent unless you loaded this skill directly through the `skill()` tool.
    
    - If you are the `sdd-init` sub-agent, continue with the phase work below. Do not delegate. Do not call the Skill tool.
    - If you loaded this skill through the `skill()` tool, you are the orchestrator. Stop here and delegate to the dedicated `sdd-init` sub-agent using your platform's delegation primitive (for example, `task(...)` or a sub-agent invocation).
    
    ## Language Domain Contract
    
    Generated technical artifacts default to English. Do not inherit the user's conversational language or the active persona's regional voice for SDD artifacts unless the user explicitly requests that artifact language or the project convention requires it.
    
    If technical artifacts are explicitly requested in another language, use a neutral/professional register unless the user explicitly requests a different tone or regional variant.
    
    Public/contextual comments follow the target context language by default. Explicit user language or tone overrides win; otherwise use a neutral/professional register unless the target context clearly calls for another tone or regional variant.
    
    ## Activation Contract
    
    Run this phase when the orchestrator/user asks to initialize SDD in a project. You are the phase executor: do the work yourself, do not delegate, and do not behave like the orchestrator.
    
    ## Hard Rules
    
    - Detect the real stack, conventions, architecture, testing tools, and persistence mode; never guess.
    - In `engram` mode, do **not** create `openspec/`.
    - In `openspec` mode, follow `../_shared/openspec-convention.md` and write file artifacts.
    - In `hybrid` mode, write both openspec files and Engram observations.
    - Always persist testing capabilities separately as `sdd/{project}/testing-capabilities` or `openspec/config.yaml` `testing:`.
    - Always build `.atl/skill-registry.md`; also save `skill-registry` to Engram when available.
    - Use `capture_prompt: false` for automated SDD/config saves when supported; omit it if the tool schema lacks it.
    - If `openspec/` already exists, report what exists and ask before updating it.
    
    ## Decision Gates
    
    | Input | Action |
    |---|---|
    | `mode=engram` | Save context and capabilities to Engram only. |
    | `mode=openspec` | Create/update openspec bootstrap files only. |
    | `mode=hybrid` | Do both Engram and openspec persistence. |
    | `mode=none` | Return detected context only; write no SDD artifacts except registry if required. |
    | explicit `strict_tdd: false` marker/config | Preserve `strict_tdd: false`. |
    | explicit `strict_tdd: true` marker/config and an explicit workspace-level test command covers every in-scope project | Use `strict_tdd: true`. |
    | explicit `strict_tdd: true` marker/config without that workspace-level command | Fail closed to `strict_tdd: false` and explain that downstream execution requires a workspace-wide command. |
    | no marker/config, non-empty discovered project set, and an explicit workspace-level test command covers every in-scope project | Default `strict_tdd: true`. |
    | zero projects are discovered or no explicit workspace-level test command covers every in-scope project | Set `strict_tdd: false`; preserve and report every project-local command, including missing or independent commands; those local facts do not override a workspace-level command that covers every in-scope project. Explain the no-runner or workspace-wide-command fallback. |
    
    ## Execution Steps
    
    1. Identify the authoritative workspace root. Before classifying a stack or applying any no-runner fallback, discover every in-scope project root from that root using the bounded rules in `references/init-details.md`.
    2. Inspect each discovered project for `package.json`, `go.mod`, `pyproject.toml`, `Cargo.toml`, CI, and lint/test config; preserve its relative path and summarize its stack/conventions.
    3. Detect each project's test runner and command, test layers, coverage, linter, type checker, and formatter. Aggregate those project-to-tool associations in the one workspace-level result; never select one project runner for the workspace.
    4. Resolve Strict TDD from an agent marker or `openspec/config.yaml` only after every discovered project has been evaluated. Set it to true only for a non-empty discovered project set when one explicit workspace-level test command covers every in-scope project. Preserve and report every project-local command, including missing or independent commands; those local facts do not override a workspace-level command that covers every in-scope project. Use the false fallback only when zero projects are discovered or no explicit workspace-level test command covers every in-scope project.
    5. Initialize persistence for the resolved mode.
    6. Build `.atl/skill-registry.md` using the skill-registry scan rules.
    7. Persist testing capabilities and project context.
    8. Return the structured initialization envelope.
    
    ## Output Contract
    
    Return `status`, `executive_summary`, `artifacts`, `next_recommended`, and `risks`. Include project, stack, persistence mode, Strict TDD status, testing capability table, saved observation IDs/paths, registry path, and next `/sdd-explore` or `/sdd-new` step.
    
    ## References
    
    - [references/init-details.md](references/init-details.md) — detection checklist, Engram payloads, config skeleton, and output templates.
    - `../_shared/engram-convention.md` — Engram artifact naming.
    - `../_shared/openspec-convention.md` — openspec layout and rules.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related