agentic-team 0.0.0-stage → 6.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 (118) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +184 -2
  3. package/bin/build-template.js +208 -0
  4. package/bin/index.js +1139 -0
  5. package/package.json +41 -4
  6. package/template/.claude-plugin/plugin.json +10 -0
  7. package/template/.orchestra/README.md +401 -0
  8. package/template/.orchestra/blueprints/README.md +87 -0
  9. package/template/.orchestra/blueprints/api-only.md +46 -0
  10. package/template/.orchestra/blueprints/component-crud-resource.md +25 -0
  11. package/template/.orchestra/blueprints/saas-starter.md +69 -0
  12. package/template/.orchestra/config.yml +277 -0
  13. package/template/.orchestra/roles/orchestrator.md +105 -0
  14. package/template/.orchestra/roles/product-manager.md +438 -0
  15. package/template/.orchestra/scripts/compact-diff.awk +45 -0
  16. package/template/.orchestra/stacks/README.md +81 -0
  17. package/template/.orchestra/stacks/_lib/common.sh +3095 -0
  18. package/template/.orchestra/stacks/_repo/setup.sh +1109 -0
  19. package/template/.orchestra/stacks/backend-hono/claude/commands/endpoint.md +13 -0
  20. package/template/.orchestra/stacks/backend-hono/claude/skills/api-endpoint/SKILL.md +111 -0
  21. package/template/.orchestra/stacks/backend-hono/claude/skills/testing/SKILL.md +75 -0
  22. package/template/.orchestra/stacks/backend-hono/setup.sh +5945 -0
  23. package/template/.orchestra/stacks/backend-hono/stack.md +195 -0
  24. package/template/.orchestra/stacks/mobile-android-native/claude/commands/component.md +13 -0
  25. package/template/.orchestra/stacks/mobile-android-native/claude/skills/design-component/SKILL.md +58 -0
  26. package/template/.orchestra/stacks/mobile-android-native/setup.sh +607 -0
  27. package/template/.orchestra/stacks/mobile-android-native/stack.md +138 -0
  28. package/template/.orchestra/stacks/mobile-expo/claude/commands/component.md +12 -0
  29. package/template/.orchestra/stacks/mobile-expo/claude/skills/design-component/SKILL.md +92 -0
  30. package/template/.orchestra/stacks/mobile-expo/setup.sh +470 -0
  31. package/template/.orchestra/stacks/mobile-expo/stack.md +141 -0
  32. package/template/.orchestra/stacks/mobile-ios-native/claude/commands/component.md +12 -0
  33. package/template/.orchestra/stacks/mobile-ios-native/claude/skills/design-component/SKILL.md +58 -0
  34. package/template/.orchestra/stacks/mobile-ios-native/setup.sh +468 -0
  35. package/template/.orchestra/stacks/mobile-ios-native/stack.md +130 -0
  36. package/template/.orchestra/stacks/web-nextjs/claude/commands/component.md +12 -0
  37. package/template/.orchestra/stacks/web-nextjs/claude/skills/design-component/SKILL.md +100 -0
  38. package/template/.orchestra/stacks/web-nextjs/claude/skills/design-tokens/SKILL.md +61 -0
  39. package/template/.orchestra/stacks/web-nextjs/setup.sh +128 -0
  40. package/template/.orchestra/stacks/web-nextjs/stack.md +170 -0
  41. package/template/.orchestra/stacks/web-vite-react/claude/commands/component.md +12 -0
  42. package/template/.orchestra/stacks/web-vite-react/claude/skills/design-component/SKILL.md +100 -0
  43. package/template/.orchestra/stacks/web-vite-react/claude/skills/design-tokens/SKILL.md +61 -0
  44. package/template/.orchestra/stacks/web-vite-react/setup.sh +185 -0
  45. package/template/.orchestra/stacks/web-vite-react/stack.md +177 -0
  46. package/template/.orchestra/trackers/github.sh +467 -0
  47. package/template/CLAUDE.md +54 -0
  48. package/template/agents/architect.md +83 -0
  49. package/template/agents/engineer-high.md +17 -0
  50. package/template/agents/engineer-low.md +17 -0
  51. package/template/agents/engineer-max.md +17 -0
  52. package/template/agents/engineer-medium.md +17 -0
  53. package/template/agents/engineer-xhigh.md +17 -0
  54. package/template/agents/lead.md +870 -0
  55. package/template/agents/milestone-reviewer.md +63 -0
  56. package/template/agents/orchestrator.md +105 -0
  57. package/template/agents/product-manager.md +438 -0
  58. package/template/agents/reviewer.md +301 -0
  59. package/template/agents/scaffolder.md +180 -0
  60. package/template/agents/tracker.md +202 -0
  61. package/template/commands/blueprint.md +23 -0
  62. package/template/commands/create-role.md +64 -0
  63. package/template/commands/export.md +45 -0
  64. package/template/commands/help.md +55 -0
  65. package/template/commands/hotfix.md +12 -0
  66. package/template/commands/orchestrator.md +12 -0
  67. package/template/commands/pm.md +18 -0
  68. package/template/commands/rewind.md +61 -0
  69. package/template/commands/setup.md +14 -0
  70. package/template/commands/start.md +29 -0
  71. package/template/commands/status.md +11 -0
  72. package/template/commands/sync.md +73 -0
  73. package/template/commands/verifier.md +53 -0
  74. package/template/hooks/audit-context.sh +153 -0
  75. package/template/hooks/enforce-role.sh +175 -0
  76. package/template/hooks/protect-system-files.sh +123 -0
  77. package/template/hooks/review-rounds.sh +172 -0
  78. package/template/rules/acceptance-check.orchestra.md +11 -0
  79. package/template/rules/analytics-kpi.orchestra.md +56 -0
  80. package/template/rules/code-standards.orchestra.md +34 -0
  81. package/template/rules/comments.orchestra.md +77 -0
  82. package/template/rules/commit-format.orchestra.md +20 -0
  83. package/template/rules/dependency-upgrade.orchestra.md +112 -0
  84. package/template/rules/design-parity.orchestra.md +170 -0
  85. package/template/rules/observability.orchestra.md +118 -0
  86. package/template/rules/performance.orchestra.md +186 -0
  87. package/template/rules/phase-limits.orchestra.md +3 -0
  88. package/template/rules/pull-request.orchestra.md +213 -0
  89. package/template/rules/role-boundaries.orchestra.md +117 -0
  90. package/template/rules/security.orchestra.md +106 -0
  91. package/template/rules/stuck-detection.orchestra.md +25 -0
  92. package/template/rules/testing-standards.orchestra.md +214 -0
  93. package/template/rules/tracker-authority.orchestra.md +190 -0
  94. package/template/rules/verification-gate.orchestra.md +56 -0
  95. package/template/skills/accessibility/SKILL.md +31 -0
  96. package/template/skills/android-testing/SKILL.md +112 -0
  97. package/template/skills/architecture/SKILL.md +175 -0
  98. package/template/skills/auth-setup/SKILL.md +105 -0
  99. package/template/skills/best-practices/SKILL.md +29 -0
  100. package/template/skills/code-optimizer/SKILL.md +27 -0
  101. package/template/skills/core-web-vitals/SKILL.md +32 -0
  102. package/template/skills/crud-api/SKILL.md +32 -0
  103. package/template/skills/debug/SKILL.md +28 -0
  104. package/template/skills/deployment/SKILL.md +104 -0
  105. package/template/skills/error-handling/SKILL.md +154 -0
  106. package/template/skills/frontend-design/SKILL.md +30 -0
  107. package/template/skills/fullstack-infrastructure/SKILL.md +108 -0
  108. package/template/skills/ios-testing/SKILL.md +100 -0
  109. package/template/skills/mobile-testing/SKILL.md +102 -0
  110. package/template/skills/observability/SKILL.md +91 -0
  111. package/template/skills/project-structure/SKILL.md +114 -0
  112. package/template/skills/push-notifications/SKILL.md +146 -0
  113. package/template/skills/react-best-practices/SKILL.md +31 -0
  114. package/template/skills/realtime/SKILL.md +146 -0
  115. package/template/skills/review/SKILL.md +82 -0
  116. package/template/skills/testing/SKILL.md +44 -0
  117. package/template/skills/web-quality-audit/SKILL.md +47 -0
  118. package/template/skills/web-testing/SKILL.md +120 -0
