@k0t0vich/meta-agents-template 0.1.9 → 0.1.11
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/CHANGELOG.md +19 -0
- package/README.md +10 -7
- package/package.json +2 -1
- package/src/init.mjs +8 -2
- package/template/.meta-agents/config/system.yaml +3 -0
- package/template/.meta-agents/scripts/sync-status.mjs +14 -8
- package/template/.meta-agents/scripts/task-branch-router.mjs +41 -8
- package/template/.meta-agents/scripts/tracker/github.mjs +690 -4
- package/template/.meta-agents/scripts/tracker-gateway.mjs +54 -13
- package/template/.meta-agents/scripts/verify-implementation-gate.mjs +373 -0
- package/template/README.md +2 -0
- package/template/agents.md +24 -21
- package/template/package.json +1 -0
- package/template/tracker-command-template.md +35 -16
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this package are documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.1.11 - 2026-03-20
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Added a hard pre-implementation command `VERIFY_IMPLEMENTATION_GATE` to enforce task readiness before coding starts.
|
|
9
|
+
- Added canonical Status Agent output contract (6 required sections) and corresponding smoke validation.
|
|
10
|
+
- Added robust empty-repository branch-routing behavior for `meta:task-start --apply` (no-commit bootstrap path).
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Fixed TrackerGateway local script resolution for `PREPARE_TASK_BRANCH`, `RUN_MR_REVIEW_GATE`, and `VERIFY_IMPLEMENTATION_GATE` in npm-linked execution mode.
|
|
14
|
+
- Enforced structured verifiability schema (`strict`, `statistical`, `human`) for task creation and `SET_STATUS -> IN_PROGRESS`.
|
|
15
|
+
- Expanded local post-publish smoke checks for source repo, generated project, and unborn repository scenarios.
|
|
16
|
+
|
|
17
|
+
## 0.1.10 - 2026-03-20
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- Implemented GitHub TrackerGateway adapter operations instead of `not implemented` stubs (`CREATE_TASK`, `SET_STATUS`, `ASSIGN_SPRINT`, `COMMIT_BY_NAME`).
|
|
21
|
+
- Added safe `dryRun` support for GitHub tracker operations to validate flows without side effects.
|
|
22
|
+
- Added smoke regression check for `meta:ops CREATE_TASK` (dry-run) to prevent future regressions where command exists but adapter is stubbed.
|
|
23
|
+
|
|
5
24
|
## 0.1.9 - 2026-03-20
|
|
6
25
|
|
|
7
26
|
### Fixed
|
package/README.md
CHANGED
|
@@ -83,13 +83,14 @@ my-project/
|
|
|
83
83
|
1. `CREATE_TASK`
|
|
84
84
|
2. `PREPARE_TASK_BRANCH`
|
|
85
85
|
3. `SET_STATUS`
|
|
86
|
-
4. `
|
|
87
|
-
5. `
|
|
88
|
-
6. `
|
|
89
|
-
7. `
|
|
90
|
-
8. `
|
|
91
|
-
9. `
|
|
92
|
-
10. `
|
|
86
|
+
4. `VERIFY_IMPLEMENTATION_GATE`
|
|
87
|
+
5. `RUN_REVIEW_GATE`
|
|
88
|
+
6. `COMMIT_BY_NAME`
|
|
89
|
+
7. `RUN_MR_REVIEW_GATE`
|
|
90
|
+
8. `ASSIGN_SPRINT`
|
|
91
|
+
9. `PREPARE_RELEASE_NOTE`
|
|
92
|
+
10. `MARK_TASKS_PUBLISH`
|
|
93
|
+
11. `STATUS_SNAPSHOT`
|
|
93
94
|
|
|
94
95
|
`VERIFY_GOVERNANCE_GATE` выполняет `Governance Watchdog Agent` перед любой операцией и блокирует выполнение при нарушении PRD/acceptance/user-confirmation правил.
|
|
95
96
|
`RUN_REVIEW_GATE` выполняет `Reviewer/Judge Agent` перед коммитом:
|
|
@@ -140,6 +141,7 @@ npm run self:bootstrap
|
|
|
140
141
|
npm run meta:verify
|
|
141
142
|
npm run meta:branch
|
|
142
143
|
npm run meta:task-start -- --task #12 --slug api-redirect
|
|
144
|
+
npm run meta:implementation-gate -- --task #12
|
|
143
145
|
npm run meta:review
|
|
144
146
|
npm run meta:review-approve
|
|
145
147
|
npm run meta:mr-review
|
|
@@ -155,6 +157,7 @@ npm run meta:status
|
|
|
155
157
|
`meta:task-start` делает branch-routing preflight: сравнивает задачу с текущей веткой, показывает dirty/ahead блокеры и готовит маршрут (`stay_on_current_branch` или `create_new_branch`).
|
|
156
158
|
`meta:task-start` также делает context-protection check для `AGENTS.md` (fallback: `agents.md`) между текущей и базовой веткой и требует явного подтверждения при diff.
|
|
157
159
|
Именование branch task ref: использовать GitHub issue ref в формате `issue-<number>`.
|
|
160
|
+
`meta:implementation-gate` блокирует старт реализации, если не выполнены условия `IN_PROGRESS + PRD sections + structured verifiability(strict/statistical/human) + branch alignment`.
|
|
158
161
|
`meta:mr-review` формирует сводный pre-merge отчёт по MR/PR, `meta:mr-review-approve` фиксирует финальный PASS после подтверждения пользователя.
|
|
159
162
|
`meta:status` отдаёт единый статус-срез: trackers used, current sprint, current task, current branch context, git uncommitted и summary.
|
|
160
163
|
В `github` режиме локальные `tasks/*` по умолчанию считаются cache/legacy и не являются источником истины.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k0t0vich/meta-agents-template",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Template system for verification-first agentic development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"meta:status": "node template/.meta-agents/scripts/sync-status.mjs",
|
|
15
15
|
"meta:branch": "node template/.meta-agents/scripts/verify-branch-strategy.mjs",
|
|
16
16
|
"meta:task-start": "node template/.meta-agents/scripts/task-branch-router.mjs",
|
|
17
|
+
"meta:implementation-gate": "node template/.meta-agents/scripts/verify-implementation-gate.mjs",
|
|
17
18
|
"meta:verify": "node template/.meta-agents/scripts/verify-governance.mjs",
|
|
18
19
|
"meta:review": "node template/.meta-agents/scripts/run-review-gate.mjs",
|
|
19
20
|
"meta:review-approve": "node template/.meta-agents/scripts/run-review-gate.mjs --approve yes",
|
package/src/init.mjs
CHANGED
|
@@ -110,6 +110,7 @@ function buildMetaScripts(packageName) {
|
|
|
110
110
|
"meta:status": `${base}/sync-status.mjs`,
|
|
111
111
|
"meta:branch": `${base}/verify-branch-strategy.mjs`,
|
|
112
112
|
"meta:task-start": `${base}/task-branch-router.mjs`,
|
|
113
|
+
"meta:implementation-gate": `${base}/verify-implementation-gate.mjs`,
|
|
113
114
|
"meta:verify": `${base}/verify-governance.mjs`,
|
|
114
115
|
"meta:review": `${base}/run-review-gate.mjs`,
|
|
115
116
|
"meta:review-approve": `${base}/run-review-gate.mjs --approve yes`,
|
|
@@ -217,14 +218,19 @@ async function mergePackageJsonMeta({
|
|
|
217
218
|
|
|
218
219
|
function buildAgentsLinkBlock(packageName) {
|
|
219
220
|
const packageRoot = `./node_modules/${packageName}`;
|
|
221
|
+
const templateAgentsPath = `${packageRoot}/template/agents.md`;
|
|
222
|
+
const trackerTemplatePath = `${packageRoot}/template/tracker-command-template.md`;
|
|
220
223
|
const lines = [
|
|
221
224
|
AGENTS_LINK_BLOCK_START,
|
|
222
225
|
"## Meta Agents Template (npm-linked)",
|
|
223
226
|
"ОБЯЗАТЕЛЬНО: перед выполнением любой команды сначала прочитай canonical rules по ссылкам ниже.",
|
|
224
227
|
"При конфликте локального текста и шаблона приоритет у canonical files из node_modules.",
|
|
225
228
|
"Базовые правила шаблона:",
|
|
226
|
-
`- [Template agents.md](${
|
|
227
|
-
`- [Template tracker-command-template.md](${
|
|
229
|
+
`- [Template agents.md](${templateAgentsPath})`,
|
|
230
|
+
`- [Template tracker-command-template.md](${trackerTemplatePath})`,
|
|
231
|
+
"Canonical files (read by path in this exact order):",
|
|
232
|
+
`1. \`${templateAgentsPath}\``,
|
|
233
|
+
`2. \`${trackerTemplatePath}\``,
|
|
228
234
|
"Локальные конфиги проекта:",
|
|
229
235
|
"- [.meta-agents/config/project-context.yaml](./.meta-agents/config/project-context.yaml)",
|
|
230
236
|
"- [.meta-agents/config/trackers.yaml](./.meta-agents/config/trackers.yaml)",
|
|
@@ -103,6 +103,7 @@ system:
|
|
|
103
103
|
required: true
|
|
104
104
|
required_before_commands:
|
|
105
105
|
- CREATE_TASK
|
|
106
|
+
- VERIFY_IMPLEMENTATION_GATE
|
|
106
107
|
- SET_STATUS
|
|
107
108
|
- COMMIT_BY_NAME
|
|
108
109
|
routing_command: "meta:task-start"
|
|
@@ -160,6 +161,7 @@ system:
|
|
|
160
161
|
required: true
|
|
161
162
|
before_commands:
|
|
162
163
|
- VERIFY_GOVERNANCE_GATE
|
|
164
|
+
- VERIFY_IMPLEMENTATION_GATE
|
|
163
165
|
- CREATE_TASK
|
|
164
166
|
- PREPARE_TASK_BRANCH
|
|
165
167
|
- SET_STATUS
|
|
@@ -225,6 +227,7 @@ system:
|
|
|
225
227
|
- evidence_pack_complete
|
|
226
228
|
- tracker_sync_complete
|
|
227
229
|
- branch_routing_dialog_completed
|
|
230
|
+
- implementation_gate_passed
|
|
228
231
|
- branch_routing_e2e_verified
|
|
229
232
|
- agents_context_consistency_verified
|
|
230
233
|
- watchdog_gate_passed
|
|
@@ -568,23 +568,29 @@ async function main() {
|
|
|
568
568
|
|
|
569
569
|
console.log("# Status Snapshot");
|
|
570
570
|
console.log("");
|
|
571
|
-
console.log("## Trackers");
|
|
571
|
+
console.log("## 1) Trackers Used");
|
|
572
572
|
console.log(`- locked provider: ${report.tracker.lockedProvider}`);
|
|
573
573
|
console.log(`- available providers: ${report.tracker.availableProviders.join(", ") || "unknown"}`);
|
|
574
574
|
console.log(`- workflow source: ${report.tracker.workflowSource}`);
|
|
575
575
|
|
|
576
576
|
console.log("");
|
|
577
|
-
console.log("##
|
|
578
|
-
console.log(`-
|
|
579
|
-
console.log(`- current task: ${report.process.currentTask}`);
|
|
580
|
-
console.log(`- current task ref: ${report.process.currentTaskRef}`);
|
|
581
|
-
console.log(`- branch/task alignment: ${report.process.branchTaskAlignment}`);
|
|
577
|
+
console.log("## 2) Current Sprint");
|
|
578
|
+
console.log(`- ${report.process.currentSprint}`);
|
|
582
579
|
|
|
583
580
|
console.log("");
|
|
584
|
-
console.log("##
|
|
581
|
+
console.log("## 3) Current Task");
|
|
582
|
+
console.log(`- task: ${report.process.currentTask}`);
|
|
583
|
+
console.log(`- task ref: ${report.process.currentTaskRef}`);
|
|
584
|
+
|
|
585
|
+
console.log("");
|
|
586
|
+
console.log("## 4) Current Branch Context");
|
|
585
587
|
console.log(`- branch: ${report.git.branch}`);
|
|
586
588
|
console.log(`- branch type: ${report.git.branchType}`);
|
|
587
589
|
console.log(`- branch task ref: ${report.git.branchTaskRef}`);
|
|
590
|
+
console.log(`- task/branch alignment: ${report.process.branchTaskAlignment}`);
|
|
591
|
+
|
|
592
|
+
console.log("");
|
|
593
|
+
console.log("## 5) Git Uncommitted");
|
|
588
594
|
console.log(`- upstream: ${report.git.upstream}`);
|
|
589
595
|
console.log(`- ahead/behind: ${report.git.ahead}/${report.git.behind}`);
|
|
590
596
|
console.log(`- modified_or_staged: ${report.git.modifiedOrStaged}`);
|
|
@@ -601,7 +607,7 @@ async function main() {
|
|
|
601
607
|
}
|
|
602
608
|
|
|
603
609
|
console.log("");
|
|
604
|
-
console.log("## Summary");
|
|
610
|
+
console.log("## 6) Summary");
|
|
605
611
|
if (report.summary.length === 0) {
|
|
606
612
|
console.log("- no additional notes");
|
|
607
613
|
} else {
|
|
@@ -163,6 +163,7 @@ function collectGitContext() {
|
|
|
163
163
|
branch,
|
|
164
164
|
branchType: classifyBranch(branch),
|
|
165
165
|
branchTaskRef: extractBranchTaskRef(branch),
|
|
166
|
+
hasCommits: hasCommits(),
|
|
166
167
|
upstream: parsed.upstream || "not configured",
|
|
167
168
|
ahead: parsed.ahead,
|
|
168
169
|
behind: parsed.behind,
|
|
@@ -259,6 +260,10 @@ function hasRef(ref) {
|
|
|
259
260
|
return Boolean(git(["show-ref", "--verify", ref], true));
|
|
260
261
|
}
|
|
261
262
|
|
|
263
|
+
function hasCommits() {
|
|
264
|
+
return Boolean(git(["rev-parse", "--verify", "HEAD"], true));
|
|
265
|
+
}
|
|
266
|
+
|
|
262
267
|
function hasOrigin() {
|
|
263
268
|
return Boolean(git(["remote", "get-url", "origin"], true));
|
|
264
269
|
}
|
|
@@ -333,6 +338,25 @@ function executePlan(plan, gitContext) {
|
|
|
333
338
|
git(["fetch", "origin"], false);
|
|
334
339
|
}
|
|
335
340
|
|
|
341
|
+
if (!gitContext.hasCommits) {
|
|
342
|
+
const baseRemote = hasRef(`refs/remotes/origin/${baseBranch}`);
|
|
343
|
+
if (baseRemote) {
|
|
344
|
+
git(["checkout", "-b", baseBranch, "--track", `origin/${baseBranch}`], false);
|
|
345
|
+
} else if (gitContext.branch !== baseBranch) {
|
|
346
|
+
git(["checkout", "-B", baseBranch], false);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
if (plan.targetBranch !== baseBranch) {
|
|
350
|
+
git(["checkout", "-B", plan.targetBranch], false);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
return {
|
|
354
|
+
changedBranch: plan.targetBranch !== gitContext.branch,
|
|
355
|
+
branch: plan.targetBranch,
|
|
356
|
+
message: `Repository has no commits yet. Bootstrapped branch routing and switched to '${plan.targetBranch}'.`,
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
|
|
336
360
|
const baseLocal = hasRef(`refs/heads/${baseBranch}`);
|
|
337
361
|
const baseRemote = hasRef(`refs/remotes/origin/${baseBranch}`);
|
|
338
362
|
|
|
@@ -411,12 +435,27 @@ function buildPlan(options, gitContext) {
|
|
|
411
435
|
requiresDialogue.push(
|
|
412
436
|
"Задача атомарная и относится к текущей feature-ветке. Подтвердите, что продолжаем работу в этой ветке.",
|
|
413
437
|
);
|
|
438
|
+
} else if (!gitContext.hasCommits) {
|
|
439
|
+
requiresDialogue.push(
|
|
440
|
+
"Репозиторий без коммитов. Подтвердите bootstrap маршрута: создать базовую ветку и рабочую ветку без ручного обхода.",
|
|
441
|
+
);
|
|
414
442
|
} else {
|
|
415
443
|
requiresDialogue.push(
|
|
416
444
|
"Задача не относится к текущей ветке. Подтвердите переключение на базовую ветку, обновление и создание новой рабочей ветки.",
|
|
417
445
|
);
|
|
418
446
|
}
|
|
419
447
|
|
|
448
|
+
const suggestedCommands = sameFeature
|
|
449
|
+
? []
|
|
450
|
+
: !gitContext.hasCommits
|
|
451
|
+
? [`git checkout -B ${baseBranch}`, `git checkout -B ${targetBranch}`]
|
|
452
|
+
: [
|
|
453
|
+
"git fetch origin",
|
|
454
|
+
`git checkout ${baseBranch}`,
|
|
455
|
+
`git pull --ff-only origin ${baseBranch}`,
|
|
456
|
+
`git checkout -b ${targetBranch}`,
|
|
457
|
+
];
|
|
458
|
+
|
|
420
459
|
return {
|
|
421
460
|
requested: {
|
|
422
461
|
task: options.task,
|
|
@@ -431,14 +470,7 @@ function buildPlan(options, gitContext) {
|
|
|
431
470
|
namingWarnings,
|
|
432
471
|
contextWarnings: getContextWarnings(baseBranch),
|
|
433
472
|
requiresDialogue,
|
|
434
|
-
suggestedCommands
|
|
435
|
-
? []
|
|
436
|
-
: [
|
|
437
|
-
"git fetch origin",
|
|
438
|
-
`git checkout ${baseBranch}`,
|
|
439
|
-
`git pull --ff-only origin ${baseBranch}`,
|
|
440
|
-
`git checkout -b ${targetBranch}`,
|
|
441
|
-
],
|
|
473
|
+
suggestedCommands,
|
|
442
474
|
};
|
|
443
475
|
}
|
|
444
476
|
|
|
@@ -449,6 +481,7 @@ function printPlan(plan, applyResult) {
|
|
|
449
481
|
console.log(`- branch: ${plan.current.branch}`);
|
|
450
482
|
console.log(`- branch type: ${plan.current.branchType}`);
|
|
451
483
|
console.log(`- branch task ref: ${plan.current.branchTaskRef || "not detected"}`);
|
|
484
|
+
console.log(`- repository state: ${plan.current.hasCommits ? "has commits" : "no commits yet"}`);
|
|
452
485
|
console.log(`- upstream: ${plan.current.upstream}`);
|
|
453
486
|
console.log(`- ahead/behind: ${plan.current.ahead}/${plan.current.behind}`);
|
|
454
487
|
console.log(`- modified_or_staged: ${plan.current.modifiedOrStaged}`);
|