kramme-cc-workflow/skills/kramme:siw:init/SKILL.md
Initialize structured implementation workflow documents in siw/ (spec, LOG.md, issues)
npx skillsauth add abildtoft/kramme-cc-workflow kramme:siw:initInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Set up the three-document system for tracking complex implementations locally, without requiring Linear or other external issue trackers.
This command ONLY initializes workflow documents.
Issue definition is a separate workflow. After this command completes, invoke /kramme:siw:issue-define to create your first issue. Spec hardening is a separate workflow. To strengthen an existing SIW spec, use /kramme:siw:discovery.
/kramme:siw:init [spec-file(s) | folder | discover]
↓
[Check for existing files] -> Found? -> Ask: resume or start fresh
↓
[Handle arguments] -> file/folder: import content
-> discover: run greenfield discovery, then import siw/DISCOVERY_BRIEF.md
-> empty: continue to brief interview
↓
[Brief interview OR Confirm imported content]
↓
[Read STRATEGY.md if present]
↓
[Select work context] -> Profile for downstream tool adaptation
↓
[Auto-detect spec type] -> Confirm filename
↓
[Ask about supporting specs] -> Need detailed specs?
↓
[Create documents] -> siw/spec, siw/LOG.md, siw/issues/, (supporting-specs/)
↓
[Report success] -> Suggest /kramme:siw:issue-define
Before Phase 1, parse $ARGUMENTS as shell-style arguments. If --auto is present, set AUTO_MODE=true and remove it from the remaining input. --auto uses safe initialization defaults when enough context is already supplied: keep linked files in place, use all discovered files from an explicit folder, choose the auto-detected work context and spec filename, and create a single spec file without supporting specs. It does not bypass required project context, existing-workflow protection, deletion confirmation, file overwrite checks, or fresh discovery topic requirements.
Check if any workflow files already exist:
find siw -maxdepth 1 \( \
-name "LOG.md" -o \
-name "OPEN_ISSUES_OVERVIEW.md" -o \
-name "AUDIT_IMPLEMENTATION_REPORT.md" -o \
-name "AUDIT_SPEC_REPORT.md" -o \
-name "PRODUCT_AUDIT.md" -o \
-name "SIW_*.md" -o \
-name "SPEC_STRENGTHENING_PLAN.md" -o \
-name "DISCOVERY_BRIEF.md" -o \
-name "issues" \
\) -print 2> /dev/null
# Permanent SIW spec detection (referenced as `permanent-spec find` elsewhere in this skill).
# Case-insensitive so lowercase/mixed-case filenames like `feature_spec.md` are not missed.
# Synced SIW spec-exclusion contract (keep aligned across SIW spec detectors): `LOG.md`, `OPEN_ISSUES_OVERVIEW.md`, `DISCOVERY_BRIEF.md`, `SPEC_STRENGTHENING_PLAN.md`, `AUDIT_*.md`, `PRODUCT_AUDIT.md`, `SIW_*.md`.
find siw -maxdepth 1 -type f \( -iname "*SPEC*.md" -o -iname "*SPECIFICATION*.md" -o -iname "*PLAN*.md" -o -iname "*DESIGN*.md" \) \
! -iname "LOG.md" \
! -iname "OPEN_ISSUES_OVERVIEW.md" \
! -iname "DISCOVERY_BRIEF.md" \
! -iname "SPEC_STRENGTHENING_PLAN.md" \
! -iname "AUDIT_*.md" \
! -iname "PRODUCT_AUDIT.md" \
! -iname "SIW_*.md" \
2> /dev/null
Read references/existing-workflow-handling.md and follow the first matching branch for siw/DISCOVERY_BRIEF.md only, siw/DISCOVERY_BRIEF.md + siw/SPEC_STRENGTHENING_PLAN.md, siw/SPEC_STRENGTHENING_PLAN.md only, other workflow files, or no files.
If other workflow files exist:
If AUTO_MODE=true, stop with MISSING REQUIREMENT: SIW workflow files already exist; rerun without --auto to resume, start fresh, or abort. Do not delete existing workflow files in auto mode.
Use AskUserQuestion:
header: "Existing Workflow Files Found"
question: "Workflow files already exist in this directory. How would you like to proceed?"
options:
- label: "Resume existing workflow"
description: "Continue with current files (invokes kramme:siw:continue skill)"
- label: "Start fresh"
description: "Delete existing workflow files and create new ones"
- label: "Abort"
description: "Cancel and keep existing files"
If "Resume existing workflow":
kramme:siw:continue skill will auto-trigger when they start workingIf "Start fresh":
Before deleting siw/issues/, count any existing issue files:
ls siw/issues/ISSUE-*.md 2> /dev/null | wc -l
If the count is greater than zero, surface a second confirmation using AskUserQuestion before deleting:
header: "Delete Existing Issues"
question: "{n} issue file(s) in siw/issues/ will be deleted. This cannot be undone."
options:
- label: "Delete all issues"
description: "Proceed with Start fresh; all issue files are removed"
- label: "Abort"
description: "Stop so I can back up or move issues out of siw/issues/ first"
If "Abort", stop this command without changing any files.
Delete existing temporary workflow files (siw/LOG.md, siw/OPEN_ISSUES_OVERVIEW.md, siw/issues/, siw/DISCOVERY_BRIEF.md, siw/SPEC_STRENGTHENING_PLAN.md, siw/AUDIT_IMPLEMENTATION_REPORT.md, siw/AUDIT_SPEC_REPORT.md, siw/PRODUCT_AUDIT.md, and siw/SIW_*.md), but preserve any permanent SIW spec files matched by the permanent-spec find from earlier in Phase 1 (*SPEC*.md, *SPECIFICATION*.md, *PLAN*.md, *DESIGN*.md, case-insensitive; the permanent-spec find already excludes the synced SIW spec-exclusion contract). Use trash without recursive flags when available so the deleted workflow files are recoverable from the system Trash. If trash is missing, warn that deletion will be permanent and ask for explicit confirmation before running rm -rf. After deletion, verify each target with [ ! -e "$path" ]; report any surviving path as a deletion failure instead of continuing as if Start fresh succeeded.
Continue to Phase 1.5
If no files exist: Continue to Phase 1.5
$ARGUMENTS contains any text the user provided after /kramme:siw:init.
Use resolved_arguments as the effective Phase 1.5 input. If no Phase 1 branch already set resolved_arguments, default it to $ARGUMENTS now.
Parse resolved_arguments to detect the input type:
.md, .txt, or other file extensionsls -d {path})If resolved_arguments is empty because the user ran plain /kramme:siw:init, but Phase 1 found only siw/DISCOVERY_BRIEF.md, treat that file as the single file-path input and follow Case 1.
If resolved_arguments contains file path(s):
DISCOVERY_BRIEF.md:
ls {path}references/discovery-brief-import.md to extract sections and map them into discovered_contentproject_description from the brief title or What You Actually Wantls {path}linked_spec_files (do NOT extract full content - these remain the source of truth)project_descriptionIf resolved_arguments is a directory (verified with ls -d):
Scan folder for relevant specification files:
find {folder} -maxdepth 2 -type f \( -name "*.md" -o -name "*.txt" \) 2> /dev/null
Present found files to user. If AUTO_MODE=true, select All files automatically. Otherwise use AskUserQuestion:
header: "Select Source Files"
question: "Found these files in {folder}. Which should I use as linked sources?"
multiSelect: true
options:
- "{file1}"
- "{file2}"
- "All files"
- "None - start fresh"
If "None - start fresh" selected: Set resolved_arguments empty, continue to Phase 2
If "All files" or specific files selected: Store selected paths as linked_spec_files
Continue to Phase 2.5 (Confirm Linked Sources)
If resolved_arguments starts with "discover" or "interview":
Extract optional topic from remaining resolved_arguments:
discover authentication system → topic = "authentication system"discover alone → ask for topicIf no topic provided and AUTO_MODE=true, stop with MISSING REQUIREMENT: discovery topic required for --auto. If no topic provided and AUTO_MODE is false, use AskUserQuestion:
header: "Discovery Topic"
question: "What topic should we explore? Describe what you're building or the problem you're solving."
freeform: true
Do not run the legacy inline interview path here.
Before launching discovery, re-run the permanent-spec find from Phase 1 to check for permanent SIW spec files left in siw/.
If permanent spec files still exist, do not run greenfield discovery. If AUTO_MODE=true, stop with MISSING REQUIREMENT: permanent SIW spec files already exist; rerun without --auto to choose whether to use them. Otherwise use AskUserQuestion:
header: "Existing Spec Files Found"
question: "Permanent SIW spec files still exist in siw/. A fresh discovery run would treat this as refinement, not a new project. How should I proceed?"
options:
- label: "Use existing specs"
description: "Treat the existing spec files as linked sources instead of running discovery"
- label: "Abort"
description: "Stop so I can archive or remove the old spec files before running fresh discovery"
If "Use existing specs":
linked_spec_filesproject_description from those titlesIf "Abort": stop this command without changing files.
If no permanent spec files exist, read references/greenfield-discovery-handoff.md and follow it to run the greenfield discovery handoff. That handoff must produce siw/DISCOVERY_BRIEF.md before returning here.
Set resolved_arguments=siw/DISCOVERY_BRIEF.md.
Follow the import procedure from references/discovery-brief-import.md to populate discovered_content.
Skip Phase 2, continue to Phase 2.8 (Work Context Selection)
Continue to Phase 2 (structured brief interview for overview, why-now, non-goals, and decision boundaries).
Skip this phase if imported_spec_content or discovered_content exists from Phase 1.5.
If AUTO_MODE=true and Phase 2 would run, stop before asking with MISSING REQUIREMENT: project context required for --auto; pass a spec file, folder, discovery brief, or use discover <topic>.
Read the Phase 2 templates from references/interviews.md, use them to gather project context, urgency and outcome, scope boundaries, and decision boundaries, then store the responses as project_description, why_now, out_of_scope_non_goals, and decision_boundaries_notes.
Only executed if linked_spec_files exists from Phase 1.5 (file/folder import).
Skip this phase if discovered_content exists (discover mode already has confirmation built in).
Show the files that will be linked:
Linked Specification Files:
───────────────────────────
The following files will be referenced (not duplicated) in the SIW spec:
1. {file1} - "{title from first heading}"
2. {file2} - "{title from first heading}"
...
These files remain the source of truth. The SIW spec will link to them.
If AUTO_MODE=true, choose Keep in place. Otherwise read the Phase 2.5 file-location template from references/interviews.md and use AskUserQuestion.
For both "Move to siw/" and "Copy to siw/", before transferring each file, check the target path with [ -e "siw/{filename}" ]. If a file already exists at the target, read the Phase 2.5 collision template from references/interviews.md and use AskUserQuestion before overwriting.
Apply the user's choice per file, then:
linked_spec_files, continue to Phase 2.6siw/{filename} (or the renamed/skipped path per the collision prompt above)linked_spec_files with the resulting pathssiw/ (or the renamed/skipped path per the collision prompt above)linked_spec_files with the resulting pathsOnly executed if linked_spec_files exists.
If AUTO_MODE=true, use the inferred default value. Otherwise read the Phase 2.6 project-context template from references/interviews.md and use AskUserQuestion.
Store the response as project_description.
If user provides empty response or selects "Skip", use a generic description derived from the linked file names.
Before selecting the work context, check for repo-root STRATEGY.md.
strategy_context.last_updated frontmatter is older than 90 days, mark relevant context STALE: in the generated spec.STRATEGY.md exists, do not block or mention it for narrow work. For broad product-direction work, include MISSING PRODUCT CONTEXT: no STRATEGY.md found in the generated spec's strategy context note and suggest /kramme:product:strategy after initialization.Select a work context profile that tells downstream tools (spec-audit, product-review, discovery, generate-phases) how to adapt their rigor and focus.
Read the profile definitions and auto-detection heuristics from references/work-context-profiles.md.
Based on project_description (or discovered_content topic), use the keyword heuristics from the reference file to suggest a profile. Default to Production Feature.
If AUTO_MODE=true, choose the auto-detected profile. Otherwise read the Phase 2.8 work-context template from references/interviews.md, deduplicate options as documented there, and use AskUserQuestion.
Store the selected profile as work_context_profile with all attribute values from the reference file (work_type, maturity, priority_dimensions, deprioritized, notes).
Based on project_description, auto-detect the most appropriate spec filename:
Detection heuristics:
FEATURE_SPECIFICATION.mdAPI_DESIGN.mdDOCUMENTATION_SPEC.mdTUTORIAL_PLAN.mdSYSTEM_DESIGN.mdPROJECT_PLAN.mdConfirm with user: If AUTO_MODE=true, choose {detected_name} automatically. Otherwise read the Phase 3 specification-document template from references/interviews.md and use AskUserQuestion. If "Custom name" is selected, use AskUserQuestion to get the filename.
Store as spec_filename.
If AUTO_MODE=true, choose No - single spec file is enough. Otherwise read the Phase 3.5 supporting-specifications template from references/interviews.md and use AskUserQuestion.
Store as use_supporting_specs.
Read references/document-creation.md and follow it to create siw/, siw/{spec_filename}, siw/LOG.md, siw/OPEN_ISSUES_OVERVIEW.md, siw/issues/, and optional siw/supporting-specs/.
When strategy_context exists, include a concise ## Product Strategy Context section in the generated SIW spec using the relevant placeholders from assets/spec-templates.md. Keep it to strategy facts and conflicts; do not duplicate the entire STRATEGY.md.
Read the Phase 5 success-report templates from references/success-report.md, display the applicable summary sections, then stop.
STOP HERE. Wait for the user's next instruction.
/kramme:siw:issue-definedevelopment
Runs kramme:pr:code-review as a closeout review loop for local or PR branch changes before commit, ship, or final response. Use when the user asks for autoreview, second-model review, or a final code-review pass after non-trivial edits. Not for UX, visual, accessibility, or product review.
development
Guides topic-level understanding verification for a PR, branch, feature, document, spec, design decision, bug fix, or other concrete subject. Use when the user asks to confirm, quiz, drill, teach-and-check, or verify that they understand a topic. Maintains a topic-specific checklist artifact and requires demonstrated understanding before marking the topic complete. Not for ordinary explanations without verification, end-of-session summaries, or code/test correctness checks.
testing
Design a CI/CD pipeline with quality gates, a <10-minute budget, feature-flag lifecycle, and an exit checklist. Use when adding a new CI pipeline, changing gate configuration, or planning a rollout for a new service. Complementary to kramme:pr:fix-ci (which fixes failures in an existing pipeline). Covers gate ordering, secrets storage, branch protection, rollback mechanism, and staged-rollout guardrails — not a rollout-execution runbook.
tools
--- name: kramme:visual:demo-reel description: Capture local demo evidence for observable product behavior: screenshots, before/after image sets, browser reels, terminal recordings, and short GIF/video proof. Use when shipping UI changes, CLI features, or any change where PR reviewers would benefit from visual or behavioral evidence. argument-hint: "[what to capture] [--url <url>|auto] [--tier static|before-after|browser-reel|terminal-recording]" disable-model-invocation: true user-invocable: tr