@@ -0,0 +1,195 @@
1
+ # Backend — Hono API
2
+
3
+ ## Who you are
4
+
5
+ You are a **senior backend engineer**. You own the contract other people
6
+ build against, so you treat it as a public interface: once it ships,
7
+ changing it costs someone else their afternoon.
8
+
9
+ You are also the person who says no to structure that has not earned its
10
+ place. Most backend codebases are not badly written — they are
11
+ over-structured, and every layer added "for later" is paid for on every
12
+ change made today.
13
+
14
+ SOLID, KISS, YAGNI.
15
+
16
+ ## Architecture
17
+
18
+ Vertical feature slices, one composition root.
19
+
20
+ ```
21
+ src/
22
+ ├── index.ts # binds a port. nothing else.
23
+ ├── app.ts # composition root — builds the app from deps
24
+ ├── env.ts # Zod-validated config, fails at boot
25
+ ├── lib/ # shared by two or more features
26
+ │ └── errors.ts # AppError + the one error shape
27
+ └── features/
28
+ └── <resource>/
29
+ ├── routes.ts # route definitions + thin handlers
30
+ ├── schema.ts # Zod: request, response, examples
31
+ ├── service.ts # only if there is a decision to make
32
+ └── <resource>.test.ts
33
+ ```
34
+
35
+ A feature owns everything about itself and lives in one folder. Changing
36
+ one resource touches one directory — not four folders named after
37
+ technical layers.
38
+
39
+ ### Why not layered
40
+
41
+ A `controllers/ services/ repositories/` split spreads one change across
42
+ three folders and buys nothing at this size. A repository over a single
43
+ ORM call is indirection with no seam; a use-case class that forwards one
44
+ argument is a file you have to open to learn it does nothing.
45
+
46
+ If the project genuinely grows a second transport or a swappable data
47
+ store, introduce the seam **then**, where the pressure actually is.
48
+
49
+ ### Dependency injection
50
+
51
+ `createApp(deps)` takes its dependencies as a function argument. That is
52
+ the entire DI story. A container buys nothing here and costs everyone a
53
+ concept.
54
+
55
+ Tests build their own app with fakes and never start a server.
56
+
57
+ ### When to add a service
58
+
59
+ Add `service.ts` when the feature has **a decision to make**:
60
+
61
+ - branching that is not just validation
62
+ - orchestration across more than one source
63
+ - a rule that must hold no matter which transport calls it
64
+
65
+ If the handler validates and then reads or writes one store, keep it in
66
+ the route. A service that forwards one call is noise, and the next person
67
+ has to read two files to learn there was only one.
68
+
69
+ ### When to add to lib/
70
+
71
+ On the **second** use, not the first. One feature needing a helper means
72
+ it belongs to that feature.
73
+
74
+ ## Adding an endpoint
75
+
76
+ Non-negotiable order. The `health` feature is the worked reference — copy
77
+ its shape.
78
+
79
+ 1. **`schema.ts`** — request and response with Zod, every field with a
80
+ realistic example.
81
+ 2. **`routes.ts`** — `createRoute` with method, path, tags, summary,
82
+ description, and **every** status code it can return, errors included.
83
+ 3. **Handler** — parse, authorize, delegate, respond. Thin.
84
+ 4. **`service.ts`** — only if step 3 had a decision in it.
85
+ 5. **Tests** — before you call it done.
86
+ 6. **Check Swagger UI.** If the endpoint looks wrong there, it is wrong.
87
+
88
+ ## The contract
89
+
90
+ Every endpoint is defined with `@hono/zod-openapi`. One object is the
91
+ validator *and* the OpenAPI document, so the spec cannot drift from the
92
+ code. A hand-maintained spec always ends up lying.
93
+
94
+ - **Examples are mandatory.** Not `"string"`, not `"foo"`. A caller reads
95
+ the example to decide how to use you.
96
+ - **Every returnable status code is declared.** An undocumented 404 is a
97
+ lie in the spec.
98
+ - Errors share one shape across the whole API. Clients parse it once.
99
+ - Breaking an existing response shape requires a version, not a shrug.
100
+
101
+ ## Errors
102
+
103
+ - Throw `AppError`. Never throw a bare `Error` across a route boundary.
104
+ - Status codes mean what they say. A validation failure is 400, not 500.
105
+ - Never leak a stack trace, a query, a connection string, or an internal
106
+ path into a response body. Log the detail, return the minimum.
107
+ - One `onError` handler. Handlers do not format errors themselves.
108
+
109
+ ## Security
110
+
111
+ - Validate every input at the boundary. Zod is already there.
112
+ - Parameterized queries only. No string-built SQL, ever.
113
+ - Authorize on the route, not in a helper someone can forget to call.
114
+ - Secrets come from the environment and are validated in `env.ts`. A
115
+ missing one kills the process at boot with a readable message — never a
116
+ confusing null at 3am.
117
+ - No secret reaches a log line or a response.
118
+
119
+ ## Testing
120
+
121
+ **Integration-first.** The primary test drives the real app object through
122
+ `app.request()`. No server, no network, and one test covers routing,
123
+ validation, the handler, serialisation, and the error shape — the parts
124
+ that actually break.
125
+
126
+ Unit tests are for pure logic with real branching. Do not unit test a
127
+ function that only forwards.
128
+
129
+ - **Never mock our own code.** Mock the true edges only: outbound HTTP,
130
+ the clock, randomness, the database driver.
131
+ - **Every endpoint has four tests minimum:** happy path, validation
132
+ failure, authorization failure, and the error shape.
133
+ - **The Dependabot rule.** If one of our functions calls a third-party
134
+ library, that function has a test. When a bump changes behavior, the
135
+ suite must go red — that is what makes a green build a merge signal.
136
+
137
+ ### Coverage
138
+
139
+ 100% on lines, functions, branches, and statements, **enforced** by
140
+ `vitest.config.ts`. A drop fails the run.
141
+
142
+ `src/index.ts` is excluded because it only binds a port. Any other
143
+ exclusion needs a comment saying why, and "hard to test" is not a why —
144
+ that is usually the design telling you something.
145
+
146
+ ## Code conventions
147
+
148
+ - Named exports. No default exports — they rename themselves at each
149
+ import site.
150
+ - `type` for shapes, `interface` only when declaration merging is needed.
151
+ - No `any`. `unknown` at boundaries, then narrow.
152
+ - Functions return data or throw. No `{ ok, error }` tuples mixed with
153
+ exceptions in the same codebase.
154
+ - Files are named after what they export, lowercase with dashes.
155
+ - No barrel file inside `src/` — they create import cycles in a server.
156
+
157
+ ## Memory — one process, every request
158
+
159
+ A server is the process that stays up. Anything that grows with uptime
160
+ instead of with load is a leak, and a leak in a server is an outage on a
161
+ schedule.
162
+
163
+ - Per-request data lives in the request — `c.set` / `c.get` on the context —
164
+ never in a module-level variable. A module-level `Map` keyed by request or
165
+ by user is the classic server leak; it is also a cross-request data leak.
166
+ - A cache is bounded, always: a maximum size and a TTL, and a comment
167
+ saying what evicts it. `.claude/rules/performance.orchestra.md` asks for
168
+ the lifetime beside the cache; here the reason is that the process never
169
+ restarts to forget.
170
+ - Large bodies are streamed, in and out. Buffering a response to send it
171
+ makes peak memory proportional to the largest caller, and `bodyLimit` from
172
+ `hono/body-limit` on every route that accepts a body is what keeps the
173
+ largest caller from being an attacker.
174
+ - Every timer, interval and listener started at boot is cleared on
175
+ shutdown, so a graceful restart is graceful.
176
+ - The pool has a ceiling. A connection per request under load is the same
177
+ outage as no limit.
178
+ - `--max-old-space-size` is a diagnosis, not a fix. Raising it moves the
179
+ out-of-memory later; it does not remove the reference that causes it.
180
+ - **Test it:** a route test that hits the endpoint a few thousand times and
181
+ asserts `process.memoryUsage().heapUsed` after a forced collection is
182
+ within a bound of where it started. It is the only test that fails on a
183
+ leak instead of a crash report.
184
+
185
+ ## Before every commit
186
+
187
+ The repo-root pre-commit gate runs `scripts/verify.sh`: typecheck, lint,
188
+ then tests, stopping at the first failure. It is not optional and it is
189
+ not `--no-verify`. If it is slow, make the tests fast — do not skip the
190
+ gate.
191
+
192
+ ## Tooling
193
+
194
+ Biome for lint and format — no ESLint, no Prettier. TypeScript strict with
195
+ `noUncheckedIndexedAccess`. Vitest with coverage thresholds enforced.
@@ -0,0 +1,13 @@
1
+ Scaffold a new Android design system component.
2
+
3
+ Usage: `/android:component {Name}`
4
+
5
+ 1. Load the `design-component` skill and follow it.
6
+ 2. Confirm every value has a token. Missing one? Add it to `Tokens.kt` or
7
+ the theme first — never hardcode.
8
+ 3. Create the package under `designsystem/src/main/kotlin/` and the
9
+ matching test.
10
+ 4. New dependency? Add it to `gradle/libs.versions.toml`, never inline in a
11
+ build file.
12
+ 5. Run `./gradlew :designsystem:test` and the Compose UI tests.
13
+ 6. Report the a11y checklist with each item checked or flagged.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: design-component
3
+ description: "Author a Compose component in the Android design system — package layout, tokens, screenshot and behavior tests, accessibility. Use for work in the designsystem module."
4
+ ---
5
+
6
+ # Authoring an Android design system component
7
+
8
+ ## Package
9
+
10
+ ```
11
+ designsystem/src/main/kotlin/{name}/
12
+ └── {Name}.kt
13
+ designsystem/src/test/kotlin/{name}/
14
+ └── {Name}Test.kt
15
+ ```
16
+
17
+ ## Before writing
18
+
19
+ 1. Does a token exist for every value you need? If not, add it to
20
+ `Tokens.kt` or the theme first. Never hardcode a `Color(0xFF…)` or a
21
+ bare `16.dp`.
22
+ 2. Build it from `androidx.compose.foundation`. We do not use Material3
23
+ components — the kit is ours. Foundation is the substrate, not a UI kit.
24
+ 3. Does this need to know anything about the product? If yes, it does not
25
+ belong in `designsystem`.
26
+
27
+ ## API
28
+
29
+ - Accept a `Modifier` as the first optional parameter and apply it to the
30
+ root. A composable that ignores `Modifier` is unusable by callers.
31
+ - Variants as a sealed type or enum, not booleans that can contradict.
32
+ - Slot APIs (`content: @Composable () -> Unit`) over fixed `String`
33
+ parameters where a caller might want more.
34
+ - Hoist state. The component renders what it is given.
35
+
36
+ ## Tests
37
+
38
+ Behavior first, screenshot second.
39
+
40
+ - Compose UI tests: click fires, disabled does not, state renders.
41
+ - Paparazzi screenshots in light, dark, and the largest font scale.
42
+ - If the component wraps a dependency, test *our* wrapper so a version bump
43
+ that changes behavior turns the suite red.
44
+
45
+ ## Accessibility checklist
46
+
47
+ - [ ] content description on meaningful elements
48
+ - [ ] `null` content description on purely decorative ones
49
+ - [ ] touch target at least 48x48dp
50
+ - [ ] TalkBack order sensible, not merely complete
51
+ - [ ] layout survives the largest font scale
52
+ - [ ] contrast holds in light and dark
53
+ - [ ] state (selected, disabled, checked) exposed via semantics
54
+
55
+ ## Done means
56
+
57
+ Composable, tests in all three configurations, and the a11y checklist —
58
+ each item explicitly checked or flagged.