@openora/create 0.4.1-canary.397 → 0.4.1-canary.403
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.js +1 -1
- package/package.json +2 -2
- package/template/__dot__claude/settings.json.tpl +8 -0
- package/template/__dot__gitignore +0 -5
- package/template/__dot__rulesync/hooks/_shared.mjs +12 -34
- package/template/__dot__rulesync/hooks/guard-core.mjs.tpl +39 -17
- package/template/__dot__rulesync/hooks/guard-generated.mjs +1 -4
- package/template/__dot__rulesync/hooks/guard-mr.mjs +78 -16
- package/template/__dot__rulesync/hooks/guard-review.mjs +280 -0
- package/template/__dot__rulesync/hooks/guard-stack.mjs +35 -0
- package/template/__dot__rulesync/hooks/post-edit.mjs.tpl +1 -1
- package/template/__dot__rulesync/hooks.json +10 -0
- package/template/__dot__rulesync/rules/overview.md +1 -1
- package/template/__dot__rulesync/skills/agent-retro/SKILL.md.tpl +81 -0
- package/template/__dot__rulesync/skills/agent-retro/scan.mjs +420 -0
- package/template/__dot__rulesync/skills/create-pr/SKILL.md.tpl +1 -1
- package/template/__dot__rulesync/skills/review/SKILL.md.tpl +3 -3
- package/template/__dot__rulesync/skills/ship/SKILL.md.tpl +6 -6
- package/template/__dot__rulesync/skills/ship/watch-pr.mjs +24 -7
- package/template/docs/agents/cross-repo.md.tpl +0 -1
- package/template/docs/agents/forge.md.tpl +4 -2
- package/template/docs/standards/git-delivery.md +13 -0
- package/template/docs/standards/module-structure.md +8 -8
- package/template/package.json.tpl +1 -1
- package/template/rulesync.jsonc +1 -2
- package/template/tools/sync-agents.mjs +23 -7
|
@@ -8,14 +8,14 @@ Read this before creating a package, an overlay add-on, or wiring a new module's
|
|
|
8
8
|
- Overlay/add-on packages mirror the platform module shape: `contract/`, `schema/`, `service/`,
|
|
9
9
|
`router/`, `adapters/`, `__tests__/`, plus `plugin.ts` at the root as the single wiring point.
|
|
10
10
|
|
|
11
|
-
| Layer | File | Holds
|
|
12
|
-
| -------- | --------------------------- |
|
|
13
|
-
| schema | `schema/index.ts` | Drizzle `pgTable`s; row types via `$inferSelect`/`$inferInsert`
|
|
14
|
-
| contract | `contract/index.ts` | oRPC route contract + req/res Zod schemas
|
|
15
|
-
| service | `service/<name>.service.ts` | ALL business logic;
|
|
16
|
-
| router | `router/index.ts` | thin oRPC wiring: resolve caller, call service, map errors
|
|
17
|
-
| plugin | `plugin.ts` | DI wiring only: `ctx.provide(...)`, route registration
|
|
18
|
-
| adapters | `adapters/<vendor>/` | concrete impls of adapter ports
|
|
11
|
+
| Layer | File | Holds | Must NOT hold |
|
|
12
|
+
| -------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- |
|
|
13
|
+
| schema | `schema/index.ts` | Drizzle `pgTable`s; row types via `$inferSelect`/`$inferInsert` | logic |
|
|
14
|
+
| contract | `contract/index.ts` | oRPC route contract + req/res Zod schemas | logic, transport wiring |
|
|
15
|
+
| service | `service/<name>.service.ts` | ALL business logic; informational events after commit via `emit`, money/compliance/RG events in the tx via `emitInTransaction` | HTTP/transport knowledge |
|
|
16
|
+
| router | `router/index.ts` | thin oRPC wiring: resolve caller, call service, map errors | business rules |
|
|
17
|
+
| plugin | `plugin.ts` | DI wiring only: `ctx.provide(...)`, route registration | logic |
|
|
18
|
+
| adapters | `adapters/<vendor>/` | concrete impls of adapter ports | being imported by another module |
|
|
19
19
|
|
|
20
20
|
- Each overlay owns its `drizzle.config.ts` and its own migration history - never share one
|
|
21
21
|
migration folder across packages.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"check:types": "turbo run check:types",
|
|
10
10
|
"check:lint": "oxlint .",
|
|
11
11
|
"test:unit": "turbo run test:unit",
|
|
12
|
-
"verify": "turbo run check:types check:lint test:unit && node .rulesync/hooks/guard-mr.mjs --stamp",
|
|
12
|
+
"verify": "sh -c 'turbo run check:types check:lint test:unit \"$@\" && { [ $# -gt 0 ] || node .rulesync/hooks/guard-mr.mjs --stamp; }' verify",
|
|
13
13
|
"gen:agents": "rulesync generate",
|
|
14
14
|
"sync:agents": "node tools/sync-agents.mjs",
|
|
15
15
|
"oss:worktree": "node tools/oss-worktree.mjs",
|
package/template/rulesync.jsonc
CHANGED
|
@@ -13,11 +13,10 @@
|
|
|
13
13
|
"targets": {
|
|
14
14
|
"agentsmd": ["rules"],
|
|
15
15
|
"claudecode": ["rules", "mcp", "subagents", "commands", "skills"],
|
|
16
|
-
"copilot": ["rules", "mcp", "subagents", "commands", "hooks"],
|
|
17
16
|
"codexcli": ["rules", "mcp", "hooks"],
|
|
18
17
|
},
|
|
19
18
|
|
|
20
|
-
//
|
|
19
|
+
// Off: keeps AGENTS.md free of simulated-command and simulated-subagent boilerplate.
|
|
21
20
|
"simulateCommands": false,
|
|
22
21
|
"simulateSubagents": false,
|
|
23
22
|
|
|
@@ -238,20 +238,36 @@ if (owned.length > 0) {
|
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
// Both files are tracked by every consumer, so a template bump cannot wire
|
|
241
|
+
// Both files are tracked by every consumer, so a template bump cannot wire these gates in.
|
|
242
242
|
const missingWiring = [
|
|
243
|
-
[
|
|
243
|
+
[
|
|
244
|
+
'.claude/settings.json',
|
|
245
|
+
'guard-mr.mjs',
|
|
246
|
+
'the verify gate',
|
|
247
|
+
'a PreToolUse "Bash" hook running guard-mr.mjs',
|
|
248
|
+
],
|
|
249
|
+
[
|
|
250
|
+
'.claude/settings.json',
|
|
251
|
+
'guard-review.mjs',
|
|
252
|
+
'the review gate',
|
|
253
|
+
'a PreToolUse "Bash" hook running guard-review.mjs',
|
|
254
|
+
],
|
|
255
|
+
[
|
|
256
|
+
'.claude/settings.json',
|
|
257
|
+
'guard-stack.mjs',
|
|
258
|
+
'the stacked-PR gate',
|
|
259
|
+
'a PreToolUse "Bash" hook running guard-stack.mjs',
|
|
260
|
+
],
|
|
244
261
|
[
|
|
245
262
|
'package.json',
|
|
246
263
|
'guard-mr.mjs --stamp',
|
|
247
|
-
'
|
|
264
|
+
'the verify gate',
|
|
265
|
+
'wrap "verify" so extra arguments reach turbo and only a full run stamps: `sh -c \'turbo run <tasks> "$@" && { [ $# -gt 0 ] || node .rulesync/hooks/guard-mr.mjs --stamp; }\' verify` (POSIX sh: on Windows run it from Git Bash or WSL)',
|
|
248
266
|
],
|
|
249
267
|
].filter(([path, marker]) => {
|
|
250
268
|
const target = join(ROOT, path);
|
|
251
269
|
return existsSync(target) && !readFileSync(target, 'utf8').includes(marker);
|
|
252
270
|
});
|
|
253
|
-
for (const [path, , fix] of missingWiring) {
|
|
254
|
-
console.warn(
|
|
255
|
-
`sync:agents - ${path} is missing the verify gate: ${fix} (see the template's copy).`,
|
|
256
|
-
);
|
|
271
|
+
for (const [path, , gate, fix] of missingWiring) {
|
|
272
|
+
console.warn(`sync:agents - ${path} is missing ${gate}: ${fix} (see the template's copy).`);
|
|
257
273
|
}
|