Smith implement

From ATTCKDigital/smith · View interactive version

Smith implement is an AI agent skill from the GitHub repository ATTCKDigital/smith. Execute the implementation plan by processing and executing all tasks defined in tasks.md

How to use this skill

Skill file

Workflow requirement (Smith 20+): This skill must be invoked from inside an active top-level workflow (/smith-new, /smith-bugfix, /smith-debug, /smith-build). The workflow-gate hook will block standalone invocation. To use this skill standalone, start a top-level workflow first.

Vault Logging

Throughout this action, log significant events to the vault session log. Read the session log path from .smith/vault/.current-session. If the file is missing or the vault is not initialized, skip all logging silently.

Timestamps are UTC. HH:MM:SS comes from date -u +%H:%M:%S — never a local clock, never a time from memory. The append already runs through a shell, so read the clock in that same command (TS=$(date -u +%H:%M:%S)) and spend no extra tool call. Substitute the resulting value: an unexpanded $(...) reaching the log is a known regression and will not parse. Every hook-written stamp in this log is date -u, so a local-clock entry lands hours away from its neighbours and skews the workflow window hooks/workflow_summary_lib.py derives from them.

Append entries using this format:

### [HH:MM:SS] /smith-implement <event>

**User Request:**
> <verbatim user message that triggered this action>

**Synthesized Input:** <brief summary>
**Outcome:** <what happened>
**Artifacts:** <files created/modified>
**Systems affected:** <system IDs>

Log at these points:

  1. On invocation — which tasks are being implemented (feature name, task count)
  2. After each task — task title, status (success/failure), files modified
  3. After tests — pass/fail summary
  4. On completion — total tasks completed vs total tasks, any failures requiring attention

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Workflow Tracking

At the start of implementation, create a per-branch active-workflow file only if it doesn't already exist (it may already be set by /smith-new or /smith-build):

BRANCH=$(git rev-parse --abbrev-ref HEAD)
SAFE_BRANCH=$(echo "$BRANCH" | sed 's/[^a-zA-Z0-9._-]/-/g')
ACTIVE_FILE=".smith/vault/active-workflows/${SAFE_BRANCH}.yaml"

# Only create if not already set by parent workflow
if [ ! -f "$ACTIVE_FILE" ]; then
  mkdir -p .smith/vault/active-workflows
  cat > "$ACTIVE_FILE" << EOF
workflow: smith-implement
feature: <detected from branch or spec>
branch: $BRANCH
started: $(date -u +"%Y-%m-%dT%H:%M:%S")
EOF
fi

Clear the active-workflow file when all tasks are complete, only if smith-implement created it (not if inherited from parent). Use the shipped helper so this works on projects that deny Bash(rm:*):

# Only clean up if we created it (check workflow field)
if grep -q 'workflow: smith-implement' "$ACTIVE_FILE" 2>/dev/null; then
  .specify/scripts/bash/clear-active-workflow.sh "$BRANCH"
fi

If this action was invoked by /smith-build, the build action handles cleanup instead.

Outline

  1. Run .specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
  1. Check checklists status (if FEATURE_DIR/checklists/ exists):

```text

| Checklist | Total | Completed | Incomplete | Status |

|-----------|-------|-----------|------------|--------|

| ux.md | 12 | 12 | 0 | PASS |

| test.md | 8 | 5 | 3 | FAIL |

| security.md | 6 | 6 | 0 | PASS |

```

Ledger Context (Optional)

If .smith/vault/ledger/ exists and contains non-empty files, load relevant Ledger sections to inform implementation. If the directory is missing, empty, or unreadable, skip silently — the Ledger is purely additive and never required.

  1. Check: ls .smith/vault/ledger/*.md 2>/dev/null
  2. If files exist, read the following section (higher-confidence entries first, truncate at ~2000 tokens):
  1. Use loaded tool preferences as additional context when choosing implementation approaches. The Ledger informs judgment, it does not override spec/plan/constitution.
  2. Budget violation tracking: If any Ledger file was truncated (entries were dropped to fit within the ~2000 token budget per file), increment context_budget_violations in .smith/vault/ledger/.meta.json by 1. If .meta.json does not exist, create it from the default template first. This signal tells the reconciliation system that the Ledger is too large for the configured budget.
  1. Load and analyze the implementation context:
  1. Project Setup Verification:

Detection & Creation Logic:

```sh

git rev-parse --git-dir 2>/dev/null

```

If ignore file already exists: Verify it contains essential patterns, append missing critical patterns only

If ignore file missing: Create with full pattern set for detected technology

Common Patterns by Technology (from plan.md tech stack):

Tool-Specific Patterns:

  1. Parse tasks.md structure and extract:
  1. Execute implementation following the task plan:
  1. Implementation execution rules:

change. Keep files within the File Size Policy (300-line soft target,

500-line decomposition threshold) and honor the file structure

plan.md prescribes — split large files rather than growing

monolithic ones.

meaningful name exists).

distinct units.

module/service/utility that already does it before writing something new.

  1. Progress tracking and error handling:
  1. Completion validation:

Note: This command assumes a complete task breakdown exists in tasks.md. If tasks are incomplete or missing, suggest running /smith-tasks first to regenerate the task list.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.