farmwork 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,44 +1,130 @@
1
- # Farmwork
1
+ <img src="/init.png" alt="Farmwork - Developer Methodology" width="500" />
2
2
 
3
- > Agentic development harness for AI-assisted projects
3
+ > A workflow framework for Claude Code by Wynter Jones
4
4
 
5
- Farmwork is a framework that transforms AI coding assistants from reactive tools into proactive development partners. The name is a play on "framework" - because building software should feel like tending a well-organized farm.
6
-
7
- ## Installation
5
+ ## Quick Start
8
6
 
9
7
  ```bash
10
8
  npm install -g farmwork
11
9
  ```
12
10
 
11
+ ```bash
12
+ cd your-project
13
+ farmwork init
14
+ farmwork doctor
15
+ farmwork status
16
+ ```
17
+
13
18
  Or run directly with npx:
14
19
 
15
20
  ```bash
16
21
  npx farmwork init
17
22
  ```
18
23
 
19
- ## Quick Start
24
+ ----
20
25
 
21
- ```bash
22
- # Initialize in your project
23
- cd your-project
24
- farmwork init
26
+ ## The Farmwork Method
25
27
 
26
- # Check your setup
27
- farmwork doctor
28
+ ### Core Concepts
29
+
30
+ 1. **FARMHOUSE.md** - Central command for tracking framework metrics
31
+ 2. **Phrase Commands** - Natural language triggers for workflows
32
+ 3. **Agents** - Specialized AI subagents for specific tasks
33
+ 4. **Autonomously Issue Tracking** - Using beads (`bd`) for full visibility
34
+ 5. **Living Audits** - Documents that track ongoing concerns
35
+ 6. **Plan & Implement** - You describe the outcome, the rest is handled, tracked and audited
36
+
37
+ ### Phrase Commands
38
+
39
+ **Farmwork Phrases** (Development Workflow):
40
+ | Phrase | Action |
41
+ |--------|--------|
42
+ | `open the farm` | Audit systems, update FARMHOUSE.md metrics |
43
+ | `count the herd` | Full inspection + dry run (code review, performance, security, quality, accessibility) |
44
+ | `go to market` | i18n translation check + accessibility audit |
45
+ | `close the farm` | Full push workflow (lint, test, build, commit, push) |
46
+
47
+ **Plan Phrases**:
48
+ | Phrase | Action |
49
+ |--------|--------|
50
+ | `make a plan for...` | Create implementation plan in `_PLANS/` |
51
+ | `let's implement...` | Execute plan with issue tracking |
52
+
53
+ ### Slash Commands
54
+
55
+ | Command | Description |
56
+ |---------|-------------|
57
+ | `/push` | Clean, stage, lint, test, build, commit, push, update metrics (11 steps) |
58
+
59
+ ### Agents
60
+
61
+ 10 specialized agents included:
62
+
63
+ | Agent | Purpose |
64
+ |-------|---------|
65
+ | `the-farmer` | Audit and update FARMHOUSE.md metrics |
66
+ | `code-reviewer` | Quality & security code review |
67
+ | `security-auditor` | OWASP vulnerability scanning |
68
+ | `performance-auditor` | Memory leaks, re-renders, anti-patterns |
69
+ | `code-smell-auditor` | DRY violations, complexity, naming |
70
+ | `accessibility-auditor` | WCAG 2.1 compliance, alt text, contrast |
71
+ | `unused-code-cleaner` | Detect and remove dead code |
72
+ | `code-cleaner` | Remove comments and console.logs |
73
+ | `i18n-locale-translator` | Translate UI text to locales |
74
+ | `storybook-maintainer` | Create/update Storybook stories |
75
+
76
+ ### Recommended Workflow
77
+
78
+ 1. **Start Session**: Run `open the farm` to audit current state
79
+ 2. **Plan Work**: Use `make a plan for...` for new features
80
+ 3. **Implement**: Use `let's implement...` to execute with tracking
81
+ 4. **Quality Check**: Run `count the herd` for full audit + dry run
82
+ 5. **Ship**: Run `close the farm` or `/push` to push changes
83
+
84
+ You can `go to market` when you have a production-ready app with international users.
85
+
86
+ ## Directory Structure
28
87
 
