chatroom-cli 1.149.1 → 1.149.2
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/index.js +120 -15
- package/dist/index.js.map +9 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -71356,7 +71356,15 @@ var init_architect = __esm(() => {
|
|
|
71356
71356
|
});
|
|
71357
71357
|
|
|
71358
71358
|
// ../../services/backend/prompts/utils/code-change-verification.ts
|
|
71359
|
-
var CODE_CHANGE_VERIFICATION_CONFIRMATION = "- [ ] I confirm that I have run typecheck and tests for the project (only required if code changes were made)";
|
|
71359
|
+
var CODE_CHANGE_VERIFICATION_CONFIRMATION = "- [ ] I confirm that I have run typecheck and tests for the project (only required if code changes were made)", BUILDER_CODE_CHANGE_VERIFICATION_CONFIRMATION;
|
|
71360
|
+
var init_code_change_verification = __esm(() => {
|
|
71361
|
+
BUILDER_CODE_CHANGE_VERIFICATION_CONFIRMATION = [
|
|
71362
|
+
"- [ ] I confirm that the lightweight checks (typecheck and lint) ran on the code I changed",
|
|
71363
|
+
"- [ ] I confirm that every verification kind the brief marked `required` ran, and I recorded its command and result below",
|
|
71364
|
+
"- [ ] I confirm that every verification kind the brief marked `not applicable` is recorded below with the brief's reason"
|
|
71365
|
+
].join(`
|
|
71366
|
+
`);
|
|
71367
|
+
});
|
|
71360
71368
|
|
|
71361
71369
|
// ../../services/backend/prompts/utils/delegation-disclosure.ts
|
|
71362
71370
|
function getDelegationBriefDisclosureComment(briefSourceRole) {
|
|
@@ -71456,7 +71464,70 @@ ${getRoleGuidanceDisclosureComment(params)}`;
|
|
|
71456
71464
|
var ROLE_GUIDANCE_DISCLOSURE_CHECKBOX = "- [ ] I confirm that I've read and followed the role guidance before starting any work";
|
|
71457
71465
|
var init_role_guidance_disclosure = () => {};
|
|
71458
71466
|
|
|
71467
|
+
// ../../services/backend/prompts/utils/verification-kinds.ts
|
|
71468
|
+
var VERIFICATION_KINDS;
|
|
71469
|
+
var init_verification_kinds = __esm(() => {
|
|
71470
|
+
VERIFICATION_KINDS = [
|
|
71471
|
+
{
|
|
71472
|
+
id: "typecheck",
|
|
71473
|
+
label: "typecheck",
|
|
71474
|
+
timingLabel: "Typecheck",
|
|
71475
|
+
lightweight: true,
|
|
71476
|
+
command: "pnpm turbo run typecheck --filter=<package>"
|
|
71477
|
+
},
|
|
71478
|
+
{
|
|
71479
|
+
id: "lint",
|
|
71480
|
+
label: "lint",
|
|
71481
|
+
timingLabel: "Lint",
|
|
71482
|
+
lightweight: true,
|
|
71483
|
+
command: "pnpm exec eslint <files in scope>"
|
|
71484
|
+
},
|
|
71485
|
+
{
|
|
71486
|
+
id: "unit",
|
|
71487
|
+
label: "unit tests",
|
|
71488
|
+
timingLabel: "Unit tests",
|
|
71489
|
+
lightweight: false,
|
|
71490
|
+
command: "pnpm --dir <workspace> exec vitest run <test files in scope>"
|
|
71491
|
+
},
|
|
71492
|
+
{
|
|
71493
|
+
id: "integration",
|
|
71494
|
+
label: "integration tests",
|
|
71495
|
+
timingLabel: "Integration tests",
|
|
71496
|
+
lightweight: false,
|
|
71497
|
+
command: "pnpm --dir <workspace> exec vitest run <integration specs in scope>",
|
|
71498
|
+
note: "The chatroom-cli suite is `pnpm --filter chatroom-cli test:integration`."
|
|
71499
|
+
},
|
|
71500
|
+
{
|
|
71501
|
+
id: "e2e",
|
|
71502
|
+
label: "e2e",
|
|
71503
|
+
timingLabel: "E2E",
|
|
71504
|
+
lightweight: false,
|
|
71505
|
+
command: "pnpm --dir apps/webapp exec playwright test --config=tests/e2e/playwright.config.ts <specs in scope> --project=chromium"
|
|
71506
|
+
}
|
|
71507
|
+
];
|
|
71508
|
+
});
|
|
71509
|
+
|
|
71459
71510
|
// ../../services/backend/prompts/teams/builder-handback-handoff-templates.ts
|
|
71511
|
+
function getVerificationKindResultLine(kind) {
|
|
71512
|
+
const outcomes = kind.lightweight ? "<ran: command → result>" : "<ran: command → result | not run: reason | not applicable: the brief's reason>";
|
|
71513
|
+
return `- \`${kind.label}\` — ${outcomes}`;
|
|
71514
|
+
}
|
|
71515
|
+
function getVerificationKindTimingLine(kind) {
|
|
71516
|
+
return kind.lightweight ? `- ${kind.timingLabel}: <duration>` : `- ${kind.timingLabel}: <duration | not run | not applicable>`;
|
|
71517
|
+
}
|
|
71518
|
+
function getTimingReportSection() {
|
|
71519
|
+
return `## Timing report
|
|
71520
|
+
<!-- REQUIRED. Record the wall-clock duration of each activity you performed, as m:ss or h:mm:ss. Measure with timestamps (for example \`date +%s\` before and after each step). Write \`not run\` for an activity you did not perform and \`not applicable\` when it does not apply to this brief. Do not omit a row. Typecheck and lint always run, so record their duration; if either cannot run, it is a blocker under \`## Blockers / questions\`, not a \`not run\` row. -->
|
|
71521
|
+
- Brief reading: <duration | not run>
|
|
71522
|
+
- Implementation (code and tests written): <duration | not run>
|
|
71523
|
+
${VERIFICATION_KINDS.map(getVerificationKindTimingLine).join(`
|
|
71524
|
+
`)}
|
|
71525
|
+
- Commits: <duration | not run>
|
|
71526
|
+
- Push and PR: <duration | not run | not applicable>
|
|
71527
|
+
- Other activities: <name — duration, one line each | not applicable>
|
|
71528
|
+
- Slowest activity and why: <one phrase>
|
|
71529
|
+
- Total: <duration>`;
|
|
71530
|
+
}
|
|
71460
71531
|
function getBuilderHandbackTemplate(query) {
|
|
71461
71532
|
const recipientRole = query.toRole;
|
|
71462
71533
|
return getBuilderHandbackBody({
|
|
@@ -71484,7 +71555,12 @@ ${getFileReferenceProofOfCompletionExample()}
|
|
|
71484
71555
|
<evidence the goal was met — list every file you modified; for each behavior the brief's \`## Test seams\` section names a seam for: the test name, the seam it calls, the failure output observed before the implementation, and the passing output after>
|
|
71485
71556
|
|
|
71486
71557
|
## Code Change Verification
|
|
71487
|
-
${
|
|
71558
|
+
${BUILDER_CODE_CHANGE_VERIFICATION_CONFIRMATION}
|
|
71559
|
+
Record each kind below, in this order, with its command and result. Typecheck and lint always run: record their command and result only. If either cannot run, put the blocker under \`## Blockers / questions\` and do not write \`not run\` here. For every other kind, write \`not run: <reason>\` or \`not applicable: <the brief's reason>\`.
|
|
71560
|
+
${VERIFICATION_KINDS.map(getVerificationKindResultLine).join(`
|
|
71561
|
+
`)}
|
|
71562
|
+
|
|
71563
|
+
${getTimingReportSection()}
|
|
71488
71564
|
|
|
71489
71565
|
## Blockers / questions
|
|
71490
71566
|
${getHandoffNotApplicableSectionComment("List blockers")}
|
|
@@ -71496,8 +71572,10 @@ ${getHandoffNotApplicableSectionComment("List review notes")}
|
|
|
71496
71572
|
\`\`\``;
|
|
71497
71573
|
}
|
|
71498
71574
|
var init_builder_handback_handoff_templates = __esm(() => {
|
|
71575
|
+
init_code_change_verification();
|
|
71499
71576
|
init_handoff_quality_principles();
|
|
71500
71577
|
init_role_guidance_disclosure();
|
|
71578
|
+
init_verification_kinds();
|
|
71501
71579
|
});
|
|
71502
71580
|
|
|
71503
71581
|
// ../../services/backend/prompts/teams/duo/handoff-templates/builder-planner-code.ts
|
|
@@ -71789,18 +71867,40 @@ var init_planner_architect_chat = __esm(() => {
|
|
|
71789
71867
|
});
|
|
71790
71868
|
|
|
71791
71869
|
// ../../services/backend/prompts/teams/builder-delegation-handoff-templates.ts
|
|
71792
|
-
function
|
|
71793
|
-
const
|
|
71794
|
-
const
|
|
71795
|
-
|
|
71796
|
-
|
|
71797
|
-
|
|
71798
|
-
|
|
71870
|
+
function getVerificationKindFlagLine(kind) {
|
|
71871
|
+
const choice = kind.lightweight ? "**required**. Lightweight: the builder always runs it, so never mark it `not applicable`." : "**required** or **not applicable: <reason>**.";
|
|
71872
|
+
const note = kind.note ? ` ${kind.note}` : "";
|
|
71873
|
+
return `- \`${kind.label}\` — ${choice} Command: \`${kind.command}\`${note}`;
|
|
71874
|
+
}
|
|
71875
|
+
function getScopeLines(batching) {
|
|
71876
|
+
const focused = "`focused` — each run covers only the test files and workspaces that touch this brief's files.";
|
|
71877
|
+
const roundFinal = batching ? "`round-final` — each run covers the full scope: the full unit suite and full integration suite of every workspace the round changed, typecheck and lint of those workspaces (`pnpm lint` for the whole repository), and every e2e spec the round affects." : "`round-final` — each run covers the full scope: the full unit suite and full integration suite of every workspace this brief changed, typecheck and lint of those workspaces (`pnpm lint` for the whole repository), and every e2e spec this brief affects.";
|
|
71878
|
+
return [
|
|
71879
|
+
"Scope: <`focused` | `round-final`> — replace the placeholder with this brief's scope and keep only that definition below.",
|
|
71880
|
+
`- ${focused}`,
|
|
71881
|
+
`- ${roundFinal}`
|
|
71882
|
+
];
|
|
71883
|
+
}
|
|
71884
|
+
function getVerificationFlagsSection(batching) {
|
|
71885
|
+
return [
|
|
71886
|
+
"## Verification flags",
|
|
71887
|
+
"Mark each kind `required` or `not applicable: <reason>`. The builder runs every `required` kind with the command shown, always runs typecheck and lint, and records each `not applicable` kind in its hand-back.",
|
|
71888
|
+
...getScopeLines(batching),
|
|
71889
|
+
...VERIFICATION_KINDS.map(getVerificationKindFlagLine),
|
|
71890
|
+
WORKSPACE_PROSE_LINE,
|
|
71799
71891
|
"",
|
|
71800
71892
|
""
|
|
71801
71893
|
].join(`
|
|
71802
|
-
`)
|
|
71803
|
-
|
|
71894
|
+
`);
|
|
71895
|
+
}
|
|
71896
|
+
function getBatchingFragments(batching) {
|
|
71897
|
+
const roundGuidance = batching ? "A builder round trip is slow — implement, commit, verify. Group phases when one verification pass covers them, and land a risky or contract-changing phase alone. You decide the grouping. In the brief body, set the `## Verification flags` scope to `round-final` for the round's final brief and `focused` for the others." : "Keep one slice ≈ one focused review surface. Delegate slices incrementally — one at a time, not all at once. In the brief body, set the `## Verification flags` scope to `focused` for each slice and to `round-final` for the final slice, which runs the full pass once.";
|
|
71898
|
+
const endToEndRequirement = batching ? "- Name at least one end-to-end evidence for the feature on the round's final brief: a CLI run, an API call, a UI action, or the template render. Earlier briefs need focused evidence only; the round as a whole must be end-to-end verified. When the brief marks `e2e` `not applicable`, the Requirements must name which of these alternatives is the end-to-end evidence." : "- Name at least one end-to-end evidence that the feature works: a CLI run, an API call, a UI action, or the template render. Unit tests alone are insufficient for new features. When the brief marks `e2e` `not applicable`, the Requirements must name which of these alternatives is the end-to-end evidence.";
|
|
71899
|
+
return {
|
|
71900
|
+
roundGuidance,
|
|
71901
|
+
endToEndRequirement,
|
|
71902
|
+
verificationFlagsSection: getVerificationFlagsSection(batching)
|
|
71903
|
+
};
|
|
71804
71904
|
}
|
|
71805
71905
|
function getBuilderDelegationBriefTemplate(options) {
|
|
71806
71906
|
const { delegatorRole, gatesOwner, batching = false } = options;
|
|
@@ -71811,7 +71911,7 @@ function getBuilderDelegationBriefTemplate(options) {
|
|
|
71811
71911
|
**Division of labor:** For backend contract, API, or schema/persistence changes, the architect designs first and you delegate only after its design returns. You (${delegatorRole}) own slicing and sequencing of builder work. The UI/UX engineer owns UI/UX design. Include its target markup, classes, styles, and screen and flow drawings in UI implementation briefs; the builder implements the components.` : `**Before you delegate:** the \`${gatesOwner}\` clears research, triage, architecture, UI/UX, and asset gates before work reaches you. If a slice depends on a fact, design decision, or bug diagnosis that the work package does not settle, hand back to \`${gatesOwner}\` with the open question instead of guessing. Do not hand off to \`researcher\`, \`triage\`, \`architect\`, or any other specialist yourself.
|
|
71812
71912
|
|
|
71813
71913
|
**Division of labor:** You (${delegatorRole}) own turning the work package into file-level builder slices and sequencing them. Copy any UI/UX target markup, classes, styles, and drawings from the work package into UI implementation briefs; the builder implements the components.`;
|
|
71814
|
-
const { roundGuidance, endToEndRequirement,
|
|
71914
|
+
const { roundGuidance, endToEndRequirement, verificationFlagsSection } = getBatchingFragments(batching);
|
|
71815
71915
|
return `${getDelegationBriefIntro()}
|
|
71816
71916
|
|
|
71817
71917
|
${prelude}
|
|
@@ -71879,7 +71979,7 @@ ${endToEndRequirement}
|
|
|
71879
71979
|
- or: no test seam — <reason>
|
|
71880
71980
|
- For each named seam: write a failing test first, then make it pass (red-green). If the seam is \`no test seam\`, delete this line.
|
|
71881
71981
|
|
|
71882
|
-
${
|
|
71982
|
+
${verificationFlagsSection}## What to avoid
|
|
71883
71983
|
- <anti-patterns, recurring mistakes, or scope creep for this slice — be explicit>
|
|
71884
71984
|
- Do not test private methods or mock internal collaborators. A test that breaks on refactor while behavior is unchanged is wrong.
|
|
71885
71985
|
- Do not derive expected values by re-running the code's own formula. Take them from a known-good literal, a worked example, or the spec.
|
|
@@ -71893,7 +71993,10 @@ ${verificationScopeSection}## What to avoid
|
|
|
71893
71993
|
|
|
71894
71994
|
\`\`\`\``;
|
|
71895
71995
|
}
|
|
71896
|
-
var
|
|
71996
|
+
var WORKSPACE_PROSE_LINE = "`<workspace>` is a directory: `services/backend`, `apps/webapp`, `packages/cli`, or `packages/shared`. `--filter` takes the package name: `@workspace/backend`, `@workspace/webapp`, `chatroom-cli`, or `@workspace/shared`.";
|
|
71997
|
+
var init_builder_delegation_handoff_templates = __esm(() => {
|
|
71998
|
+
init_verification_kinds();
|
|
71999
|
+
});
|
|
71897
72000
|
|
|
71898
72001
|
// ../../services/backend/prompts/teams/duo/handoff-templates/planner-builder-code.ts
|
|
71899
72002
|
function getPlannerBuilderCodeTemplate(_query) {
|
|
@@ -72651,6 +72754,7 @@ ${getHandoffNotApplicableSectionComment("List manual steps outside the system")}
|
|
|
72651
72754
|
</handoff-action>`;
|
|
72652
72755
|
}
|
|
72653
72756
|
var init_handoff_report_template_body = __esm(() => {
|
|
72757
|
+
init_code_change_verification();
|
|
72654
72758
|
init_context_disclosure();
|
|
72655
72759
|
init_handoff_quality_principles();
|
|
72656
72760
|
init_proof_of_verification();
|
|
@@ -73917,6 +74021,7 @@ ${getHandoffNotApplicableSectionComment("List review notes")}
|
|
|
73917
74021
|
\`\`\``;
|
|
73918
74022
|
}
|
|
73919
74023
|
var init_specifier_coordinator_code = __esm(() => {
|
|
74024
|
+
init_code_change_verification();
|
|
73920
74025
|
init_handoff_quality_principles();
|
|
73921
74026
|
init_role_guidance_disclosure();
|
|
73922
74027
|
init_unresolved_decisions();
|
|
@@ -123667,4 +123772,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
123667
123772
|
});
|
|
123668
123773
|
program2.parse();
|
|
123669
123774
|
|
|
123670
|
-
//# debugId=
|
|
123775
|
+
//# debugId=0FE2B8362AD6B80B64756E2164756E21
|