anycrew 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +79 -2
- package/README.npm.md +80 -0
- package/README.pypi.md +82 -0
- package/agents/ai-engineer.md +50 -0
- package/agents/architect.md +45 -0
- package/agents/brainstormer.md +46 -0
- package/agents/crew-lead.md +53 -0
- package/agents/debugger.md +38 -0
- package/agents/designer.md +43 -0
- package/agents/doc-writer.md +45 -0
- package/agents/implementer.md +56 -0
- package/agents/product-manager.md +44 -0
- package/agents/release-engineer.md +45 -0
- package/agents/researcher.md +41 -0
- package/agents/reviewer.md +59 -0
- package/agents/scout.md +50 -0
- package/agents/security-reviewer.md +54 -0
- package/agents/spec-writer.md +43 -0
- package/agents/tester.md +41 -0
- package/bin/anycrew.mjs +6 -0
- package/hooks/hooks.json +18 -0
- package/hooks/scripts/lint-after-edit.sh +65 -0
- package/lib/cli.mjs +184 -0
- package/lib/frontmatter.mjs +80 -0
- package/lib/fsx.mjs +35 -0
- package/lib/generate.mjs +244 -0
- package/lib/pack.mjs +75 -0
- package/models.json +98 -0
- package/package.json +52 -4
- package/presets/generic.json +28 -0
- package/presets/go-service.json +38 -0
- package/presets/node-typescript-next.json +44 -0
- package/presets/python-fastapi-react.json +49 -0
- package/rules/00-sdd-process.md +21 -0
- package/rules/10-architecture-boundaries.md +26 -0
- package/rules/40-security-and-data.md +25 -0
- package/rules/50-llm-features.md +27 -0
- package/rules/60-testing.md +19 -0
- package/rules/70-docs-and-status.md +19 -0
- package/skills/crew-adr/SKILL.md +21 -0
- package/skills/crew-architecture/SKILL.md +24 -0
- package/skills/crew-brainstorm/SKILL.md +24 -0
- package/skills/crew-checkpoint/SKILL.md +22 -0
- package/skills/crew-debug/SKILL.md +22 -0
- package/skills/crew-deploy-check/SKILL.md +28 -0
- package/skills/crew-design/SKILL.md +22 -0
- package/skills/crew-docs/SKILL.md +23 -0
- package/skills/crew-implement/SKILL.md +24 -0
- package/skills/crew-init/SKILL.md +36 -0
- package/skills/crew-llm/SKILL.md +28 -0
- package/skills/crew-plan/SKILL.md +24 -0
- package/skills/crew-prd/SKILL.md +22 -0
- package/skills/crew-research/SKILL.md +21 -0
- package/skills/crew-review/SKILL.md +21 -0
- package/skills/crew-security/SKILL.md +21 -0
- package/skills/crew-spec/SKILL.md +24 -0
- package/skills/crew-status/SKILL.md +31 -0
- package/skills/crew-sync/SKILL.md +23 -0
- package/skills/crew-tasks/SKILL.md +21 -0
- package/skills/crew-test/SKILL.md +21 -0
- package/skills/crew-verify/SKILL.md +23 -0
- package/templates/AGENTS.md +85 -0
- package/templates/CLAUDE.md +3 -0
- package/templates/GEMINI.md +2 -0
- package/templates/anycrew.config.json +13 -0
- package/templates/copilot-instructions.md +6 -0
- package/templates/docs/00-constitution.md +62 -0
- package/templates/docs/01-brainstorm-and-decision.md +45 -0
- package/templates/docs/02-research.md +17 -0
- package/templates/docs/03-prd.md +31 -0
- package/templates/docs/04-requirements-traceability.md +9 -0
- package/templates/docs/05-architecture.md +35 -0
- package/templates/docs/06-agent-design.md +25 -0
- package/templates/docs/09-data-model.md +17 -0
- package/templates/docs/10-api-contract.md +13 -0
- package/templates/docs/11-frontend.md +18 -0
- package/templates/docs/12-design-system.md +14 -0
- package/templates/docs/13-conventions.md +26 -0
- package/templates/docs/14-security.md +23 -0
- package/templates/docs/15-testing.md +18 -0
- package/templates/docs/16-infrastructure.md +17 -0
- package/templates/docs/17-observability.md +8 -0
- package/templates/docs/19-delivery-plan.md +10 -0
- package/templates/docs/20-implementation-status.md +18 -0
- package/templates/docs/README.md +34 -0
- package/templates/docs/adr/ADR-template.md +13 -0
- package/templates/docs/adr/README.md +4 -0
- package/templates/docs/glossary.md +8 -0
- package/templates/docs/specs/NNN-template/plan.md +25 -0
- package/templates/docs/specs/NNN-template/spec.md +26 -0
- package/templates/docs/specs/NNN-template/tasks.md +14 -0
- package/templates/docs/specs/README.md +25 -0
package/models.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Model tiers are the portable way anycrew says how much model an agent needs. Each tool maps a tier to its own model name here. Override per project in .anycrew/config.json under \"models\". Keep aliases (not dated IDs) wherever the tool offers them so the mapping ages well.",
|
|
3
|
+
"tiers": {
|
|
4
|
+
"fast": {
|
|
5
|
+
"purpose": "Read, search, summarise, format, update status docs, mechanical edits. High volume, low stakes.",
|
|
6
|
+
"examples": [
|
|
7
|
+
"scout",
|
|
8
|
+
"doc-writer"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"balanced": {
|
|
12
|
+
"purpose": "Implement a task, write tests, routine review, research with sources, infra and deploy work.",
|
|
13
|
+
"examples": [
|
|
14
|
+
"implementer",
|
|
15
|
+
"tester",
|
|
16
|
+
"researcher",
|
|
17
|
+
"designer",
|
|
18
|
+
"release-engineer"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"strong": {
|
|
22
|
+
"purpose": "Decisions and judgement: brainstorm, product scope, architecture, specs, security, final review, hard debugging, LLM feature design.",
|
|
23
|
+
"examples": [
|
|
24
|
+
"brainstormer",
|
|
25
|
+
"product-manager",
|
|
26
|
+
"architect",
|
|
27
|
+
"spec-writer",
|
|
28
|
+
"reviewer",
|
|
29
|
+
"security-reviewer",
|
|
30
|
+
"debugger",
|
|
31
|
+
"ai-engineer",
|
|
32
|
+
"crew-lead"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"tools": {
|
|
37
|
+
"claude": {
|
|
38
|
+
"$comment": "Claude Code subagent frontmatter: `model:` accepts haiku | sonnet | opus | fable | inherit | full ID; `effort:` accepts low | medium | high | xhigh | max.",
|
|
39
|
+
"fast": {
|
|
40
|
+
"model": "haiku",
|
|
41
|
+
"effort": "low"
|
|
42
|
+
},
|
|
43
|
+
"balanced": {
|
|
44
|
+
"model": "sonnet",
|
|
45
|
+
"effort": "medium"
|
|
46
|
+
},
|
|
47
|
+
"strong": {
|
|
48
|
+
"model": "opus",
|
|
49
|
+
"effort": "high"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"antigravity": {
|
|
53
|
+
"$comment": "Antigravity subagents (.agents/agents/*.md) accept `model: inherit | flash | pro` (tiers, not IDs). `flash_lite` exists only for run_workflow scripts, so fast and balanced both map to flash.",
|
|
54
|
+
"fast": "flash",
|
|
55
|
+
"balanced": "flash",
|
|
56
|
+
"strong": "pro"
|
|
57
|
+
},
|
|
58
|
+
"gemini": {
|
|
59
|
+
"$comment": "Gemini CLI model names. Adjust to the models your account can use.",
|
|
60
|
+
"fast": "gemini-flash-lite-latest",
|
|
61
|
+
"balanced": "gemini-flash-latest",
|
|
62
|
+
"strong": "gemini-pro-latest"
|
|
63
|
+
},
|
|
64
|
+
"codex": {
|
|
65
|
+
"$comment": "Codex custom agents (.codex/agents/*.toml) take `model` and `model_reasoning_effort` (low | medium | high | xhigh | max). `model` null keeps the user's default model and varies only the effort.",
|
|
66
|
+
"fast": {
|
|
67
|
+
"model": null,
|
|
68
|
+
"model_reasoning_effort": "low"
|
|
69
|
+
},
|
|
70
|
+
"balanced": {
|
|
71
|
+
"model": null,
|
|
72
|
+
"model_reasoning_effort": "medium"
|
|
73
|
+
},
|
|
74
|
+
"strong": {
|
|
75
|
+
"model": null,
|
|
76
|
+
"model_reasoning_effort": "high"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"cursor": {
|
|
80
|
+
"$comment": "Cursor subagents accept `model: inherit` or a model ID such as composer-2 or claude-opus-5[effort=high]. inherit keeps the chat's model; set IDs here to enforce tiers.",
|
|
81
|
+
"fast": "inherit",
|
|
82
|
+
"balanced": "inherit",
|
|
83
|
+
"strong": "inherit"
|
|
84
|
+
},
|
|
85
|
+
"opencode": {
|
|
86
|
+
"$comment": "OpenCode agents take `model: provider/model-id`. Defaults assume the Anthropic provider; change to your provider.",
|
|
87
|
+
"fast": "anthropic/claude-haiku-5-5",
|
|
88
|
+
"balanced": "anthropic/claude-sonnet-5-5",
|
|
89
|
+
"strong": "anthropic/claude-opus-5-5"
|
|
90
|
+
},
|
|
91
|
+
"copilot": {
|
|
92
|
+
"$comment": "GitHub Copilot custom agents accept `model:` as a string or a preference-ordered array; empty means inherit the chat's model.",
|
|
93
|
+
"fast": "",
|
|
94
|
+
"balanced": "",
|
|
95
|
+
"strong": ""
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anycrew",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "One crew of specialist AI agents for any coding assistant. Spec-driven, test-first, security-reviewed, and model-tiered. Installs into Claude Code, OpenAI Codex, Google Antigravity, Gemini CLI, Cursor, OpenCode and GitHub Copilot.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"anycrew": "bin/anycrew.mjs"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin",
|
|
12
|
+
"lib",
|
|
13
|
+
"agents",
|
|
14
|
+
"skills",
|
|
15
|
+
"rules",
|
|
16
|
+
"templates",
|
|
17
|
+
"presets",
|
|
18
|
+
"hooks",
|
|
19
|
+
"models.json",
|
|
20
|
+
"LICENSE",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"validate": "node scripts/validate.mjs",
|
|
25
|
+
"test": "node scripts/validate.mjs && node scripts/smoke.mjs",
|
|
26
|
+
"list": "node bin/anycrew.mjs list",
|
|
27
|
+
"test:parity": "python3 tests/test_parity.py",
|
|
28
|
+
"bump": "node scripts/bump.mjs",
|
|
29
|
+
"release:check": "node scripts/release-check.mjs",
|
|
30
|
+
"prepack": "cp README.md .README.repo.md && cp README.npm.md README.md",
|
|
31
|
+
"postpack": "mv .README.repo.md README.md"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"ai-agents",
|
|
38
|
+
"claude-code",
|
|
39
|
+
"codex",
|
|
40
|
+
"antigravity",
|
|
41
|
+
"gemini-cli",
|
|
42
|
+
"cursor",
|
|
43
|
+
"opencode",
|
|
44
|
+
"copilot",
|
|
45
|
+
"agent-skills",
|
|
46
|
+
"spec-driven-development",
|
|
47
|
+
"boilerplate",
|
|
48
|
+
"mvp"
|
|
49
|
+
],
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "git+https://github.com/fadlytanjung/anycrew.git"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "generic",
|
|
3
|
+
"name": "Generic (any stack)",
|
|
4
|
+
"description": "No stack assumptions. Fill the commands in .anycrew/config.json after init.",
|
|
5
|
+
"languages": [],
|
|
6
|
+
"commands": {
|
|
7
|
+
"setup": "echo 'TODO: install dependencies'",
|
|
8
|
+
"dev": "echo 'TODO: run the app locally'",
|
|
9
|
+
"check": "echo 'TODO: lint + types + tests'",
|
|
10
|
+
"test": "echo 'TODO: run tests'",
|
|
11
|
+
"lint": "echo 'TODO: lint'"
|
|
12
|
+
},
|
|
13
|
+
"layout": {
|
|
14
|
+
"backend": "",
|
|
15
|
+
"frontend": "",
|
|
16
|
+
"docs": "docs",
|
|
17
|
+
"specs": "docs/specs",
|
|
18
|
+
"contracts": "contracts"
|
|
19
|
+
},
|
|
20
|
+
"rules": {
|
|
21
|
+
"backend_globs": [],
|
|
22
|
+
"frontend_globs": [],
|
|
23
|
+
"llm_globs": ["**/prompts/**", "**/agents/**"]
|
|
24
|
+
},
|
|
25
|
+
"hooks": {
|
|
26
|
+
"lint_after_edit": true
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "go-service",
|
|
3
|
+
"name": "Go service (API or worker)",
|
|
4
|
+
"description": "Go 1.23+ module with standard layout, chi or net/http, sqlc or pgx, golangci-lint, table-driven tests. Optional HTMX or a separate frontend.",
|
|
5
|
+
"languages": ["go"],
|
|
6
|
+
"commands": {
|
|
7
|
+
"setup": "go mod download",
|
|
8
|
+
"dev": "go run ./cmd/server",
|
|
9
|
+
"check": "gofmt -l . && go vet ./... && golangci-lint run && go test ./...",
|
|
10
|
+
"test": "go test ./...",
|
|
11
|
+
"lint": "gofmt -l . && go vet ./... && golangci-lint run"
|
|
12
|
+
},
|
|
13
|
+
"layout": {
|
|
14
|
+
"backend": ".",
|
|
15
|
+
"frontend": "",
|
|
16
|
+
"docs": "docs",
|
|
17
|
+
"specs": "docs/specs",
|
|
18
|
+
"contracts": "contracts"
|
|
19
|
+
},
|
|
20
|
+
"rules": {
|
|
21
|
+
"backend_globs": ["**/*.go"],
|
|
22
|
+
"frontend_globs": [],
|
|
23
|
+
"llm_globs": ["**/prompts/**", "internal/agents/**"]
|
|
24
|
+
},
|
|
25
|
+
"backend_conventions": [
|
|
26
|
+
"Go 1.23+, modules, `gofmt` and `golangci-lint` clean.",
|
|
27
|
+
"Layout: `cmd/<binary>` for entry points, `internal/<domain>` for business logic, `internal/adapters` for I/O; domain packages import no I/O packages.",
|
|
28
|
+
"Interfaces are defined where they are used (consumer side); adapters satisfy them.",
|
|
29
|
+
"Errors are wrapped with context (`fmt.Errorf(\"...: %w\", err)`) and checked with `errors.Is/As`; sentinel errors carry stable names.",
|
|
30
|
+
"Context is the first parameter of every function that does I/O.",
|
|
31
|
+
"Structured logging with `log/slog`; never log secrets or personal data.",
|
|
32
|
+
"Table-driven tests; fakes for interfaces; integration tests behind a build tag."
|
|
33
|
+
],
|
|
34
|
+
"frontend_conventions": [],
|
|
35
|
+
"hooks": {
|
|
36
|
+
"lint_after_edit": true
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "node-typescript-next",
|
|
3
|
+
"name": "TypeScript monorepo: Node API + Next.js",
|
|
4
|
+
"description": "pnpm workspace with a Node 22 TypeScript API (Hono or NestJS, Zod, Vitest) and a Next.js App Router frontend (React 19, Tailwind, Playwright). Prisma or Drizzle for data.",
|
|
5
|
+
"languages": ["typescript"],
|
|
6
|
+
"commands": {
|
|
7
|
+
"setup": "pnpm install",
|
|
8
|
+
"dev": "pnpm dev",
|
|
9
|
+
"check": "pnpm lint && pnpm typecheck && pnpm test",
|
|
10
|
+
"test": "pnpm test",
|
|
11
|
+
"lint": "pnpm lint && pnpm typecheck"
|
|
12
|
+
},
|
|
13
|
+
"layout": {
|
|
14
|
+
"backend": "apps/api",
|
|
15
|
+
"frontend": "apps/web",
|
|
16
|
+
"docs": "docs",
|
|
17
|
+
"specs": "docs/specs",
|
|
18
|
+
"contracts": "contracts"
|
|
19
|
+
},
|
|
20
|
+
"rules": {
|
|
21
|
+
"backend_globs": ["apps/api/**", "packages/**"],
|
|
22
|
+
"frontend_globs": ["apps/web/**"],
|
|
23
|
+
"llm_globs": ["**/prompts/**", "**/agents/**"]
|
|
24
|
+
},
|
|
25
|
+
"backend_conventions": [
|
|
26
|
+
"Node 22, TypeScript strict, ESM only; pnpm workspaces; commit `pnpm-lock.yaml`.",
|
|
27
|
+
"Validate every boundary with Zod schemas; derive types from schemas, never duplicate them.",
|
|
28
|
+
"Layers: `routes -> services -> domain + ports`; adapters implement ports; domain has no I/O.",
|
|
29
|
+
"Errors carry a stable `code`; HTTP layer maps them to problem+json.",
|
|
30
|
+
"Structured JSON logs with request IDs; never log secrets or personal data.",
|
|
31
|
+
"Database access only through the repository layer; migrations are versioned and forward-only.",
|
|
32
|
+
"Tests with Vitest; one in-memory fake per port; integration tests hit a disposable database."
|
|
33
|
+
],
|
|
34
|
+
"frontend_conventions": [
|
|
35
|
+
"Next.js App Router, React 19, TypeScript strict; Server Components by default, client components only when needed.",
|
|
36
|
+
"Design tokens in one place; Tailwind utilities from tokens only; no arbitrary values.",
|
|
37
|
+
"Every data view has loading, empty and error states; responsive from 360 px to 1600 px.",
|
|
38
|
+
"Forms validate with the same Zod schemas the API uses.",
|
|
39
|
+
"Tests: Vitest + Testing Library; Playwright for flows and visual baselines."
|
|
40
|
+
],
|
|
41
|
+
"hooks": {
|
|
42
|
+
"lint_after_edit": true
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "python-fastapi-react",
|
|
3
|
+
"name": "Python FastAPI backend + React/Vite frontend",
|
|
4
|
+
"description": "uv-managed Python 3.12 backend (FastAPI, Pydantic v2, pytest, ruff, pyright strict) and a React 19 + Vite + TypeScript frontend (Vitest, Playwright). Hexagonal backend layers enforced with import-linter.",
|
|
5
|
+
"languages": ["python", "typescript"],
|
|
6
|
+
"commands": {
|
|
7
|
+
"setup": "cd backend && uv sync && cd ../frontend && npm ci",
|
|
8
|
+
"dev": "make dev",
|
|
9
|
+
"check": "make check",
|
|
10
|
+
"test": "cd backend && uv run pytest -q && cd ../frontend && npm test -- --run",
|
|
11
|
+
"lint": "cd backend && uv run ruff check . && uv run ruff format --check . && uv run pyright && cd ../frontend && npm run lint && npx tsc --noEmit"
|
|
12
|
+
},
|
|
13
|
+
"layout": {
|
|
14
|
+
"backend": "backend",
|
|
15
|
+
"frontend": "frontend",
|
|
16
|
+
"docs": "docs",
|
|
17
|
+
"specs": "docs/specs",
|
|
18
|
+
"contracts": "contracts"
|
|
19
|
+
},
|
|
20
|
+
"rules": {
|
|
21
|
+
"backend_globs": ["backend/**/*.py"],
|
|
22
|
+
"frontend_globs": ["frontend/**"],
|
|
23
|
+
"llm_globs": ["backend/app/agents/**", "**/prompts/**"]
|
|
24
|
+
},
|
|
25
|
+
"backend_conventions": [
|
|
26
|
+
"Python 3.12, `uv` only (`uv sync`, `uv run`); commit `uv.lock`.",
|
|
27
|
+
"Type-checked with pyright strict; formatted and linted with ruff (line length 100).",
|
|
28
|
+
"`async` for I/O; wrap sync SDKs with `anyio.to_thread.run_sync`.",
|
|
29
|
+
"Pydantic v2 models at every boundary (API, LLM output, persistence).",
|
|
30
|
+
"Layers: `api -> services -> domain + ports`; `adapters` implement `ports`; `domain` is pure (no I/O, no SDKs, no clock). Enforced by import-linter in `backend/.importlinter`.",
|
|
31
|
+
"Errors: raise domain errors with a stable `code`; the API renders RFC 9457 problem+json.",
|
|
32
|
+
"Logging: structured JSON; bind request and entity IDs; never log secrets or personal data.",
|
|
33
|
+
"Money is `Decimal`, never float. Time is injected through a `Clock`; store UTC.",
|
|
34
|
+
"Tests in `backend/tests/{unit,integration,scenarios}`; an in-memory fake for every port in `backend/tests/fakes/`."
|
|
35
|
+
],
|
|
36
|
+
"frontend_conventions": [
|
|
37
|
+
"React 19 + Vite + TypeScript strict (`noUncheckedIndexedAccess`); no `any`; named exports only.",
|
|
38
|
+
"Feature-Sliced Design: `app -> pages -> widgets -> features -> entities -> shared`; import only downward.",
|
|
39
|
+
"API types are generated from `contracts/openapi.yaml`; never hand-write them.",
|
|
40
|
+
"Server state only through TanStack Query hooks in `entities/*/api.ts`.",
|
|
41
|
+
"Design values come from tokens; no raw colours, sizes or inline styles.",
|
|
42
|
+
"Every data panel has loading, empty and error states; every screen works from 360 px to 1600 px.",
|
|
43
|
+
"User-visible strings live in locale files, never literal in components.",
|
|
44
|
+
"Tests: Vitest + Testing Library + MSW; Playwright visual baselines at 390/834/1440 px."
|
|
45
|
+
],
|
|
46
|
+
"hooks": {
|
|
47
|
+
"lint_after_edit": true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
description: Spec-driven development process. Applies to every change in the repository.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Spec-driven development
|
|
7
|
+
|
|
8
|
+
- Every change implements a task from `docs/specs/NNN-*/tasks.md`. If no task covers the change,
|
|
9
|
+
propose a spec or task update first; do not write untracked code.
|
|
10
|
+
- Read the spec's `spec.md` and `plan.md` and the docs they link before writing code.
|
|
11
|
+
- Respect task order inside a spec. Tasks marked **TDD** start with a failing test that is run and
|
|
12
|
+
seen to fail for the expected reason.
|
|
13
|
+
- Acceptance criteria IDs (`AC-NNN-n`) appear in test names or docstrings so they can be traced.
|
|
14
|
+
- When the spec is wrong, ambiguous or contradicts another doc: stop, explain the conflict, and
|
|
15
|
+
propose the doc change. Never silently diverge. If code and docs disagree, fix the doc first.
|
|
16
|
+
- After finishing a task: tick it (`- [x]`), run the project's check command, and commit with
|
|
17
|
+
`feat(NNN): <what changed>` and `Tasks: TNNN-nn` in the body. One task, one commit.
|
|
18
|
+
- Update `docs/20-implementation-status.md` in the same commit when a component's status
|
|
19
|
+
changes; record deliberate deviations in its notes.
|
|
20
|
+
- Never work on two specs in one change. Never start P1 work before the P0 path runs end to end.
|
|
21
|
+
- If a change alters what a diagram shows, update the diagram in the same commit.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
description: Architecture boundaries that keep the domain testable and the adapters replaceable. Applies to all application code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Architecture boundaries
|
|
7
|
+
|
|
8
|
+
- Layers and allowed imports: `api/routes → services → domain + ports`; `adapters` implement
|
|
9
|
+
`ports`; `main` is the composition root that wires adapters in. The exact names follow
|
|
10
|
+
`docs/13-conventions.md`.
|
|
11
|
+
- `domain` is pure: no I/O, no SDKs, no framework, no network, no file system, no wall clock.
|
|
12
|
+
Time comes from an injected clock; randomness from an injected source.
|
|
13
|
+
- Every external system (database, queue, storage, model provider, third-party API) sits behind
|
|
14
|
+
a port (an interface) with an in-memory fake used by tests. No test calls a real external
|
|
15
|
+
service.
|
|
16
|
+
- Routes and controllers are thin: parse, call a service, map errors. No business logic there.
|
|
17
|
+
- Every number that matters to the business is computed by deterministic code with a unit test;
|
|
18
|
+
a model may read, classify, propose and explain, never decide or compute.
|
|
19
|
+
- State changes and their audit record are written together (same transaction or equivalent);
|
|
20
|
+
re-runs are idempotent and never duplicate data.
|
|
21
|
+
- Configuration is environment variables validated at start-up; model IDs, regions and limits are
|
|
22
|
+
configuration, never literals in code.
|
|
23
|
+
- A new dependency, managed service or paid API needs an ADR (or a note in the spec's plan) before
|
|
24
|
+
it enters the code.
|
|
25
|
+
- Enforce the layer rules with a tool where the stack allows it (import-linter, eslint
|
|
26
|
+
boundaries, go vet rules, dependency-cruiser) and run it in the check command.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
description: Security and data-handling rules. Applies to every change, including scripts, tests, fixtures, infra and docs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Security and data
|
|
7
|
+
|
|
8
|
+
- **No secrets** in code, config, images, logs, fixtures, commit messages or tool output. Secrets
|
|
9
|
+
come from a secret manager or an ignored local `.env`; never print a token, even while debugging.
|
|
10
|
+
- Public environment variables (anything shipped to a browser or client) hold nothing server-side.
|
|
11
|
+
- Every data access is scoped by the verified principal (user, workspace, tenant); a foreign ID
|
|
12
|
+
returns not-found, never forbidden-with-details. Roles are an explicit table with a test per cell.
|
|
13
|
+
- Input is untrusted: validate at the boundary with a schema, enforce size and type limits, sniff
|
|
14
|
+
uploads by content, use parameterised queries, render user content safely (no raw HTML).
|
|
15
|
+
- Model output is untrusted: validate against a schema before use; resolve references only against
|
|
16
|
+
known IDs; never let it change permissions, policy or limits.
|
|
17
|
+
- Content given to a model (documents, retrieved text, tool results, user messages) is data, never
|
|
18
|
+
instructions; frame it as such and pass it as a separate part.
|
|
19
|
+
- Personal data is minimised, masked at rest where possible, and never logged; retention and
|
|
20
|
+
deletion paths exist and are tested.
|
|
21
|
+
- Real customer data never enters the repository; tests, fixtures, evals and docs use synthetic
|
|
22
|
+
data that is marked as such.
|
|
23
|
+
- Dependencies are pinned with a committed lockfile and audited in the check command.
|
|
24
|
+
- A change to auth, isolation, roles or validation rules ships with a test in the same commit and
|
|
25
|
+
is seen by the security reviewer before merge.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: model_decision
|
|
3
|
+
description: Rules for code that calls a language model or orchestrates agents: prompts, schemas, grounding, cost and tracing. Read when touching prompts, agent nodes, tool definitions or evals.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Model-backed features
|
|
7
|
+
|
|
8
|
+
- Prompts live in files (`prompts/<id>.md` or the project's equivalent) with front matter `id`,
|
|
9
|
+
`version`, `model`, `output_schema`. No prompt text over 200 characters inside code. Bump the
|
|
10
|
+
version on any change and re-run the evals and recordings that depend on it.
|
|
11
|
+
- Every call has a strict output schema validated before use, a model setting from configuration,
|
|
12
|
+
a timeout, a retry policy and a fallback. Temperature 0 for classification, extraction and
|
|
13
|
+
mapping; low for prose.
|
|
14
|
+
- Choose the tier by the job: fast models for classification and extraction, strong models for
|
|
15
|
+
reasoning and prose. Record the comparison that justified the choice.
|
|
16
|
+
- Content a prompt sees is framed as untrusted data and passed as a separate part. Tools exposed
|
|
17
|
+
to a model are read-only and scoped unless an ADR says otherwise, and return values with IDs.
|
|
18
|
+
- Every number or claim a model writes for a user carries a citation the code can verify; the
|
|
19
|
+
code decides whether the citation holds. A model never grades its own output.
|
|
20
|
+
- A model's result about a user's own data is a proposal until a person accepts it; nothing a
|
|
21
|
+
model detects overwrites a value a person confirmed.
|
|
22
|
+
- Agent nodes: one job each, a result schema, an idempotency key checked before work, a small
|
|
23
|
+
return value; large data stays in storage. Orchestration is code, not conversation.
|
|
24
|
+
- One trace per run with a span per call; token and cost accounting per call; prompt and
|
|
25
|
+
response content captured only with synthetic data and an explicit flag.
|
|
26
|
+
- Evals run on demand with a dataset and scorers and are reported in docs; they are never part of
|
|
27
|
+
the merge gate.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: model_decision
|
|
3
|
+
description: Testing rules. Read when writing or changing tests, fixtures, recordings or evals.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Testing
|
|
7
|
+
|
|
8
|
+
- The check command runs lint, types, layer rules, repo checks and every gated test layer; it
|
|
9
|
+
never calls a real external service.
|
|
10
|
+
- A test proves one behaviour and is named after it and its AC (`test_ac007_3_…`).
|
|
11
|
+
- Fakes for every port; recorded outputs for model and OCR calls replayed from fixtures; a missing
|
|
12
|
+
recording fails loudly.
|
|
13
|
+
- Expected values come from generated ground truth, never hand-typed numbers.
|
|
14
|
+
- Every limit is tested at, below and above the boundary with an injected clock.
|
|
15
|
+
- Invariants get property tests: idempotency, order independence, round-trips, arithmetic.
|
|
16
|
+
- Flaky tests are bugs: remove the shared state, the real clock or the network; never add retries.
|
|
17
|
+
- Never loosen, skip or delete a test to get green; report the conflict with the spec.
|
|
18
|
+
- Visual baselines change only in a reviewed change with screenshots at the agreed widths.
|
|
19
|
+
- Coverage floors per layer are written in `docs/15-testing.md` and enforced by the check command.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: model_decision
|
|
3
|
+
description: Documentation conventions and the implementation-status discipline. Read when editing anything under docs/ or README.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Docs and status
|
|
7
|
+
|
|
8
|
+
- `docs/20-implementation-status.md` is the only document that says what is built. Statuses:
|
|
9
|
+
Specified → In progress → Built (tests green, suite named) → Deployed; Cut with a reason.
|
|
10
|
+
Built without a named test is Partial. Update it in the same commit as the change.
|
|
11
|
+
- Numbered docs answer one question each; `docs/README.md` lists them with that question and the
|
|
12
|
+
reading order. Cross-links are relative paths.
|
|
13
|
+
- Specs live in `docs/specs/NNN-name/` as `spec.md`, `plan.md`, `tasks.md`; ADRs in
|
|
14
|
+
`docs/adr/ADR-NNN-title.md`; both are indexed.
|
|
15
|
+
- Mermaid renders on GitHub: in `sequenceDiagram` messages avoid `;`, `{}`, `|` and a second `:`;
|
|
16
|
+
quote flowchart labels containing `/`. Editable diagram files (`.drawio.svg`) are edited with the
|
|
17
|
+
tool, never by hand.
|
|
18
|
+
- Numbers in README or docs come from recorded evidence with a date, never from memory.
|
|
19
|
+
- Write plainly: short sentences, no marketing language, no claims without evidence.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: crew-adr
|
|
3
|
+
description: "Writes one architecture decision record in docs/adr/: context, options with trade-offs, the decision, consequences and how to revisit it; links it from the docs index. Use when a choice is expensive to reverse (a service, a database, a protocol, a scope change)."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
anycrew-agent: architect
|
|
7
|
+
anycrew-phase: design
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# One decision, recorded
|
|
11
|
+
|
|
12
|
+
Delegate to the **architect** (strong tier). Template: `templates/docs/adr/ADR-template.md`.
|
|
13
|
+
|
|
14
|
+
1. Number: next free `ADR-NNN` in `docs/adr/`. File `docs/adr/ADR-NNN-short-title.md`.
|
|
15
|
+
2. Sections: Status (Proposed / Accepted / Superseded by), Context, Options considered (at least
|
|
16
|
+
two, each with what it costs), Decision, Consequences (good and bad), How to revisit.
|
|
17
|
+
3. If it supersedes an earlier ADR or amends a constitution principle, say so in both files.
|
|
18
|
+
4. Add the row to `docs/README.md` (or `docs/adr/README.md`) and reference the ADR from the
|
|
19
|
+
spec or doc that depends on it.
|
|
20
|
+
|
|
21
|
+
Done when the ADR is Accepted by a person, or left Proposed with the open question named.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: crew-architecture
|
|
3
|
+
description: "Designs the system from the PRD: architecture with containers and flows (docs/05), data model (docs/09), API contract (docs/10 + contracts/), layer rules (docs/13) and an ADR per significant decision; selects the stack preset. Use before the first spec and whenever a change crosses a boundary."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
anycrew-agent: architect
|
|
7
|
+
anycrew-phase: design
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Architecture, data model and contracts
|
|
11
|
+
|
|
12
|
+
Delegate to the **architect** (strong tier). Templates in `templates/docs/` (05, 09, 10, 13,
|
|
13
|
+
`adr/ADR-template.md`).
|
|
14
|
+
|
|
15
|
+
1. Inputs: `docs/03`, `docs/00`, `docs/02`, the preset in `.anycrew/config.json`.
|
|
16
|
+
2. Outputs: `docs/05-architecture.md`, `docs/09-data-model.md`, `docs/10-api-contract.md`,
|
|
17
|
+
`contracts/openapi.yaml` (or equivalent), `docs/13-conventions.md`, and ADRs for every
|
|
18
|
+
decision that is expensive to reverse (`crew-adr` for one at a time).
|
|
19
|
+
3. For model-backed features, pull in the **ai-engineer** (`crew-llm`) for `docs/06`.
|
|
20
|
+
4. For UI, pull in the **designer** (`crew-design`) for `docs/11` and `docs/12`.
|
|
21
|
+
5. Gate: the constitution check table has a line per principle; the person approves the ADRs.
|
|
22
|
+
6. The architect ends with the list of specs to write, in build order, for `crew-spec`.
|
|
23
|
+
|
|
24
|
+
Done when the docs above exist, `contracts/` validates, and the ADRs are approved.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: crew-brainstorm
|
|
3
|
+
description: "Runs a structured brainstorm from an idea, theme or problem to a documented decision in docs/01: inputs and criteria, problem scan, scored options, the decision, out of scope, risks and name candidates. Use at the start of a product, hackathon entry or pivot."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
anycrew-agent: brainstormer
|
|
7
|
+
anycrew-phase: discover
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Brainstorm to a decision
|
|
11
|
+
|
|
12
|
+
Delegate to the **brainstormer** (strong tier) with the person's idea or theme and any
|
|
13
|
+
constraints they stated. Template: `templates/docs/01-brainstorm-and-decision.md`.
|
|
14
|
+
|
|
15
|
+
1. The brainstormer asks at most five questions, then writes `docs/01-brainstorm-and-decision.md`
|
|
16
|
+
through steps 2–7 of its procedure: problem scan, 5–8 options, scoring table, decision,
|
|
17
|
+
boundaries and risks, names.
|
|
18
|
+
2. Hand facts marked **[assumed]** to the **researcher** (`crew-research`) if the decision
|
|
19
|
+
depends on them.
|
|
20
|
+
3. Present the decision paragraph and the scoring table to the person and ask for approval.
|
|
21
|
+
This is a gate: nothing downstream starts before a person says yes.
|
|
22
|
+
|
|
23
|
+
Done when `docs/01` exists, the decision is approved, and `docs/20-implementation-status.md`
|
|
24
|
+
has a "Decision" row.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: crew-checkpoint
|
|
3
|
+
description: "Updates docs/20-implementation-status.md so it matches the tree: moves component rows between Specified, In progress, Built (with the test suite named), Deployed and Cut; refreshes the last-updated line. Use as part of any change that adds, completes or removes a component, and before a demo or release."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
anycrew-agent: doc-writer
|
|
7
|
+
anycrew-phase: record
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Checkpoint the implementation status
|
|
11
|
+
|
|
12
|
+
Delegate to the **doc-writer** (fast tier). The status doc is the only document that says what
|
|
13
|
+
is actually built; keep it true.
|
|
14
|
+
|
|
15
|
+
1. Read `docs/20-implementation-status.md` and the specs' `tasks.md`.
|
|
16
|
+
2. Move the rows the change affected. **Built** requires a named test suite; code without a
|
|
17
|
+
test that would fail if it broke is **Partial**.
|
|
18
|
+
3. Record deliberate deviations in the row's notes and gaps in the Gaps section.
|
|
19
|
+
4. Refresh the "last updated" line with the date and the one-line reason.
|
|
20
|
+
5. If the project has a status checker script, run it and fix the rows, not the checker.
|
|
21
|
+
|
|
22
|
+
Done when every row's status matches the code and tests, and the date is today.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: crew-debug
|
|
3
|
+
description: "Structured debugging: capture the error and the spec statement it violates, reproduce deterministically, isolate by layer, explain the root cause, fix with a regression test, record the lesson. Use for errors, failing tests and environment-specific behaviour whose cause is not obvious."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
anycrew-agent: debugger
|
|
7
|
+
anycrew-phase: build
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Debug to the root cause
|
|
11
|
+
|
|
12
|
+
Delegate to the **debugger** (strong tier) with the error text, the command, the environment
|
|
13
|
+
and the expected behaviour.
|
|
14
|
+
|
|
15
|
+
1. No fix before a reproduction and a one-paragraph root cause.
|
|
16
|
+
2. The fix is the smallest change at the cause, with the regression test and the check
|
|
17
|
+
command green.
|
|
18
|
+
3. If the cause was a missing rule or a wrong doc, update it in the same change.
|
|
19
|
+
4. Auth, tenancy or money involved → `crew-security` before merge.
|
|
20
|
+
|
|
21
|
+
Done when the regression test passes, the suite is green, and the report lists what was ruled
|
|
22
|
+
out.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: crew-deploy-check
|
|
3
|
+
description: "Runs the pre-deployment checklist: gates green on the commit, migrations reviewed and reversible, configuration and secrets present per environment, feature flags set, rollback command and owner named, monitoring in place; then deploys with the documented command if asked and verifies the health endpoint. Use before any release."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
anycrew-agent: release-engineer
|
|
7
|
+
anycrew-phase: ship
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Pre-deploy checklist and deploy
|
|
11
|
+
|
|
12
|
+
Delegate to the **release-engineer** (balanced tier). Templates:
|
|
13
|
+
`templates/docs/16-infrastructure.md`, `templates/docs/17-observability.md`.
|
|
14
|
+
|
|
15
|
+
Report each item as ✅ or ❌ with evidence (a command and its output, a file path):
|
|
16
|
+
|
|
17
|
+
1. Check command green on the exact commit; the commit references its spec.
|
|
18
|
+
2. Migrations: forward-only, dry-run output attached, contract step scheduled separately.
|
|
19
|
+
3. Configuration: every variable in `docs/16` present in the target environment; no secret in
|
|
20
|
+
a file, image or pipeline log.
|
|
21
|
+
4. Feature flags and limits set for the release.
|
|
22
|
+
5. Rollback: the command, the previous version, and who runs it.
|
|
23
|
+
6. Monitoring: dashboards and alerts cover the change; cost budget alert exists.
|
|
24
|
+
7. Deploy (only when asked): run the documented command, then verify the version at the health
|
|
25
|
+
endpoint and one smoke action.
|
|
26
|
+
|
|
27
|
+
Done when every item is ✅ or has a named owner and date, and the person has approved a
|
|
28
|
+
production deploy explicitly.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: crew-design
|
|
3
|
+
description: "Defines screens, states and flows (docs/11) and the design system (docs/12 + tokens): information architecture, words first, tokens, components, responsive and accessibility rules, low-fidelity mocks and UI quality gates. Use before any UI spec and whenever a screen is added or changed."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
anycrew-agent: designer
|
|
7
|
+
anycrew-phase: design
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Screens and design system
|
|
11
|
+
|
|
12
|
+
Delegate to the **designer** (balanced tier). Templates: `templates/docs/11-frontend.md`,
|
|
13
|
+
`templates/docs/12-design-system.md`.
|
|
14
|
+
|
|
15
|
+
1. Inputs: `docs/03` journeys, `docs/05`, `docs/10`.
|
|
16
|
+
2. Outputs: `docs/11-frontend.md` (routes, screens, states, flows), `docs/12-design-system.md`
|
|
17
|
+
(principles, tokens, components, content style, gates), `contracts/design/tokens.json`,
|
|
18
|
+
mocks under `design/mocks/` with screenshots at 390/834/1440 px in `docs/assets/`.
|
|
19
|
+
3. Gate: every screen has words for empty, loading, error and success; every token contrast
|
|
20
|
+
pair passes AA; no screen scrolls horizontally at 360 px.
|
|
21
|
+
|
|
22
|
+
Done when the docs exist and the person has looked at the mocks at three widths.
|