diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 1363491..8ba2907 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -4,6 +4,11 @@ "name": "Jared Swanson" }, "plugins": [ + { + "name": "cc-architect", + "source": "./plugins/cc-architect", + "description": "Model-tier-optimized execution plans, scaffolding, and configuration operations for building and managing Claude Code extensions (plugins, skills, workflows, descriptions)" + }, { "name": "os-adr", "source": "./plugins/os-adr", @@ -12,7 +17,7 @@ { "name": "os-backlog", "source": "./plugins/os-backlog", - "description": "Uniform Planka backlog boards across projects: idempotent board-ensure (lists, labels, archive convention, Planka 2.1.1 quirk handling) and a deterministic repo-to-board routing resolver." + "description": "Git-issues backlog across projects: deterministic tracker routing (forgejo/github/repo), mid-session capture as labeled issues, pull-only listing (ADR-0042)." }, { "name": "os-context", diff --git a/plugins/cc-architect/.claude-plugin/plugin.json b/plugins/cc-architect/.claude-plugin/plugin.json new file mode 100644 index 0000000..5b2ba75 --- /dev/null +++ b/plugins/cc-architect/.claude-plugin/plugin.json @@ -0,0 +1,5 @@ +{ + "name": "cc-architect", + "version": "1.0.1", + "description": "Model-tier-optimized execution plans, scaffolding, and configuration operations for building and managing Claude Code extensions (plugins, skills, workflows, descriptions)" +} diff --git a/plugins/cc-architect/CHANGELOG.md b/plugins/cc-architect/CHANGELOG.md new file mode 100644 index 0000000..c95aa9c --- /dev/null +++ b/plugins/cc-architect/CHANGELOG.md @@ -0,0 +1,18 @@ +# Changelog + +## [Unreleased] - 2026-01-26 + +### Breaking Changes +- **agent-architect → workflow-architect:** The agent-architect skill has been renamed to workflow-architect. It now teaches creating workflow documents for general-purpose subagents instead of creating custom agent files. +- **agents/ directory removed:** Custom agent files are no longer used. Skills dispatch general-purpose subagents with workflow documents. +- **commands/ directory removed:** Standalone commands are deprecated. All functionality is accessed via skills (`/skill-name`). + +### Changed +- **slash-command-architect:** Now marked as legacy-maintenance only. For new functionality, use skill-architect to create skills instead. +- **SKILL.md files condensed:** Reduced from ~40-55 lines to ~13-17 lines. Theory removed, workflow routing preserved. +- **Workflow files condensed:** Reduced by ~38% on average. Goal/Why sections removed, step sequences and templates preserved. +- **Task tool invocations:** Changed to use Skill tool with `/description-architect` instead of invoking custom agents. + +### Migration Details +- Aligned with `references/plugin-architecture-philosophy.md` +- Backup available at `~/dev/backup/cc-architect-2026-01-25/` (delete after 2026-03-25) diff --git a/plugins/cc-architect/CLAUDE.md b/plugins/cc-architect/CLAUDE.md new file mode 100644 index 0000000..164f296 --- /dev/null +++ b/plugins/cc-architect/CLAUDE.md @@ -0,0 +1,80 @@ +# CC Architect + +Build Claude Code extensions: plugins, skills, workflows, commands, and descriptions. + +## Entry Point + +**Use `/cc-architect` for everything.** It analyzes your request and orchestrates the appropriate workflows automatically. + +Examples: +- "Create a new plugin for X" +- "Add a skill to the Y plugin" +- "Audit my skill for compliance" +- "Write a description for this component" + +The orchestrator reads the workflow catalog, builds an execution plan with optimal model tiers, and coordinates subagents to complete your request. + +## Architecture + +``` +User request + | + v +/cc-architect (reads SKILL.md) + | + v +Planner subagent (Sonnet) + - Reads workflows/catalog.md + - Builds execution plan with model tiers + | + v +Execution subagents (per plan) + - Haiku: scaffolding, validation, cleanup + - Sonnet: drafting, analysis + - Opus: synthesis, quality decisions + | + v +Final output presented to user +``` + +## Available Workflows + +The orchestrator can invoke any of these (see `workflows/catalog.md` for details): + +| Category | Workflows | +|----------|-----------| +| Plugin | create-plugin, plugin-add-skill, audit-plugin, improve-plugin-docs | +| Skill | create-skill, audit-skill, improve-skill | +| Workflow | create-workflow, audit-workflow, improve-workflow | +| Description | generate-description | +| Command (legacy) | create-command, audit-command, improve-command | + +## Shared References + +**Knowledge philosophy** (`references/knowledge-philosophy.md`) +Document what AI doesn't know from training: rubrics, templates, process steps, custom conventions. + +**Progressive disclosure** (`references/progressive-disclosure/`) +Knowledge architecture for non-code files. Creates navigable tree structure for just-in-time discovery. + +**Self-improvement** (`references/self-improvement/`) +Reflection step for every workflow. After completing any task, identify friction for future improvements. + +**Tool patterns** (`references/tool-patterns/catalog.md`) +Patterns for robust tools: audit, verification, brainstorming, reversion protection. + +--- + +## Legacy Skills (Removed) + +The following individual architect skills have been **removed**; their functionality was folded into `/cc-architect`'s workflows. Some workflow docs still reference these by their old names (`skill-architect`, `slash-command-architect`) — treat any such reference as a pointer to the replacement workflow below, not to a live skill directory. + +| Legacy Skill | Replacement | +|--------------|-------------| +| `/plugin-architect` | `/cc-architect` + create-plugin workflow | +| `/skill-architect` | `/cc-architect` + create-skill workflow | +| `/workflow-architect` | `/cc-architect` + create-workflow workflow | +| `/slash-command-architect` | `/cc-architect` + create-command workflow | +| `/description-architect` | `/cc-architect` + generate-description workflow | + +These no longer exist at `skills/{name}/SKILL.md`; only `skills/cc-architect/SKILL.md` remains. diff --git a/plugins/cc-architect/commands/cc-architect.md b/plugins/cc-architect/commands/cc-architect.md new file mode 100644 index 0000000..6ac4f8c --- /dev/null +++ b/plugins/cc-architect/commands/cc-architect.md @@ -0,0 +1,7 @@ +--- +description: "Model-tier-optimized execution plans and scaffolding for building Claude Code extensions" +--- + +Invoke the cc-architect skill. + +Read and follow: `skills/cc-architect/SKILL.md` diff --git a/plugins/cc-architect/planning/cc-architect-migration-plan.md b/plugins/cc-architect/planning/cc-architect-migration-plan.md new file mode 100644 index 0000000..fe56bab --- /dev/null +++ b/plugins/cc-architect/planning/cc-architect-migration-plan.md @@ -0,0 +1,359 @@ +# CC-Architect Migration Plan + +## Overview + +Migrate cc-architect plugin to align with `plugin-architecture-philosophy.md`. + +**Backup:** `~/dev/backup/cc-architect-2026-01-25/` (delete after 2026-03-25, 60 days) + +**Philosophy Core Principles:** +- Skills dispatch general subagents (no custom agents) +- Commands consolidated into skills (skills are directly invocable) +- SKILL.md as 6-8 line dispatcher +- Workflows contain rubrics/templates/steps only (no theory) +- Trust AI knowledge; don't pre-document what AI knows + +--- + +## Phase 0: Pre-Flight Checks + +**Subagent:** Sonnet +**Purpose:** Resolve architectural paradoxes and validate prerequisites before migration. + +### 0.1 Backup Validation +- Verify `~/dev/backup/cc-architect-2026-01-25/` exists and is complete +- Confirm backup is restorable (test copy one file back) +- Check available disk space + +### 0.2 Resolve Agent-Architect Paradox + +**Problem:** agent-architect skill teaches custom agent creation, but philosophy says "Custom agents are relics." + +**Decision options:** +1. **Delete agent-architect** - Remove skill entirely +2. **Transform to workflow-architect** - Teach general subagent + workflow pattern instead + +**Resolution:** Transform agent-architect to **workflow-architect** that teaches: +- Creating workflow documents (not agent files) +- Using general-purpose subagent with workflow paths +- This preserves the skill's purpose (helping users extend Claude) while aligning with philosophy + +**Execution steps:** +1. `git mv skills/agent-architect skills/workflow-architect` +2. Update `skills/workflow-architect/SKILL.md` frontmatter: `name: workflow-architect` +3. Update `.claude-plugin/plugin.json` skills list (if referenced) +4. Grep for `/agent-architect` or `agent-architect` references → update to `/workflow-architect` +5. Update CLAUDE.md architect table +6. Update workflow files to teach workflow creation instead of agent creation + +### 0.3 Resolve Slash-Command-Architect Fate + +**Problem:** slash-command-architect teaches command creation, but philosophy says "Do not create new standalone commands." + +**Decision:** Keep slash-command-architect for **legacy maintenance only**. Update SKILL.md to clearly state: +- Use for maintaining existing commands +- For new functionality, create skills instead +- Link to philosophy document + +### 0.4 Audit Task Tool Invocations + +**Action:** Grep all workflow files for `Task tool` or `Task:` invocations of custom agents. + +**Known issues:** +- `new-agent.md` line 90 references description-architect agent +- `new-command.md` line 77 references description-architect agent +- `new-skill.md` line 155 references description-architect agent + +**Fix strategy:** Identify all occurrences in Phase 0.4. Apply fixes during Phase 4 (workflow condensing) when those files are already being edited. This avoids duplicate file edits. + +**Fix:** Update all workflows to use `Skill tool` with `/description-architect` instead of Task tool with custom agent. + +### 0.5 Update Reference Docs + +**Action:** Update plugin-structure.md and layout docs to mark `agents/` and `commands/` as deprecated/legacy patterns. + +**Verification:** +- [ ] Backup validated +- [ ] Agent-architect transformation decision documented +- [ ] Slash-command-architect scope clarified +- [ ] All Task tool invocations of custom agents identified and fix strategy defined +- [ ] Reference docs updated to deprecate agents/commands directories + +--- + +## Phase 1: Delete Custom Agents + +**Subagent:** Haiku +**Prerequisite:** Phase 0 complete + +**Files to delete (using `git rm`):** +- `agents/skill-architect.md` +- `agents/agent-architect.md` +- `agents/slash-command-architect.md` +- `agents/description-architect.md` +- `agents/plugin-architect.md` + +**Before deletion:** +- Verify all workflows updated to not invoke these agents via Task tool (from Phase 0.4) + +**After deletion:** +- Remove `agents/` directory if empty + +**Verification:** +- `agents/` directory is empty or removed +- No workflow files contain Task tool invocations to deleted agents +- Check plugin.json doesn't reference deleted agents + +**Rollback:** Restore from backup + +--- + +## Phase 2: Delete Standalone Commands + +**Subagent:** Haiku +**Files to delete (using `git rm`):** +- `commands/skill-architect.md` +- `commands/agent-architect.md` +- `commands/slash-command-architect.md` + +**After deletion:** +- Remove `commands/` directory if empty + +**Verification:** +- `commands/` directory is empty or removed +- Skills remain invocable via `/skill-name` +- Check plugin.json doesn't reference deleted commands + +**Rollback:** Restore from backup + +--- + +## Phase 3: Condense SKILL.md Files + +**Subagent:** Sonnet (judgment required for what to keep) +**Target files:** +- `skills/skill-architect/SKILL.md` +- `skills/agent-architect/SKILL.md` → rename to `skills/workflow-architect/SKILL.md` +- `skills/slash-command-architect/SKILL.md` +- `skills/description-architect/SKILL.md` +- `skills/plugin-architect/SKILL.md` + +**Transformation:** +From ~40 lines to ~10-15 lines: +```markdown +--- +name: skill-architect +description: [keep existing] +--- +# Skill Architect + +## Workflows +- **New skill:** `workflows/new-skill.md` +- **Improve skill:** `workflows/improve-skill.md` +- **Audit skill:** `workflows/audit-skill.md` + +Read `../../references/subagent-pattern.md` for dispatch rules. +``` + +**Verification (focus-based, not line-count):** +- Theory/explanation removed (architecture details, "why" sections) +- Workflow routing preserved (list of workflows with use-case triggers) +- Reference to subagent-pattern.md included +- Fits on one screen (~25 lines max, but clarity over count) +- All workflow paths correct and resolve +- Description frontmatter preserved + +**Rollback:** Restore from backup + +--- + +## Phase 4: Condense Workflow Files + +**Subagent:** Sonnet (judgment required for what to keep) +**Prerequisite:** Read condensing rubric (below) + +**Target:** All `workflows/*.md` files in each skill + +### Condensing Rubric + +**Remove (AI knows this):** +- "Goal:" explanations (AI understands task goals) +- "Why:" sections (trust AI reasoning) +- Framework explanations (AI knows frameworks) +- Conceptual overviews (AI has training data) + +**Keep (AI doesn't know this):** +- Step numbers and sequence +- Specific file paths (project-specific) +- Templates and output formats (custom conventions) +- Rubrics and checklists (custom criteria) +- Subagent delegation hints ("Subagent: haiku/sonnet/opus") +- Checkpoints ("Confirm with user") +- Task document instructions + +**Preserve invariants:** +- Workflows must include subagent hints (per skill-architect/invariants.md) +- Format can be concise but delegation info must remain + +**Example transformation:** +```markdown +# Before (verbose) +### 2. Design the structure +**Goal:** Plan the skill's directory layout before creating files. +**Who:** Main agent or general subagent (cheap model). +**Must read:** +- `references/layout/reference.md` +**Do:** +- Map workflows to `workflows/*.md` files + +# After (minimal) +### 2. Design structure +Subagent (haiku). Read: `references/layout/reference.md` +- Map workflows → `workflows/*.md` +- Write to task doc `## Proposed Structure` +Checkpoint: Confirm with user. +``` + +**User checkpoint after each workflow:** +- Show before/after comparison +- Highlight removed sections +- User confirms: "Proceed" or "Restore section X" + +**Red flags (stop and review with user):** +- Step numbers changed or removed +- File paths removed +- Templates removed +- Subagent hints removed +- User checkpoints removed + +**Verification:** +- Workflow files condensed (aim for 40-60% reduction, prioritize clarity over target) +- All action items preserved +- All file path references preserved and correct +- All templates/rubrics preserved +- Subagent hints preserved (invariant requirement) + +**Rollback:** Restore from backup + +--- + +## Phase 4.5: Intermediate Review + +**Subagent:** Sonnet +**Purpose:** Catch major issues before final phases + +**Check:** +- All condensed SKILL.md files are valid +- All condensed workflow files are functional +- No critical information lost in condensing +- Reference paths still resolve + +**Output:** Quick P0-P1 issue list. Fix before proceeding. + +--- + +## Phase 5: Update CLAUDE.md + +**Subagent:** Haiku +**File:** `CLAUDE.md` + +**Changes:** +- Remove references to deleted agents/commands +- Update task-to-workflow mapping if needed +- Update architect table if agent-architect renamed to workflow-architect +- Ensure skill invocation instructions are clear + +**Verification:** +- No dangling references +- All listed skills exist +- Invoke instructions match current structure + +**Rollback:** Restore from backup + +--- + +## Phase 6: Validate Structure and Functionality + +**Subagent:** Sonnet +**Actions:** + +### Structural Validation +- Run any existing validation scripts +- Verify all internal file references resolve +- Check for broken links in reference paths +- Verify no orphaned files + +### Functional Testing +For each architect skill: +- Invoke via `/skill-name` (or simulate invocation) +- Verify correct workflow is selected +- Verify subagent dispatch would work +- Complete one simple task if possible + +**Output:** List of any remaining issues + +--- + +## Phase 7: Post-Migration Review + +**Subagent:** Opus (comprehensive review) +**Scope:** Full review of migrated plugin + +**Checklist:** +- [ ] Alignment with plugin-architecture-philosophy.md +- [ ] No regression in capability (all workflows still work) +- [ ] Standards compliance (kebab-case, frontmatter, etc.) +- [ ] Architecture integrity (progressive disclosure maintained) +- [ ] No orphaned files +- [ ] No broken references +- [ ] Reversion protection preserved (invariants, golden examples, decisions) +- [ ] Under-scripting blind spot documented as known issue (from philosophy doc) + +**Output:** P0-P3 issue report with recommendations + +--- + +## Phase 8: Documentation + +**Subagent:** Haiku +**Actions:** +- Create/update `CHANGELOG.md` (at plugin root: `cc-architect/CHANGELOG.md`) with migration notes +- Document breaking changes: + - agent-architect → workflow-architect rename (if applicable) + - commands/ directory removed + - agents/ directory removed +- Note that slash-command-architect is now legacy-only + +--- + +## Success Criteria + +1. **No custom agents** - `agents/` deleted +2. **No standalone commands** - `commands/` deleted +3. **Lean SKILL.md** - Theory removed, workflow routing preserved, fits one screen +4. **Condensed workflows** - Reduced while preserving all action items +5. **No broken references** - All paths resolve +6. **No capability loss** - All workflows still executable +7. **Philosophy aligned** - Passes checklist from philosophy doc +8. **Functional testing passed** - Each skill invocable, each workflow path tested +9. **Reversion protection intact** - invariants.md, examples/golden/, .decisions/ preserved + +--- + +## Execution Order + +``` +Phase 0 (pre-flight) → Phase 1 (agents) → Phase 2 (commands) → Phase 3 (SKILL.md) → Phase 4 (workflows) → Phase 4.5 (intermediate review) → Phase 5 (CLAUDE.md) → Phase 6 (validate) → Phase 7 (review) → Phase 8 (docs) +``` + +Each phase completes before next begins. Review after each phase for early issue detection. + +--- + +## Rollback Procedure + +If any phase fails critically: +1. Stop migration +2. Document what failed and why +3. Restore from `~/dev/backup/cc-architect-2026-01-25/` +4. Address root cause before retrying diff --git a/plugins/cc-architect/planning/phase-0-task-tool-issues.md b/plugins/cc-architect/planning/phase-0-task-tool-issues.md new file mode 100644 index 0000000..d84541d --- /dev/null +++ b/plugins/cc-architect/planning/phase-0-task-tool-issues.md @@ -0,0 +1,72 @@ +# Phase 0: Task Tool Invocation Issues + +This document identifies Task tool invocations that reference custom agents (description-architect, skill-architect, etc.) in workflow files. These issues should be addressed in Phase 4 when those workflow files are being edited to avoid duplicate edits. + +## Identified Issues + +### Issue 1: new-skill.md +**File:** `/home/jared/dev/cc-plugins/cc-architect/skills/skill-architect/workflows/new-skill.md` +**Line:** 155 +**Status:** RESOLVED (Phase 4) + +**Original text:** +```markdown +- Generate description via description-architect (Task tool with `description-architect` agent) + - Input: type=skill, name, purpose, triggers from task document + - Output: description string for frontmatter +``` + +**Resolution:** Updated to use Skill tool invocation with `/description-architect` pattern instead of Task tool with custom agent reference. + +--- + +### Issue 2: new-command.md +**File:** `/home/jared/dev/cc-plugins/cc-architect/skills/slash-command-architect/workflows/new-command.md` +**Line:** 77 +**Status:** RESOLVED (Phase 4) + +**Original text:** +```markdown +2. Generate description via description-architect (Task tool with `description-architect` agent) + - Input: type=command, name, purpose, triggers from requirements + - Output: description string for frontmatter +``` + +**Resolution:** Updated to use Skill tool invocation with `/description-architect` pattern. Note that this workflow is in the legacy-maintenance skill slash-command-architect. + +--- + +### Issue 3: new-workflow.md (ALREADY FIXED) +**File:** `/home/jared/dev/cc-plugins/cc-architect/skills/workflow-architect/workflows/new-workflow.md` +**Original line:** ~90 +**Status:** ALREADY FIXED during Phase 0 + +The original file (new-agent.md) had a reference to description-architect on line 90, but this has been removed during the agent-architect → workflow-architect transformation in Phase 0. + +--- + +## Additional Findings + +### Other description-architect references (NOT Task tool invocations) + +These are not Task tool invocations but references to the description-architect skill in documentation: + +1. **Invariants files** - Multiple skills reference "Always generates descriptions via description-architect" as an invariant. These are policy statements, not invocations. + +2. **Golden examples** - Multiple golden example files mention description-architect in their workflow descriptions. These are documentation, not invocations. + +3. **Redirect files** (`descriptions.md`) - Multiple plugins have redirect files pointing to description-architect. These are navigation aids, not invocations. + +These documentation references may need updating in Phase 4 depending on the final architecture decision, but they are not the critical Task tool invocations that need immediate attention. + +--- + +## Resolution Summary + +All identified Task tool invocation issues have been resolved in Phase 4: + +1. **Issue #1 (new-skill.md):** RESOLVED - Updated to use Skill tool with `/description-architect` +2. **Issue #2 (new-command.md):** RESOLVED - Updated to use Skill tool with `/description-architect` +3. **Issue #3 (new-workflow.md):** RESOLVED during Phase 0 - No Task tool invocations present + +The migration to the general subagent pattern with Skill tool invocations is complete. diff --git a/plugins/cc-architect/references/brainstorming/domain-hooks.md b/plugins/cc-architect/references/brainstorming/domain-hooks.md new file mode 100644 index 0000000..d7e08c1 --- /dev/null +++ b/plugins/cc-architect/references/brainstorming/domain-hooks.md @@ -0,0 +1,130 @@ +# Domain Hooks + +Architect-specific questions and anti-patterns for brainstorming. Reference the relevant section based on what's being designed. + +--- + +## Skill + +### Key Questions + +- **Trigger**: When should this skill activate? What user intent or request invokes it? +- **Context needs**: What does Claude need to know to execute? Where does that knowledge live? +- **Boundaries**: What is explicitly out of scope? What should trigger a different skill? +- **Output**: What does success look like? A file? A conversation? An action? + +### Anti-patterns to Critique + +| Anti-pattern | What to look for | +|--------------|------------------| +| Over-specification | Skill tells Claude HOW to do things instead of WHAT knowledge exists and WHERE | +| Kitchen-sink scope | Skill tries to handle too many scenarios; should be split | +| Missing escape hatch | No guidance on when NOT to use the skill | +| Implementation in SKILL.md | SKILL.md contains code examples or step-by-step procedures instead of pointers to references | + +### Progressive Disclosure Check + +- Does SKILL.md fit in ~50 lines? +- Are details in referenced docs, not inline? +- Can Claude load context incrementally as needed? + +--- + +## Plugin + +### Key Questions + +- **Cohesion**: What unifies the skills in this plugin? What's the theme? +- **Boundary**: Where does this plugin's responsibility end? What's adjacent but separate? +- **Dependencies**: Does this plugin depend on others? Should it? +- **User**: Who installs this plugin? What problem are they solving? + +### Anti-patterns to Critique + +| Anti-pattern | What to look for | +|--------------|------------------| +| Kitchen-sink | Plugin contains unrelated skills that happen to be made by same author | +| Overlapping scope | Skills within plugin have unclear boundaries with each other | +| Missing entry point | No clear CLAUDE.md or SKILL.md directing users to capabilities | +| Dependency bloat | Plugin requires many other plugins to function | + +### Structure Check + +- Does plugin have clear CLAUDE.md explaining what it offers? +- Are skills cohesive (related purpose) not just co-located? +- Is the plugin installable and usable independently? + +--- + +## Agent + +### Key Questions + +- **Task fit**: What specific task type does this agent handle? When is it dispatched? +- **Tools**: What tools does the agent need? What tools should it NOT have? +- **Autonomy level**: How much should it decide on its own vs. ask for guidance? +- **Output contract**: What does the agent return to the caller? + +### Anti-patterns to Critique + +| Anti-pattern | What to look for | +|--------------|------------------| +| Tool overload | Agent has access to tools it doesn't need | +| Unclear boundaries | Agent's responsibility overlaps with other agents or main thread | +| Missing output contract | Caller doesn't know what to expect back | +| Over-autonomy | Agent makes decisions that should be escalated | + +### Dispatch Check + +- Is it clear when to use this agent vs. doing the work in main thread? +- Does the agent description in Task tool registry accurately describe capability? +- Can the agent complete its task with the tools provided? + +--- + +## Slash Command + +### Key Questions + +- **Trigger**: What does the user type to invoke? Is it memorable? +- **Input**: What arguments does it accept? What's required vs. optional? +- **Output**: What happens when invoked? File created? Action taken? Skill loaded? +- **Discoverability**: How does user learn this command exists? + +### Anti-patterns to Critique + +| Anti-pattern | What to look for | +|--------------|------------------| +| Overloaded command | Command does too many different things based on args | +| Unclear invocation | User can't guess what to type | +| Missing feedback | Command runs silently without confirming action | +| Duplicates skill | Command is just an alias for a skill with no added value | + +### Naming Check + +- Is the command name a verb? (commit, audit, review) +- Is it 1-2 words max? +- Does it conflict with existing commands? + +--- + +## Description (Frontmatter) + +### Key Questions + +- **Escape hatch**: Does the description help Claude know when NOT to use this? +- **Trigger clarity**: Is it clear what user intent/request activates this? +- **Specificity**: Is it specific enough to avoid false positives? + +### Anti-patterns to Critique + +| Anti-pattern | What to look for | +|--------------|------------------| +| Too broad | Description matches requests it shouldn't handle | +| Too narrow | Description misses valid use cases | +| Missing negative triggers | No "don't use when" guidance | +| Marketing language | Description sells rather than describes | + +### Test + +Read the description and ask: "If I were Claude seeing a user request, would this description help me decide correctly whether to use this?" diff --git a/plugins/cc-architect/references/brainstorming/workflow.md b/plugins/cc-architect/references/brainstorming/workflow.md new file mode 100644 index 0000000..0ca0b82 --- /dev/null +++ b/plugins/cc-architect/references/brainstorming/workflow.md @@ -0,0 +1,118 @@ +# Brainstorming Workflow + +Refines rough ideas into conceptual designs through drafting, self-critique, and trade-off surfacing. + +## When to Use + +**Explicit trigger only.** Use when user: +- Asks to "brainstorm" a concept +- Wants to "explore" or "think through" an idea +- Has a nascent idea not ready for implementation +- Requests interactive design refinement + +**Do not use** when user provides clear instructions and expects execution. Most interactions are execution-focused - don't add friction by brainstorming unsolicited. + +## Core Principles + +1. **Draft first, ask later.** Don't pepper the user with questions. Use your judgment to draft, then surface gaps. + +2. **Conceptual, not implementation.** Output is design decisions and constraints. The implementing AI decides HOW. + +3. **Always checkpoint.** Write a defer file after critique. User can leave or continue - nothing is lost. + +4. **Subagents for execution.** If continuing to implementation, dispatch subagents. Keep main thread focused on coordination. + +## Workflow + +### Phase 1: Understand Intent + +Quickly gather context: +- What problem does this solve? +- Who/what consumes it? +- What constraints exist? + +If context is clear from the user's input, skip questions. If ambiguous, ask 1-2 clarifying questions max - don't interrogate. + +Check domain hooks in `domain-hooks.md` for architect-specific questions. + +### Phase 2: Draft Conceptual Design + +Generate a complete conceptual draft: +- Purpose and scope +- Key design decisions +- Structure/architecture (conceptual, not file-by-file) +- Constraints and boundaries +- What it explicitly does NOT do + +**Adapt scope to input clarity:** +- Nascent idea → high-level design, major decision points +- Clear concept → fuller design with more specifics +- Near-implementation ready → detailed design, edge cases + +### Phase 3: Self-Critique + +Before showing the user, critique your draft against: +- Alignment with stated intent +- Domain anti-patterns (see `domain-hooks.md`) +- Missing pieces or unstated assumptions +- Over-engineering or unnecessary complexity + +Note issues found. Revise draft if issues are clear fixes. Flag trade-offs that need user input. + +### Phase 4: Present & Checkpoint + +Present the design to the user. Then immediately write a defer file (see `../defer-work/workflow.md`) containing: +- The conceptual design +- Trade-offs requiring decisions +- Issues found during critique +- Tasks to move toward implementation + +Tell the user: + +``` +Design captured to .claude/deferred/YYYY-MM-DD-.md + +Trade-offs to decide: +- +- + +You can: +- Clear context and resume later with "pick up " +- Continue here - I'll work from the checkpoint + +What would you like to do? +``` + +### Phase 5: Resolution (if continuing) + +If user continues: +1. Work through trade-offs with user +2. Update defer file with decisions +3. Use subagents to execute tasks from the defer file +4. Subagents check off tasks as they complete +5. Main thread coordinates, delegates execution + +## Output Format + +The brainstorming output is a **conceptual design**, not a specification. Example structure: + +```markdown +## Purpose + + +## Design Decisions +- : +- : ... + +## Structure + + +## Constraints +- +- + +## Open Questions +- +``` + +Keep it scannable. User should understand the design in 60 seconds. diff --git a/plugins/cc-architect/references/conventions/plugin-data-convention.md b/plugins/cc-architect/references/conventions/plugin-data-convention.md new file mode 100644 index 0000000..043da6a --- /dev/null +++ b/plugins/cc-architect/references/conventions/plugin-data-convention.md @@ -0,0 +1,83 @@ +# Plugin Data Convention + +Standard convention for plugins that create files in user projects. + +## Path Convention + +``` +.claude/plugin-data/// +``` + +Plugins creating files in user projects MUST use this path structure. + +## Examples + +| Plugin | Path | Purpose | +|--------|------|---------| +| ux | `.claude/plugin-data/ux/audits/` | UX audit findings | +| seo-audit | `.claude/plugin-data/seo-audit/reports/` | SEO audit reports | +| commit | `.claude/plugin-data/commit/history/` | If commit needed state | + +## File Naming + +Use descriptive, sortable names: + +``` +--.md +``` + +Examples: +- `2024-01-15-heuristic-checkout-flow.md` +- `2024-01-15-accessibility-homepage.md` +- `2024-01-15-report-full-audit.md` + +## Gitignore + +User projects should add to `.gitignore`: + +``` +.claude/plugin-data/ +``` + +This data is transient and project-specific. It should not be committed. + +For specific plugin types, consider more granular patterns: + +``` +# Temporary files +**/.claude/plugin-data//tmp/ + +# Cached data +**/.claude/plugin-data//cache/ + +# Log files +**/.claude/plugin-data//*.log +``` + +## Artifact Lifecycle + +When designing functionality that creates plugin data files, consider cleanup needs. + +### Lifecycle Types + +| Type | Example | Recommended Approach | +|------|---------|---------------------| +| Audit findings | UX heuristic evaluation | Manual cleanup, historical value | +| Temporary state | In-progress work | Auto-archive or TTL-based cleanup | +| Reports | SEO audit summary | Archival policy, version-dated | + +### Documentation Requirements + +1. **In the skill/workflow**: Document expected lifecycle of created artifacts +2. **In plugin CLAUDE.md**: Add cleanup guidance section + +## Plugin Author Checklist + +When your plugin creates files in user projects: + +- [ ] Use `.claude/plugin-data//` path +- [ ] Choose semantic subdirectory name (audits/, reports/, state/) +- [ ] Document cleanup expectations in workflow +- [ ] Consider if automated cleanup is warranted +- [ ] Add note to generated files about their transient nature +- [ ] Include cleanup guidance in plugin CLAUDE.md diff --git a/plugins/cc-architect/references/defer-work/template.md b/plugins/cc-architect/references/defer-work/template.md new file mode 100644 index 0000000..8043ffc --- /dev/null +++ b/plugins/cc-architect/references/defer-work/template.md @@ -0,0 +1,75 @@ +# Defer File Template + +Use this structure when creating defer files. + +--- + +```markdown +# Deferred: + +Created: YYYY-MM-DD +Status: In Progress | Blocked | Ready to Resume + +## Context + +<2-3 sentences: What were we doing? What triggered this deferral?> + +## Original Intent + + + +## Findings + + + +### Trade-offs Requiring Decision + +- [ ] ****: