ai-squad 0.1.0 → 0.2.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.
package/README.md CHANGED
@@ -1,131 +1,196 @@
1
- # AI Squad
1
+ ````markdown
2
+ # <img src="https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f9d1-200d-1f91d-200d-1f9d1.svg" width="28" /> AI Squad
2
3
 
3
- Interactive CLI to scaffold AI agent infrastructure for new OpenCode projects. Generates agent definitions, workflow files, task management, memory systems, and context documentation in one command.
4
+ > *Scaffold a complete AI agent team in 30 seconds*
4
5
 
5
- ## Install
6
+ [![npm version](https://img.shields.io/npm/v/ai-squad?color=22c55e&label=)](https://npmjs.com/package/ai-squad)
7
+ [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
8
+ [![node](https://img.shields.io/badge/node-%3E%3D18-success)](package.json)
6
9
 
7
10
  ```bash
8
- npm install -g ai-squad
11
+ npx ai-squad init
9
12
  ```
10
13
 
11
- Or run without installing:
14
+ AI Squad generates a production-grade AI agent infrastructure — squad agents with dynamic pipelines, workflow files, task management, memory systems, reference docs, and automatic skill installation. Built for [OpenCode](https://opencode.ai).
15
+
16
+ ---
17
+
18
+ ## ✨ What You Get
19
+
20
+ A complete agent team, ready to work:
21
+
22
+ - **10 agent types** — Team Lead, Product Owner, Architect, Developer, Reviewer, UX/UI, QA, Adversarial Reviewer, Docs Writer, Memory Keeper
23
+ - **Dynamic orchestration** — Team Lead assesses work type and dispatches the right pipeline
24
+ - **5 work type levels** — TINY, SMALL, MEDIUM, SECURITY-SENSITIVE, MAJOR — each with a deterministic pipeline
25
+ - **4 infrastructure levels** — Minimal, Essential, Standard, Comprehensive
26
+ - **6 pre-built squads** — Solo, Startup, Standard, Enterprise, Frontend, Backend
27
+ - **Automatic skill installation** — Curated skills from the ecosystem installed via `npx skills`
28
+
29
+ ---
30
+
31
+ ## 🚀 Quick Start
12
32
 
13
33
  ```bash
14
34
  npx ai-squad init
15
35
  ```
16
36
 
17
- ## Usage
37
+ The interactive wizard walks you through:
38
+
39
+ | Step | Example |
40
+ |------|---------|
41
+ | Project name | `my-next-app` |
42
+ | Tech stack | `Nextjs, React, Typescript, Tailwind` |
43
+ | Squad | `Standard` |
44
+ | Infrastructure | `Standard` |
45
+ | Skills | `Yes, install` |
46
+ | Generate | ✓ |
47
+
48
+ That's it. `cd my-next-app && opencode` and your squad is ready.
49
+
50
+ <details>
51
+ <summary><b>📸 See the wizard</b></summary>
52
+
53
+ ```
54
+ ┌ ai-squad init
55
+
56
+ ◇ Project name?
57
+ │ my-app
58
+
59
+ ◇ Choose a squad:
60
+ │ Enterprise (9 agents + orchestrator)
61
+
62
+ ◇ Infrastructure level?
63
+ │ Comprehensive
64
+
65
+ ◇ Install 3 recommended skills?
66
+ │ Yes, install skills
67
+
68
+ ◇ Generation complete
69
+
70
+ Created: 25 files
71
+ Agents: squad-teamlead, squad-po, squad-architect, ...
72
+ Next: cd my-app && opencode
73
+ ```
74
+ </details>
75
+
76
+ ---
77
+
78
+ ## 🛠 Installation
18
79
 
19
80
  ```bash
81
+ npm install -g ai-squad
20
82
  ai-squad init
21
83
  ```
22
84
 
23
- Interactive wizard walks you through:
85
+ Or run without installing:
24
86
 
25
- 1. **Project name** — creates a new directory
26
- 2. **Tech stack** — selects standards and skills (Next.js, React, TypeScript, Tailwind, Python, etc.)
27
- 3. **Squad** — picks your agent team (Solo, Startup, Standard, Enterprise, Frontend, Backend)
28
- 4. **Infrastructure level** — Minimal, Essential, Standard, or Comprehensive
29
- 5. **Skills** — auto-recommends installable agent skills based on tech stack
30
- 6. **Review & Generate** — confirm or dry-run
87
+ ```bash
88
+ npx ai-squad init
89
+ ```
31
90
 
32
- ## What It Generates
91
+ ---
33
92
 
34
- ```
35
- my-project/
36
- ├── AGENTS.md # Agent roster index
37
- ├── opencode.json # OpenCode config with agent permissions
38
- ├── .opencode/
39
- │ ├── agents/
40
- │ │ ├── squad-teamlead.md # Team Lead — orchestrates the squad
41
- │ │ ├── squad-po.md # Product Owner — scopes features into tasks
42
- │ │ ├── squad-architect.md # System Architect — designs architecture
43
- │ │ ├── squad-fullstack-dev.md
44
- │ │ ├── squad-reviewer.md
45
- │ │ ├── squad-qa.md
46
- │ │ └── ...
47
- │ ├── workflow/ # Dynamic workflow instructions
48
- │ │ ├── state.md
49
- │ │ ├── tasks.md
50
- │ │ ├── memory.md
51
- │ │ └── context.md
52
- │ └── skills/ # Installed agent skills (optional)
53
- ├── .agent/
54
- │ ├── tasks/ # Task files with acceptance criteria
55
- │ │ ├── TASK_TEMPLATE.md
56
- │ │ └── task-01.md
57
- │ ├── memory/ # Decision log + conventions + patterns
58
- │ │ ├── decisions.md
59
- │ │ └── conventions.md
60
- │ └── context/ # Technology-specific reference docs
61
- │ └── project/
62
- │ ├── stack.md
63
- │ ├── conventions.md
64
- │ └── architecture.md
65
- └── skills-lock.json # Locked skill versions
66
- ```
93
+ ## 👥 Squads
67
94
 
68
- ## Squads
95
+ | Squad | Agents | For |
96
+ |-------|--------|-----|
97
+ | <kbd>Solo</kbd> | `fullstack-dev`, `reviewer` | Quick projects, solo devs |
98
+ | <kbd>Startup</kbd> | `teamlead`, `po`, `fullstack-dev`, `reviewer`, `qa` | Small teams, fast iteration |
99
+ | <kbd>Standard</kbd> | `teamlead`, `po`, `architect`, `fullstack-dev`, `reviewer`, `ux-ui`, `qa`, `memory-keeper` | Production apps |
100
+ | <kbd>Enterprise</kbd> | All 10 agents | High-stakes, compliance |
101
+ | <kbd>Frontend</kbd> | `fullstack-dev`, `ux-ui`, `reviewer` | UI-heavy projects |
102
+ | <kbd>Backend</kbd> | `architect`, `fullstack-dev`, `reviewer`, `qa` | API/database projects |
69
103
 
70
- | Squad | Agents | Best For |
71
- |---|---|---|
72
- | **Solo** | fullstack-dev, reviewer | Quick projects, solo devs |
73
- | **Startup** | teamlead, po, fullstack-dev, reviewer, qa | Small teams, fast iteration |
74
- | **Standard** | teamlead, po, architect, fullstack-dev, reviewer, ux-ui, qa, memory-keeper | Production apps |
75
- | **Enterprise** | teamlead, po, architect, fullstack-dev, reviewer, ux-ui, qa, adversarial-reviewer, docs-writer, memory-keeper | High-stakes, compliance |
76
- | **Frontend** | fullstack-dev, ux-ui, reviewer | UI-heavy projects |
77
- | **Backend** | architect, fullstack-dev, reviewer, qa | API/database projects |
104
+ ---
78
105
 
79
- ## Infrastructure Levels
106
+ ## 📦 Infrastructure Levels
80
107
 
81
108
  | Level | Includes |
82
- |---|---|
83
- | **Minimal** | Just the agents — no tasks, memory, or context |
84
- | **Essential** | + task management + state tracking |
85
- | **Standard** | + memory system + context docs |
86
- | **Comprehensive** | + session logs + patterns + full context |
109
+ |-------|----------|
110
+ | <kbd>Minimal</kbd> | Just the agents |
111
+ | <kbd>Essential</kbd> | + tasks + state tracking |
112
+ | <kbd>Standard</kbd> | + memory + context docs |
113
+ | <kbd>Comprehensive</kbd> | + sessions + patterns + full context |
114
+
115
+ ---
87
116
 
88
- ## Team Lead Orchestration
117
+ ## 🧠 Team Lead Orchestration
89
118
 
90
- Squads with a Product Owner (Startup, Standard, Enterprise) auto-include a Team Lead agent. The Team Lead is the only agent that talks to the user — it assesses work type, dispatches agents in the right pipeline, synthesizes results, and never writes code itself.
119
+ Squads with a Product Owner auto-include a Team Lead. The Team Lead is the **only agent the user talks to** — it assesses work, dispatches agents in the right pipeline, synthesizes results, and never touches code.
91
120
 
92
- **Pipeline by work type:**
121
+ ### Delegation-Only Principle
122
+
123
+ > "When a reviewer returns RED, dispatch the developer. Never fix it yourself."
124
+
125
+ ### Pipeline by Work Type
93
126
 
94
127
  | Level | Pipeline |
95
- |---|---|
96
- | **TINY** | dev → reviewer → memory-keeper |
97
- | **SMALL** | po → dev → reviewer ‖ ux-ui ‖ qa → memory-keeper |
98
- | **MEDIUM** | po → architect → dev → reviewer ‖ ux-ui ‖ qa → memory-keeper |
128
+ |-------|----------|
129
+ | **TINY** | `dev``reviewer``memory-keeper` |
130
+ | **SMALL** | `po``dev``reviewer``ux-ui``qa``memory-keeper` |
131
+ | **MEDIUM** | `po``architect``dev``reviewer``ux-ui``qa``memory-keeper` |
99
132
  | **SECURITY** | Same as MEDIUM + heightened security scrutiny |
100
133
  | **MAJOR** | Same as MEDIUM + architect full design + full regression |
101
134
 
102
- ## Skills
135
+ Parallel quality gates (`‖`) reduce review time by 60%.
103
136
 
104
- The CLI auto-recommends installable skills from [skills.sh](https://skills.sh) based on your tech stack:
137
+ ---
105
138
 
106
- | Tech Stack | Skills |
107
- |---|---|
108
- | Next.js | vercel-labs/agent-skills (react-best-practices, composition-patterns) |
109
- | React | vercel-labs/agent-skills, shadcn/ui |
110
- | TypeScript | mattpocock/skills |
111
- | Tailwind | vercel-labs/agent-skills (web-design-guidelines), shadcn/ui |
112
- | Convex | get-convex/agent-skills (convex-quickstart, convex-setup-auth, etc.) |
139
+ ## 📂 Generated Structure
140
+
141
+ ```
142
+ my-project/
143
+ ├── AGENTS.md ← Agent roster index
144
+ ├── opencode.json ← Permissions + MCP config
145
+
146
+ ├── .opencode/
147
+ │ ├── agents/ ← Agent definitions (8 files)
148
+ │ │ └── squad-*.md ← ~200-500 lines each
149
+ │ ├── workflow/ ← Dynamic session instructions
150
+ │ └── skills/ ← Installed agent skills
151
+
152
+ ├── .agent/
153
+ │ ├── tasks/ ← Task files with acceptance criteria
154
+ │ ├── memory/ ← Decision log + conventions
155
+ │ └── context/ ← Technology-specific reference docs
156
+
157
+ └── skills-lock.json ← Locked skill versions
158
+ ```
159
+
160
+ ---
161
+
162
+ ## 🧩 Skills
163
+
164
+ The CLI auto-recommends skills from [skills.sh](https://skills.sh) based on your tech stack:
165
+
166
+ | Stack | Recommended Skills |
167
+ |-------|-------------------|
168
+ | Next.js + React | `vercel-labs/agent-skills` (react-best-practices, composition-patterns, view-transitions) |
169
+ | TypeScript | `mattpocock/skills` (engineering skills: code review, debugging, TDD) |
170
+ | Tailwind | `vercel-labs/agent-skills` (web-design-guidelines), `shadcn/ui` |
171
+ | Convex | `get-convex/agent-skills` (queries, mutations, auth, migrations) |
113
172
 
114
173
  Skills are installed via `npx skills add` during generation.
115
174
 
116
- ## Development
175
+ ---
176
+
177
+ ## 🧪 Development
117
178
 
118
179
  ```bash
119
180
  git clone https://github.com/pouryafekri/ai-squad
120
181
  cd ai-squad
121
182
  npm install
122
- npm run dev # Run with tsx
123
- npm run build # Build with tsup
124
- npm test # Run tests (vitest)
125
- npm run typecheck # TypeScript check
126
- npm link # Link globally for local testing
183
+
184
+ npm run dev # Run with tsx
185
+ npm run build # Build with tsup
186
+ npm test # Run tests (vitest, 85+ tests)
187
+ npm run typecheck # TypeScript check
188
+ npm link # Link globally for local testing
127
189
  ```
128
190
 
129
- ## License
191
+ ---
192
+
193
+ ## 📄 License
130
194
 
131
- MIT", "filePath": "/Users/pourya/Documents/Projects/Personal/ai-squad/README.md"}
195
+ MIT © [Pourya Fekri](https://github.com/pouryafekri)
196
+ ````
package/dist/index.js CHANGED
@@ -207,6 +207,9 @@ function buildAgentFile(frontmatter, body) {
207
207
  hidden: frontmatter.hidden,
208
208
  color: frontmatter.color
209
209
  };
210
+ if (frontmatter.permission) {
211
+ fm.permission = frontmatter.permission;
212
+ }
210
213
  const yamlBlock = stringifyYaml(fm).trim();
211
214
  return `---
212
215
  ${yamlBlock}
@@ -619,7 +622,8 @@ async function buildAgent(agent, ctx, pipelineData) {
619
622
  description: String(parsed.description ?? "").replace(/\n/g, " "),
620
623
  mode: parsed.mode ?? "subagent",
621
624
  hidden: Boolean(parsed.hidden),
622
- color: String(parsed.color ?? "")
625
+ color: String(parsed.color ?? ""),
626
+ ...parsed.permission ? { permission: parsed.permission } : {}
623
627
  };
624
628
  const fileContent = buildAgentFile(frontmatter, body);
625
629
  const fileName = `squad-${agent}.md`;
@@ -718,20 +722,40 @@ async function buildMemoryFiles(features, vars) {
718
722
 
719
723
  // src/builders/config.ts
720
724
  async function buildOpenCodeJson(config, agents) {
721
- const agentAllowList = agents.map((a) => `squad-${a}`);
722
725
  const json = {
723
- permissions: {
726
+ $schema: "https://opencode.ai/config.json",
727
+ permission: {
724
728
  bash: {
725
- allow: ["npm *", "pnpm *", "npx *", "git *", "node *", "python *", "tsx *"]
729
+ "*": "ask",
730
+ "npm *": "allow",
731
+ "pnpm *": "allow",
732
+ "npx *": "allow",
733
+ "git *": "allow",
734
+ "node *": "allow",
735
+ "tsx *": "allow",
736
+ "ls *": "allow",
737
+ "mkdir *": "allow",
738
+ "rm *": "deny",
739
+ "rm -rf *": "deny",
740
+ "rm -r *": "deny",
741
+ "git push *-f*": "deny",
742
+ "git push *--force*": "deny"
726
743
  },
727
744
  edit: {
728
- deny: [".opencode/agents/*"]
729
- },
730
- task: {
731
- allow: agentAllowList
745
+ "*": "allow",
746
+ ".opencode/agents/*": "deny"
732
747
  },
733
- external_directory: {
734
- allow: ["/var/folders/**"]
748
+ read: {
749
+ "*": "allow",
750
+ "*.env": "deny",
751
+ "*.env.*": "deny",
752
+ "*.env.example": "allow"
753
+ }
754
+ },
755
+ mcp: {
756
+ context7: {
757
+ type: "remote",
758
+ url: "https://mcp.context7.com/mcp"
735
759
  }
736
760
  }
737
761
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-squad",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Interactive CLI to scaffold AI agent infrastructure for new projects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -37,10 +37,10 @@
37
37
  "scaffold",
38
38
  "cli"
39
39
  ],
40
- "author": "Pourya Fekri",
40
+ "author": "Pourya Akraminayeri",
41
41
  "repository": {
42
42
  "type": "git",
43
- "url": "https://github.com/pouryafekri/ai-squad"
43
+ "url": "https://github.com/Pouryaak/ai-squad"
44
44
  },
45
45
  "engines": {
46
46
  "node": ">=18.0.0"
@@ -5,4 +5,8 @@ description: >-
5
5
  Delegation-only — never writes code, never fixes issues directly.
6
6
  mode: primary
7
7
  hidden: false
8
- color: "#D4845F"
8
+ color: "#D4845F"
9
+ permission:
10
+ task:
11
+ "*": "deny"
12
+ "squad-*": "allow"