ai-squad 0.1.0 → 0.2.1

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,194 @@
1
- # AI Squad
1
+ # <img src="https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f9d1-200d-1f91d-200d-1f9d1.svg" width="28" /> AI Squad
2
2
 
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.
3
+ > *Scaffold a complete AI agent team in 30 seconds*
4
4
 
5
- ## Install
5
+ [![npm version](https://img.shields.io/npm/v/ai-squad?color=22c55e&label=)](https://npmjs.com/package/ai-squad)
6
+ [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
7
+ [![node](https://img.shields.io/badge/node-%3E%3D18-success)](package.json)
6
8
 
7
9
  ```bash
8
- npm install -g ai-squad
10
+ npx ai-squad init
9
11
  ```
10
12
 
11
- Or run without installing:
13
+ 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).
14
+
15
+ ---
16
+
17
+ ## ✨ What You Get
18
+
19
+ A complete agent team, ready to work:
20
+
21
+ - **10 agent types** — Team Lead, Product Owner, Architect, Developer, Reviewer, UX/UI, QA, Adversarial Reviewer, Docs Writer, Memory Keeper
22
+ - **Dynamic orchestration** — Team Lead assesses work type and dispatches the right pipeline
23
+ - **5 work type levels** — TINY, SMALL, MEDIUM, SECURITY-SENSITIVE, MAJOR — each with a deterministic pipeline
24
+ - **4 infrastructure levels** — Minimal, Essential, Standard, Comprehensive
25
+ - **6 pre-built squads** — Solo, Startup, Standard, Enterprise, Frontend, Backend
26
+ - **Automatic skill installation** — Curated skills from the ecosystem installed via `npx skills`
27
+
28
+ ---
29
+
30
+ ## 🚀 Quick Start
12
31
 
13
32
  ```bash
14
33
  npx ai-squad init
15
34
  ```
16
35
 
17
- ## Usage
36
+ The interactive wizard walks you through:
37
+
38
+ | Step | Example |
39
+ |------|---------|
40
+ | Project name | `my-next-app` |
41
+ | Tech stack | `Nextjs, React, Typescript, Tailwind` |
42
+ | Squad | `Standard` |
43
+ | Infrastructure | `Standard` |
44
+ | Skills | `Yes, install` |
45
+ | Generate | ✓ |
46
+
47
+ That's it. `cd my-next-app && opencode` and your squad is ready.
48
+
49
+ <details>
50
+ <summary><b>📸 See the wizard</b></summary>
51
+
52
+ ```
53
+ ┌ ai-squad init
54
+
55
+ ◇ Project name?
56
+ │ my-app
57
+
58
+ ◇ Choose a squad:
59
+ │ Enterprise (9 agents + orchestrator)
60
+
61
+ ◇ Infrastructure level?
62
+ │ Comprehensive
63
+
64
+ ◇ Install 3 recommended skills?
65
+ │ Yes, install skills
66
+
67
+ ◇ Generation complete
68
+
69
+ Created: 25 files
70
+ Agents: squad-teamlead, squad-po, squad-architect, ...
71
+ Next: cd my-app && opencode
72
+ ```
73
+ </details>
74
+
75
+ ---
76
+
77
+ ## 🛠 Installation
18
78
 
19
79
  ```bash
80
+ npm install -g ai-squad
20
81
  ai-squad init
21
82
  ```
22
83
 
23
- Interactive wizard walks you through:
84
+ Or run without installing:
24
85
 
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
86
+ ```bash
87
+ npx ai-squad init
88
+ ```
31
89
 
32
- ## What It Generates
90
+ ---
33
91
 
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
- ```
92
+ ## 👥 Squads
67
93
 
68
- ## Squads
94
+ | Squad | Agents | For |
95
+ |-------|--------|-----|
96
+ | <kbd>Solo</kbd> | `fullstack-dev`, `reviewer` | Quick projects, solo devs |
97
+ | <kbd>Startup</kbd> | `teamlead`, `po`, `fullstack-dev`, `reviewer`, `qa` | Small teams, fast iteration |
98
+ | <kbd>Standard</kbd> | `teamlead`, `po`, `architect`, `fullstack-dev`, `reviewer`, `ux-ui`, `qa`, `memory-keeper` | Production apps |
99
+ | <kbd>Enterprise</kbd> | All 10 agents | High-stakes, compliance |
100
+ | <kbd>Frontend</kbd> | `fullstack-dev`, `ux-ui`, `reviewer` | UI-heavy projects |
101
+ | <kbd>Backend</kbd> | `architect`, `fullstack-dev`, `reviewer`, `qa` | API/database projects |
69
102
 
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 |
103
+ ---
78
104
 
79
- ## Infrastructure Levels
105
+ ## 📦 Infrastructure Levels
80
106
 
81
107
  | 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 |
108
+ |-------|----------|
109
+ | <kbd>Minimal</kbd> | Just the agents |
110
+ | <kbd>Essential</kbd> | + tasks + state tracking |
111
+ | <kbd>Standard</kbd> | + memory + context docs |
112
+ | <kbd>Comprehensive</kbd> | + sessions + patterns + full context |
113
+
114
+ ---
87
115
 
88
- ## Team Lead Orchestration
116
+ ## 🧠 Team Lead Orchestration
89
117
 
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.
118
+ 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
119
 
92
- **Pipeline by work type:**
120
+ ### Delegation-Only Principle
121
+
122
+ > "When a reviewer returns RED, dispatch the developer. Never fix it yourself."
123
+
124
+ ### Pipeline by Work Type
93
125
 
94
126
  | 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 |
127
+ |-------|----------|
128
+ | **TINY** | `dev``reviewer``memory-keeper` |
129
+ | **SMALL** | `po``dev``reviewer``ux-ui``qa``memory-keeper` |
130
+ | **MEDIUM** | `po``architect``dev``reviewer``ux-ui``qa``memory-keeper` |
99
131
  | **SECURITY** | Same as MEDIUM + heightened security scrutiny |
100
132
  | **MAJOR** | Same as MEDIUM + architect full design + full regression |
101
133
 
102
- ## Skills
134
+ Parallel quality gates (`‖`) reduce review time by 60%.
103
135
 
104
- The CLI auto-recommends installable skills from [skills.sh](https://skills.sh) based on your tech stack:
136
+ ---
105
137
 
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.) |
138
+ ## 📂 Generated Structure
139
+
140
+ ```
141
+ my-project/
142
+ ├── AGENTS.md ← Agent roster index
143
+ ├── opencode.json ← Permissions + MCP config
144
+
145
+ ├── .opencode/
146
+ │ ├── agents/ ← Agent definitions (8 files)
147
+ │ │ └── squad-*.md ← ~200-500 lines each
148
+ │ ├── workflow/ ← Dynamic session instructions
149
+ │ └── skills/ ← Installed agent skills
150
+
151
+ ├── .agent/
152
+ │ ├── tasks/ ← Task files with acceptance criteria
153
+ │ ├── memory/ ← Decision log + conventions
154
+ │ └── context/ ← Technology-specific reference docs
155
+
156
+ └── skills-lock.json ← Locked skill versions
157
+ ```
158
+
159
+ ---
160
+
161
+ ## 🧩 Skills
162
+
163
+ The CLI auto-recommends skills from [skills.sh](https://skills.sh) based on your tech stack:
164
+
165
+ | Stack | Recommended Skills |
166
+ |-------|-------------------|
167
+ | Next.js + React | `vercel-labs/agent-skills` (react-best-practices, composition-patterns, view-transitions) |
168
+ | TypeScript | `mattpocock/skills` (engineering skills: code review, debugging, TDD) |
169
+ | Tailwind | `vercel-labs/agent-skills` (web-design-guidelines), `shadcn/ui` |
170
+ | Convex | `get-convex/agent-skills` (queries, mutations, auth, migrations) |
113
171
 
114
172
  Skills are installed via `npx skills add` during generation.
115
173
 
116
- ## Development
174
+ ---
175
+
176
+ ## 🧪 Development
117
177
 
118
178
  ```bash
119
179
  git clone https://github.com/pouryafekri/ai-squad
120
180
  cd ai-squad
121
181
  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
182
+
183
+ npm run dev # Run with tsx
184
+ npm run build # Build with tsup
185
+ npm test # Run tests (vitest, 85+ tests)
186
+ npm run typecheck # TypeScript check
187
+ npm link # Link globally for local testing
127
188
  ```
128
189
 
129
- ## License
190
+ ---
191
+
192
+ ## 📄 License
130
193
 
131
- MIT", "filePath": "/Users/pourya/Documents/Projects/Personal/ai-squad/README.md"}
194
+ MIT © [Pourya Akraminayeri](https://github.com/Pouryaak)
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.1",
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"