Skip to content

Commit 8281c60

Browse files
aRustyDevclaude
andcommitted
refactor(build): Move justfiles to context dirs, symlink .claude/
- Move justfiles from just/ to their context directories: - context/plugins/justfile - context/skills/justfile - context/commands/justfile - context/agents/justfile - context/rules/justfile - Add default recipe to justfile (just --list) - Migrate .claude/ content to context/: - agents: bd-task-agent, skill-pr-addresser, skill-reviewer dirs - skills: beads skill - rules: 14 project rules (pre-commit.md → pre-commit-project.md) - Replace .claude/{agents,skills,rules} with symlinks to context/ - Archive completed plugin-build-system plan Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 81e9bc2 commit 8281c60

2,643 files changed

Lines changed: 272858 additions & 52382 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Plugin Component Audit
2+
3+
Audit of existing plugins and potential shared components from `context/`.
4+
5+
## Summary
6+
7+
| Plugin | Status | Potential Shared Components |
8+
|--------|--------|----------------------------|
9+
| android-dev | Placeholder | api-designer, mobile-app-developer agents |
10+
| api-dev | Placeholder | api-designer, api-documenter, graphql-architect agents |
11+
| blog-workflow | List format | content-marketer, technical-writer agents |
12+
| browser-extension-dev | Partial | Has MCP/skills defined, needs agent mapping |
13+
| cad-dev | Placeholder | No matching components |
14+
| content-creation | Placeholder | content-marketer, seo-specialist agents |
15+
| frontend-dev | Placeholder | frontend-developer, react-specialist, vue-expert agents |
16+
| go-projects | Placeholder | golang-pro agent, convert skills |
17+
| homebrew-dev | Complete | Already migrated |
18+
| infrastructure | Placeholder | terraform-engineer, kubernetes-specialist agents |
19+
| ios-dev | Placeholder | swift-expert, mobile-app-developer agents |
20+
| job-hunting | No sources | No matching components |
21+
| mcp-server-dev | No sources | mcp-developer agent |
22+
| model-dev | Placeholder | ml-engineer, data-scientist agents |
23+
| pcb-design | No sources | embedded-systems agent (partial) |
24+
| rust-projects | No sources | rust-engineer agent, convert skills |
25+
| siem-ops | Placeholder | security-engineer, incident-responder agents |
26+
| terraform | No sources | terraform-engineer, cloud-architect agents |
27+
28+
## Detailed Recommendations
29+
30+
### Ready for Component Mapping
31+
32+
These plugins could use existing context/ components:
33+
34+
#### api-dev
35+
```json
36+
{
37+
"agents/api-designer.md": "context/agents/api-designer.md",
38+
"agents/api-documenter.md": "context/agents/api-documenter.md",
39+
"agents/graphql-architect.md": "context/agents/graphql-architect.md"
40+
}
41+
```
42+
43+
#### frontend-dev
44+
```json
45+
{
46+
"agents/frontend-developer.md": "context/agents/frontend-developer.md",
47+
"agents/react-specialist.md": "context/agents/react-specialist.md",
48+
"agents/vue-expert.md": "context/agents/vue-expert.md",
49+
"agents/nextjs-developer.md": "context/agents/nextjs-developer.md"
50+
}
51+
```
52+
53+
#### go-projects
54+
```json
55+
{
56+
"agents/golang-pro.md": "context/agents/golang-pro.md"
57+
}
58+
```
59+
60+
#### infrastructure
61+
```json
62+
{
63+
"agents/terraform-engineer.md": "context/agents/terraform-engineer.md",
64+
"agents/kubernetes-specialist.md": "context/agents/kubernetes-specialist.md",
65+
"agents/cloud-architect.md": "context/agents/cloud-architect.md"
66+
}
67+
```
68+
69+
#### mcp-server-dev
70+
```json
71+
{
72+
"agents/mcp-developer.md": "context/agents/mcp-developer.md"
73+
}
74+
```
75+
76+
#### rust-projects
77+
```json
78+
{
79+
"agents/rust-engineer.md": "context/agents/rust-engineer.md"
80+
}
81+
```
82+
83+
#### siem-ops
84+
```json
85+
{
86+
"agents/security-engineer.md": "context/agents/security-engineer.md",
87+
"agents/incident-responder.md": "context/agents/incident-responder.md",
88+
"agents/penetration-tester.md": "context/agents/penetration-tester.md"
89+
}
90+
```
91+
92+
#### terraform
93+
```json
94+
{
95+
"agents/terraform-engineer.md": "context/agents/terraform-engineer.md",
96+
"agents/cloud-architect.md": "context/agents/cloud-architect.md"
97+
}
98+
```
99+
100+
### Needs Custom Components
101+
102+
These plugins have no matching components in context/:
103+
104+
- **cad-dev**: Would need CAD-specific skills/agents
105+
- **pcb-design**: Would need PCB/electronics skills/agents
106+
- **job-hunting**: Would need career-focused components
107+
- **android-dev**: Has mobile-app-developer but may need Android-specific
108+
- **ios-dev**: Has swift-expert but may need iOS-specific
109+
110+
### Planning Format (Skip Migration)
111+
112+
- **blog-workflow**: Uses list format for planning, not buildable
113+
114+
## Migration Priority
115+
116+
1. **High value** (many matching components):
117+
- infrastructure, terraform, api-dev, frontend-dev, siem-ops
118+
119+
2. **Medium value** (some matching components):
120+
- go-projects, rust-projects, mcp-server-dev
121+
122+
3. **Low value** (few/no matching components):
123+
- cad-dev, pcb-design, job-hunting, android-dev, ios-dev, content-creation, model-dev
124+
125+
## Recommended Actions
126+
127+
1. Update high-value plugins with real component mappings
128+
2. Keep placeholder sources for low-value plugins until domain-specific components exist
129+
3. Remove placeholder files (foo.md, bar.md) and use empty sources for plugins without shared components

