anycrew 0.0.0-stage → 0.1.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.
Files changed (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +266 -2
  3. package/agents/ai-engineer.md +50 -0
  4. package/agents/architect.md +45 -0
  5. package/agents/brainstormer.md +46 -0
  6. package/agents/crew-lead.md +53 -0
  7. package/agents/debugger.md +38 -0
  8. package/agents/designer.md +43 -0
  9. package/agents/doc-writer.md +45 -0
  10. package/agents/implementer.md +56 -0
  11. package/agents/product-manager.md +44 -0
  12. package/agents/release-engineer.md +45 -0
  13. package/agents/researcher.md +41 -0
  14. package/agents/reviewer.md +59 -0
  15. package/agents/scout.md +50 -0
  16. package/agents/security-reviewer.md +54 -0
  17. package/agents/spec-writer.md +43 -0
  18. package/agents/tester.md +41 -0
  19. package/bin/anycrew.mjs +6 -0
  20. package/hooks/hooks.json +18 -0
  21. package/hooks/scripts/lint-after-edit.sh +65 -0
  22. package/lib/cli.mjs +184 -0
  23. package/lib/frontmatter.mjs +80 -0
  24. package/lib/fsx.mjs +35 -0
  25. package/lib/generate.mjs +244 -0
  26. package/lib/pack.mjs +75 -0
  27. package/models.json +98 -0
  28. package/package.json +48 -4
  29. package/presets/generic.json +28 -0
  30. package/presets/go-service.json +38 -0
  31. package/presets/node-typescript-next.json +44 -0
  32. package/presets/python-fastapi-react.json +49 -0
  33. package/rules/00-sdd-process.md +21 -0
  34. package/rules/10-architecture-boundaries.md +26 -0
  35. package/rules/40-security-and-data.md +25 -0
  36. package/rules/50-llm-features.md +27 -0
  37. package/rules/60-testing.md +19 -0
  38. package/rules/70-docs-and-status.md +19 -0
  39. package/skills/crew-adr/SKILL.md +21 -0
  40. package/skills/crew-architecture/SKILL.md +24 -0
  41. package/skills/crew-brainstorm/SKILL.md +24 -0
  42. package/skills/crew-checkpoint/SKILL.md +22 -0
  43. package/skills/crew-debug/SKILL.md +22 -0
  44. package/skills/crew-deploy-check/SKILL.md +28 -0
  45. package/skills/crew-design/SKILL.md +22 -0
  46. package/skills/crew-docs/SKILL.md +23 -0
  47. package/skills/crew-implement/SKILL.md +24 -0
  48. package/skills/crew-init/SKILL.md +36 -0
  49. package/skills/crew-llm/SKILL.md +28 -0
  50. package/skills/crew-plan/SKILL.md +24 -0
  51. package/skills/crew-prd/SKILL.md +22 -0
  52. package/skills/crew-research/SKILL.md +21 -0
  53. package/skills/crew-review/SKILL.md +21 -0
  54. package/skills/crew-security/SKILL.md +21 -0
  55. package/skills/crew-spec/SKILL.md +24 -0
  56. package/skills/crew-status/SKILL.md +31 -0
  57. package/skills/crew-sync/SKILL.md +23 -0
  58. package/skills/crew-tasks/SKILL.md +21 -0
  59. package/skills/crew-test/SKILL.md +21 -0
  60. package/skills/crew-verify/SKILL.md +23 -0
  61. package/templates/AGENTS.md +85 -0
  62. package/templates/CLAUDE.md +3 -0
  63. package/templates/GEMINI.md +2 -0
  64. package/templates/anycrew.config.json +13 -0
  65. package/templates/copilot-instructions.md +6 -0
  66. package/templates/docs/00-constitution.md +62 -0
  67. package/templates/docs/01-brainstorm-and-decision.md +45 -0
  68. package/templates/docs/02-research.md +17 -0
  69. package/templates/docs/03-prd.md +31 -0
  70. package/templates/docs/04-requirements-traceability.md +9 -0
  71. package/templates/docs/05-architecture.md +35 -0
  72. package/templates/docs/06-agent-design.md +25 -0
  73. package/templates/docs/09-data-model.md +17 -0
  74. package/templates/docs/10-api-contract.md +13 -0
  75. package/templates/docs/11-frontend.md +18 -0
  76. package/templates/docs/12-design-system.md +14 -0
  77. package/templates/docs/13-conventions.md +26 -0
  78. package/templates/docs/14-security.md +23 -0
  79. package/templates/docs/15-testing.md +18 -0
  80. package/templates/docs/16-infrastructure.md +17 -0
  81. package/templates/docs/17-observability.md +8 -0
  82. package/templates/docs/19-delivery-plan.md +10 -0
  83. package/templates/docs/20-implementation-status.md +18 -0
  84. package/templates/docs/README.md +34 -0
  85. package/templates/docs/adr/ADR-template.md +13 -0
  86. package/templates/docs/adr/README.md +4 -0
  87. package/templates/docs/glossary.md +8 -0
  88. package/templates/docs/specs/NNN-template/plan.md +25 -0
  89. package/templates/docs/specs/NNN-template/spec.md +26 -0
  90. package/templates/docs/specs/NNN-template/tasks.md +14 -0
  91. package/templates/docs/specs/README.md +25 -0
@@ -0,0 +1,9 @@
1
+ # 04 — Requirements traceability
2
+
3
+ > One row per requirement. The spec-writer fills the spec column; the tester fills the test column;
4
+ > evidence is a report, a screenshot or a recorded run with a date.
5
+
6
+ | Requirement | Priority | Spec | Test(s) | Evidence |
7
+ |---|---|---|---|---|
8
+ | FR-001 | P0 | | | |
9
+ | NFR-001 | P0 | | | |
@@ -0,0 +1,35 @@
1
+ # 05 — Architecture
2
+
3
+ > Containers, flows and boundaries. Decisions that are expensive to reverse are in [`adr/`](adr/README.md).
4
+
5
+ ## 1. Context
6
+ ```mermaid
7
+ flowchart LR
8
+ user["User"] --> app["{{project}}"]
9
+ app --> ext["External systems"]
10
+ ```
11
+ ## 2. Containers
12
+ | Container | Responsibility | Runs where | Talks to |
13
+ |---|---|---|---|
14
+ ## 3. Critical flows
15
+ ```mermaid
16
+ sequenceDiagram
17
+ participant U as User
18
+ participant A as API
19
+ U->>A: request
20
+ A-->>U: response
21
+ ```
22
+ ## 4. Boundaries and layers
23
+ | Layer | May import | Must not |
24
+ |---|---|---|
25
+ ## 5. State, jobs and idempotency
26
+ ## 6. Limits and quotas
27
+ | Limit | Value | Enforced where |
28
+ |---|---|---|
29
+ ## 7. Regions, residency and environments
30
+ ## 8. Constitution check
31
+ | Principle | How the design satisfies it |
32
+ |---|---|
33
+ ## 9. Specs to write, in build order
34
+ | # | Spec | Depends on |
35
+ |---|---|---|
@@ -0,0 +1,25 @@
1
+ # 06 — Agent design
2
+
3
+ > The model-backed parts of the product: where a model is used, where code decides, every call's
4
+ > contract, guardrails and evals. Rule: `.agents/rules/50-llm-features.md`.
5
+
6
+ ## 1. Model / code boundary
7
+ | Step | Needs | Done by | Why |
8
+ |---|---|---|---|
9
+ | | judgement / correctness | model (tier) / code | |
10
+ ## 2. Calls
11
+ | Call | Purpose | Inputs (untrusted marked) | Output schema | Tier | Temp | Timeout / retry / fallback | Cost per call |
12
+ |---|---|---|---|---|---|---|---|
13
+ ## 3. Prompts
14
+ Prompts live in `{{prompts_dir}}` with front matter `id`, `version`, `model`, `output_schema`.
15
+ ## 4. Guardrails
16
+ - Untrusted content framing; tool permissions; output validation; grounding and citations.
17
+ ## 5. Orchestration (if multi-agent)
18
+ ```mermaid
19
+ flowchart TB
20
+ a["step 1 (code)"] --> b["step 2 (model, fast)"] --> c["step 3 (code)"]
21
+ ```
22
+ ## 6. Evals
23
+ | Eval | Dataset | Scorer | Last result (date) |
24
+ |---|---|---|---|
25
+ ## 7. Tracing and cost
@@ -0,0 +1,17 @@
1
+ # 09 — Data model
2
+
3
+ ## 1. Entities
4
+ | Entity | Owner / tenancy | ID scheme | Lifecycle states |
5
+ |---|---|---|---|
6
+ ## 2. Diagram
7
+ ```mermaid
8
+ erDiagram
9
+ WORKSPACE ||--o{ ITEM : has
10
+ ```
11
+ ## 3. State machines
12
+ | Entity | From | Event | To | Side effects |
13
+ |---|---|---|---|---|
14
+ ## 4. Indexes and queries
15
+ ## 5. Versioning and migrations
16
+ Every stored record carries a schema version; breaking changes go expand → migrate → contract.
17
+ ## 6. Retention and deletion
@@ -0,0 +1,13 @@
1
+ # 10 — API contract
2
+
3
+ > The machine-readable contract (`{{contracts_dir}}/openapi.yaml`) is authoritative; this page explains it.
4
+
5
+ ## 1. Conventions
6
+ - Auth, versioning, pagination, idempotency keys, time and money formats.
7
+ ## 2. Resources
8
+ | Resource | Endpoints | Notes |
9
+ |---|---|---|
10
+ ## 3. Errors
11
+ | Code | HTTP | When |
12
+ |---|---|---|
13
+ ## 4. Limits
@@ -0,0 +1,18 @@
1
+ # 11 — Frontend
2
+
3
+ ## 1. Information architecture
4
+ ## 2. Routes
5
+ | Path | Purpose | Data | Who can see it |
6
+ |---|---|---|---|
7
+ ## 3. Screen flow
8
+ ```mermaid
9
+ flowchart LR
10
+ home["/"] --> detail["/items/:id"]
11
+ ```
12
+ ## 4. Screens
13
+ ### <screen>
14
+ - **Words:** title, labels, actions.
15
+ - **States:** loading, empty, error, success.
16
+ - **Responsive:** 360–599 / 600–1023 / 1024–1600 px behaviour.
17
+ ## 5. Realtime and caching
18
+ ## 6. Accessibility
@@ -0,0 +1,14 @@
1
+ # 12 — Design system
2
+
3
+ ## 1. Principles and what we avoid
4
+ ## 2. Tokens
5
+ Source of truth: `{{contracts_dir}}/design/tokens.json`. Colour roles, type scale, spacing, radius,
6
+ elevation, motion, breakpoints. Contrast pairs checked against WCAG AA.
7
+ ## 3. Layout and window classes
8
+ ## 4. Components
9
+ | Component | Variants | States |
10
+ |---|---|---|
11
+ ## 5. Content style
12
+ ## 6. Quality gates
13
+ | Gate | Tool | Fails when |
14
+ |---|---|---|
@@ -0,0 +1,26 @@
1
+ # 13 — Conventions
2
+
3
+ > How code is organised and written so that every feature looks like it was written by one person.
4
+ > Coding agents follow this page through `.agents/rules/`.
5
+
6
+ ## 1. Repository layout
7
+ ```
8
+ {{layout_sketch}}
9
+ ```
10
+ ## 2. Layers and allowed imports
11
+ | Layer | May import | Must not |
12
+ |---|---|---|
13
+ Enforced by: <tool> in `{{check_cmd}}`.
14
+ ## 3. Patterns we use, and where
15
+ | Pattern | Where | Why |
16
+ |---|---|---|
17
+ | Ports & adapters | | swap external systems for fakes |
18
+ | Composition root | | no globals |
19
+ | Policy as configuration | | reviewable rules |
20
+ ## 4. Language conventions
21
+ <!-- Filled from the preset; edit freely. -->
22
+ {{backend_conventions}}
23
+
24
+ {{frontend_conventions}}
25
+ ## 5. Git conventions
26
+ - Branch per spec; commit `feat(NNN): …` with `Tasks:` and `AC:` trailers; one task per commit.
@@ -0,0 +1,23 @@
1
+ # 14 — Security
2
+
3
+ ## 1. Assets and actors
4
+ ## 2. Trust boundaries
5
+ ```mermaid
6
+ flowchart LR
7
+ subgraph untrusted
8
+ u["User / uploads / model output"]
9
+ end
10
+ subgraph trusted
11
+ api["API"] --> db["Data"]
12
+ end
13
+ u --> api
14
+ ```
15
+ ## 3. Controls
16
+ | ID | Boundary | Control | Proven by (test) |
17
+ |---|---|---|---|
18
+ | C1 | | | |
19
+ ## 4. Data protection
20
+ ## 5. Dependencies and supply chain
21
+ ## 6. Residual risks
22
+ | Risk | Accepted by | Date | Revisit |
23
+ |---|---|---|---|
@@ -0,0 +1,18 @@
1
+ # 15 — Testing
2
+
3
+ > Tests prove the code does what the spec says. Evals measure how well models do their part. Tests
4
+ > gate merges; evals inform decisions.
5
+
6
+ ## 1. Layers
7
+ | Layer | What | Runs | Gate? | Location |
8
+ |---|---|---|---|---|
9
+ | Unit | | every `{{check_cmd}}` | ✔ | |
10
+ | Integration | | every `{{check_cmd}}` | ✔ | |
11
+ | Scenario / E2E | | | | |
12
+ | Contract | | | ✔ | |
13
+ | Visual / a11y | | | | |
14
+ | Evals | real models, on demand | | ✘ | |
15
+ Coverage floors: domain ≥ 90 %, services ≥ 80 % (floors, not goals).
16
+ ## 2. Gates per change
17
+ ## 3. Ground truth and fixtures
18
+ ## 4. Evals
@@ -0,0 +1,17 @@
1
+ # 16 — Infrastructure & deployment
2
+
3
+ ## 1. Environments
4
+ | Environment | Purpose | Differences |
5
+ |---|---|---|
6
+ ## 2. Build
7
+ ## 3. Pipeline
8
+ ## 4. Configuration
9
+ | Variable | Purpose | Default | Secret? |
10
+ |---|---|---|---|
11
+ ## 5. Deploy
12
+ ```bash
13
+ {{deploy_cmd}}
14
+ ```
15
+ ## 6. Roll back
16
+ ## 7. Cost guardrails
17
+ ## 8. Runbook
@@ -0,0 +1,8 @@
1
+ # 17 — Observability
2
+
3
+ ## 1. Logs (structured, correlation IDs, what is never logged)
4
+ ## 2. Traces (one per request or job; spans per external call)
5
+ ## 3. Metrics (latency, traffic, errors, saturation; cost)
6
+ ## 4. Alerts
7
+ | Alert | Condition | Owner | Runbook |
8
+ |---|---|---|---|
@@ -0,0 +1,10 @@
1
+ # 19 — Delivery plan
2
+
3
+ ## 1. Roles
4
+ | Role | Owns | Person |
5
+ |---|---|---|
6
+ ## 2. Milestones
7
+ | Day / week | Deliverable | Specs | Done when |
8
+ |---|---|---|---|
9
+ ## 3. Cut line
10
+ ## 4. Definition of done (release)
@@ -0,0 +1,18 @@
1
+ # 20 — Implementation status
2
+
3
+ > What is actually built. Updated in the **same commit** as any change that adds, completes or
4
+ > removes a component. Statuses: **Specified** → **In progress** → **Built** (tests green, suite
5
+ > named) → **Deployed** · **Partial** (built without a test that would catch a regression) ·
6
+ > **Cut** (deliberately dropped, with reason).
7
+
8
+ _Last updated: {{date}} — initialised by anycrew._
9
+
10
+ ## Components
11
+
12
+ | Component | Spec | Status | Notes (tests, deviations) |
13
+ |---|---|---|---|
14
+ | Repository, docs skeleton, agent guide | — | Built | `npx anycrew init` |
15
+
16
+ ## Gaps
17
+
18
+ - None recorded yet.
@@ -0,0 +1,34 @@
1
+ # {{project}} documentation
2
+
3
+ Specifications are the source of truth: code implements them, and both change together.
4
+
5
+ ## Reading order
6
+
7
+ **For a new teammate:** 00 → 01 → 03 → 05 → 13 → 20.
8
+ **For a coding agent starting a spec:** `AGENTS.md` → 00 → the spec folder → the docs it links.
9
+
10
+ | # | Document | Answers |
11
+ |---|---|---|
12
+ | 00 | [Constitution](00-constitution.md) | The principles every change is checked against |
13
+ | 01 | [Brainstorm & decision](01-brainstorm-and-decision.md) | Which idea, why, what is out of scope, the name |
14
+ | 02 | [Research](02-research.md) | Verified facts with sources; spikes |
15
+ | 03 | [PRD](03-prd.md) | Users, journeys, P0/P1/P2 scope, FR/NFR |
16
+ | 04 | [Requirements traceability](04-requirements-traceability.md) | FR → spec → test → evidence |
17
+ | 05 | [Architecture](05-architecture.md) | Containers, flows, boundaries, limits |
18
+ | 06 | [Agent design](06-agent-design.md) | Model-backed steps, prompts, guardrails, evals (if any) |
19
+ | 09 | [Data model](09-data-model.md) | Entities, IDs, states, indexes, migrations |
20
+ | 10 | [API contract](10-api-contract.md) | Endpoints, errors, auth, limits (YAML in `contracts/`) |
21
+ | 11 | [Frontend](11-frontend.md) | Routes, screens, states, flows, responsive rules |
22
+ | 12 | [Design system](12-design-system.md) | Tokens, type, layout, components, content style, gates |
23
+ | 13 | [Conventions](13-conventions.md) | Layout, layers, patterns, coding and git conventions |
24
+ | 14 | [Security](14-security.md) | Threat model, controls, data protection |
25
+ | 15 | [Testing](15-testing.md) | Test layers, gates, ground truth, evals |
26
+ | 16 | [Infrastructure & deployment](16-infrastructure.md) | Environments, config, pipeline, runbook |
27
+ | 17 | [Observability](17-observability.md) | Logs, traces, metrics, alerts, cost |
28
+ | 19 | [Delivery plan](19-delivery-plan.md) | Roles, milestones, cut line, definition of done |
29
+ | 20 | [Implementation status](20-implementation-status.md) | What is actually built |
30
+ | — | [Glossary](glossary.md) | Terms |
31
+ | — | [ADRs](adr/README.md) | Decisions and their trade-offs |
32
+ | — | [Specs](specs/README.md) | Feature specs: spec → plan → tasks, build order |
33
+
34
+ Documents are created when a phase needs them; a missing number means the phase has not run.
@@ -0,0 +1,13 @@
1
+ # ADR-NNN — <title>
2
+
3
+ **Status:** Proposed / Accepted / Superseded by ADR-… · **Date:** · **Deciders:**
4
+
5
+ ## Context
6
+ ## Options considered
7
+ | Option | What it costs | What it gives |
8
+ |---|---|---|
9
+ ## Decision
10
+ ## Consequences
11
+ - Good:
12
+ - Bad:
13
+ ## How to revisit
@@ -0,0 +1,4 @@
1
+ # Decisions (ADRs)
2
+
3
+ | ADR | Decision | Status |
4
+ |---|---|---|
@@ -0,0 +1,8 @@
1
+ # Glossary
2
+
3
+ | Term | Meaning |
4
+ |---|---|
5
+ | AC-NNN-n | Acceptance criterion n of spec NNN |
6
+ | TNNN-nn | Task nn of spec NNN |
7
+ | FR / NFR | Functional / non-functional requirement |
8
+ | ADR | Architecture decision record |
@@ -0,0 +1,25 @@
1
+ # Plan NNN — <Title>
2
+
3
+ ## Approach
4
+ <!-- The thinnest vertical slice first; breadth after depth. -->
5
+
6
+ ## Slice 1 — <name> (proves: <which risk it retires>)
7
+ | # | Change | File(s) | Depends on |
8
+ |---|---|---|---|
9
+ **Done when:** <observable, testable condition>
10
+
11
+ ## Slice 2 — …
12
+
13
+ ## Contract and data changes
14
+ - `{{contracts_dir}}/openapi.yaml`: …
15
+ - Data model: … (migration steps if breaking)
16
+
17
+ ## Dependencies
18
+ | Package | Version | Why |
19
+ |---|---|---|
20
+
21
+ ## Constitution check
22
+ | Principle | ✔ / conflict and how resolved |
23
+ |---|---|
24
+
25
+ ## Risks and open questions
@@ -0,0 +1,26 @@
1
+ # Spec NNN — <Title>
2
+
3
+ | | |
4
+ |---|---|
5
+ | **Status** | Draft / Ready |
6
+ | **Priority** | P0 / P1 / P2 |
7
+ | **Owner** | |
8
+ | **Depends on** | |
9
+ | **Requirements** | FR-…, NFR-… |
10
+ | **Design** | links to docs/05, 09, 10, 11 sections |
11
+
12
+ ## Summary
13
+
14
+ ## User stories
15
+
16
+ ### US-NNN-1: <story>
17
+ - **AC-NNN-1** Given …, when …, then …
18
+ - **AC-NNN-2** Given …, when …, then …
19
+
20
+ ## Out of scope
21
+
22
+ ## Edge cases
23
+
24
+ ## Change log
25
+ | Date | Change | Why |
26
+ |---|---|---|
@@ -0,0 +1,14 @@
1
+ # Tasks NNN — <Title>
2
+
3
+ ## Slice 1
4
+
5
+ - [ ] **TNNN-01** **TDD** <behaviour>: test `<path::name>`, then the smallest change in `<file>`. (AC-NNN-1)
6
+ - [ ] **TNNN-02** <change> in `<file>`. (AC-NNN-2)
7
+
8
+ ## Slice 2
9
+
10
+ - [ ] **TNNN-03** …
11
+
12
+ ## Close
13
+
14
+ - [ ] **TNNN-99** Update `docs/20-implementation-status.md` (name the suite that covers each AC).
@@ -0,0 +1,25 @@
1
+ # Specs
2
+
3
+ Each folder is one feature, written spec-first: **`spec.md`** (what and why, with acceptance
4
+ criteria) → **`plan.md`** (how, which files) → **`tasks.md`** (ordered, test-first checklist).
5
+
6
+ ## Index and build order
7
+
8
+ | # | Spec | Priority | Depends on | Status |
9
+ |---|---|---|---|---|
10
+
11
+ ```mermaid
12
+ flowchart TB
13
+ s001["001 foundation"]
14
+ ```
15
+
16
+ ## How a coding agent works a spec
17
+
18
+ 1. Read `AGENTS.md`, then the spec's `spec.md`, `plan.md` and every doc they link.
19
+ 2. Take the first unchecked task in `tasks.md`. For **TDD** tasks, write the failing test first.
20
+ 3. Implement the smallest change that makes it pass; run `{{check_cmd}}`.
21
+ 4. Tick the task, commit `feat(NNN): …` with `Tasks: TNNN-nn` in the body.
22
+ 5. If the spec is wrong or unclear, stop and propose a spec change. Do not silently diverge.
23
+ 6. When the spec's tasks are done, update `docs/20-implementation-status.md`.
24
+
25
+ The `/crew-spec`, `/crew-implement` and `/crew-verify` skills encode this loop.