lfg
Autonomous end-to-end workflow — implement, test, review, fix, and capture learnings in one shot
What this skill does
# LFG — Autonomous End-to-End Workflow
You are an experienced full-stack developer running an autonomous pipeline: implement → test → review → fix → learn. Heavy phases are delegated to Task agents to keep this orchestrator's context lean.
**Target:** $ARGUMENTS
## ANTI-DEFERRAL MANDATE
**Fix everything now.** If an agent flags it, fix it. If a test fails, fix it. If a warning appears, fix it.
There is no deferral. If an agent flags it, fix it now. Do NOT create GitHub issues for findings discovered during implementation — implement the fix. The only exception: if a fix is genuinely impossible due to an external constraint (external API not under your control, requires separate deployment pipeline), stop and use the AskUserQuestion tool to explain the constraint and ask the user how they want to handle it. Do not add TODOs. Do not create GitHub issues.
---
## Phase 1: Determine Work Type
```bash
if [[ "$ARGUMENTS" =~ ^[0-9]+$ ]]; then
echo "=== Working on Issue #$ARGUMENTS ==="
WORK_TYPE="issue"
ISSUE_NUMBER=$ARGUMENTS
gh issue view $ARGUMENTS
echo -e "\n=== All Context (PM specs, research, architecture) ==="
gh issue view $ARGUMENTS --comments
ISSUE_BODY=$(gh issue view $ISSUE_NUMBER --json body --jq '.body')
gh pr list --search "mentions:$ARGUMENTS"
else
echo "=== Quick Fix Mode ==="
echo "Description: $ARGUMENTS"
WORK_TYPE="quick-fix"
ISSUE_NUMBER=""
ISSUE_BODY="$ARGUMENTS"
fi
```
## Phase 2: Create Branch
```bash
DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' 2>/dev/null || echo "main")
git checkout "$DEFAULT_BRANCH" && git pull origin "$DEFAULT_BRANCH"
if [ "$WORK_TYPE" = "issue" ]; then
git checkout -b "feature/$ISSUE_NUMBER-brief-description"
else
BRANCH_NAME=$(echo "$ARGUMENTS" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | cut -c1-50)
git checkout -b "fix/$BRANCH_NAME"
fi
echo "=== Branch created ==="
git branch --show-current
```
## Phase 3: Research (Task-Delegated)
Invoke the **work-researcher** agent to gather pre-implementation context.
- subagent_type: "psd-coding-system:workflow:work-researcher"
- description: "Research for #$ISSUE_NUMBER"
- prompt: "WORK_TYPE=$WORK_TYPE ISSUE_NUMBER=$ISSUE_NUMBER ISSUE_BODY=$ISSUE_BODY ARGUMENTS=$ARGUMENTS — Gather pre-implementation context: knowledge lookup, codebase research, external research (if high-risk), git history, test strategy, security review, UX considerations. Return structured Research Brief."
**If the agent fails, proceed anyway** — incorporate available findings into implementation.
## Phase 4: Implementation (Inline — Main Context Consumer)
Implement the solution following the Research Brief, local CLAUDE.md conventions, and type safety.
### Commit Heuristic
Commit incrementally: **"Can I write a complete, meaningful commit message right now?"** If yes — commit now. Each commit should be atomic.
```bash
# After each meaningful unit of work:
git add [specific files]
git commit -m "feat(scope): [what this atomic change does]
- [Detail 1]
- [Detail 2]
Part of #$ISSUE_NUMBER"
```
### Inline Testing
Run tests as you go to catch issues early:
```bash
npm test || yarn test || pytest || cargo test || go test ./...
npm run typecheck 2>/dev/null || tsc --noEmit 2>/dev/null
npm run lint 2>/dev/null || true
```
## Phase 5: Thorough Testing (Task-Delegated)
Invoke the **test-specialist** agent for comprehensive test coverage beyond inline checks.
- subagent_type: "psd-coding-system:quality:test-specialist"
- description: "Thorough testing for #$ISSUE_NUMBER"
- prompt: "Run comprehensive tests for recent changes. Write missing tests for new code paths. Validate coverage thresholds. Run quality gates (lint, typecheck, tests). Report: tests written, coverage %, failing tests, quality gate status."
**Handle results:**
- If tests fail: fix implementation code, re-run inline tests to verify
- If coverage gaps identified: write additional tests
- If agent fails: fall back to inline test results from Phase 4
## Phase 6: Validation (Task-Delegated)
Invoke the **work-validator** agent for language-specific reviews and deployment checks.
```bash
CHANGED_FILES=$(git diff --name-only "$DEFAULT_BRANCH"...HEAD 2>/dev/null || git diff --name-only HEAD~1 2>/dev/null || echo "")
echo "Changed files for validation:"
echo "$CHANGED_FILES"
```
- subagent_type: "psd-coding-system:workflow:work-validator"
- description: "Validation for #$ISSUE_NUMBER"
- prompt: "ISSUE_NUMBER=$ISSUE_NUMBER CHANGED_FILES=$CHANGED_FILES — Run language-specific light reviews and deployment verification. Return Validation Report with status PASS/PASS_WITH_WARNINGS/FAIL."
**Handle results:**
- **PASS**: Proceed
- **PASS_WITH_WARNINGS**: Fix the warnings, then proceed
- **FAIL**: Fix critical issues, then proceed
- **Agent failure**: Fall back to inline quality gates
## Phase 7: Commit & Create PR
```bash
# Commit any remaining changes
if ! git diff --cached --quiet 2>/dev/null || ! git diff --quiet 2>/dev/null; then
git add [specific changed files]
if [ "$WORK_TYPE" = "issue" ]; then
git commit -m "feat: implement solution for #$ISSUE_NUMBER
- [List key changes]
- [Note any breaking changes]
Closes #$ISSUE_NUMBER"
else
git commit -m "fix: $ARGUMENTS
- [Describe what was fixed]
- [Note any side effects]"
fi
fi
git push -u origin HEAD
if [ "$WORK_TYPE" = "issue" ]; then
gh pr create \
--title "feat: #$ISSUE_NUMBER - [Descriptive Title]" \
--body "## Summary
Implements #$ISSUE_NUMBER
## Changes
- [Key change 1]
- [Key change 2]
## Test Plan
- [ ] Tests pass
- [ ] Manual verification
Closes #$ISSUE_NUMBER" \
--assignee "@me"
else
gh pr create \
--title "fix: $ARGUMENTS" \
--body "## Summary
Quick fix: $ARGUMENTS
## Changes
- [What was changed]
## Test Plan
- [ ] Tests pass" \
--assignee "@me"
fi
echo "=== PR created ==="
PR_NUMBER=$(gh pr view --json number --jq '.number')
```
## Phase 8: Review (Task-Delegated — Parallel)
Dispatch review agents in parallel for a self-review before requesting human review.
**Detect languages from changed files:**
```bash
HAS_TYPESCRIPT=$(echo "$CHANGED_FILES" | grep -E '\.(ts|tsx|js|jsx)$' | head -1)
HAS_PYTHON=$(echo "$CHANGED_FILES" | grep -E '\.py$' | head -1)
HAS_SWIFT=$(echo "$CHANGED_FILES" | grep -E '\.swift$' | head -1)
HAS_SQL=$(echo "$CHANGED_FILES" | grep -E '\.sql$' | head -1)
```
**Always invoke security, correctness, and adversarial reviews:**
- subagent_type: "psd-coding-system:review:security-analyst-specialist"
- description: "Security review for PR #$PR_NUMBER"
- prompt: "Review changed files for security vulnerabilities: XSS, injection, auth bypass, secrets, OWASP top 10. Changed files: $CHANGED_FILES. Report findings with severity (P1/P2/P3)."
- subagent_type: "psd-coding-system:review:correctness-reviewer"
- description: "Correctness review for PR #$PR_NUMBER"
- prompt: "Review changed files for logic errors, off-by-one bugs, null/undefined handling gaps, state management issues, comparison bugs, and async correctness. Enumerate edge cases for significant functions. Rate findings with confidence scores (HIGH/MEDIUM/LOW). Changed files: $CHANGED_FILES. Report findings with severity (P1/P2/P3)."
- subagent_type: "psd-coding-system:review:adversarial-reviewer"
- description: "Adversarial review for PR #$PR_NUMBER"
- prompt: "Map all component boundaries in changed files. Construct failure scenarios: data contract violations, partial failure/recovery, timing/ordering failures, cascading failures, and resource exhaustion. Trace cross-boundary failure propagation for high-risk scenarios. Rate findings with confidence scores (HIGH/MEDIUM/LOW). Changed files: $CHANGED_FILES. Report findings with severity (P1/P2/P3)."
**Invoke language reviewers based on detected languages (in parallel with above):**
If TypeScript/JavaScript detected:
- subagent_type: "psd-coding-system:review:typescript-reviewer"
-Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.