29
- # View framework status
30
- farmwork status
31
88
  ```
89
+ your-project/
90
+ ├── CLAUDE.md # Main instructions & phrase commands
91
+ ├── .claude/ # Claude Code configuration
92
+ │ ├── agents/ # 10 specialized subagents
93
+ │ │ ├── the-farmer.md
94
+ │ │ ├── code-reviewer.md
95
+ │ │ ├── security-auditor.md
96
+ │ │ ├── performance-auditor.md
97
+ │ │ ├── code-smell-auditor.md
98
+ │ │ ├── accessibility-auditor.md
99
+ │ │ ├── unused-code-cleaner.md
100
+ │ │ ├── code-cleaner.md
101
+ │ │ ├── i18n-locale-translator.md
102
+ │ │ └── storybook-maintainer.md
103
+ │ └── commands/ # User-invocable skills
104
+ │ └── push.md
105
+ ├── _AUDIT/ # Living audit documents
106
+ │ ├── FARMHOUSE.md # Framework command center
107
+ │ ├── SECURITY.md # Security posture
108
+ │ ├── PERFORMANCE.md # Performance metrics
109
+ │ ├── ACCESSIBILITY.md # WCAG 2.1 compliance
110
+ │ ├── CODE_QUALITY.md # Code quality tracking
111
+ │ └── TESTS.md # Test coverage
112
+ ├── _PLANS/ # Implementation plans
113
+ │ └── FEATURE_NAME.md
114
+ ├── .beads/ # Issue tracking
115
+ └── justfile # Navigation commands
116
+ ```
117
+
118
+ <img src="/logo.png" alt="Farmwork - Developer Methodology" width="300" />
32
119
 
33
120
  ## Commands
34
121
 
35
122
  ### `farmwork init`
36
123
 
37
- Initialize the Farmwork framework in your current directory. Runs an interactive setup wizard to configure your project for any tech stack.
124
+ Start setting up the new digital farm:
38
125
 
39
126
  ```bash
40
127
  farmwork init # Interactive setup wizard
41
- farmwork init -f # Force overwrite existing files
42
128
  ```
43
129
 
44
130
  **Options:**
@@ -54,31 +140,22 @@ If you enable Storybook (for React/Vue projects), the wizard will also ask for:
54
140
  **Creates:**
55
141
  - `CLAUDE.md` - Main instructions and phrase commands
56
142
  - `.claude/` - Claude Code configuration directory
57
- - `settings.json` - Project settings
58
- - `agents/` - Specialized subagents
59
- - `commands/` - User-invocable skills
143
+ - `agents/` - 10 specialized subagents
144
+ - `commands/` - 1 user-invocable skill (/push)
60
145
  - `_AUDIT/` - Living audit documents
61
146
  - `FARMHOUSE.md` - Framework command center
147
+ - `SECURITY.md` - Security posture tracking
148
+ - `PERFORMANCE.md` - Performance metrics
149
+ - `ACCESSIBILITY.md` - WCAG 2.1 compliance
150
+ - `CODE_QUALITY.md` - Code quality tracking
151
+ - `TESTS.md` - Test coverage tracking
62
152
  - `_PLANS/` - Implementation plans directory
63
153
  - `justfile` - Navigation and task commands
64
154
 
65
- ### `farmwork add <type> <name>`
66
-
67
- Add a new component to your Farmwork setup.
68
-
69
- ```bash
70
- farmwork add agent code-reviewer # Add a new agent
71
- farmwork add command deploy # Add a new command
72
- farmwork add audit performance # Add a new audit document
73
- ```
74
-
75
- **Types:**
76
- - `agent` - Creates `.claude/agents/<name>.md`
77
- - `command` - Creates `.claude/commands/<name>.md`
78
- - `audit` - Creates `_AUDIT/<NAME>.md`
79
-
80
155
  ### `farmwork status`
81
156
 
157
+ <img src="/status.png" alt="Farmwork Status" width="500" />
158
+
82
159
  Display Farmwork status and metrics.
83
160
 
84
161
  ```bash
@@ -92,8 +169,12 @@ farmwork status
92
169
  - Configuration file status
93
170
  - Project metrics (tests, stories)
94
171
 
172
+ <img src="/status2.png" alt="Farmwork Status Details" width="500" />
173
+
95
174
  ### `farmwork doctor`
96
175
 
176
+ <img src="/doctor.png" alt="Farmwork Doctor" width="500" />
177
+
97
178
  Check your Farmwork setup and diagnose issues.
98
179
 
99
180
  ```bash
@@ -108,67 +189,12 @@ farmwork doctor
108
189
  - Issue tracking (beads)
109
190
  - Security (.gitignore settings)
110
191
 
