본문으로 건너뛰기
cccskills
무료GitHub에 공개

command-router

Routes /sdd-run commands to fullstack-typescript skills or system CLI.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Command Router

Routes techpacks.routeCommand(command, args) requests to the appropriate fullstack-typescript skill or system CLI handler. Core never dispatches tech pack commands directly — it invokes this router, which handles argument validation, sub-help, destructive action confirmation, and dispatch.

Input

Invoked by the techpacks gateway with a structured context block:

command: <command-name>
namespace: <tech-pack-namespace>
args: <parsed-args>

Validated against command-router-context.schema.json.


Dispatch Table

Maps the command namespace to its handler.

NamespaceHandlerDescription
local-envINVOKE local-env-orchestration skillOrchestrates local Kubernetes environment management
databasePass-through to tech system CLIDatabase lifecycle operations
contractPass-through to tech system CLIContract generation and validation
configINVOKE config-orchestration skillConfiguration management operations

Handler Details

Skill-handled namespaces (local-env, config): Load the orchestration skill via techpacks.loadSkill and pass the action and args. The skill handles argument validation, sub-help display, and execution.

Pass-through namespaces (database, contract): Execute directly via the tech system CLI:

<tech-pack-root>/system/system-run.sh <namespace> <action> <args>

Skill Paths

Skill NamePath (relative to tech pack root)
local-env-orchestrationskills/orchestrators/local-env-orchestration/SKILL.md
config-orchestrationskills/orchestrators/config-orchestration/SKILL.md

Tech System CLI Path

<tech-pack-root>/system/system-run.sh

Where <tech-pack-root> is the absolute path to the tech pack directory, resolved by the techpacks gateway via techpacks.resolvePath.


Destructive Actions Table

Actions that destroy data or remove deployments. The sdd-run command checks this table before execution and requires explicit user confirmation.

CommandLevelWhat it affects
database teardowndestructiveRemoves the database and all associated resources permanently
database resetdestructiveDrops and recreates the database from scratch — all data is lost
database seedcautionOverwrites existing seed data — existing records may be replaced
local-env destroydestructiveDeletes the local Kubernetes cluster and all resources within it
local-env undeploycautionRemoves deployed applications from the cluster — databases persist

Confirmation Format

For destructive and caution actions, display a warning before executing:

<warning_level> <LEVEL>: <action description>

This will <specific consequence>.

Target: <component or cluster being affected>
Environment: <env if applicable>

Confirm? (yes/no)

Sub-Help: database

When /sdd-run database is invoked without an action, display:

/sdd-run database — PostgreSQL database lifecycle management

USAGE:
  /sdd-run database <action> <name> [options]

ACTIONS:
  setup          Initialize schema, run migrations, and seed
  migrate        Run pending database migrations
  seed           Populate database with seed data                     caution
  reset          Drop and recreate database from scratch              destructive
  teardown       Remove database and all associated resources         destructive
  psql           Open interactive PostgreSQL shell
  port-forward   Forward local port to database pod in Kubernetes

REQUIRED:
  <name>         Database component name (from sdd-settings.yaml)

OPTIONS:
  --env <env>    Target environment (default: local)

EXAMPLES:
  /sdd-run database setup main-db
  /sdd-run database migrate main-db --env staging
  /sdd-run database psql main-db
  /sdd-run database reset main-db

Sub-Help: contract

When /sdd-run contract is invoked without an action, display:

/sdd-run contract — OpenAPI contract management

USAGE:
  /sdd-run contract <action> <name>

ACTIONS:
  generate-types   Generate TypeScript types from OpenAPI spec
  validate         Validate OpenAPI spec for correctness

REQUIRED:
  <name>           Contract component name (from sdd-settings.yaml)

EXAMPLES:
  /sdd-run contract generate-types main-api
  /sdd-run contract validate main-api

Sub-Help: config

When /sdd-run config is invoked without an action, the config-orchestration skill displays its own sub-help. See skills/orchestrators/config-orchestration/SKILL.md.

Sub-Help: local-env

When /sdd-run local-env is invoked without an action, the local-env-orchestration skill displays its own sub-help. See skills/orchestrators/local-env-orchestration/SKILL.md.


Namespace Mapping Note

The local-env namespace is the user-facing name. The local-env-orchestration skill maps this to the env namespace when calling the system CLI:

  • User runs: /sdd-run local-env create
  • Orchestrator executes: <tech-pack-root>/system/system-run.sh env create

This mapping is handled inside the local-env-orchestration skill, not in this router.


Routing Logic

When the techpacks gateway invokes this router:

  1. Parse the context block — extract command, namespace, and args.

  2. Extract the namespace — the first word of the command (e.g., database from database setup).

  3. Check the Dispatch Table — find the handler for the namespace.

  4. If skill-handled — load the orchestration skill and pass the action and args to it.

  5. If pass-through — check the Destructive Actions Table first. If the command matches a destructive or caution action, require confirmation before executing. Then run the system CLI command.

  6. If namespace not found — return an error indicating the namespace is not supported by this tech pack.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Standards for authoring SDD plugin agents — frontmatter, self-containment, skill references, and no-user-interaction rules.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Scaffolds Node.js/TypeScript backend components with CMDO architecture, driven by component settings.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

CMDO architecture standards for Node.js/TypeScript backends with strict layer separation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Intent-to-command mappings for fullstack-typescript tech pack features.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Create change specification and implementation plan with dynamic phase generation. Supports feature, bugfix, refactor, and epic types.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Orchestrates the full change lifecycle — routes actions to phase-specific sub-files.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

LiorCohen의 스킬 모두 보기

이 스킬의 문제 신고