Skip to content
Back to skills

Features

BSecurity

Create `workflow-automation-proposer` **skill** (Step 3 of the workflow analysis pipeline) that synthesizes patterns and workflows into concrete automation proposals including slash commands, scripts, and hooks.

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 6, 2026
ai-agentspythonbashreactgitapi

Works with

  • cli
  • api

Security analysis

B85/100
  • highPerforms destructive filesystem operations

Pro scans all 21 files and shows the line behind each finding

Scanned October 6, 2026

npx -y skills add BrennonTWilliams/little-loops --skill features --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Features?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Features
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/brennontwilliams-features-little-loops/badge)](https://www.skillsdirectory.com/skills/brennontwilliams-features-little-loops)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
discovered_commit: 8279174
discovered_branch: main
discovered_date: 2026-01-12T12:00:00Z
status: done
completed_at: 2026-02-13T00:00:00Z
priority: P2
---

# FEAT-028: Workflow Automation Proposer Skill

## Summary

Create `workflow-automation-proposer` **skill** (Step 3 of the workflow analysis pipeline) that synthesizes patterns and workflows into concrete automation proposals including slash commands, scripts, and hooks.

> **Note**: Originally proposed as an agent, this was revised to be a skill per project guidelines: "Prefer Skills over Agents." This is single-pass synthesis work with fixed input/output, not autonomous multi-step exploration.

## Motivation

Pattern analysis (FEAT-026) and workflow detection (FEAT-027) identify what users do repeatedly, but don't propose solutions. This skill:

- Synthesizes patterns and workflows into actionable proposals
- Proposes new slash commands for repeated multi-step workflows
- Suggests scripts for complex automation
- Recommends hooks for preventive automation
- Prioritizes proposals by frequency and implementation effort

This completes the analysis pipeline by providing implementable recommendations.

**Why a Skill, not an Agent:**
- Single-pass synthesis (read inputs → generate proposals → output)
- Fixed input/output structure (YAML in, YAML out)
- No autonomous exploration or sub-agent spawning needed
- The "judgment" required (matching patterns to automation types) fits skill prompting

## Proposed Implementation

### 1. Skill Definition: `skills/workflow-automation-proposer/SKILL.md`

```markdown
---
description: |
  Synthesizes workflow patterns into concrete automation proposals.
  Final step (Step 3) of the /ll:analyze-workflows pipeline.

  Input: step1-patterns.yaml + step2-workflows.yaml
  Output: step3-proposals.yaml

  Trigger keywords: "propose automations", "workflow proposals",
  "automation suggestions", "step 3 workflow analysis"
---

# Workflow Automation Proposer

You are the final step in a 3-step workflow analysis pipeline. Your job is to propose concrete automation solutions based on the patterns and workflows identified in Steps 1 and 2.

## Arguments

$ARGUMENTS
```

### 2. Input File Resolution

The skill receives input file paths via `$ARGUMENTS`:

| Scenario | Behavior |
|----------|----------|
| `$ARGUMENTS` provided | Parse as space-separated paths: `<step1-file> <step2-file>` |
| `$ARGUMENTS` empty | Look in `.claude/workflow-analysis/` for `step1-patterns.yaml` and `step2-workflows.yaml` |

**Invocation from `/ll:analyze-workflows`:**

```
Skill tool invocation:
  skill: "workflow-automation-proposer"
  args: ".claude/workflow-analysis/step1-patterns.yaml .claude/workflow-analysis/step2-workflows.yaml"
```

**Direct invocation (auto-detect):**

```bash
/workflow-automation-proposer
# Looks for most recent step1/step2 files in .claude/workflow-analysis/
```

### 3. Proposal Types

| Type | When to Propose | Example |
|------|-----------------|---------|
| `slash_command` | Multi-step workflow with 3+ occurrences | `/ll:cleanup-refs` for reference removal |
| `script_python` | Complex logic, data processing, external APIs | Entity extraction script |
| `script_bash` | Simple file operations, tool chains | Batch rename script |
| `hook_pre_tool` | Prevent unwanted tool usage | Block `rm -rf` patterns |
| `hook_post_tool` | React to tool completions | Auto-lint after edits |
| `hook_stop` | Session end automation | Auto-commit reminders |
| `agent_enhancement` | Extend existing agent capabilities | Add entity extraction to analyzer |
| `existing_command` | User should use existing command | Suggest `/ll:commit` for commit requests |

### 4. Priority Calculation

```python
def calculate_priority(pattern: Pattern, workflows: list[Workflow]) -> str:
    """Determine proposal priority based on frequency and impact."""

    frequency = pattern.frequency
    workflow_count = len([w for w in workflows if pattern in w.patterns])
    friction_score = estimate_friction(pattern)  # Manual steps, errors, time

    score = (
        frequency * 0.4 +           # How often does this occur?
        workflow_count * 0.3 +      # How many workflows affected?
        friction_score * 0.3        # How painful is the manual process?
    )

    if score >= 8:
        return "HIGH"      # 5+ occurrences, major friction
    elif score >= 4:
        return "MEDIUM"    # 3-4 occurrences, moderate friction
    else:
        return "LOW"       # 1-2 occurrences, minor friction
```

### 5. Effort Estimation

| Effort | Criteria | Example |
|--------|----------|---------|
| `SMALL` | Single file, <100 lines, no external dependencies | Simple slash command |
| `MEDIUM` | 2-3 files, 100-300 lines, uses existing patterns | Agent + command combo |
| `LARGE` | Multiple files, >300 lines, new patterns or dependencies | Full pipeline feature |

```python
def estimate_effort(proposal_type: str, complexity: str) -> str:
    """Estimate implementation effort."""

    effort_matrix = {
        ('slash_command', 'simple'): 'SMALL',
        ('slash_command', 'multi_step'): 'MEDIUM',
        ('script_python', 'simple'): 'SMALL',
        ('script_python', 'complex'): 'MEDIUM',
        ('hook_pre_tool', 'simple'): 'SMALL',
        ('hook_post_tool', 'complex'): 'MEDIUM',
        ('agent_enhancement', 'any'): 'MEDIUM',
        ('new_agent', 'any'): 'LARGE',
    }

    return effort_matrix.get((proposal_type, complexity), 'MEDIUM')
```

### 6. Implementation Sketch Generation

For each proposal, generate an actionable implementation plan:

```python
def generate_implementation_sketch(proposal: Proposal) -> str:
    """Generate step-by-step implementation plan."""

    if proposal.type == 'slash_command':
        return f"""
## Implementation: {proposal.name}

### 1. Create command file
Location: `commands/{proposal.name.replace('/ll:', '')}.md`

### 2. Define frontmatter
```yaml
---
description: {proposal.description}
allowed_tools: {proposal.required_tools}
---
```

### 3. Write command logic
{proposal.logic_outline}

### 4. Test
- Run with sample inputs
- Verify expected behavior
"""

    elif proposal.type == 'hook_pre_tool':
        return f"""
## Implementation: {proposal.name}

### 1. Add hook to hooks.json
```json
{{
  "event": "PreToolUse",
  "matcher": {proposal.matcher},
  "action": "prompt",
  "prompt_file": "hooks/prompts/{proposal.prompt_file}"
}}
```

### 2. Create prompt file
{proposal.prompt_content}
"""
    # ... more types
```

### 7. Output Schema: `step3-proposals.yaml`

```yaml
analysis_metadata:
  patterns_file: step1-patterns.yaml
  workflows_file: step2-workflows.yaml
  analysis_timestamp: 2026-01-12T10:30:00Z
  skill: workflow-automation-proposer  # Changed from 'agent' - this is a skill
  version: "1.0"

summary:
  total_proposals: 8
  by_priority:
    HIGH: 2
    MEDIUM: 4
    LOW: 2
  by_type:
    slash_command: 3
    hook_pre_tool: 2
    script_python: 1
    existing_command: 2
  estimated_total_effort: "2-3 implementation sessions"

proposals:
  - id: "prop-001"
    type: slash_command
    name: "/ll:cleanup-refs"
    description: "Automate reference cleanup workflow"
    rationale: |
      Detected 15 occurrences of reference cleanup pattern across 3 workflows.
      Users repeatedly: search for references → review list → remove each → verify.
      This 4-step workflow can be automated into a single command.
    source_patterns:
      - pattern: "remove references"
        frequency: 8
      - pattern: "clean up"
        frequency: 7
    source_workflows:
      - "wf-001: Reference Cleanup (champion-insights)"
      - "wf-003: Reference Cleanup (SOW)"
    priority: HIGH
    effort: MEDIUM
    implementation_sketch: |
      1. Accept target file/concept as argument
      2. Search for all references (Grep with entity pattern)
      3. Present list for user confirmation
      4. Remove each reference (Edit tool)
      5. Run lint check to verify
      6. Optionally commit changes
    required_tools:
      - Grep
      - Edit
      - Bash
    example_usage: |
      /ll:cleanup-refs champion-insights.md
      /ll:cleanup-refs "SOW references"

  - id: "prop-002"
    type: hook_pre_tool
    name: "test-before-commit"
    description: "Prompt to run tests before git commits"
    rationale: |
      Detected pattern: users commit → tests fail → fix → commit again.
      8 occurrences of this cycle. A PreToolUse hook can remind users
      to run tests before committing.
    source_patterns:
      - pattern: "run tests"
        frequency: 12
      - pattern: "commit"
        frequency: 50
    priority: MEDIUM
    effort: SMALL
    implementation_sketch: |
      1. Add PreToolUse hook for Bash tool
      2. Match "git commit" commands
      3. Prompt: "Have you run tests? Consider /ll:run-tests first."
      4. User can proceed or run tests
    hooks_json_entry: |
      {
        "event": "PreToolUse",
        "matcher": {"tool": "Bash", "command_pattern": "git commit"},
        "action": "prompt",
        "prompt_file": "hooks/prompts/test-before-commit.md"
      }

  - id: "prop-003"
    type: existing_command
    name: "/ll:commit"
    description: "Suggest existing commit command"
    rationale: |
      Detected 50 manual commit requests ("commit these changes", "git commit").
      The /ll:commit command already handles this with proper commit messages
      and user approval flow.
    frequency: 50
    priority: HIGH
    effort: NONE
    recommendation: |
      Inform user that /ll:commit exists and handles:
      - Automatic commit message generation
      - User approval before committing
      - Proper attribution

  - id: "prop-004"
    type: script_python
    name: "batch-entity-extractor"
    description: "Extract entities from multiple files at once"
    rationale: |
      Entity extraction is used across pattern analysis and sequence analysis.
      A standalone script could pre-process files for faster analysis.
    source_workflows:
      - "wf-002: File Organization"
    priority: LOW
    effort: MEDIUM
    implementation_sketch: |
      1. Create scripts/little_loops/entity_extractor.py
      2. Accept glob pattern for input files
      3. Extract entities using regex patterns
      4. Output JSON/YAML with entity inventory
      5. CLI: ll-entities extract "*.md"

  - id: "prop-005"
    type: hook_post_tool
    name: "auto-lint-after-edit"
    description: "Run lint check after file edits"
    rationale: |
      Detected pattern: edit → lint fails → fix → edit → lint.
      A PostToolUse hook can auto-run lint after Edit operations.
    source_patterns:
      - pattern: "fix lint"
        frequency: 6
    priority: MEDIUM
    effort: SMALL
    implementation_sketch: |
      1. Add PostToolUse hook for Edit tool
      2. Run appropriate linter based on file type
      3. Report issues inline if found

existing_command_suggestions:
  - user_pattern: "commit these changes"
    suggested_command: "/ll:commit"
    frequency: 50
  - user_pattern: "run tests"
    suggested_command: "/ll:run-tests"
    frequency: 12
  - user_pattern: "check lint"
    suggested_command: "/ll:check-code"
    frequency: 8

implementation_roadmap:
  immediate:
    - prop-003  # Existing command awareness (no implementation needed)
    - prop-002  # Test-before-commit hook (SMALL effort)
  short_term:
    - prop-001  # Cleanup-refs command (MEDIUM effort)
    - prop-005  # Auto-lint hook (SMALL effort)
  future:
    - prop-004  # Entity extractor script (MEDIUM effort)
```

### 8. Skill Prompt Content

```markdown
# Workflow Automation Proposer

You are the final step in a 3-step workflow analysis pipeline. Your job is to propose concrete automation solutions.

## Input

- `step1-patterns.yaml`: Pattern analysis results
- `step2-workflows.yaml`: Workflow detection results

## Output

Write proposals to `.claude/workflow-analysis/step3-proposals.yaml`

## Analysis Process

1. **Identify high-value targets**:
   - Patterns with frequency >= 5
   - Workflows spanning multiple sessions
   - Error/retry cycles

2. **Match to automation types**:
   - Multi-step workflows → slash commands
   - Preventive needs → PreToolUse hooks
   - Post-action automation → PostToolUse hooks
   - Complex logic → Python scripts

3. **Check for existing solutions**:
   - Does /ll:* already solve this?
   - Would a simple script suffice?

4. **Generate proposals**:
   - Clear rationale with data
   - Implementation sketch
   - Priority and effort estimates

5. **Create implementation roadmap**:
   - Group by effort and priority
   - Suggest implementation order

## Important Guidelines

- Propose specific, actionable solutions
- Include frequency data to justify priority
- Don't propose what already exists (suggest existing commands instead)
- Keep implementation sketches concrete but concise
- Consider dependencies between proposals
```

## Location

| Component | Path |
|-----------|------|
| Skill | `skills/workflow-automation-proposer/SKILL.md` |
| Output | `.claude/workflow-analysis/step3-proposals.yaml` |

## Current Behavior

No automation proposal system exists. Users must manually identify automation opportunities.

## Expected Behavior

```bash
# After running /ll:analyze-workflows, Step 3 produces:
$ cat .claude/workflow-analysis/step3-proposals.yaml

summary:
  total_proposals: 8
  by_priority:
    HIGH: 2
    MEDIUM: 4
    LOW: 2
  ...

proposals:
  - id: "prop-001"
    type: slash_command
    name: "/ll:cleanup-refs"
    priority: HIGH
    effort: MEDIUM
    ...
```

## Impact

- **Severity**: High - Completes the workflow analysis pipeline
- **Effort**: Medium - Skill prompt with synthesis logic
- **Risk**: Low - Read-only analysis, proposals are suggestions only

## Dependencies

None external. Uses YAML processing.

## Blocked By

- ~~FEAT-026: Workflow Pattern Analyzer Agent (provides pattern data)~~ ✅ Completed
- ~~FEAT-027: Workflow Sequence Analyzer Module (provides workflow data)~~ ✅ Completed

## Blocks

- FEAT-029: `/ll:analyze-workflows` Command (invokes this skill via Skill tool)

## Labels

`feature`, `skill`, `workflow-analysis`, `automation-proposals`

---

## Verification Notes

**Verified: 2026-01-20**

- Blocker FEAT-026 (Workflow Pattern Analyzer Agent) is **completed** (in `.issues/completed/`)
  - `agents/workflow-pattern-analyzer.md` exists
- Blocker FEAT-027 (Workflow Sequence Analyzer Module) is **completed** (in `.issues/completed/`)
  - `scripts/little_loops/workflow_sequence_analyzer.py` exists
  - Tests at `scripts/tests/test_workflow_sequence_analyzer.py`
- **All blockers resolved** - this issue is ready for implementation
- Updated skill path from `skills/workflow-automation-proposer.md` to `skills/workflow-automation-proposer/SKILL.md` to match project conventions

---

## Resolution

- **Action**: implement
- **Completed**: 2026-01-20
- **Status**: Completed

### Changes Made
- `skills/workflow-automation-proposer/SKILL.md`: Created new skill definition with:
  - YAML frontmatter with description and trigger keywords
  - Input file resolution instructions
  - Complete proposal type taxonomy
  - Priority and effort calculation guidance
  - Full output YAML schema specification
  - Implementation sketch templates for each proposal type
  - Example proposal for reference

### Verification Results
- YAML frontmatter: PASS (parses correctly)
- Lint: PASS
- Types: PASS

---

## Status

**Completed** | Created: 2026-01-12 | Completed: 2026-01-20 | Priority: P2

Files in this skill

  • P0-FEAT-3398-quality-regression-detection-with-model-attribution.md52.3 KB
  • P0-FEAT-3404-ll-version-history-db-stamp-and-typed-reader-path.md20.4 KB
  • P0-FEAT-3405-quality-regression-detection-attribution-and-report-cli-wiring.md43.1 KB
  • P1-FEAT-020-product-analysis-opt-in-configuration.md5.2 KB
  • P1-FEAT-022-product-analyzer-skill.md9.6 KB
  • P1-FEAT-040-fsm-schema-definition-and-validation.md7 KB
  • P1-FEAT-041-paradigm-compilers.md10.6 KB
  • P1-FEAT-042-variable-interpolation-system.md8.9 KB
  • P1-FEAT-043-tier1-deterministic-evaluators.md12.3 KB
  • P1-FEAT-045-fsm-executor-core.md17.9 KB
  • P1-FEAT-047-ll-loop-cli-tool.md16.6 KB
  • P1-FEAT-210-add-end-to-end-cli-workflow-tests.md4.3 KB
  • P1-FEAT-2878-trace-level-assertions-in-the-eval-harness-with-optional-multi-host-divergence-runs.md28.2 KB
  • P1-FEAT-3329-conftest-guards-for-live-host-cli-spawns-and-unpatched-rate-limit-ladders.md86.3 KB
  • P1-FEAT-3399-cross-repo-history-db-aggregation.md43.4 KB
  • P1-FEAT-3409-workspace-membership-discovery-for-cross-repo-history-db-aggregation.md80.3 KB
  • P1-FEAT-3410-attach-based-cross-repo-history-db-aggregation-and-workspace-cli-flag.md67.7 KB
  • P1-FEAT-914-greenfield-project-builder-meta-loop.md39.6 KB
  • P2-FEAT-011-user-message-history-extraction.md12.6 KB
  • P2-FEAT-021-goals-vision-ingestion-mechanism.md10.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…