111
- ## The Farmwork Method
112
-
113
- ### Core Concepts
114
-
115
- 1. **FARMHOUSE.md** - Central command for tracking framework metrics
116
- 2. **Phrase Commands** - Natural language triggers for workflows
117
- 3. **Agents** - Specialized AI subagents for specific tasks
118
- 4. **Commands** - User-invocable skills (triggered with `/command`)
119
- 5. **Issue Tracking** - Using beads (`bd`) for full visibility
120
- 6. **Living Audits** - Documents that track ongoing concerns
121
-
122
- ### Phrase Commands
123
-
124
- **Farmwork Phrases** (Development Workflow):
125
- - `till the land` - Audit systems, update metrics
126
- - `inspect the farm` - Full inspection (code review, performance, security, quality)
127
- - `go to market` - i18n translation check
128
- - `harvest crops` - Full push workflow
129
-
130
- **Plan Phrases**:
131
- - `make a plan for...` - Create implementation plan
132
- - `let's implement...` - Execute plan with issue tracking
133
-
134
- ### Recommended Workflow
135
-
136
- 1. **Start Session**: Run `till the land` to audit current state
137
- 2. **Plan Work**: Use `make a plan for...` for new features
138
- 3. **Implement**: Use `let's implement...` to execute with tracking
139
- 4. **Quality Check**: Run `inspect the farm`
140
- 5. **Ship**: Run `harvest crops` to push changes
141
-
142
- ## Directory Structure
143
-
144
- ```
145
- your-project/
146
- ├── CLAUDE.md # Main instructions & phrase commands
147
- ├── .claude/ # Claude Code configuration
148
- │ ├── settings.json # Project settings
149
- │ ├── agents/ # Specialized subagents
150
- │ │ ├── code-reviewer.md
151
- │ │ ├── security-auditor.md
152
- │ │ └── ...
153
- │ └── commands/ # User-invocable skills
154
- │ ├── push.md
155
- │ └── ...
156
- ├── _AUDIT/ # Living audit documents
157
- │ ├── FARMHOUSE.md # Framework command center
158
- │ ├── SECURITY.md
159
- │ ├── PERFORMANCE.md
160
- │ └── ...
161
- ├── _PLANS/ # Implementation plans
162
- │ └── FEATURE_NAME.md
163
- ├── .beads/ # Issue tracking (optional)
164
- └── justfile # Navigation commands
165
- ```
166
192
 
167
193
  ## Requirements
168
194
 
169
195
  - Node.js 18+