.archive/plans/plugin-build-system/analysis/research-report.md

Lines changed: 204 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Context Component Build System
2+
3+
**Created:** 2025-02-20
4+
**Updated:** 2025-03-16
5+
**Owner:** Claude Code AI
6+
7+
Content-addressed build system for context component management with tiered distribution.
8+
9+
## Problem
10+
11+
- Component duplication across plugins
12+
- Version drift with no tracking
13+
- No standardized distribution for non-plugin components
14+
- Unclear relationships between plugins, skills, commands, agents
15+
16+
## Solution
17+
18+
Implement a tiered build and distribution system:
19+
20+
1. **Justfile modules** for building each component type
21+
2. **Content-addressed hashing** for tracking source changes
22+
3. **Tiered distribution** via appropriate tools per component type
23+
4. **Validation gates** appropriate to each tier
24+
25+
## Component Hierarchy
26+
27+
```
28+
┌─────────────────────────────────────────────────────────────┐
29+
│ TIER 1: PLUGINS (Primary) │
30+
│ Distribution: plugin-marketplace │
31+
│ Build: just plugin:build <name> │
32+
│ Validation: Full marketplace validation, versioning │
33+
│ Contains: Skills, Commands, Agents, Rules, MCP configs │
34+
├─────────────────────────────────────────────────────────────┤
35+
│ TIER 2: SKILLS (Secondary) │
36+
│ Distribution: npx skills (Vercel Labs) ✓ │
37+
│ Build: just skill:build <name> │
38+
│ Validation: SKILL.md structure, allowed-tools │
39+
│ Contains: Commands, Agents, Rules (bundled) │
40+
├─────────────────────────────────────────────────────────────┤
41+
│ TIER 3: COMMANDS & AGENTS (Tertiary) │
42+
│ Distribution: Bundle into skills (no dedicated CLI exists) │
43+
│ Build: just command:build, just agent:build │
44+
│ Validation: Frontmatter, markdown lint │
45+
│ Contains: Self-contained │
46+
├─────────────────────────────────────────────────────────────┤
47+
│ TIER 4: SUPPORTING COMPONENTS │
48+
│ Distribution: Bundled into higher tiers │
49+
│ Build: just rule:build, just mcp:build, just hook:build │
50+
│ Validation: Format-specific │
51+
│ Types: Rules, Output Styles, MCP Configs, Hooks │
52+
└─────────────────────────────────────────────────────────────┘
53+
```
54+
55+
> **Note:** Prompts are NOT a separate component type. Commands are "prompts with slash triggers", rules are "headless prompts", and skills are "prompts with infrastructure". Use SKILL.md `type` metadata for distinctions.
56+
57+
## Key Decisions
58+
59+
| Decision | Choice | Rationale |
60+
|----------|--------|-----------|
61+
| Promotion path | None | Components are distinct, refactor not promote |
62+
| Plugin skills | All referenced | Extract to context/skills/ first |
63+
| Build system | Justfile modules | `just plugin:build`, `just skill:build`, etc. |
64+
| Plugin distribution | plugin-marketplace | Established, works |
65+
| Skill distribution | **`npx skills` (Vercel)** | 547K/week downloads, 42 agents, skills.sh registry |
66+
| Command/Agent distribution | Bundle into skills | No dedicated CLI exists |
67+
| Source tracking | Extend plugin.sources.json | Track skill composition |
68+
| Prompts as component | **No** | Subsumed by skills/commands/rules |
69+
| Skill spec | SKILL.md (agentskills.io) | Industry standard (Anthropic, OpenAI, Microsoft, Google) |
70+
71+
## Phases
72+
73+
| Phase | Name | Goal | Status |
74+
|-------|------|------|--------|
75+
| 0 | Research | Document approach, audit components | ✅ Complete |
76+
| 0.5 | CLI Research | Evaluate distribution CLI options | ✅ Complete |
77+
| 1 | PoC | Hash generation and validation | ✅ Complete |
78+
| 2 | MVP | Stale detection + one plugin migration | ✅ Complete |
79+
| 3 | Full Build | Complete build system with justfile modules | ✅ Complete |
80+
| 4 | Migration | Migrate all plugins, implement skill tracking | ✅ Complete |
81+
| 5 | Distribution Gaps | Hook distribution, cross-agent rules (optional) | Proposed |
82+
83+
## Documents
84+
85+
| Document | Location |
86+
|----------|----------|
87+
| Component Audit | `analysis/plugin-component-audit.md` |
88+
| CLI Research Report | `analysis/research-report.md` |
89+
| Architecture Decision | `docs/src/adr/0003-plugin-build-system.md` |
90+
| Phase Plans | `phase/*.md` |
91+
92+
## Research Questions (Resolved)
93+
94+
| Question | Answer |
95+
|----------|--------|
96+
| Skills CLI? | **`npx skills`** (add-skill deprecated, openskills has 200x less adoption) |
97+
| Commands/Agents/Rules CLI? | **None exists** - bundle into skills |
98+
| Prompts as component? | **No** - subsumed by skills/commands/rules |
99+
100+
## Distribution Gaps (Phase 5 Candidates)
101+
102+
Ecosystem gaps with no existing tools:
103+
104+
| Gap | Impact | Build Opportunity |
105+
|-----|--------|-------------------|
106+
| **Hook distribution** | No way to share hook configs | High - largest ecosystem gap |
107+
| **Cross-agent rule translation** | Different formats per agent | Medium - multi-agent teams |
108+
| **Skill dependency resolution** | No formal dependency graph | Medium - contribute to spec |
109+
| **AGENTS.md for Claude Code** | 3K+ GitHub upvotes, no response | Low - wait for Anthropic |
110+
111+
See `analysis/research-report.md` for full details.
112+
113+
## Quick Links
114+
115+
- [Phase 0: Research](phase/0-research.md)
116+
- [Phase 0.5: CLI Research](phase/0.5-cli-research.md)
117+
- [Phase 1: PoC](phase/1-poc.md)
118+
- [Phase 2: MVP](phase/2-mvp.md)
119+
- [Phase 3: Full Build](phase/3-full-build.md)
120+
- [Phase 4: Migration](phase/4-migration.md)
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Phase 0: Research
2+
3+
**ID:** `phase-0`
4+
**Dependencies:** none
5+
**Status:** complete
6+
**Effort:** 4 hours
7+
8+
Initial research and architecture planning for the plugin build system.
9+
10+
## Goal
11+
12+
Document the current state, identify problems, and design the high-level approach.
13+
14+
## Deliverables
15+
16+
### 1. Problem Statement
17+
18+
Documented issues with current plugin management:
19+
- Component duplication across plugins (same agent copied to multiple plugins)
20+
- Version drift with no tracking mechanism
21+
- No standardized distribution for non-plugin components
22+
- Unclear relationships between plugins, skills, commands, agents
23+
24+
### 2. Component Audit
25+
26+
Analyzed all 18 existing plugins to identify:
27+
- Which have shared components
28+
- Which could use existing context/ components
29+
- Migration priority based on component reuse potential
30+
31+
**Output:** `analysis/plugin-component-audit.md`
32+
33+
### 3. Architecture Decision
34+
35+
Decided on content-addressed build system with:
36+
- SHA256 hashing for change detection
37+
- `plugin.sources.json` for tracking source→plugin mappings
38+
- Tiered component hierarchy (Plugins > Skills > Commands/Agents > Supporting)
39+
40+
### 4. Phase Plan
41+
42+
Created phased implementation plan:
43+
- Phase 0.5: CLI Research (what tools exist for distribution)
44+
- Phase 1: PoC (hash generation and validation)
45+
- Phase 2: MVP (stale detection, one plugin migration)
46+
- Phase 3: Full Build (justfile modules, all component types)
47+
- Phase 4: Migration (all plugins)
48+
49+
## Key Decisions Made
50+
51+
| Decision | Choice | Rationale |
52+
|----------|--------|-----------|
53+
| Hash algorithm | SHA256 | Industry standard, fast, collision-resistant |
54+
| Build tool | Justfile | Already in use, supports modules |
55+
| Source tracking | plugin.sources.json | Extend existing format |
56+
| Change detection | Content-addressed | More reliable than timestamps |
57+
| Plugin distribution | plugin-marketplace | Already working, established |
58+
59+
## Success Criteria
60+
61+
- [x] Problem statement documented
62+
- [x] Component audit complete
63+
- [x] Architecture approach decided
64+
- [x] Phase plan created
65+
- [x] Key decisions documented
66+
67+
## Notes
68+
69+
- Phase 0.5 (CLI Research) was added after initial planning to research Tier 2-4 distribution options
70+
- homebrew-dev plugin identified as first migration candidate (already has sources)

0 commit comments

Comments
 (0)