@openora/create 0.4.1-canary.39 → 0.4.1-canary.390
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/dist/.tsbuildinfo +1 -1
- package/dist/generated/versions.d.ts +11 -0
- package/dist/generated/versions.d.ts.map +1 -0
- package/dist/generated/versions.js +11 -0
- package/dist/generated/versions.js.map +1 -0
- package/dist/index.js +48 -93
- package/dist/index.js.map +1 -1
- package/dist/render.d.ts +15 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +125 -0
- package/dist/render.js.map +1 -0
- package/package.json +8 -6
- package/template/README.md.tpl +12 -7
- package/template/__dot__claude/settings.json.tpl +22 -12
- package/template/__dot__env.example +10 -0
- package/template/__dot__gitignore +5 -0
- package/template/__dot__rulesync/commands/check.md +11 -10
- package/template/__dot__rulesync/commands/doctor.md.tpl +17 -0
- package/template/__dot__rulesync/commands/scaffold-module.md +3 -2
- package/template/__dot__rulesync/commands/scaffold-plugin.md +23 -4
- package/template/__dot__rulesync/commands/scaffold-route.md +1 -0
- package/template/__dot__rulesync/commands/start.md +2 -2
- package/template/__dot__rulesync/hooks/_shared.mjs +26 -13
- package/template/__dot__rulesync/hooks/guard-core.mjs.tpl +76 -28
- package/template/__dot__rulesync/hooks/guard-generated.mjs +15 -13
- package/template/__dot__rulesync/hooks/guard-mr.mjs +81 -0
- package/template/__dot__rulesync/hooks/guard-subagent.mjs +22 -6
- package/template/__dot__rulesync/hooks/post-edit.mjs.tpl +116 -0
- package/template/__dot__rulesync/hooks.json +27 -4
- package/template/__dot__rulesync/rules/conventions.md +99 -119
- package/template/__dot__rulesync/rules/db-conventions.md +6 -72
- package/template/__dot__rulesync/rules/e2e-conventions.md +33 -7
- package/template/__dot__rulesync/rules/frontend-conventions.md.tpl +35 -0
- package/template/__dot__rulesync/rules/oss-boundaries.md.tpl +78 -0
- package/template/__dot__rulesync/rules/overview.md +19 -82
- package/template/__dot__rulesync/skills/create-plugin/{SKILL.md → SKILL.md.tpl} +12 -23
- package/template/__dot__rulesync/skills/create-pr/SKILL.md.tpl +37 -0
- package/template/__dot__rulesync/skills/create-task/SKILL.md.tpl +96 -0
- package/template/__dot__rulesync/skills/create-ui-module/{SKILL.md → SKILL.md.tpl} +12 -10
- package/template/__dot__rulesync/skills/enhance-prompt/{SKILL.md → SKILL.md.tpl} +4 -4
- package/template/__dot__rulesync/skills/handoff/SKILL.md +4 -3
- package/template/__dot__rulesync/skills/review/SKILL.md.tpl +277 -0
- package/template/__dot__rulesync/skills/ship/SKILL.md.tpl +157 -0
- package/template/__dot__rulesync/skills/ship/handoff.md.tpl +48 -0
- package/template/__dot__rulesync/skills/ship/watch-pr.mjs +172 -0
- package/template/__dot__rulesync/skills/ui-verify/SKILL.md.tpl +120 -0
- package/template/__dot__rulesync/skills/ui-verify/layout-check.check.sh +58 -0
- package/template/__dot__rulesync/skills/ui-verify/layout-check.js +163 -0
- package/template/__dot__rulesync/subagents/builder.md.tpl +116 -0
- package/template/__dot__rulesync/subagents/compliance-reviewer.md +79 -0
- package/template/__dot__rulesync/subagents/debugger.md.tpl +89 -0
- package/template/__dot__rulesync/subagents/deployer.md.tpl +55 -0
- package/template/__dot__rulesync/subagents/expert.md +29 -34
- package/template/__dot__rulesync/subagents/planner.md.tpl +40 -0
- package/template/__dot__rulesync/subagents/quality-reviewer.md.tpl +113 -0
- package/template/__dot__rulesync/subagents/security-reviewer.md.tpl +86 -0
- package/template/__dot__rulesync/subagents/tester.md.tpl +103 -0
- package/template/__dot__rulesync/sync.json.tpl +26 -0
- package/template/apps/api/package.json.tpl +2 -2
- package/template/apps/api/src/extensions.config.ts.tpl +12 -0
- package/template/apps/api/src/main.ts.tpl +1 -4
- package/template/apps/api/src/seed.ts.tpl +8 -1
- package/template/docker-compose.yml +13 -0
- package/template/docs/agents/cross-repo.md.tpl +37 -0
- package/template/docs/agents/forge.md.tpl +54 -0
- package/template/docs/agents/issue-tracker.md.tpl +42 -0
- package/template/docs/standards/comments.md +16 -0
- package/template/docs/standards/database.md +77 -0
- package/template/docs/standards/enforcement.md +12 -0
- package/template/docs/standards/errors.md +30 -0
- package/template/docs/standards/frontend.md +60 -0
- package/template/docs/standards/functions.md +38 -0
- package/template/docs/standards/git-delivery.md +20 -0
- package/template/docs/standards/module-structure.md +37 -0
- package/template/docs/standards/testing.md +91 -0
- package/template/docs/standards/types.md +31 -0
- package/template/package.json.tpl +16 -10
- package/template/pnpm-workspace.yaml.tpl +6 -0
- package/template/rulesync.jsonc +3 -3
- package/template/tools/oss-worktree.mjs.tpl +105 -0
- package/template/tools/review-precheck.mjs +531 -0
- package/template/tools/sync-agents.mjs +257 -0
- package/dist/generated/core-version.d.ts +0 -2
- package/dist/generated/core-version.d.ts.map +0 -1
- package/dist/generated/core-version.js +0 -2
- package/dist/generated/core-version.js.map +0 -1
- package/template/__dot__rulesync/commands/doctor.md +0 -16
- package/template/__dot__rulesync/hooks/post-edit.mjs +0 -57
- package/template/__dot__rulesync/rules/oss-boundaries.md +0 -31
- package/template/__dot__rulesync/skills/add-feature/SKILL.md +0 -113
- package/template/__dot__rulesync/skills/add-feature/handoff.md +0 -58
- package/template/__dot__rulesync/skills/create-pr/SKILL.md +0 -55
- package/template/__dot__rulesync/skills/create-task/SKILL.md +0 -77
- package/template/__dot__rulesync/skills/review/SKILL.md +0 -110
- package/template/__dot__rulesync/subagents/builder.md +0 -93
- package/template/__dot__rulesync/subagents/debugger.md +0 -82
- package/template/__dot__rulesync/subagents/deployer.md +0 -66
- package/template/__dot__rulesync/subagents/qa.md +0 -88
- package/template/__dot__rulesync/subagents/quality-reviewer.md +0 -67
- package/template/__dot__rulesync/subagents/security-reviewer.md +0 -54
|
@@ -8,94 +8,31 @@ globs:
|
|
|
8
8
|
|
|
9
9
|
# Agent instructions
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
this repo. Every per-tool instruction file (`AGENTS.md` - shared, also Codex's brief;
|
|
13
|
-
`CLAUDE.md`; `.github/copilot-instructions.md`) plus Codex's `.codex/config.toml` and the
|
|
14
|
-
subagent and command mirrors are generated by
|
|
15
|
-
[rulesync](https://github.com/dyoshikawa/rulesync) from the single source in `.rulesync/`
|
|
16
|
-
(`rules/`, `subagents/`, `commands/`, `mcp.json`). Edit the source under `.rulesync/`, then
|
|
17
|
-
run `pnpm gen:agents`. Do not hand-edit the generated files.
|
|
11
|
+
This repo is a downstream igaming operator built on the OSS platform (`@openora/*`). Every per-tool instruction file (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.codex/config.toml`) and the subagent and command mirrors are generated by [rulesync](https://github.com/dyoshikawa/rulesync) from `.rulesync/`. Edit the source, run `pnpm gen:agents`, never hand-edit a generated file.
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
Sibling rules (load on demand; don't reopen settled questions):
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
- `conventions` - the always-on code standard, with a table routing each kind of change to its deep-dive file in `docs/standards/`.
|
|
16
|
+
- `oss-boundaries` - never patch `@openora/*` in place; core changes go through an OSS worktree; enforced import/module boundaries.
|
|
17
|
+
- `e2e-conventions` - Playwright specs against the real stack, fixtures, page objects, API specs.
|
|
18
|
+
- `db-conventions` - SQL / Drizzle rules for the tables an overlay owns.
|
|
19
|
+
- `frontend-conventions` - React/UI rules for the operator's apps and shared UI package.
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
- `oss-boundaries` - OSS core is read-only; enforced import/module boundaries.
|
|
25
|
-
- `db-conventions` - SQL / Drizzle rules for tables an overlay owns.
|
|
26
|
-
- `e2e-conventions` - dual-mode Playwright specs, fixtures, mocks, page objects.
|
|
21
|
+
## Agent files: generated from the template, or owned here
|
|
27
22
|
|
|
28
|
-
|
|
23
|
+
Most of `.rulesync/` (skills, subagents, commands, hooks, the shared rules) and `docs/standards/` are generated: `pnpm install` renders them from `@openora/create`'s consumer template at the pinned `@openora/*` version, using the variables in `.rulesync/sync.json`. They are gitignored via the managed `synced-agents` block in `.gitignore`, so they never appear in a diff and cannot drift - editing one locally is pointless, the next install overwrites it. Change it upstream in the template instead. This repo owns and tracks the rules and skills the template does not ship, plus the `consumerOwned` overrides in `.rulesync/sync.json`; operator-specific facts belong there or in `sync.json` vars.
|
|
29
24
|
|
|
30
|
-
|
|
25
|
+
## How you work here
|
|
31
26
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
## Getting started
|
|
38
|
-
|
|
39
|
-
When the user opens Claude Code or asks to build something, call the `start` MCP tool (server: `oss`) and follow the script it returns.
|
|
40
|
-
|
|
41
|
-
Trigger phrases: "start", "help", "what can I build", "what can I do", "I want to build X", "how do I begin", "getting started".
|
|
42
|
-
|
|
43
|
-
## Enhance the ask first (pre-step)
|
|
44
|
-
|
|
45
|
-
Before acting on any non-trivial request - and before delegating to an agent - run the `enhance-prompt` skill on the raw ask: restate the intent, gather scoped context (your tracker / roadmap / team chat / local docs), surface the blocking ambiguities, and produce the brief you actually execute. Skip it only when the ask is already precise. Subagents act on the brief they are handed - they do not re-enhance it.
|
|
46
|
-
|
|
47
|
-
## How you work here: collect requirements, delegate everything else
|
|
48
|
-
|
|
49
|
-
Your one human-facing job is to **gather thorough requirements** from the user - interview them (goal, actors, value flow, rules, lifecycle, compliance, UI, edge cases, success criteria, out of scope) until you could hand a stranger a buildable spec. The `start` / `enhance-intent` tools give you the checklist.
|
|
50
|
-
|
|
51
|
-
Once requirements are confirmed, **delegate the rest to the agents** via the Task tool - you orchestrate, you do not implement feature code yourself:
|
|
52
|
-
|
|
53
|
-
1. `expert` - formalizes the requirements into acceptance criteria, flags compliance/gaps.
|
|
54
|
-
2. `builder` - implements (`pnpm gen ...`, code, wiring).
|
|
55
|
-
3. `qa` - writes/runs the E2E test against the acceptance criteria.
|
|
56
|
-
|
|
57
|
-
Only return to the user to resolve genuine decisions they alone can make.
|
|
27
|
+
- Before acting on a non-trivial request, and before delegating, run the `enhance-prompt` skill on the raw ask. Skip it only when the ask is already precise. Subagents act on the brief they are handed; they do not re-enhance it.
|
|
28
|
+
- Your human-facing job is gathering requirements until a stranger could build from them; the `start` / `enhance-intent` MCP tools give the checklist. Then delegate to the subagents (`expert` -> `builder` -> `tester`) and return to the user only for decisions they alone can make.
|
|
29
|
+
- Core lookups go through the `oss` MCP before reading `@openora/*` source (load it with ToolSearch `+oss`): `describe-module <id>` gives a module's tables, routes, events and the seams it binds or reads; `list-adapters` / `list-events` take a `query`; `schema-get <name>` finds a Zod contract's file; `find-usages names=[...]` replaces grepping core, and `get-symbol names=[...]` (`Owner.method` for a method) prints definitions instead of whole files, as an outline when long; pass every name in one call. Then read only what they point at.
|
|
30
|
+
- A task that names a ticket key starts by reading the whole ticket per `docs/agents/issue-tracker.md`. Never write to the tracker unless the user asks for that exact write.
|
|
31
|
+
- `pnpm verify` on the committed tree is the gate before a merge/pull request; the `guard-mr` hook refuses to open one until it has passed on HEAD.
|
|
58
32
|
|
|
59
33
|
## What this repo is
|
|
60
34
|
|
|
61
|
-
- `apps/api/` - thin Hono + oRPC API entry, your own `extensions.config.ts
|
|
62
|
-
-
|
|
63
|
-
- `@openora/*` packages are
|
|
64
|
-
|
|
65
|
-
## How to extend
|
|
66
|
-
|
|
67
|
-
| What you want | Command |
|
|
68
|
-
| -------------------------------------------- | ------------------ |
|
|
69
|
-
| New behavior / routes | `pnpm gen plugin` |
|
|
70
|
-
| Swap a vendor (payment / KYC / notification) | `pnpm gen adapter` |
|
|
71
|
-
|
|
72
|
-
Register new plugins in `apps/api/src/extensions.config.ts`. Adapters must be listed AFTER the module that owns the default binding (last registration of a DI token wins).
|
|
73
|
-
|
|
74
|
-
## Agents (spawn via the Task tool)
|
|
75
|
-
|
|
76
|
-
Delegate work to these scoped agents - the `start` / `enhance-intent` playbooks tell you when to use each:
|
|
77
|
-
|
|
78
|
-
- `expert` - turns a fuzzy product ask into requirements + acceptance criteria (jurisdiction rules, player journey). Advisory, writes no code. Use BEFORE building anything non-obvious.
|
|
79
|
-
- `builder` - senior fullstack engineer. Implements overlays, swaps adapters, mounts UI pages.
|
|
80
|
-
- `qa` - writes/runs Playwright E2E tests; triages whether a bug is in OSS core (upstream) or your overlay (local fix).
|
|
81
|
-
- `debugger` - root-causes failures, build-time (Next/Turbopack, tsc, module resolution) and runtime (Chrome DevTools: console/network/DOM). Spawn it whenever something errors or behaves wrong; it finds the cause and routes the fix.
|
|
82
|
-
- `quality-reviewer` - reviews a diff: boundaries, conventions, frontend rules, perf, duplication. Findings only.
|
|
83
|
-
- `security-reviewer` - reviews a diff: authz, secrets/PII, money paths, input validation. Findings only.
|
|
84
|
-
|
|
85
|
-
This repo consumes OSS core as linked packages - never edit `@openora/*` source. If a bug is in core, report it upstream; extend from the outside via plugins.
|
|
86
|
-
|
|
87
|
-
## MCP tools available (server: `oss`)
|
|
88
|
-
|
|
89
|
-
This server reads the platform CATALOG (not OSS source) - it tells you what exists so you extend without forking. Call these instead of grepping:
|
|
90
|
-
|
|
91
|
-
- `start` - onboarding flow (call when the user asks what to build)
|
|
92
|
-
- `enhance-intent` - turn a fuzzy ask into a grounded spec + playbook
|
|
93
|
-
- `dev:infra` - start/stop/status docker compose (postgres :5432)
|
|
94
|
-
- `catalog-overview` - START HERE: counts + adapter seams + config fields
|
|
95
|
-
- `list-adapters` - vendor swap seams (interface + token + status)
|
|
96
|
-
- `list-routes [module]` - oRPC route namespaces
|
|
97
|
-
- `list-events` - cross-module domain events you can subscribe to
|
|
98
|
-
- `list-slots` - named UI slots you can fill from a UI plugin
|
|
99
|
-
- `describe-module <name>` - one module's group, tables, routes
|
|
100
|
-
- `schema-get <name>` - locate a Zod contract schema's file
|
|
101
|
-
- `get-config-schema` - the igaming-config fields a consumer can set
|
|
35
|
+
- `apps/api/` - thin Hono + oRPC API entry, your own `extensions.config.ts`.
|
|
36
|
+
- This is a headless API consumer; build your frontend in its own repo and consume the API over HTTP via `@openora/react`.
|
|
37
|
+
- `@openora/*` packages are pinned npm dependencies.
|
|
38
|
+
- New behaviour, a vendor swap or a mounted page: the `create-plugin` skill picks the generator.
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-plugin
|
|
3
|
-
|
|
3
|
+
targets: ['*']
|
|
4
4
|
description: >
|
|
5
|
-
Guided creation of
|
|
5
|
+
Guided creation of a {{name}} extension - the right way to add behavior or swap a vendor without
|
|
6
6
|
touching `@openora/*` core. Interviews for intent, classifies the seam (plugin / adapter /
|
|
7
7
|
page / route), runs the matching scaffold command, wires extensions.config.ts, and enforces
|
|
8
8
|
boundaries + audit + db rules. Use on "create plugin", "add an extension", "swap KYC/PSP",
|
|
9
9
|
"mount a page", "/create-plugin <name>".
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
# create-plugin
|
|
12
|
+
# create-plugin ({{name}})
|
|
13
13
|
|
|
14
|
-
The platform is extended from the **outside only** (overlay plugin / adapter rebind / UI page /
|
|
15
|
-
config) - never by editing `@openora/*`. This skill picks the correct seam and scaffolds it.
|
|
16
|
-
Domain questions go to `expert` first; review the result with `review`.
|
|
14
|
+
The platform is extended from the **outside only** (overlay plugin / adapter rebind / UI page / config) - never by editing `@openora/*`. This skill picks the correct seam and scaffolds it. Domain questions go to `expert` first; review the result with `review`.
|
|
17
15
|
|
|
18
16
|
## 1. Classify the seam (ask if unclear)
|
|
19
17
|
|
|
@@ -24,23 +22,17 @@ Domain questions go to `expert` first; review the result with `review`.
|
|
|
24
22
|
| Mount a react-sdk page on a route | page | `pnpm gen page <route>` |
|
|
25
23
|
| Add one route to an existing add-on/overlay | route | `/scaffold-route <add-on> <METHOD> <path>` |
|
|
26
24
|
|
|
27
|
-
If the behavior genuinely cannot be expressed from the outside, STOP - it's an OSS-core change.
|
|
28
|
-
Hand off via the `add-feature` skill's `handoff.md`. Do not patch the linked OSS checkout.
|
|
25
|
+
If the behavior genuinely cannot be expressed from the outside, STOP - it's an OSS-core change. Hand off via the `ship` skill's `handoff.md`. Never patch `{{ossDir}}`.
|
|
29
26
|
|
|
30
27
|
## 2. Ground first
|
|
31
28
|
|
|
32
|
-
- Read
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
default binding to swap), `list-routes` (collision check), `list-slots`, `list-events`.
|
|
36
|
-
- For a domain rule you can't safely assume (a limit, a KYC threshold, a jurisdiction behavior),
|
|
37
|
-
spawn `expert` before scaffolding.
|
|
29
|
+
- Read `CLAUDE.md` / `AGENTS.md` (the rendered `overview` rule: what you may and may not touch), `.claude/rules/oss-boundaries.md`, and `.claude/rules/db-conventions.md` + `docs/standards/database.md` (if the extension owns tables).
|
|
30
|
+
- Inspect what already exists with the `oss` MCP: `catalog-overview`, `list-adapters` (token + default binding to swap), `list-routes` (collision check), `list-slots`, `list-events`.
|
|
31
|
+
- For a domain rule you can't safely assume (a limit, a KYC threshold, a jurisdiction behavior), spawn `expert` before scaffolding.
|
|
38
32
|
|
|
39
33
|
## 3. Scaffold + wire
|
|
40
34
|
|
|
41
|
-
Run the command from step 1, then fill the `// AGENT: implement here` regions. Register the plugin
|
|
42
|
-
in `apps/api/src/extensions.config.ts`. **Order matters for adapters** - last registration of a DI
|
|
43
|
-
token wins, so list a swap AFTER the module that owns the default binding.
|
|
35
|
+
Run the command from step 1, then fill the `// AGENT: implement here` regions. Register the plugin in `apps/api/src/extensions.config.ts`. **Order matters for adapters** - last registration of a DI token wins, so list a swap AFTER the module that owns the default binding.
|
|
44
36
|
|
|
45
37
|
```ts
|
|
46
38
|
// good - swap binds after the owning module, so it replaces the default
|
|
@@ -52,12 +44,9 @@ plugins: [myCustomPspAdapter, walletModule];
|
|
|
52
44
|
|
|
53
45
|
## 4. Non-negotiables
|
|
54
46
|
|
|
55
|
-
- **Boundaries**: import only package entrypoints (`@openora/core`, not `.../src` or `.../dist`).
|
|
56
|
-
|
|
57
|
-
- **
|
|
58
|
-
`timestamp({ withTimezone: true })`). Run `pnpm db:migrate` after.
|
|
59
|
-
- **Audit every mutation**: each state-changing action emits a domain event the `audit` add-on
|
|
60
|
-
subscribes to, or resolves `AUDIT_WRITER` and calls `record(...)`. A mutation with no audit is not done.
|
|
47
|
+
- **Boundaries**: import only package entrypoints (`@openora/core`, not `.../src` or `.../dist`). No imports between extensions; cross-extension data goes through the oRPC client or a schema subpath.
|
|
48
|
+
- **Tables**: live in the overlay's own `src/schema/index.ts`; follow `docs/standards/database.md` (snake_case, `timestamp({ withTimezone: true })`). Run `pnpm db:migrate` after.
|
|
49
|
+
- **Audit every mutation**: each state-changing action emits a domain event the `audit` add-on subscribes to, or resolves `AUDIT_WRITER` and calls `record(...)`. A mutation with no audit is not done.
|
|
61
50
|
- **Validate at the edge**: Zod schemas for every route input/output; no inline `fetch`/SQL in handlers.
|
|
62
51
|
|
|
63
52
|
## 5. Verify
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-pr
|
|
3
|
+
targets: ['*']
|
|
4
|
+
description: Commit, push, and open a pull request on this repo's forge, targeting the branch `docs/agents/forge.md` names. Use on "create pr", "create mr", "open a pr/mr", "/create-pr", or "promote <branch>".
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# create-pr ({{name}})
|
|
8
|
+
|
|
9
|
+
`docs/agents/forge.md` is the source of truth for this repo's forge: which CLI to use, how to open and read a pull request, and where a change lands. Read it first - the steps below never hardcode a forge command.
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. **Determine source + target.** `git branch --show-current`, then take the target from the "Where a change lands" section of `docs/agents/forge.md`.
|
|
14
|
+
2. **Land the paired OSS change first, if there is one.** It is paired when `{{ossDir}}/.worktrees/<branch, / as +>` exists or `git -C {{ossDir}} branch --list <branch>` matches. First finish step 3 of "Changing OSS core" in the `oss-boundaries` rule (verify, OSS review, no open BLOCK). Then run steps 3-7 inside that worktree under the OSS repo's own delivery rules (`<worktree>/docs/standards/skills/delivery.md`: `gh`, its PR template, `pnpm verify`, public-record rules), with its own explicit push confirmation. Reuse an open OSS PR (`gh pr list --head <branch>` in the worktree).
|
|
15
|
+
3. **Scope the commit.** `git status -s`. Commit ONLY changes that belong to this unit of work. If unrelated/pre-existing edits are present, do NOT bundle them - stage your files explicitly and tell the user what you left out. Never `git add -A` blindly when foreign changes are in the tree.
|
|
16
|
+
4. **Commit.** Conventional-commit message (`feat:`, `fix:`, `docs:`, `refactor:`, `chore:`); the scope is a commitlint-enum package or app, never the ticket key; for ticket work the key goes at the END of the subject (e.g. `feat(web): add deposit limits ({{trackerKey}}-123)`). No "Co-Authored-By" / "Generated with" trailers.
|
|
17
|
+
5. **Verify the commit.** Run `pnpm verify` on the committed, clean tree: it is the pre-MR gate and records the verified commit. The `guard-mr` hook refuses to open the pull request until that record matches HEAD. Don't push a red tree.
|
|
18
|
+
6. **Push** the current branch - but STOP and get an explicit per-action "yes push" from the user FIRST. The one exception: run by `ship` without `--ask`, the `/ship` invocation is that yes for its ticket branch only. Report the commit SHA, then ask. Invoking this skill is NOT push authorization. Pushing to a shared/env branch (`{{mrTarget}}`, `stage`, `prod`) without that explicit yes is forbidden. Only after the yes: `git push -u origin <current>`.
|
|
19
|
+
7. **Open the pull request** using the command in `docs/agents/forge.md` (only after the push is confirmed and done). Reuse an open request for the same source -> target instead of creating a duplicate, and never delete a long-lived branch on merge.
|
|
20
|
+
8. **Report** the pull-request URL back to the user, and the OSS PR URL when paired.
|
|
21
|
+
|
|
22
|
+
## Pull-request description
|
|
23
|
+
|
|
24
|
+
- State the user-facing change and its reason briefly.
|
|
25
|
+
- Add short, reproducible local test steps for the changed behavior (for example, `pnpm dev` then the relevant URLs or user flow).
|
|
26
|
+
- Close the ticket by key at the end: `Closes <KEY>-n` if this PR finishes it, else `Refs <KEY>-n` (see `docs/agents/issue-tracker.md`).
|
|
27
|
+
- Do not include a generic verification-command list: CI already reports those checks.
|
|
28
|
+
- **Attach the manual-verification evidence.** The videos are what a reviewer reads as proof of a user-visible change: one short clip per acceptance criterion, embedded under that criterion, the before/after pair on a fix. A screenshot only where a clip adds nothing, such as a second theme. Upload each file to the forge and embed the markdown it returns - `docs/agents/forge.md` says how (its "Attach evidence" section). A local path under `apps/e2e/test-results/` shows a reviewer nothing; never put one in a description. An API-only change attaches the request/response trace instead. Paste the `tester` pass's verdict table next to it. Skip this only when nothing user-visible changed.
|
|
29
|
+
- **Diagram the flow.** A change that adds or changes a flow across components (a request path through gates and a vendor, a state machine, an async job or webhook, a new module or overlay) embeds a fenced `mermaid` block (`flowchart` or `sequenceDiagram`), right after the summary - GitHub and GitLab both render it. Name nodes as the code does, keep it under ~15 nodes, include the refusal and failure branches. No flow (copy, styling, deps, a one-file fix): no diagram.
|
|
30
|
+
- A paired change links neither way: the shared branch name pairs the two requests. The OSS repo is public, so its PR never names this repo or the operator; this request may be read by people outside the team, so it never names or links the OSS repo.
|
|
31
|
+
|
|
32
|
+
## Rules
|
|
33
|
+
|
|
34
|
+
- NEVER push without an explicit per-action "yes push" from the user (or `/ship` on its ticket branch, see step 6). Invoking this skill does NOT authorize a push. Report the commit SHA, ask, then push only on yes.
|
|
35
|
+
- `pnpm verify` must pass on the commit you push.
|
|
36
|
+
- Keep the pull request scoped to one concern; split unrelated changes into separate ones.
|
|
37
|
+
- No AI-attribution trailers anywhere - not in the commit, not in the pull-request title or description. No "Generated with", no "Co-Authored-By: Claude", no robot-emoji footer.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-task
|
|
3
|
+
targets: ['*']
|
|
4
|
+
description: Create or rewrite this operator's Jira tickets in a lean, bulleted, easy-to-scan format, from a wiki spec page, a design prototype, or plain notes. Use on "create task", "new ticket", "rewrite ticket", "turn this into Jira issues", "break this feature down in Jira", "/create-task", or any {{trackerKey}}-XXX description work.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# create-task ({{name}})
|
|
8
|
+
|
|
9
|
+
Template and clean up Jira tickets for this operator's project so they are short, scannable, and free of filler. Use for new tasks, for breaking a spec or design into issues, and for rewriting bloated ones.
|
|
10
|
+
|
|
11
|
+
## Jira coordinates
|
|
12
|
+
|
|
13
|
+
- Tool: the **Atlassian** MCP - read the issue, create/edit the issue.
|
|
14
|
+
- `cloudId`: `{{jiraCloudId}}` (`{{jiraSite}}`)
|
|
15
|
+
- Project key: `{{trackerKey}}` (ticket keys look like `{{trackerKey}}-XXX`)
|
|
16
|
+
- Always pass `contentFormat: "markdown"` and `responseContentFormat: "markdown"`, except for checkable acceptance criteria (see gotchas).
|
|
17
|
+
- Epic link: the standard `parent` field (`parent: { key: "<EPIC-KEY>" }`), not the deprecated Epic Link custom field.
|
|
18
|
+
|
|
19
|
+
## Issue type
|
|
20
|
+
|
|
21
|
+
| Type | When |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Epic | One per module spec page. Description empty. Confirm with the user before creating one. |
|
|
24
|
+
| Story | One per sub-feature, or per distinct flow or command inside it. The common case. |
|
|
25
|
+
| Task | Small freestanding work: bugfix, config change, provider swap, spike. Also a shipped feature that drifted from its design. |
|
|
26
|
+
|
|
27
|
+
No sub-tasks, sprints, or test links: other processes own those. Leave assignee unset and priority at the project default unless the user says otherwise.
|
|
28
|
+
|
|
29
|
+
## Source rules
|
|
30
|
+
|
|
31
|
+
- **Wiki page** (`{{wikiSpace}}` space): read it whole per `docs/agents/issue-tracker.md`, images and comments included. Pull scenarios, rules, limits, and role names from the page; never invent them. Link the page.
|
|
32
|
+
- **Design prototype** (URL or screenshot): acceptance criteria cover only what is visible - layout, states, copy, controls. Rules the design cannot show (limits, validation, rate caps) go to **Open questions**, not criteria.
|
|
33
|
+
- **Plain notes**: feature-sized -> full template, ask for what you would normally read from a spec. Small -> Task with **Goal** + **Tasks** only.
|
|
34
|
+
- Anything you filled in from judgement is listed under **Open questions** in chat, never asserted as a criterion.
|
|
35
|
+
- Unsure whether it is a Task or a Story: ask. The wrong one buries a feature in a one-liner or pads a bugfix with empty sections.
|
|
36
|
+
|
|
37
|
+
## Writing rules
|
|
38
|
+
|
|
39
|
+
- Lead with **Goal** (1-2 lines). Reader should get the point in 5 seconds.
|
|
40
|
+
- Everything else is **bullets**. No long prose paragraphs.
|
|
41
|
+
- Cut: progress logs, "we decided to instead", history, anything not actionable. State the current decision, not how we got there.
|
|
42
|
+
- Short dashes `-` only, never long dashes. ASCII only.
|
|
43
|
+
- Use `->` for flows, `x3` for counts, backticks for commands/env vars/paths.
|
|
44
|
+
- Acceptance criteria are flat statements with real values: "Player can send a message (max 500 characters)", not "should be able to".
|
|
45
|
+
- Name the owner-confirmed decisions inline with date + who (e.g. "confirmed with <owner> 2026-06-15") so they are not relitigated.
|
|
46
|
+
- Scope tightly. Push anything bigger into a separate ticket and say so in **Out of scope**, citing the real key. Sibling not filed yet: say so in chat, never invent a key.
|
|
47
|
+
|
|
48
|
+
## Jira gotchas
|
|
49
|
+
|
|
50
|
+
- **Markdown checkboxes break.** `- [ ]` renders as literal `\[ \]`. Default to plain `-` bullets. Only when the user asks for checkable criteria: build the whole description as ADF (`heading`, `bulletList`, `taskList` nodes) and send `contentFormat: "adf"`. Each `taskItem` has `state: "TODO"` and every `localId` is a real UUID (`uuidgen`): a short id like `ac-1` saves fine and renders no checkbox. Fetch back with `responseContentFormat: "adf"` and confirm the `taskList` survived.
|
|
51
|
+
- The summary is plain text: `&` or `—` arrive literally.
|
|
52
|
+
- Markdown `##` headings and `**bold**` convert cleanly; tables convert too. Markdown writes need no re-read.
|
|
53
|
+
|
|
54
|
+
## Section template (drop unused sections)
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
## Goal
|
|
58
|
+
|
|
59
|
+
<1-2 lines: what ships and for whom>
|
|
60
|
+
|
|
61
|
+
## Decisions
|
|
62
|
+
|
|
63
|
+
- <key tech/approach choice, with confirmer + date if relevant>
|
|
64
|
+
|
|
65
|
+
## Scope / What to build
|
|
66
|
+
|
|
67
|
+
- <bulleted, concrete>
|
|
68
|
+
|
|
69
|
+
## Tasks
|
|
70
|
+
|
|
71
|
+
- <ordered, each a discrete unit of work>
|
|
72
|
+
|
|
73
|
+
## Links
|
|
74
|
+
|
|
75
|
+
- <spec page, design, vendor docs>
|
|
76
|
+
|
|
77
|
+
## Out of scope
|
|
78
|
+
|
|
79
|
+
<comma list, point to follow-up tickets>
|
|
80
|
+
|
|
81
|
+
## Acceptance criteria
|
|
82
|
+
|
|
83
|
+
- <observable, testable outcomes>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Infra/DevOps tickets: swap **Scope** for **Provision** (services as bullets) + a **One-time bootstrap** section. Cross-cutting infra a module depends on: swap **Out of scope** for **Key assumptions**. Link a prior infra ticket as a worked example if one exists.
|
|
87
|
+
|
|
88
|
+
Spikes (research with no code output): **Context** (what and why) + **Links** + criteria as deliverables ("Compare cost, coverage, integration effort", "Written recommendation", "Client confirms the decision" when sign-off is the end point). Compliance-sensitive spikes (payments, KYC/AML, data handling) name the licence jurisdiction that constrains them.
|
|
89
|
+
|
|
90
|
+
## Flow
|
|
91
|
+
|
|
92
|
+
1. If rewriting: read the issue whole per `docs/agents/issue-tracker.md` (`atlassian-read`; comments and images included) - a rewrite that drops a decision buried in a comment or a screenshot is a regression.
|
|
93
|
+
2. Read the source per **Source rules**, plus any context it references (Slack decision, sibling ticket).
|
|
94
|
+
3. Find the epic: `project = {{trackerKey}} AND issuetype = Epic AND summary ~ "<module>"`. Then list its children (`parent = <EPIC-KEY>`) to see what is already covered and which keys to cross-reference.
|
|
95
|
+
4. Source covers several flows: propose the split (one line per issue) and get a yes before drafting.
|
|
96
|
+
5. Draft in chat with **Open questions** listed separately. Create or edit only after the user confirms. Report the ticket key + URL.
|
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
name: create-ui-module
|
|
3
3
|
targets: ['*']
|
|
4
4
|
description: >
|
|
5
|
-
Create a frontend feature module in apps/backoffice or apps/web following
|
|
6
|
-
|
|
7
|
-
components, barrel entry, route wiring. Use on "create module", "new feature module",
|
|
5
|
+
Create a frontend feature module in apps/backoffice or apps/web following the modular
|
|
6
|
+
architecture in the `frontend-conventions` rule: standard folder shape, co-located
|
|
7
|
+
locales, DI hooks, pure components, barrel entry, route wiring. Use on "create module", "new feature module",
|
|
8
8
|
"add a backoffice/web module", "/create-ui-module <app> <name>".
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# create-ui-module (
|
|
11
|
+
# create-ui-module ({{name}})
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Applies once this repo has UI apps (`apps/web` / `apps/backoffice`); an api-only repo has no `src/modules/` to scaffold into.
|
|
14
|
+
|
|
15
|
+
Scaffold a feature module under `src/modules/<name>/` per the modular architecture in `frontend-conventions` and `docs/standards/frontend.md`. Where the repo ships a module-structure lint rule, it enforces the shape (folder structure, `use-` hook naming, kebab-case files, client-component naming). Copy an existing module in the same app as the reference.
|
|
14
16
|
|
|
15
17
|
## 1. Resolve input
|
|
16
18
|
|
|
@@ -32,7 +34,7 @@ src/modules/<name>/
|
|
|
32
34
|
`locales/index.ts` pattern (exact):
|
|
33
35
|
|
|
34
36
|
```ts
|
|
35
|
-
import { registerTranslations } from '
|
|
37
|
+
import { registerTranslations } from '{{scope}}/ui';
|
|
36
38
|
import en from './en.json';
|
|
37
39
|
|
|
38
40
|
export const locales = { en };
|
|
@@ -43,16 +45,16 @@ Components use `useTranslation(ns)`; no hardcoded copy. Non-`en` files mirror `e
|
|
|
43
45
|
|
|
44
46
|
## 3. Wire the route
|
|
45
47
|
|
|
46
|
-
- backoffice: `src/routes/_authed/<name>.tsx` -> `createFileRoute` with `component` imported from `@/modules/<name
|
|
48
|
+
- backoffice: `src/routes/_authed/<name>.tsx` -> `createFileRoute` with `component` imported from `@/modules/<name>`; mirror a sibling route file.
|
|
47
49
|
- web: the App Router page under `app/(shell)/<name>/` imports from `@/modules/<name>`; client components get `'use client'` line 1 + `.client.tsx` suffix.
|
|
48
50
|
|
|
49
51
|
## 4. Non-negotiables
|
|
50
52
|
|
|
51
53
|
- No cross-module imports - cross-module effects go through query cache invalidation, never a direct import.
|
|
52
54
|
- Outside code imports ONLY the barrel via `@/modules/<name>`; inside the module use relative paths.
|
|
53
|
-
- Hooks take their clients (oRPC/API) as parameters
|
|
54
|
-
- Follow the conventions rule
|
|
55
|
+
- Hooks take their clients (oRPC/API) as parameters via a `use-<domain>-client-deps.ts` hook so they're testable without global mocks.
|
|
56
|
+
- Follow the `frontend-conventions` rule + `docs/standards/frontend.md` (daisyUI, theme tokens, hoisted `styles` const, React Compiler - no manual memo).
|
|
55
57
|
|
|
56
58
|
## 5. Verify
|
|
57
59
|
|
|
58
|
-
`/check` green (
|
|
60
|
+
`/check` green (any structure lint runs inside `pnpm check:lint`); route renders (`pnpm dev`). Hand to `review` before an MR.
|
|
@@ -3,14 +3,14 @@ name: enhance-prompt
|
|
|
3
3
|
targets: ['*']
|
|
4
4
|
description: >
|
|
5
5
|
Normalize any raw request into a grounded, structured brief before acting. The auto pre-step
|
|
6
|
-
for orchestration skills and subagents: extract the real intent, gather scoped context (
|
|
7
|
-
|
|
6
|
+
for orchestration skills and subagents: extract the real intent, gather scoped context (Jira +
|
|
7
|
+
Confluence + Slack + roadmap + local docs), surface only blocking ambiguities, and emit
|
|
8
8
|
objective / scope / constraints / deliverables / guardrails. Routes build-type asks into
|
|
9
9
|
`enhance-intent`. Skips asks that are already precise. Use on any fuzzy, broad, or multi-part
|
|
10
10
|
request, or at the start of a skill or agent that received a raw ask.
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
# enhance-prompt
|
|
13
|
+
# enhance-prompt ({{name}})
|
|
14
14
|
|
|
15
15
|
Turn a raw, rambling ask into a brief a stranger could execute - before any file is touched. A one-line ask is a starting point, not a spec; a wrong reading executed confidently wastes far more than the enhancement costs.
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ Match effort to the ask: a small task gets a one-line restatement, not a full br
|
|
|
27
27
|
|
|
28
28
|
1. **Restate the intent** in one line. If your restatement might be wrong, gather context or ask - don't guess.
|
|
29
29
|
2. **Classify**: build (feature / adapter / page / route) · review or audit · debug · refactor · docs · research · ops. For a **build** ask, hand off to the `enhance-intent` MCP tool (server `oss`) - it adds the platform catalog, requirements checklist, and `pnpm gen` playbook - and stop here.
|
|
30
|
-
3. **Gather scoped context** - targeted, never a data dump (token budget matters). Pull only what changes the plan:
|
|
30
|
+
3. **Gather scoped context** - targeted, never a data dump (token budget matters). Pull only what changes the plan: Jira + Confluence via `atlassian-read` per `docs/agents/issue-tracker.md` (roadmap + related tickets, specs / decisions - comments and images included), Slack (recent decisions, `slack-reader`), local `docs/` + ADRs, past sessions. Scope first (which project, epic, timeframe), then fetch. Roadmap and known-issue threads are signal; general chatter is noise.
|
|
31
31
|
4. **Surface blocking ambiguities only** - the questions whose answers change what you build. Resolve the rest with stated defaults. Don't interrogate.
|
|
32
32
|
5. **Emit the brief**, sized to the task.
|
|
33
33
|
|
|
@@ -29,9 +29,10 @@ disallowed-tools:
|
|
|
29
29
|
Turn "what we're doing" into a prompt a _stranger_ agent can act on with zero access to this
|
|
30
30
|
chat. The receiver has none of our context, so the prompt must carry all of it.
|
|
31
31
|
|
|
32
|
-
Common use here: an OSS-core change
|
|
33
|
-
|
|
34
|
-
the
|
|
32
|
+
Common use here: an OSS-core change that should run in a separate session. Any paired change can
|
|
33
|
+
be made here, in an OSS worktree - see "Changing OSS core" in the `oss-boundaries` rule. When it
|
|
34
|
+
runs elsewhere, the receiver is a teammate or a new agent session rooted in the platform
|
|
35
|
+
checkout, and either way it needs a standalone brief.
|
|
35
36
|
|
|
36
37
|
Optional argument = what to hand off / who to (e.g. `the OSS core publish fix`, `to a teammate in
|
|
37
38
|
the platform repo`, a repo path, an issue/MR#). No argument -> hand off the current in-flight task.
|