@kleber.mottajr/juninho 1.0.1 → 1.2.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.
- package/README.md +112 -13
- package/dist/cli.js +53 -29
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -1
- package/dist/config.js.map +1 -1
- package/dist/installer.d.ts +2 -0
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +178 -54
- package/dist/installer.js.map +1 -1
- package/dist/lint-detection.d.ts +26 -0
- package/dist/lint-detection.d.ts.map +1 -0
- package/dist/lint-detection.js +200 -0
- package/dist/lint-detection.js.map +1 -0
- package/dist/models.js +4 -4
- package/dist/models.js.map +1 -1
- package/dist/project-types.d.ts +47 -0
- package/dist/project-types.d.ts.map +1 -0
- package/dist/project-types.js +251 -0
- package/dist/project-types.js.map +1 -0
- package/dist/templates/agents.d.ts +2 -1
- package/dist/templates/agents.d.ts.map +1 -1
- package/dist/templates/agents.js +7 -5
- package/dist/templates/agents.js.map +1 -1
- package/dist/templates/commands.d.ts.map +1 -1
- package/dist/templates/commands.js +225 -150
- package/dist/templates/commands.js.map +1 -1
- package/dist/templates/docs.d.ts +2 -1
- package/dist/templates/docs.d.ts.map +1 -1
- package/dist/templates/docs.js +61 -14
- package/dist/templates/docs.js.map +1 -1
- package/dist/templates/plugins.d.ts +2 -1
- package/dist/templates/plugins.d.ts.map +1 -1
- package/dist/templates/plugins.js +167 -102
- package/dist/templates/plugins.js.map +1 -1
- package/dist/templates/skills.d.ts +2 -1
- package/dist/templates/skills.d.ts.map +1 -1
- package/dist/templates/skills.js +708 -195
- package/dist/templates/skills.js.map +1 -1
- package/dist/templates/support-scripts.d.ts +2 -1
- package/dist/templates/support-scripts.d.ts.map +1 -1
- package/dist/templates/support-scripts.js +468 -21
- package/dist/templates/support-scripts.js.map +1 -1
- package/dist/templates/tools.d.ts +2 -1
- package/dist/templates/tools.d.ts.map +1 -1
- package/dist/templates/tools.js +315 -74
- package/dist/templates/tools.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ function writeCommands(projectDir) {
|
|
|
22
22
|
(0, fs_1.writeFileSync)(path_1.default.join(commandsDir, "j.pr-review.md"), PR_REVIEW);
|
|
23
23
|
(0, fs_1.writeFileSync)(path_1.default.join(commandsDir, "j.status.md"), STATUS);
|
|
24
24
|
(0, fs_1.writeFileSync)(path_1.default.join(commandsDir, "j.unify.md"), UNIFY_CMD);
|
|
25
|
+
(0, fs_1.writeFileSync)(path_1.default.join(commandsDir, "j.finish-setup.md"), FINISH_SETUP);
|
|
25
26
|
}
|
|
26
27
|
// ─── /plan ────────────────────────────────────────────────────────────────────
|
|
27
28
|
const PLAN = `# /plan — Strategic Planning
|
|
@@ -115,7 +116,7 @@ When ANY sub-agent returns output:
|
|
|
115
116
|
Run \`/j.plan\` to create an execution plan, then \`/j.implement\` to build.
|
|
116
117
|
`;
|
|
117
118
|
// ─── /implement ───────────────────────────────────────────────────────────────
|
|
118
|
-
const IMPLEMENT = `# /implement — Execute Plan or Spec
|
|
119
|
+
const IMPLEMENT = `# /implement — Execute Plan or Spec
|
|
119
120
|
|
|
120
121
|
Invoke the \`@j.implementer\` agent to build what was planned or specified.
|
|
121
122
|
|
|
@@ -134,22 +135,22 @@ Invoke the \`@j.implementer\` agent to build what was planned or specified.
|
|
|
134
135
|
/j.implement docs/specs/user-profile.md
|
|
135
136
|
\`\`\`
|
|
136
137
|
|
|
137
|
-
## What happens
|
|
138
|
-
|
|
139
|
-
1. \`@j.implementer\` reads the active \`plan.md\` (auto-loaded by plan-autoload plugin)
|
|
140
|
-
2. Reads \`.opencode/state/workflow-config.md\` to understand handoff and UNIFY behavior
|
|
141
|
-
3. Or reads the specified spec file
|
|
142
|
-
4. Executes in waves:
|
|
143
|
-
- Wave 1: Foundation (schema, types, migrations)
|
|
144
|
-
- Wave 2: Core logic (services, API routes)
|
|
145
|
-
- Wave 3: Integration (wire-up, tests)
|
|
146
|
-
5. Uses the fast pre-commit path while implementing:
|
|
147
|
-
- \`.opencode/scripts/lint-structure.sh\`
|
|
148
|
-
- \`.opencode/scripts/test-related.sh\`
|
|
149
|
-
6. Spawns \`@j.validator\` for spec compliance
|
|
150
|
-
7. Exits when code changes and task-level tests are complete
|
|
151
|
-
8. The caller then runs \`.opencode/scripts/check-all.sh\` or \`/j.check\`
|
|
152
|
-
9. If the repo-wide check fails, delegate back to \`@j.implementer\` with the failing output
|
|
138
|
+
## What happens
|
|
139
|
+
|
|
140
|
+
1. \`@j.implementer\` reads the active \`plan.md\` (auto-loaded by plan-autoload plugin)
|
|
141
|
+
2. Reads \`.opencode/state/workflow-config.md\` to understand handoff and UNIFY behavior
|
|
142
|
+
3. Or reads the specified spec file
|
|
143
|
+
4. Executes in waves:
|
|
144
|
+
- Wave 1: Foundation (schema, types, migrations)
|
|
145
|
+
- Wave 2: Core logic (services, API routes)
|
|
146
|
+
- Wave 3: Integration (wire-up, tests)
|
|
147
|
+
5. Uses the fast pre-commit path while implementing:
|
|
148
|
+
- \`.opencode/scripts/lint-structure.sh\`
|
|
149
|
+
- \`.opencode/scripts/test-related.sh\`
|
|
150
|
+
6. Spawns \`@j.validator\` for spec compliance
|
|
151
|
+
7. Exits when code changes and task-level tests are complete
|
|
152
|
+
8. The caller then runs \`.opencode/scripts/check-all.sh\` or \`/j.check\`
|
|
153
|
+
9. If the repo-wide check fails, delegate back to \`@j.implementer\` with the failing output
|
|
153
154
|
|
|
154
155
|
## Delegation Rule (MANDATORY)
|
|
155
156
|
|
|
@@ -162,58 +163,58 @@ When ANY sub-agent returns output:
|
|
|
162
163
|
- Sub-agent unknowns/ambiguities are VALUABLE DATA — forward them to the user via \`question\` tool
|
|
163
164
|
- If the sub-agent's report has gaps, pass those gaps to the user as questions — do NOT fill them yourself
|
|
164
165
|
|
|
165
|
-
## After implementation
|
|
166
|
-
|
|
167
|
-
Run \`/j.check\` for repo-wide verification.
|
|
168
|
-
If \`/j.check\` fails, invoke \`/j.implement\` again with the failing output.
|
|
169
|
-
Run \`/j.unify\` only after the full check passes and \`workflow-config.md\` enables UNIFY.
|
|
166
|
+
## After implementation
|
|
167
|
+
|
|
168
|
+
Run \`/j.check\` for repo-wide verification.
|
|
169
|
+
If \`/j.check\` fails, invoke \`/j.implement\` again with the failing output.
|
|
170
|
+
Run \`/j.unify\` only after the full check passes and \`workflow-config.md\` enables UNIFY.
|
|
170
171
|
`;
|
|
171
172
|
// ─── /sync-docs ───────────────────────────────────────────────────────────────
|
|
172
|
-
const SYNC_DOCS = `# /sync-docs — Refresh AGENTS and Documentation
|
|
173
|
-
|
|
174
|
-
Generate or update \`AGENTS.md\`, domain docs, and principle docs using the current code as source of truth.
|
|
175
|
-
|
|
176
|
-
## Usage
|
|
177
|
-
|
|
178
|
-
\`\`\`
|
|
179
|
-
/j.sync-docs
|
|
180
|
-
/j.sync-docs <path or domain>
|
|
181
|
-
\`\`\`
|
|
182
|
-
|
|
183
|
-
## What happens
|
|
184
|
-
|
|
185
|
-
1. Read \`.opencode/state/workflow-config.md\`
|
|
186
|
-
2. Identify key files for the requested scope
|
|
187
|
-
3. Update the right doc surface for each kind of knowledge:
|
|
188
|
-
- \`AGENTS.md\` for directory-local working rules and commands
|
|
189
|
-
- \`docs/domain/*\` for business behavior and invariants
|
|
190
|
-
- \`docs/principles/*\` for cross-cutting technical patterns
|
|
191
|
-
4. Add or refresh sync markers such as:
|
|
192
|
-
- \`<!-- juninho:sync source=src/payments/service.ts hash=abc123 -->\`
|
|
193
|
-
5. Update \`docs/domain/INDEX.md\` and \`docs/principles/manifest\` when new docs are added or renamed
|
|
194
|
-
|
|
195
|
-
## Rules
|
|
196
|
-
|
|
197
|
-
- Prefer small, high-signal \`AGENTS.md\` files close to the code they describe
|
|
198
|
-
- Keep business behavior out of \`AGENTS.md\`; put it in \`docs/domain/*\`
|
|
199
|
-
- Keep technical principles reusable; do not bury them in a module-specific doc
|
|
200
|
-
- Use key-file sync markers so doc drift is visible during later updates
|
|
201
|
-
|
|
202
|
-
## Delegation Rule (MANDATORY)
|
|
203
|
-
|
|
204
|
-
You MUST delegate this task to \`@j.implementer\` using the \`task()\` tool.
|
|
205
|
-
Do NOT rewrite the docs yourself when the harness workflow asks for agent execution.
|
|
206
|
-
|
|
207
|
-
## When to use
|
|
208
|
-
|
|
209
|
-
- After finishing a feature before human review
|
|
210
|
-
- After major refactors that changed local rules or business behavior
|
|
211
|
-
- When CARL recall quality degrades because docs or manifests are stale
|
|
173
|
+
const SYNC_DOCS = `# /sync-docs — Refresh AGENTS and Documentation
|
|
174
|
+
|
|
175
|
+
Generate or update \`AGENTS.md\`, domain docs, and principle docs using the current code as source of truth.
|
|
176
|
+
|
|
177
|
+
## Usage
|
|
178
|
+
|
|
179
|
+
\`\`\`
|
|
180
|
+
/j.sync-docs
|
|
181
|
+
/j.sync-docs <path or domain>
|
|
182
|
+
\`\`\`
|
|
183
|
+
|
|
184
|
+
## What happens
|
|
185
|
+
|
|
186
|
+
1. Read \`.opencode/state/workflow-config.md\`
|
|
187
|
+
2. Identify key files for the requested scope
|
|
188
|
+
3. Update the right doc surface for each kind of knowledge:
|
|
189
|
+
- \`AGENTS.md\` for directory-local working rules and commands
|
|
190
|
+
- \`docs/domain/*\` for business behavior and invariants
|
|
191
|
+
- \`docs/principles/*\` for cross-cutting technical patterns
|
|
192
|
+
4. Add or refresh sync markers such as:
|
|
193
|
+
- \`<!-- juninho:sync source=src/payments/service.ts hash=abc123 -->\`
|
|
194
|
+
5. Update \`docs/domain/INDEX.md\` and \`docs/principles/manifest\` when new docs are added or renamed
|
|
195
|
+
|
|
196
|
+
## Rules
|
|
197
|
+
|
|
198
|
+
- Prefer small, high-signal \`AGENTS.md\` files close to the code they describe
|
|
199
|
+
- Keep business behavior out of \`AGENTS.md\`; put it in \`docs/domain/*\`
|
|
200
|
+
- Keep technical principles reusable; do not bury them in a module-specific doc
|
|
201
|
+
- Use key-file sync markers so doc drift is visible during later updates
|
|
202
|
+
|
|
203
|
+
## Delegation Rule (MANDATORY)
|
|
204
|
+
|
|
205
|
+
You MUST delegate this task to \`@j.implementer\` using the \`task()\` tool.
|
|
206
|
+
Do NOT rewrite the docs yourself when the harness workflow asks for agent execution.
|
|
207
|
+
|
|
208
|
+
## When to use
|
|
209
|
+
|
|
210
|
+
- After finishing a feature before human review
|
|
211
|
+
- After major refactors that changed local rules or business behavior
|
|
212
|
+
- When CARL recall quality degrades because docs or manifests are stale
|
|
212
213
|
`;
|
|
213
214
|
// ─── /init-deep ───────────────────────────────────────────────────────────────
|
|
214
215
|
const INIT_DEEP = `# /init-deep — Deep Codebase Initialization
|
|
215
216
|
|
|
216
|
-
Perform a deep scan of the codebase and generate hierarchical AGENTS.md files, domain documentation, and local quality-gate scripts.
|
|
217
|
+
Perform a deep scan of the codebase and generate hierarchical AGENTS.md files, domain documentation, and local quality-gate scripts.
|
|
217
218
|
|
|
218
219
|
## Usage
|
|
219
220
|
|
|
@@ -241,19 +242,19 @@ Writes to \`docs/domain/INDEX.md\`:
|
|
|
241
242
|
- API route inventory
|
|
242
243
|
- Service layer patterns
|
|
243
244
|
|
|
244
|
-
### 3. Update principles manifest
|
|
245
|
-
|
|
246
|
-
Adds entries to \`docs/principles/manifest\` (KEY=VALUE format):
|
|
247
|
-
- Canonical code patterns discovered
|
|
248
|
-
- Architectural directives
|
|
249
|
-
- Technology decisions
|
|
250
|
-
|
|
251
|
-
### 4. Refresh local automation stubs
|
|
252
|
-
|
|
253
|
-
- Validate \`.opencode/scripts/lint-structure.sh\`
|
|
254
|
-
- Validate \`.opencode/scripts/test-related.sh\`
|
|
255
|
-
- Validate \`.opencode/scripts/check-all.sh\`
|
|
256
|
-
- Align commands in \`AGENTS.md\` with the actual repository scripts
|
|
245
|
+
### 3. Update principles manifest
|
|
246
|
+
|
|
247
|
+
Adds entries to \`docs/principles/manifest\` (KEY=VALUE format):
|
|
248
|
+
- Canonical code patterns discovered
|
|
249
|
+
- Architectural directives
|
|
250
|
+
- Technology decisions
|
|
251
|
+
|
|
252
|
+
### 4. Refresh local automation stubs
|
|
253
|
+
|
|
254
|
+
- Validate \`.opencode/scripts/lint-structure.sh\`
|
|
255
|
+
- Validate \`.opencode/scripts/test-related.sh\`
|
|
256
|
+
- Validate \`.opencode/scripts/check-all.sh\`
|
|
257
|
+
- Align commands in \`AGENTS.md\` with the actual repository scripts
|
|
257
258
|
|
|
258
259
|
## When to use
|
|
259
260
|
|
|
@@ -376,9 +377,9 @@ Activate maximum parallelism mode — work until all tasks in execution-state.md
|
|
|
376
377
|
- Each worktree works on independent files
|
|
377
378
|
- No merge conflicts by design
|
|
378
379
|
4. \`@j.validator\` runs after each wave
|
|
379
|
-
5. Loop continues until all tasks are marked complete
|
|
380
|
-
6. Run \`/j.check\` once task-level work is done
|
|
381
|
-
7. \`@j.unify\` runs only if closeout is enabled in \`workflow-config.md\`
|
|
380
|
+
5. Loop continues until all tasks are marked complete
|
|
381
|
+
6. Run \`/j.check\` once task-level work is done
|
|
382
|
+
7. \`@j.unify\` runs only if closeout is enabled in \`workflow-config.md\`
|
|
382
383
|
|
|
383
384
|
## When to use
|
|
384
385
|
|
|
@@ -405,13 +406,13 @@ Wave 3 (parallel):
|
|
|
405
406
|
## Safety
|
|
406
407
|
|
|
407
408
|
- Each worktree is isolated — no cross-contamination
|
|
408
|
-
- Merge happens only after all waves pass validation and the repo-wide check passes
|
|
409
|
+
- Merge happens only after all waves pass validation and the repo-wide check passes
|
|
409
410
|
- If any wave fails, the loop pauses and reports blockers
|
|
410
411
|
`;
|
|
411
412
|
// ─── /check ───────────────────────────────────────────────────────────────────
|
|
412
|
-
const CHECK = `# /check — Run All Quality Gates
|
|
413
|
-
|
|
414
|
-
Run the full repository verification after \`@j.implementer\` exits.
|
|
413
|
+
const CHECK = `# /check — Run All Quality Gates
|
|
414
|
+
|
|
415
|
+
Run the full repository verification after \`@j.implementer\` exits.
|
|
415
416
|
|
|
416
417
|
## Usage
|
|
417
418
|
|
|
@@ -419,31 +420,31 @@ Run the full repository verification after \`@j.implementer\` exits.
|
|
|
419
420
|
/j.check
|
|
420
421
|
\`\`\`
|
|
421
422
|
|
|
422
|
-
## What runs
|
|
423
|
-
|
|
424
|
-
\`.opencode/scripts/check-all.sh\`
|
|
425
|
-
|
|
426
|
-
This script is expected to run the repository-wide checks for the current stack.
|
|
427
|
-
Typical examples:
|
|
428
|
-
- \`npm run typecheck && npm run lint && npm test\`
|
|
429
|
-
- \`./gradlew test\`
|
|
430
|
-
- \`./mvnw test\`
|
|
423
|
+
## What runs
|
|
424
|
+
|
|
425
|
+
\`.opencode/scripts/check-all.sh\`
|
|
426
|
+
|
|
427
|
+
This script is expected to run the repository-wide checks for the current stack.
|
|
428
|
+
Typical examples:
|
|
429
|
+
- \`npm run typecheck && npm run lint && npm test\`
|
|
430
|
+
- \`./gradlew test\`
|
|
431
|
+
- \`./mvnw test\`
|
|
431
432
|
|
|
432
433
|
## When to use
|
|
433
434
|
|
|
434
|
-
- After \`/j.implement\` returns control to the caller
|
|
435
|
-
- Before \`/j.unify\`
|
|
436
|
-
- After a refactor that touched many files or workflows
|
|
435
|
+
- After \`/j.implement\` returns control to the caller
|
|
436
|
+
- Before \`/j.unify\`
|
|
437
|
+
- After a refactor that touched many files or workflows
|
|
437
438
|
|
|
438
439
|
## Notes
|
|
439
440
|
|
|
440
|
-
This is intentionally broader than the pre-commit hook.
|
|
441
|
-
The pre-commit hook stays fast and only runs structure lint plus tests related to staged files.
|
|
441
|
+
This is intentionally broader than the pre-commit hook.
|
|
442
|
+
The pre-commit hook stays fast and only runs structure lint plus tests related to staged files.
|
|
442
443
|
`;
|
|
443
444
|
// ─── /lint ────────────────────────────────────────────────────────────────────
|
|
444
|
-
const LINT = `# /lint — Run Linter
|
|
445
|
-
|
|
446
|
-
Run the structure lint used by the pre-commit path.
|
|
445
|
+
const LINT = `# /lint — Run Linter
|
|
446
|
+
|
|
447
|
+
Run the structure lint used by the pre-commit path.
|
|
447
448
|
|
|
448
449
|
## Usage
|
|
449
450
|
|
|
@@ -451,20 +452,20 @@ Run the structure lint used by the pre-commit path.
|
|
|
451
452
|
/j.lint
|
|
452
453
|
\`\`\`
|
|
453
454
|
|
|
454
|
-
## What runs
|
|
455
|
-
|
|
456
|
-
\`.opencode/scripts/lint-structure.sh\`
|
|
455
|
+
## What runs
|
|
456
|
+
|
|
457
|
+
\`.opencode/scripts/lint-structure.sh\`
|
|
457
458
|
|
|
458
459
|
## When to use
|
|
459
460
|
|
|
460
|
-
- During active implementation, to catch structural issues quickly
|
|
461
|
-
- When the pre-commit hook fails on lint and you want the same check on demand
|
|
462
|
-
- After editing docs, scripts, or config files that need non-test validation
|
|
461
|
+
- During active implementation, to catch structural issues quickly
|
|
462
|
+
- When the pre-commit hook fails on lint and you want the same check on demand
|
|
463
|
+
- After editing docs, scripts, or config files that need non-test validation
|
|
463
464
|
`;
|
|
464
465
|
// ─── /test ────────────────────────────────────────────────────────────────────
|
|
465
|
-
const TEST = `# /test — Run Test Suite
|
|
466
|
-
|
|
467
|
-
Run fast, change-scoped tests during implementation.
|
|
466
|
+
const TEST = `# /test — Run Test Suite
|
|
467
|
+
|
|
468
|
+
Run fast, change-scoped tests during implementation.
|
|
468
469
|
|
|
469
470
|
## Usage
|
|
470
471
|
|
|
@@ -481,18 +482,18 @@ Run fast, change-scoped tests during implementation.
|
|
|
481
482
|
/j.test --watch
|
|
482
483
|
\`\`\`
|
|
483
484
|
|
|
484
|
-
## What runs
|
|
485
|
-
|
|
486
|
-
\`.opencode/scripts/test-related.sh\`
|
|
487
|
-
|
|
488
|
-
If the repository defines \`test:related\`, that script is preferred.
|
|
489
|
-
Otherwise the default fallback tries tools such as \`jest --findRelatedTests\` or \`vitest related\`.
|
|
485
|
+
## What runs
|
|
486
|
+
|
|
487
|
+
\`.opencode/scripts/test-related.sh\`
|
|
488
|
+
|
|
489
|
+
If the repository defines \`test:related\`, that script is preferred.
|
|
490
|
+
Otherwise the default fallback tries tools such as \`jest --findRelatedTests\` or \`vitest related\`.
|
|
490
491
|
|
|
491
492
|
## When to use
|
|
492
493
|
|
|
493
|
-
- During implementation, before leaving \`@j.implementer\`
|
|
494
|
-
- When the pre-commit hook fails on related tests and you want to rerun the same scope
|
|
495
|
-
- Use \`/j.check\` for the full repository suite after implementation
|
|
494
|
+
- During implementation, before leaving \`@j.implementer\`
|
|
495
|
+
- When the pre-commit hook fails on related tests and you want to rerun the same scope
|
|
496
|
+
- Use \`/j.check\` for the full repository suite after implementation
|
|
496
497
|
`;
|
|
497
498
|
// ─── /pr-review ───────────────────────────────────────────────────────────────
|
|
498
499
|
const PR_REVIEW = `# /pr-review — Advisory PR Review
|
|
@@ -518,22 +519,22 @@ Launch the \`@j.reviewer\` agent to perform an advisory code review on the curre
|
|
|
518
519
|
- When you want a second opinion on the implementation quality
|
|
519
520
|
- For pre-merge quality assurance
|
|
520
521
|
|
|
521
|
-
## Distinction from @j.validator
|
|
522
|
-
|
|
523
|
-
| \`@j.reviewer\` | \`@j.validator\` |
|
|
524
|
-
|---|---|
|
|
525
|
-
| Post-PR, advisory | During implementation loop |
|
|
526
|
-
| "Is this good code?" | "Does this satisfy the spec?" |
|
|
527
|
-
| Never blocks | Gates the pipeline |
|
|
528
|
-
| Read-only | Can fix issues directly |
|
|
529
|
-
|
|
530
|
-
## Quality target
|
|
531
|
-
|
|
532
|
-
Aim for PR artifacts with the same quality bar as a strong human-authored engineering PR:
|
|
533
|
-
- state the purpose and problem clearly
|
|
534
|
-
- summarize the solution in reviewer-friendly steps
|
|
535
|
-
- map changed files to responsibilities
|
|
536
|
-
- provide runnable validation steps with expected outcomes
|
|
522
|
+
## Distinction from @j.validator
|
|
523
|
+
|
|
524
|
+
| \`@j.reviewer\` | \`@j.validator\` |
|
|
525
|
+
|---|---|
|
|
526
|
+
| Post-PR, advisory | During implementation loop |
|
|
527
|
+
| "Is this good code?" | "Does this satisfy the spec?" |
|
|
528
|
+
| Never blocks | Gates the pipeline |
|
|
529
|
+
| Read-only | Can fix issues directly |
|
|
530
|
+
|
|
531
|
+
## Quality target
|
|
532
|
+
|
|
533
|
+
Aim for PR artifacts with the same quality bar as a strong human-authored engineering PR:
|
|
534
|
+
- state the purpose and problem clearly
|
|
535
|
+
- summarize the solution in reviewer-friendly steps
|
|
536
|
+
- map changed files to responsibilities
|
|
537
|
+
- provide runnable validation steps with expected outcomes
|
|
537
538
|
`;
|
|
538
539
|
// ─── /status ──────────────────────────────────────────────────────────────────
|
|
539
540
|
const STATUS = `# /status — Show Current Work Status
|
|
@@ -566,9 +567,9 @@ Reads \`.opencode/state/execution-state.md\` directly.
|
|
|
566
567
|
No agent needed — this is a direct state file read.
|
|
567
568
|
`;
|
|
568
569
|
// ─── /unify ───────────────────────────────────────────────────────────────────
|
|
569
|
-
const UNIFY_CMD = `# /unify — Close the Loop
|
|
570
|
-
|
|
571
|
-
Invoke the \`@j.unify\` agent to reconcile plan vs delivery and execute only the enabled closeout steps.
|
|
570
|
+
const UNIFY_CMD = `# /unify — Close the Loop
|
|
571
|
+
|
|
572
|
+
Invoke the \`@j.unify\` agent to reconcile plan vs delivery and execute only the enabled closeout steps.
|
|
572
573
|
|
|
573
574
|
## Usage
|
|
574
575
|
|
|
@@ -576,20 +577,20 @@ Invoke the \`@j.unify\` agent to reconcile plan vs delivery and execute only the
|
|
|
576
577
|
/j.unify
|
|
577
578
|
\`\`\`
|
|
578
579
|
|
|
579
|
-
## What happens
|
|
580
|
-
|
|
581
|
-
1. Read \`.opencode/state/workflow-config.md\`
|
|
582
|
-
2. Reconcile \`plan.md\` vs actual git diff — mark tasks DONE/PARTIAL/SKIPPED
|
|
583
|
-
3. Run only the enabled closeout steps, such as:
|
|
584
|
-
- update \`persistent-context.md\`
|
|
585
|
-
- refresh \`docs/domain/\` or \`docs/domain/INDEX.md\`
|
|
586
|
-
- merge worktrees
|
|
587
|
-
- create a PR
|
|
588
|
-
4. If PR creation is enabled, draft a rich PR body with purpose, problem, solution, changed files, and validation steps
|
|
580
|
+
## What happens
|
|
581
|
+
|
|
582
|
+
1. Read \`.opencode/state/workflow-config.md\`
|
|
583
|
+
2. Reconcile \`plan.md\` vs actual git diff — mark tasks DONE/PARTIAL/SKIPPED
|
|
584
|
+
3. Run only the enabled closeout steps, such as:
|
|
585
|
+
- update \`persistent-context.md\`
|
|
586
|
+
- refresh \`docs/domain/\` or \`docs/domain/INDEX.md\`
|
|
587
|
+
- merge worktrees
|
|
588
|
+
- create a PR
|
|
589
|
+
4. If PR creation is enabled, draft a rich PR body with purpose, problem, solution, changed files, and validation steps
|
|
589
590
|
|
|
590
591
|
## When to use
|
|
591
592
|
|
|
592
|
-
After \`@j.implementer\` exits, \`/j.check\` passes, and \`@j.validator\` has approved the required work.
|
|
593
|
+
After \`@j.implementer\` exits, \`/j.check\` passes, and \`@j.validator\` has approved the required work.
|
|
593
594
|
|
|
594
595
|
## Prerequisites
|
|
595
596
|
|
|
@@ -599,7 +600,81 @@ After \`@j.implementer\` exits, \`/j.check\` passes, and \`@j.validator\` has ap
|
|
|
599
600
|
|
|
600
601
|
## Note
|
|
601
602
|
|
|
602
|
-
UNIFY behavior is controlled by \`.opencode/state/workflow-config.md\`.
|
|
603
|
-
If PR creation or doc updates are disabled there, \`@j.unify\` should skip those steps and report what was intentionally not executed.
|
|
603
|
+
UNIFY behavior is controlled by \`.opencode/state/workflow-config.md\`.
|
|
604
|
+
If PR creation or doc updates are disabled there, \`@j.unify\` should skip those steps and report what was intentionally not executed.
|
|
605
|
+
`;
|
|
606
|
+
// ─── /finish-setup ───────────────────────────────────────────────────────────
|
|
607
|
+
const FINISH_SETUP = `# /finish-setup — Generate Dynamic Skills and Documentation
|
|
608
|
+
|
|
609
|
+
Scan the entire codebase, discover recurring file patterns, generate dynamic skills, and populate domain/principles documentation.
|
|
610
|
+
|
|
611
|
+
## Usage
|
|
612
|
+
|
|
613
|
+
\`\`\`
|
|
614
|
+
/j.finish-setup
|
|
615
|
+
\`\`\`
|
|
616
|
+
|
|
617
|
+
## What happens
|
|
618
|
+
|
|
619
|
+
### Phase 1 — Structural Scan (via @j.explore)
|
|
620
|
+
|
|
621
|
+
1. Invoke \`@j.explore\` to scan the entire codebase
|
|
622
|
+
2. Identify recurring file patterns by suffix/convention:
|
|
623
|
+
- \`*Repository.ts\`, \`*Repository.java\`, \`*Repository.kt\`, \`*_repository.py\` → pattern "repository"
|
|
624
|
+
- \`*Service.ts\`, \`*Service.java\`, \`*Service.kt\`, \`*_service.py\` → pattern "service"
|
|
625
|
+
- \`*Controller.ts\`, \`*Controller.java\`, \`*Controller.kt\` → pattern "controller"
|
|
626
|
+
- \`*Handler.go\`, \`*handler.go\` → pattern "handler"
|
|
627
|
+
- \`*Middleware.*\` → pattern "middleware"
|
|
628
|
+
- \`*Schema.*\`, \`*Model.*\` → pattern "model/schema"
|
|
629
|
+
- \`*DTO.*\`, \`*Request.*\`, \`*Response.*\` → pattern "dto"
|
|
630
|
+
- \`*Factory.*\`, \`*Builder.*\` → pattern "factory/builder"
|
|
631
|
+
- Any other recurring naming pattern (\`*Hook.ts\`, \`*Composable.ts\`, \`*Store.ts\`, etc.)
|
|
632
|
+
3. For each pattern found, read 2-3 exemplar files and extract:
|
|
633
|
+
- Common structure (imports, exports, class vs function)
|
|
634
|
+
- Naming conventions
|
|
635
|
+
- Dependency patterns (what it injects, what it returns)
|
|
636
|
+
- Error handling patterns
|
|
637
|
+
- Validation patterns
|
|
638
|
+
|
|
639
|
+
### Phase 2 — Generate Dynamic Skills
|
|
640
|
+
|
|
641
|
+
4. For each discovered pattern, create a skill in \`.opencode/skills/j.{pattern}-writing/SKILL.md\`:
|
|
642
|
+
- Frontmatter with \`name\`, \`description\`
|
|
643
|
+
- "When this skill activates" with the glob patterns from the project
|
|
644
|
+
- "Required Steps" extracted from the exemplar file analysis
|
|
645
|
+
- "Anti-patterns to avoid" based on what the exemplars do NOT do
|
|
646
|
+
- Canonical example copied/adapted from a real project file
|
|
647
|
+
5. Update \`.opencode/state/skill-map.json\` with new regex patterns for each skill
|
|
648
|
+
|
|
649
|
+
### Phase 3 — Generate Documentation
|
|
650
|
+
|
|
651
|
+
6. Generate initial docs in \`docs/domain/\` (subdirectories by discovered domain)
|
|
652
|
+
7. Generate initial docs in \`docs/principles/\` based on patterns found
|
|
653
|
+
8. Populate \`docs/principles/manifest\` with real keywords
|
|
654
|
+
9. Populate \`docs/domain/INDEX.md\` with real entries and CARL keywords
|
|
655
|
+
10. Update root \`AGENTS.md\` with discovered information (stack, build commands, test commands, directory layout)
|
|
656
|
+
|
|
657
|
+
## Delegation Rule (MANDATORY)
|
|
658
|
+
|
|
659
|
+
You MUST use \`@j.explore\` for Phase 1. Do NOT try to scan the codebase yourself.
|
|
660
|
+
|
|
661
|
+
When \`@j.explore\` returns its report:
|
|
662
|
+
- Read the FULL report
|
|
663
|
+
- Extract all file patterns and structural findings
|
|
664
|
+
- Use them to generate skills and docs
|
|
665
|
+
|
|
666
|
+
## When to use
|
|
667
|
+
|
|
668
|
+
- After initial \`juninho setup\` to customize skills for the specific project
|
|
669
|
+
- After major structural refactors that introduce new file patterns
|
|
670
|
+
- When onboarding a new project to the framework
|
|
671
|
+
|
|
672
|
+
## Result
|
|
673
|
+
|
|
674
|
+
After completion, the project will have:
|
|
675
|
+
- Custom skills that match its specific file patterns and conventions
|
|
676
|
+
- Domain documentation populated with real business domains
|
|
677
|
+
- Principles documentation reflecting actual codebase patterns
|
|
678
|
+
- An updated AGENTS.md with project-specific information
|
|
604
679
|
`;
|
|
605
680
|
//# sourceMappingURL=commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/templates/commands.ts"],"names":[],"mappings":";;;;;AAGA,
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/templates/commands.ts"],"names":[],"mappings":"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"}
|
package/dist/templates/docs.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { ProjectType } from "../project-types.js";
|
|
1
2
|
export interface OpencodeModels {
|
|
2
3
|
strong: string;
|
|
3
4
|
medium: string;
|
|
4
5
|
weak: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function writeDocs(projectDir: string): void;
|
|
7
|
+
export declare function writeDocs(projectDir: string, projectType?: ProjectType, isKotlin?: boolean): void;
|
|
7
8
|
export declare function patchOpencodeJson(projectDir: string, models?: OpencodeModels): void;
|
|
8
9
|
//# sourceMappingURL=docs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/templates/docs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/templates/docs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGtD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,SAAS,CACvB,UAAU,EAAE,MAAM,EAClB,WAAW,GAAE,WAA2B,EACxC,QAAQ,GAAE,OAAe,GACxB,IAAI,CASN;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAgInF"}
|
package/dist/templates/docs.js
CHANGED
|
@@ -8,8 +8,9 @@ exports.patchOpencodeJson = patchOpencodeJson;
|
|
|
8
8
|
const fs_1 = require("fs");
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const models_js_1 = require("../models.js");
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const project_types_js_1 = require("../project-types.js");
|
|
12
|
+
function writeDocs(projectDir, projectType = "node-nextjs", isKotlin = false) {
|
|
13
|
+
(0, fs_1.writeFileSync)(path_1.default.join(projectDir, "AGENTS.md"), agentsMd(projectType, isKotlin));
|
|
13
14
|
(0, fs_1.writeFileSync)(path_1.default.join(projectDir, "docs", "domain", "INDEX.md"), DOMAIN_INDEX);
|
|
14
15
|
(0, fs_1.writeFileSync)(path_1.default.join(projectDir, "docs", "principles", "manifest"), MANIFEST);
|
|
15
16
|
(0, fs_1.writeFileSync)(path_1.default.join(projectDir, "docs", "principles", "auth-patterns.md"), AUTH_PATTERNS);
|
|
@@ -39,6 +40,11 @@ function patchOpencodeJson(projectDir, models) {
|
|
|
39
40
|
type: "local",
|
|
40
41
|
command: ["npx", "-y", "@upstash/context7-mcp@latest"],
|
|
41
42
|
},
|
|
43
|
+
// context-mode provides intelligent context management for agent sessions.
|
|
44
|
+
"context-mode": {
|
|
45
|
+
type: "local",
|
|
46
|
+
command: ["npx", "-y", "context-mode@latest"],
|
|
47
|
+
},
|
|
42
48
|
},
|
|
43
49
|
agent: {
|
|
44
50
|
// Permission model from framework Section 27.
|
|
@@ -159,10 +165,56 @@ function deepMerge(base, override) {
|
|
|
159
165
|
}
|
|
160
166
|
return result;
|
|
161
167
|
}
|
|
162
|
-
// ─── AGENTS.md
|
|
163
|
-
|
|
168
|
+
// ─── AGENTS.md (parameterized by project type) ──────────────────────────────
|
|
169
|
+
function skillsTable(projectType, isKotlin) {
|
|
170
|
+
const config = project_types_js_1.PROJECT_TYPE_REGISTRY[projectType];
|
|
171
|
+
const rows = [];
|
|
172
|
+
const skillActivations = {
|
|
173
|
+
"j.test-writing": getTestSkillRow(projectType, isKotlin),
|
|
174
|
+
"j.page-creation": { pattern: "`app/**/page.tsx`", notes: "Stack-specific; Next.js App Router only" },
|
|
175
|
+
"j.api-route-creation": { pattern: "`app/api/**/*.ts`", notes: "" },
|
|
176
|
+
"j.server-action-creation": { pattern: "`**/actions.ts`", notes: "Stack-specific; Next.js Server Actions only" },
|
|
177
|
+
"j.schema-migration": { pattern: "`schema.prisma`", notes: "" },
|
|
178
|
+
"j.agents-md-writing": { pattern: "`**/AGENTS.md`", notes: "Directory-local agent guidance" },
|
|
179
|
+
"j.domain-doc-writing": { pattern: "`docs/domain/**/*.md`", notes: "Business behavior and sync markers" },
|
|
180
|
+
"j.principle-doc-writing": { pattern: "`docs/principles/**`", notes: "Cross-cutting technical rules" },
|
|
181
|
+
"j.shell-script-writing": { pattern: "`.opencode/scripts/**/*.sh`, `scripts/**/*.sh`, hooks", notes: "Fast, safe automation scripts" },
|
|
182
|
+
};
|
|
183
|
+
for (const skill of config.skills) {
|
|
184
|
+
const info = skillActivations[skill];
|
|
185
|
+
if (!info)
|
|
186
|
+
continue;
|
|
187
|
+
rows.push(`| \`${skill}\` | ${info.pattern} | ${info.notes} |`);
|
|
188
|
+
}
|
|
189
|
+
return rows.join("\n");
|
|
190
|
+
}
|
|
191
|
+
function getTestSkillRow(projectType, isKotlin) {
|
|
192
|
+
if (projectType === "java" && isKotlin) {
|
|
193
|
+
return { pattern: "`*Test.kt`, `*Tests.kt`, `*Test.java`", notes: "Kotlin/JUnit 5 + MockK/Mockito-Kotlin" };
|
|
194
|
+
}
|
|
195
|
+
switch (projectType) {
|
|
196
|
+
case "node-nextjs":
|
|
197
|
+
case "node-generic":
|
|
198
|
+
return { pattern: "`*.test.ts`, `*.spec.ts`", notes: "Jest/Vitest AAA pattern" };
|
|
199
|
+
case "python":
|
|
200
|
+
return { pattern: "`test_*.py`, `*_test.py`", notes: "pytest + unittest.mock" };
|
|
201
|
+
case "go":
|
|
202
|
+
return { pattern: "`*_test.go`", notes: "table-driven tests with t.Run" };
|
|
203
|
+
case "java":
|
|
204
|
+
return { pattern: "`*Test.java`, `*Tests.java`", notes: "JUnit 5 + Mockito" };
|
|
205
|
+
case "generic":
|
|
206
|
+
default:
|
|
207
|
+
return { pattern: "test files", notes: "AAA pattern" };
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function agentsMd(projectType, isKotlin) {
|
|
211
|
+
const stackLabel = projectType === "java" && isKotlin ? "Java/Kotlin" : projectType;
|
|
212
|
+
const skillCount = project_types_js_1.PROJECT_TYPE_REGISTRY[projectType].skills.length;
|
|
213
|
+
const commandCount = 15; // 14 original + finish-setup
|
|
214
|
+
return `# AGENTS.md
|
|
164
215
|
|
|
165
216
|
This project uses the **Agentic Coding Framework** v2.1 — installed by [juninho](https://github.com/KleberMotta/juninho).
|
|
217
|
+
Project type: **${stackLabel}**
|
|
166
218
|
|
|
167
219
|
## Workflows
|
|
168
220
|
|
|
@@ -199,6 +251,7 @@ This project uses the **Agentic Coding Framework** v2.1 — installed by [juninh
|
|
|
199
251
|
| \`/j.handoff\` | Prepare end-of-session handoff doc |
|
|
200
252
|
| \`/j.init-deep\` | Generate hierarchical AGENTS.md + populate domain docs |
|
|
201
253
|
| \`/j.ulw-loop\` | Maximum parallelism mode |
|
|
254
|
+
| \`/j.finish-setup\` | Scan codebase, generate dynamic skills from file patterns, populate domain/principles docs |
|
|
202
255
|
|
|
203
256
|
## Agent Roster
|
|
204
257
|
|
|
@@ -237,7 +290,7 @@ Maps files, patterns, and constraints before the developer interview.
|
|
|
237
290
|
|
|
238
291
|
### @j.librarian
|
|
239
292
|
External docs and OSS research. Spawned by planner Phase 1.
|
|
240
|
-
Fetches official API docs via Context7 MCP.
|
|
293
|
+
Fetches official API docs via Context7 MCP and context-mode MCP.
|
|
241
294
|
|
|
242
295
|
## Context Tiers
|
|
243
296
|
|
|
@@ -285,15 +338,7 @@ Fetches official API docs via Context7 MCP.
|
|
|
285
338
|
|
|
286
339
|
| Skill | Activates on | Notes |
|
|
287
340
|
|-------|-------------|-------|
|
|
288
|
-
|
|
289
|
-
| \`j.page-creation\` | \`app/**/page.tsx\` | Stack-specific; use only on Next.js App Router repos |
|
|
290
|
-
| \`j.api-route-creation\` | \`app/api/**/*.ts\` | |
|
|
291
|
-
| \`j.server-action-creation\` | \`**/actions.ts\` | Stack-specific; use only on Next.js Server Actions repos |
|
|
292
|
-
| \`j.schema-migration\` | \`schema.prisma\` | |
|
|
293
|
-
| \`j.agents-md-writing\` | \`**/AGENTS.md\` | Directory-local agent guidance |
|
|
294
|
-
| \`j.domain-doc-writing\` | \`docs/domain/**/*.md\` | Business behavior and sync markers |
|
|
295
|
-
| \`j.principle-doc-writing\` | \`docs/principles/**\` | Cross-cutting technical rules |
|
|
296
|
-
| \`j.shell-script-writing\` | \`.opencode/scripts/**/*.sh\`, \`scripts/**/*.sh\`, hooks | Fast, safe automation scripts |
|
|
341
|
+
${skillsTable(projectType, isKotlin)}
|
|
297
342
|
|
|
298
343
|
## State Files
|
|
299
344
|
|
|
@@ -304,6 +349,7 @@ Fetches official API docs via Context7 MCP.
|
|
|
304
349
|
| \`.opencode/state/validator-work.md\` | Validator audit trail — BLOCK/FIX/NOTE per pass |
|
|
305
350
|
| \`.opencode/state/implementer-work.md\` | Implementer decisions and blockers log |
|
|
306
351
|
| \`.opencode/state/workflow-config.md\` | Controls handoff, doc sync, and configurable UNIFY behavior |
|
|
352
|
+
| \`.opencode/state/skill-map.json\` | Dynamic skill-to-pattern mapping — extended by /j.finish-setup |
|
|
307
353
|
| \`.opencode/state/.plan-ready\` | Transient IPC flag — plan path, consumed by plan-autoload |
|
|
308
354
|
|
|
309
355
|
## Conventions
|
|
@@ -315,6 +361,7 @@ Fetches official API docs via Context7 MCP.
|
|
|
315
361
|
- Worktrees: \`worktrees/{feature}-{task}/\` — created by implementer, removed by UNIFY
|
|
316
362
|
- Hierarchical \`AGENTS.md\`: root + \`src/\` + \`src/{module}/\` — generated by \`/j.init-deep\`
|
|
317
363
|
`;
|
|
364
|
+
}
|
|
318
365
|
// ─── Domain INDEX.md ──────────────────────────────────────────────────────────
|
|
319
366
|
const DOMAIN_INDEX = `# Domain Index
|
|
320
367
|
|