170
196
  - [just](https://github.com/casey/just) (recommended for navigation)
171
- - [beads](https://github.com/steveyegge/beads) (optional, for issue tracking)
197
+ - [beads](https://github.com/steveyegge/beads) (for issue tracking)
172
198
 
173
199
  ## License
174
200
 
@@ -176,5 +202,5 @@ MIT
176
202
 
177
203
  ## Links
178
204
 
179
- - [Farmwork Documentation](https://farmwork.wynter.ai)
180
- - [GitHub Repository](https://github.com/wynterjones/farmwork)
205
+ - [Farmwork Website](https://farmwork.dev)
206
+ - [Wynter Jones](https://wynter.ai)
package/bin/farmwork.js CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { program } from 'commander';
4
4
  import { init } from '../src/init.js';
5
- import { add } from '../src/add.js';
6
5
  import { status } from '../src/status.js';
7
6
  import { doctor } from '../src/doctor.js';
8
7
  import chalk from 'chalk';
@@ -26,11 +25,6 @@ program
26
25
  .option('-f, --force', 'Overwrite existing files')
27
26
  .action(init);
28
27
 
29
- program
30
- .command('add <type> <name>')
31
- .description('Add a component (agent, command, audit)')
32
- .action(add);
33
-
34
28
  program
35
29
  .command('status')
36
30
  .description('Show Farmwork status and metrics')
package/package.json CHANGED
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "farmwork",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
- "description": "Farmwork - Agentic development harness for AI-assisted projects",
5
+ "description": "Farmwork - A workflow framework for Claude Code by Wynter Jones",
6
6
  "main": "src/index.js",
7
7
  "bin": {
8
8
  "farmwork": "./bin/farmwork.js"
9
9
  },
10
+ "files": [
11
+ "src",
12
+ "bin",
13
+ "templates"
14
+ ],
10
15
  "scripts": {
11
16
  "test": "node --test",
12
17
  "lint": "eslint src/"
@@ -25,9 +30,10 @@
25
30
  "dependencies": {
26
31
  "chalk": "^5.3.0",
27
32
  "commander": "^12.1.0",
33
+ "fs-extra": "^11.2.0",
28
34
  "inquirer": "^9.2.12",
29
35
  "ora": "^8.0.1",
30
- "fs-extra": "^11.2.0"
36
+ "terminal-kit": "^3.1.1"
31
37
  },
32
38
  "engines": {
33
39
  "node": ">=18.0.0"
package/src/doctor.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import fs from "fs-extra";
2
2
  import path from "path";
3
- import chalk from "chalk";
4
3
  import { execSync } from "child_process";
4
+ import { farmTerm, emojis } from "./terminal.js";
5
5
 
6
6
  function checkExists(filePath, description) {
7
7
  const exists = fs.existsSync(filePath);
@@ -54,8 +54,7 @@ function checkClaudeMdSections(claudeMdPath) {
54
54
  const content = fs.readFileSync(claudeMdPath, "utf8");
55
55
  const requiredSections = [
56
56
  "Phrase Commands",
57
- "Issue Tracking",
58
- "Claude Code Commands",
57
+ "Issue-First Workflow",
59
58
  ];
60
59
 
61
60
  const missing = requiredSections.filter(
@@ -115,27 +114,24 @@ function checkGitignore(cwd) {
115
114
  export async function doctor() {
116
115
  const cwd = process.cwd();
117
116
 
118
- console.log(chalk.cyan("\n🩺 Farmwork Doctor\n"));
119
- console.log(chalk.gray("Checking your Farmwork setup...\n"));
117
+ farmTerm.logo();
118
+ farmTerm.header("FARMWORK DOCTOR", "accent");
119
+ await farmTerm.analyzing("Diagnosing project health", 1200);
120
120
 
121
121
  const checks = [];
122
122
 
123
- checks.push({ category: "Core Files", items: [] });
123
+ // Core Files
124
+ checks.push({ category: "Core Files", emoji: "🌾", items: [] });
124
125
  checks[0].items.push(
125
126
  checkExists(path.join(cwd, "CLAUDE.md"), "CLAUDE.md exists"),
126
127
  );
127
128
  checks[0].items.push(
128
129
  checkExists(path.join(cwd, ".claude"), ".claude/ directory exists"),
129
130
  );
130
- checks[0].items.push(
131
- checkExists(
132
- path.join(cwd, ".claude", "settings.json"),
133
- "settings.json exists",
134
- ),
135
- );
136
131
  checks[0].items.push(checkClaudeMdSections(path.join(cwd, "CLAUDE.md")));
137
132
 
138
- checks.push({ category: "Agents & Commands", items: [] });
133
+ // Agents & Commands
134
+ checks.push({ category: "Agents & Commands", emoji: "🐴", items: [] });
139
135
  checks[1].items.push(
140
136
  checkDirectoryNotEmpty(
141
137
  path.join(cwd, ".claude", "agents"),
@@ -149,7 +145,8 @@ export async function doctor() {
149
145
  ),
150
146
  );
151
147
 
152
- checks.push({ category: "Audit System", items: [] });
148
+ // Audit System
149
+ checks.push({ category: "Audit System", emoji: "🦉", items: [] });
153
150
  checks[2].items.push(
154
151
  checkExists(path.join(cwd, "_AUDIT"), "_AUDIT/ directory exists"),
155
152
  );
@@ -166,56 +163,67 @@ export async function doctor() {
166
163
  checkExists(path.join(cwd, "_PLANS"), "_PLANS/ directory exists"),
167
164
  );
168
165
 
169
- checks.push({ category: "Navigation", items: [] });
166
+ // Navigation
167
+ checks.push({ category: "Navigation", emoji: "🐓", items: [] });
170
168
  checks[3].items.push(
171
169
  checkExists(path.join(cwd, "justfile"), "justfile exists"),
172
170
  );
173
171
  checks[3].items.push(checkCommand("just", "just command available"));
174
172
 
175
- checks.push({ category: "Issue Tracking", items: [] });
173
+ // Issue Tracking
174
+ checks.push({ category: "Issue Tracking", emoji: "🐷", items: [] });
176
175
  checks[4].items.push(
177
176
  checkExists(path.join(cwd, ".beads"), ".beads/ directory exists"),
178
177
  );
179
178
  checks[4].items.push(checkCommand("bd", "bd (beads) command available"));
180
179
 
181
- checks.push({ category: "Security", items: [] });
180
+ // Security
181
+ checks.push({ category: "Security", emoji: "🐕", items: [] });
182
182
  checks[5].items.push(checkGitignore(cwd));
183
183
 
184
184
  let totalPassed = 0;
185
185
  let totalFailed = 0;
186
186
  let totalWarnings = 0;
187
187
 
188
+ // Run checks with animation
188
189
  for (const category of checks) {
189
- console.log(chalk.bold(`${category.category}`));
190
+ farmTerm.section(category.category, category.emoji);
190
191
 
191
192
  for (const check of category.items) {
193
+ // Small delay for visual effect
194
+ await new Promise(r => setTimeout(r, 80));
195
+
192
196
  if (check.passed) {
193
- console.log(chalk.green(` 🌱 ${check.message}`));
197
+ farmTerm.status(check.message, "pass");
194
198
  totalPassed++;
195
199
  } else {
196
- if (check.message.includes("beads") || check.message.includes("bd ")) {
197
- console.log(chalk.yellow(` 🍋 ${check.message}`));
198
- if (check.details) console.log(chalk.gray(` ${check.details}`));
200
+ // Beads-related items are optional (warnings)
201
+ const isOptional = check.message.includes("beads") || check.message.includes("bd ");
202
+ if (isOptional) {
203
+ farmTerm.status(check.message, "warn", check.details || "(optional)");
199
204
  totalWarnings++;
200
205
  } else {
201
- console.log(chalk.red(` 🍂 ${check.message}`));
202
- if (check.details) console.log(chalk.gray(` ${check.details}`));
206
+ farmTerm.status(check.message, "fail", check.details || "");
203
207
  totalFailed++;
204
208
  }
205
209
  }
206
210
  }
207
- console.log();
208
211
  }
209
212
 
210
- console.log(chalk.bold("Summary"));
211
- console.log(chalk.green(` 🌱 ${totalPassed} passed`));
213
+ // Summary
214
+ farmTerm.nl();
215
+ farmTerm.divider("═", 50);
216
+ farmTerm.section("Diagnosis Summary", "🐮");
217
+
218
+ farmTerm.metric("Passed", totalPassed, emojis.seedling);
212
219
  if (totalWarnings > 0) {
213
- console.log(chalk.yellow(` 🍋 ${totalWarnings} warnings (optional)`));
220
+ farmTerm.metric("Warnings", totalWarnings, emojis.leaf);
214
221
  }
215
222
  if (totalFailed > 0) {
216
- console.log(chalk.red(` 🍂 ${totalFailed} failed`));
223
+ farmTerm.metric("Failed", totalFailed, "🍂");
217
224
  }
218
225
 
226
+ // Health Assessment
219
227
  const health =
220
228
  totalFailed === 0
221
229
  ? totalWarnings === 0
@@ -225,20 +233,28 @@ export async function doctor() {
225
233
  ? "Needs Attention"
226
234
  : "Critical";
227
235
 
228
- const healthColor =
229
- health === "Excellent"
230
- ? chalk.green
231
- : health === "Good"
232
- ? chalk.cyan
233
- : health === "Needs Attention"
234
- ? chalk.yellow
235
- : chalk.red;
236
-
237
- console.log(`\n${chalk.bold("Health:")} ${healthColor(health)}`);
236
+ farmTerm.nl();
237
+ farmTerm.divider();
238
+
239
+ if (health === "Excellent") {
240
+ farmTerm.success(`Health: ${health} - Your farm is thriving! 🌳`);
241
+ } else if (health === "Good") {
242
+ farmTerm.info(`Health: ${health} - Growing nicely! 🌿`);
243
+ } else if (health === "Needs Attention") {
244
+ farmTerm.warn(`Health: ${health} - Some areas need work 🌱`);
245
+ } else {
246
+ farmTerm.error(`Health: ${health} - Urgent care needed! 🥀`);
247
+ }
238
248
 
239
249
  if (totalFailed > 0) {
240
- console.log(chalk.gray("\nRun `farmwork init` to fix missing components."));
250
+ farmTerm.nl();
251
+ farmTerm.info("Run `farmwork init` to fix missing components.");
241
252
  }
242
253
 
243
- console.log();
254
+ // Health bar visualization
255
+ const healthPercent = Math.round((totalPassed / (totalPassed + totalFailed + totalWarnings)) * 100);
256
+ farmTerm.nl();
257
+ farmTerm.score("Overall Health", healthPercent, 100);
258
+
259
+ farmTerm.nl();
244
260
  }
package/src/index.js CHANGED
@@ -1,4 +1,3 @@
1
1
  export { init } from './init.js';
2
- export { add } from './add.js';
3
2
  export { status } from './status.js';
4
3
  export { doctor } from './doctor.js';