forge-workflow 1.4.7 → 1.5.0

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.
@@ -0,0 +1,28 @@
1
+ {
2
+ "id": "claude",
3
+ "name": "Claude Code",
4
+ "version": "1.0.0",
5
+ "description": "Anthropic's CLI agent",
6
+ "homepage": "https://claude.ai/code",
7
+ "capabilities": {
8
+ "commands": true,
9
+ "skills": true,
10
+ "hooks": false
11
+ },
12
+ "directories": {
13
+ "commands": ".claude/commands",
14
+ "rules": ".claude/rules",
15
+ "skills": ".claude/skills/forge-workflow",
16
+ "scripts": ".claude/scripts"
17
+ },
18
+ "files": {
19
+ "rootConfig": "CLAUDE.md",
20
+ "skillDefinition": ".claude/skills/forge-workflow/SKILL.md"
21
+ },
22
+ "setup": {
23
+ "copyCommands": true,
24
+ "copyRules": true,
25
+ "copyScripts": true,
26
+ "createSkill": true
27
+ }
28
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "id": "cline",
3
+ "name": "Cline",
4
+ "version": "1.0.0",
5
+ "description": "VS Code agent extension",
6
+ "homepage": "https://github.com/cline/cline",
7
+ "capabilities": {
8
+ "commands": false,
9
+ "skills": true,
10
+ "hooks": false
11
+ },
12
+ "directories": {
13
+ "skills": ".cline/skills/forge-workflow"
14
+ },
15
+ "files": {
16
+ "rootConfig": ".clinerules"
17
+ },
18
+ "setup": {
19
+ "createSkill": true
20
+ }
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "id": "continue",
3
+ "name": "Continue",
4
+ "version": "1.0.0",
5
+ "description": "Open-source AI assistant",
6
+ "homepage": "https://continue.dev",
7
+ "capabilities": {
8
+ "commands": false,
9
+ "skills": true,
10
+ "hooks": false
11
+ },
12
+ "directories": {
13
+ "prompts": ".continue/prompts",
14
+ "skills": ".continue/skills/forge-workflow"
15
+ },
16
+ "setup": {
17
+ "createSkill": true,
18
+ "needsConversion": true,
19
+ "continueFormat": true
20
+ }
21
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "id": "copilot",
3
+ "name": "GitHub Copilot",
4
+ "version": "1.0.0",
5
+ "description": "GitHub's AI assistant",
6
+ "homepage": "https://github.com/features/copilot",
7
+ "capabilities": {
8
+ "commands": false,
9
+ "skills": false,
10
+ "hooks": false
11
+ },
12
+ "directories": {
13
+ "prompts": ".github/prompts",
14
+ "instructions": ".github/instructions"
15
+ },
16
+ "files": {
17
+ "rootConfig": ".github/copilot-instructions.md"
18
+ },
19
+ "setup": {
20
+ "needsConversion": true,
21
+ "promptFormat": true
22
+ }
23
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "id": "cursor",
3
+ "name": "Cursor",
4
+ "version": "1.0.0",
5
+ "description": "AI-first code editor",
6
+ "homepage": "https://cursor.sh",
7
+ "capabilities": {
8
+ "commands": false,
9
+ "skills": true,
10
+ "hooks": false
11
+ },
12
+ "directories": {
13
+ "rules": ".cursor/rules",
14
+ "skills": ".cursor/skills/forge-workflow"
15
+ },
16
+ "files": {
17
+ "rootConfig": ".cursorrules"
18
+ },
19
+ "setup": {
20
+ "copyRules": true,
21
+ "createSkill": true,
22
+ "customSetup": "cursor"
23
+ }
24
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "id": "kilocode",
3
+ "name": "Kilo Code",
4
+ "version": "1.0.0",
5
+ "description": "VS Code extension",
6
+ "homepage": "https://marketplace.visualstudio.com/items?itemName=kilo-code",
7
+ "capabilities": {
8
+ "commands": false,
9
+ "skills": true,
10
+ "hooks": false
11
+ },
12
+ "directories": {
13
+ "workflows": ".kilocode/workflows",
14
+ "rules": ".kilocode/rules",
15
+ "skills": ".kilocode/skills/forge-workflow"
16
+ },
17
+ "setup": {
18
+ "copyRules": true,
19
+ "createSkill": true,
20
+ "needsConversion": true
21
+ }
22
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "id": "opencode",
3
+ "name": "OpenCode",
4
+ "version": "1.0.0",
5
+ "description": "Open-source agent",
6
+ "homepage": "https://github.com/opencode",
7
+ "capabilities": {
8
+ "commands": true,
9
+ "skills": true,
10
+ "hooks": false
11
+ },
12
+ "directories": {
13
+ "commands": ".opencode/commands",
14
+ "skills": ".opencode/skills/forge-workflow"
15
+ },
16
+ "setup": {
17
+ "copyCommands": true,
18
+ "createSkill": true
19
+ }
20
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "id": "roo",
3
+ "name": "Roo Code",
4
+ "version": "1.0.0",
5
+ "description": "Cline fork with modes",
6
+ "homepage": "https://github.com/roocode/roo",
7
+ "capabilities": {
8
+ "commands": true,
9
+ "skills": false,
10
+ "hooks": false
11
+ },
12
+ "directories": {
13
+ "commands": ".roo/commands"
14
+ },
15
+ "files": {
16
+ "rootConfig": ".clinerules"
17
+ },
18
+ "setup": {
19
+ "copyCommands": true,
20
+ "needsConversion": true
21
+ }
22
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "id": "windsurf",
3
+ "name": "Windsurf",
4
+ "version": "1.0.0",
5
+ "description": "Codeium's agentic IDE",
6
+ "homepage": "https://codeium.com/windsurf",
7
+ "capabilities": {
8
+ "commands": false,
9
+ "skills": true,
10
+ "hooks": false
11
+ },
12
+ "directories": {
13
+ "workflows": ".windsurf/workflows",
14
+ "rules": ".windsurf/rules",
15
+ "skills": ".windsurf/skills/forge-workflow"
16
+ },
17
+ "files": {
18
+ "rootConfig": ".windsurfrules"
19
+ },
20
+ "setup": {
21
+ "copyRules": true,
22
+ "createSkill": true,
23
+ "needsConversion": true
24
+ }
25
+ }
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Plugin Manager
3
+ *
4
+ * Handles loading, validating, and managing agent plugin JSON files.
5
+ * Provides discoverable plugin architecture for AI coding agents.
6
+ */
7
+
8
+ const fs = require('node:fs');
9
+ const path = require('node:path');
10
+
11
+ class PluginManager {
12
+ constructor() {
13
+ this.plugins = new Map();
14
+ this.loadPlugins();
15
+ }
16
+
17
+ /**
18
+ * Load all plugin files from lib/agents/ directory
19
+ */
20
+ loadPlugins() {
21
+ const pluginDir = path.join(__dirname, 'agents');
22
+
23
+ // Create directory if it doesn't exist (for first-time setup)
24
+ if (!fs.existsSync(pluginDir)) {
25
+ fs.mkdirSync(pluginDir, { recursive: true });
26
+ return;
27
+ }
28
+
29
+ const files = fs.readdirSync(pluginDir)
30
+ .filter(f => f.endsWith('.plugin.json'));
31
+
32
+ files.forEach(file => {
33
+ try {
34
+ const content = fs.readFileSync(path.join(pluginDir, file), 'utf-8');
35
+ const plugin = JSON.parse(content);
36
+ this.validatePlugin(plugin);
37
+
38
+ // Check for duplicate IDs
39
+ if (this.plugins.has(plugin.id)) {
40
+ throw new Error(`Plugin with ID "${plugin.id}" already exists`);
41
+ }
42
+
43
+ this.plugins.set(plugin.id, plugin);
44
+ } catch (error) {
45
+ // Re-throw with file context
46
+ throw new Error(`Failed to load plugin ${file}: ${error.message}`);
47
+ }
48
+ });
49
+ }
50
+
51
+ /**
52
+ * Validate plugin schema
53
+ * @param {Object} plugin - Plugin object to validate
54
+ * @throws {Error} If validation fails
55
+ */
56
+ validatePlugin(plugin) {
57
+ const required = ['id', 'name', 'version', 'directories'];
58
+
59
+ // Check required fields exist
60
+ required.forEach(field => {
61
+ if (!plugin[field]) {
62
+ throw new Error(`Plugin validation failed: missing required field "${field}"`);
63
+ }
64
+ });
65
+
66
+ // Validate field types
67
+ if (typeof plugin.id !== 'string') {
68
+ throw new Error('Plugin validation failed: "id" must be a string');
69
+ }
70
+ if (typeof plugin.name !== 'string') {
71
+ throw new Error('Plugin validation failed: "name" must be a string');
72
+ }
73
+ if (typeof plugin.version !== 'string') {
74
+ throw new Error('Plugin validation failed: "version" must be a string');
75
+ }
76
+ if (typeof plugin.directories !== 'object' || Array.isArray(plugin.directories)) {
77
+ throw new Error('Plugin validation failed: "directories" must be an object');
78
+ }
79
+
80
+ // Validate optional fields if present
81
+ if (plugin.description && typeof plugin.description !== 'string') {
82
+ throw new Error('Plugin validation failed: "description" must be a string');
83
+ }
84
+ if (plugin.homepage && typeof plugin.homepage !== 'string') {
85
+ throw new Error('Plugin validation failed: "homepage" must be a string');
86
+ }
87
+ }
88
+
89
+ /**
90
+ * Get plugin by ID
91
+ * @param {string} id - Plugin ID
92
+ * @returns {Object|undefined} Plugin object or undefined if not found
93
+ */
94
+ getPlugin(id) {
95
+ return this.plugins.get(id);
96
+ }
97
+
98
+ /**
99
+ * Get all plugins as a Map
100
+ * @returns {Map} Map of plugin ID to plugin object
101
+ */
102
+ getAllPlugins() {
103
+ return this.plugins;
104
+ }
105
+
106
+ /**
107
+ * Get list of all agent IDs
108
+ * @returns {Array<string>} Array of plugin IDs
109
+ */
110
+ listAgents() {
111
+ return Array.from(this.plugins.keys());
112
+ }
113
+ }
114
+
115
+ module.exports = PluginManager;
package/package.json CHANGED
@@ -1,15 +1,29 @@
1
1
  {
2
2
  "name": "forge-workflow",
3
- "version": "1.4.7",
3
+ "version": "1.5.0",
4
4
  "description": "9-stage TDD workflow for ALL AI coding agents (Claude, Cursor, Windsurf, Kilo, OpenCode, Copilot, Cline, Roo, Aider, Continue, Antigravity)",
5
5
  "bin": {
6
- "forge": "bin/forge.js"
6
+ "forge": "bin/forge.js",
7
+ "forge-validate": "bin/forge-validate.js"
7
8
  },
8
9
  "scripts": {
10
+ "test": "node --test test/**/*.test.js",
9
11
  "postinstall": "node ./bin/forge.js",
12
+ "prepare": "lefthook install || echo 'Note: lefthook not installed. Git hooks disabled. Run: npm install -D lefthook'",
10
13
  "setup": "node ./bin/forge.js setup",
11
14
  "help": "node ./bin/forge.js --help"
12
15
  },
16
+ "peerDependencies": {
17
+ "lefthook": "^1.0.0"
18
+ },
19
+ "peerDependenciesMeta": {
20
+ "lefthook": {
21
+ "optional": true
22
+ }
23
+ },
24
+ "devDependencies": {
25
+ "lefthook": "^1.10.1"
26
+ },
13
27
  "keywords": [
14
28
  "ai",
15
29
  "workflow",
@@ -41,12 +55,16 @@
41
55
  },
42
56
  "files": [
43
57
  "bin/",
58
+ "lib/",
44
59
  ".claude/commands/",
45
60
  ".claude/rules/",
46
61
  ".claude/scripts/",
47
62
  ".claude/skills/",
63
+ ".forge/hooks/",
64
+ ".github/PLUGIN_TEMPLATE.json",
48
65
  "docs/",
49
66
  "install.sh",
67
+ "lefthook.yml",
50
68
  "AGENTS.md",
51
69
  "CLAUDE.md",
52
70
  ".mcp.json.example"
@@ -1,46 +0,0 @@
1
- ---
2
- name: forge-workflow
3
- description: 9-stage TDD-first workflow for feature development. Use when building features, fixing bugs, or shipping PRs.
4
- category: Development Workflow
5
- tags: [tdd, workflow, pr, git, testing]
6
- tools: [Bash, Read, Write, Edit, Grep, Glob]
7
- ---
8
-
9
- # Forge Workflow Skill
10
-
11
- A TDD-first workflow for AI coding agents. Ship features with confidence.
12
-
13
- ## When to Use
14
-
15
- Automatically invoke this skill when the user wants to:
16
- - Build a new feature
17
- - Fix a bug
18
- - Create a pull request
19
- - Run the development workflow
20
-
21
- ## 9 Stages
22
-
23
- | Stage | Command | Description |
24
- |-------|---------|-------------|
25
- | 1 | `/status` | Check current context, active work, recent completions |
26
- | 2 | `/research` | Deep research with web search, document to docs/research/ |
27
- | 3 | `/plan` | Create implementation plan, branch, OpenSpec if strategic |
28
- | 4 | `/dev` | TDD development (RED-GREEN-REFACTOR cycles) |
29
- | 5 | `/check` | Validation (type/lint/security/tests) |
30
- | 6 | `/ship` | Create PR with full documentation |
31
- | 7 | `/review` | Address ALL PR feedback |
32
- | 8 | `/merge` | Update docs, merge PR, cleanup |
33
- | 9 | `/verify` | Final documentation verification |
34
-
35
- ## Workflow Flow
36
-
37
- ```
38
- /status -> /research -> /plan -> /dev -> /check -> /ship -> /review -> /merge -> /verify
39
- ```
40
-
41
- ## Core Principles
42
-
43
- - **TDD-First**: Write tests BEFORE implementation (RED-GREEN-REFACTOR)
44
- - **Research-First**: Understand before building, document decisions
45
- - **Security Built-In**: OWASP Top 10 analysis for every feature
46
- - **Documentation Progressive**: Update at each stage, verify at end