ワンクリックで
system-cli-standards
Standards for how plugin prompt files (skills, agents, commands) invoke and reference the SDD system CLI.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Standards for how plugin prompt files (skills, agents, commands) invoke and reference the SDD system CLI.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Orchestrates SDD project initialization — version detection, environment verification, scaffolding, and git setup.
Manage project settings in sdd/sdd-settings.yaml including component settings that drive scaffolding.
Single gateway for all core↔tech-pack interactions. Reads manifests, resolves paths, loads skills/agents, routes commands.
Manage tasks and plans using the .tasks/ directory.
Standards for authoring SDD plugin agents — frontmatter, self-containment, skill references, and no-user-interaction rules.
Standards for authoring SDD plugin commands — frontmatter, user interaction, skill/agent invocation, CLI integration, and output formatting.
| name | system-cli-standards |
| description | Standards for how plugin prompt files (skills, agents, commands) invoke and reference the SDD system CLI. |
Standards for all plugin prompt files (skills, agents, commands) that invoke or reference the SDD system CLI. Does NOT cover hooks (separate lifecycle via hook-runner.sh).
The plugin has two system CLIs — one for core SDD operations and one for tech-pack-specific operations. Each has its own system-run.sh:
# Core SDD operations (spec, scaffolding, workflow, settings, permissions, archive, agent, log, tech-pack)
<plugin-root>/core/system/system-run.sh <namespace> <action> [args] [options]
# Tech pack operations (config, contract, database, local-env)
<plugin-root>/fullstack-typescript/system/system-run.sh <namespace> <action> [args] [options]
<plugin-root> is a placeholder that the agent resolves from its Claude Code plugin context. It is NOT shell syntax — the agent substitutes the actual absolute path before constructing the bash command.system-run.sh self-locates its own system root from its filesystem path and forwards to the compiled CLI via exec.private: true with no bin field, so system-run.sh is the only valid way to invoke each.| Namespace | CLI |
|---|---|
scaffolding, spec, permissions, workflow, settings, archive, tech-pack, agent, log | core/system/system-run.sh |
config, contract, database, local-env | fullstack-typescript/system/system-run.sh |
Use system-run.sh as shown above. This is the only context this standard covers.
Hooks use hook-runner.sh via hooks.json. Different lifecycle, different stdin/stdout JSON contract. Out of scope for this standard.
Templates that scaffold package.json files into user projects cannot use ${CLAUDE_PLUGIN_ROOT} — that variable only exists during a plugin session. Scaffolded npm scripts that reference sdd-system as a bare command are broken. Until the system package exposes a bin field or another resolution mechanism, do not emit CLI invocations in scaffolded templates. Instead, provide instructions that the user runs via the plugin commands (e.g., /sdd-run).
All CLI commands return a CommandResult:
interface CommandResult {
readonly success: boolean;
readonly data?: unknown;
readonly error?: string;
readonly message?: string;
}
| Mode | Flag | Behavior |
|---|---|---|
| JSON (structured) | --json | Prints JSON.stringify(result, null, 2) to stdout |
| Plain (human) | (default) | Prints result.message to stdout, or Error: ${result.error} to stderr on failure |
| Code | Meaning |
|---|---|
0 | result.success === true |
1 | result.success === false |
--json and parse the JSON output. Check .success before reading .data.--json. The CLI prints human-readable text.All commands accept:
| Option | Description |
|---|---|
--json | Output structured JSON instead of plain text |
--verbose | Enable verbose logging |
--help | Show help for the command |
CLI commands that accept file content (e.g., --config <path>) should also accept - to read from stdin. This eliminates temporary file creation in prompts.
system-run.sh passes stdin through transparently via exec.
Preferred — pipe content via stdin:
echo "${content}" | <plugin-root>/system/system-run.sh namespace action --config -
Avoid — creating temp files:
# Don't do this — creates files that need cleanup
echo "${content}" > /tmp/temp-config.yaml
<plugin-root>/system/system-run.sh namespace action --config /tmp/temp-config.yaml
rm /tmp/temp-config.yaml
If an operation is deterministic and repeatable, it belongs in the CLI. If it requires judgment or context, it belongs in the prompt.
This is a strict one-way dependency. The CLI is a standalone tool that knows nothing about the prompt layer.
All plugin prompt files (plugin/core/skills/, plugin/core/commands/, plugin/fullstack-typescript/skills/, plugin/fullstack-typescript/agents/) have no runtime access to anything outside plugin/. Never reference .claude/, .tasks/, or root-level files from within a plugin prompt file.
| Operation | Owner | Why |
|---|---|---|
| File reading/writing with fixed logic | CLI | Deterministic, no judgment needed |
| YAML/JSON parsing with validation | CLI | Schema-based, repeatable |
| Path resolution and filesystem checks | CLI | Pure computation |
| Scaffolding files from templates | CLI | Template expansion is mechanical |
| Configuration management | CLI | Read/write/validate against schema |
| Anything requiring LLM judgment | Prompt | Non-deterministic |
| Anything requiring user interaction | Prompt (command layer) | Commands are the UI layer |
| Workflow orchestration | Prompt | Sequencing decisions |
| Interpreting ambiguous requirements | Prompt | Needs context and judgment |
Before adding a new CLI command, verify:
CommandResult with appropriate success, data, error, and message fields--json for structured output- for stdin where file content is an input.md file that will invoke itEvery system-run.sh <namespace> <action> reference in a prompt file must correspond to a command that actually exists in the CLI registry. Prompt files must not reference nonexistent namespace/action pairs.
Source of truth: Each namespace has a schema.ts in its respective system package — plugin/core/system/src/commands/<namespace>/schema.ts for core namespaces, or plugin/fullstack-typescript/system/src/commands/<namespace>/schema.ts for tech pack namespaces. Each exports an ACTIONS array as the authoritative list of valid actions per namespace.
Enforcement: The cli-invocation-audit.test.ts test scans all .md files under plugin/ for system-run.sh <namespace> <action> patterns and validates each pair against the CLI's actual command registry. This test runs as part of npm test.
When adding a new CLI invocation to a prompt file:
<namespace> <action> pair exists in the corresponding schema.tsUse Opus model for audits — thoroughness matters more than speed here.
plugin/core/skills/, plugin/core/commands/, plugin/fullstack-typescript/skills/, and plugin/fullstack-typescript/agents/plugin/core/skills/*/templates/ and plugin/fullstack-typescript/skills/*/templates/system-run.sh invocation.temp/system-cli-audit-<datetime>.md.tasks/0-inbox/116/audit-<datetime>.md) and reference it from task.md — do NOT inline the full report into task.mdNote: plugin/core/system/README.md and plugin/fullstack-typescript/system/README.md are the CLIs' own documentation and are out of scope for prompt file audits.
Audit the plugin/core/system/ and plugin/fullstack-typescript/system/ TypeScript source code against the typescript-standards skill.
typescript-standards skill — use its full Summary Checklist as the audit criteria.ts file in plugin/core/system/src/ and plugin/fullstack-typescript/system/src/ (recursively).temp/system-cli-audit-<datetime>.md report (under a separate "TypeScript Standards" heading), or write a standalone .temp/typescript-audit-<datetime>.md if running independently