@difflab/difflab-cli 0.11.0 → 0.12.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 +6 -2
- package/dist/index.js +90 -106
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -76,9 +76,13 @@ On first use, missing bundled templates and filled examples are copied to `~/.di
|
|
|
76
76
|
|
|
77
77
|
The portable `skills/difflab-plan`, `skills/difflab-review`, `skills/difflab-flow`, `skills/difflab-explore`, `skills/difflab-adr`, and `skills/difflab-poc` directories contain natural-language agent workflows for these templates. Install each skill in your client's Agent Skills directory. The MCP-only `log_append({"path":"/absolute/physical/project-store/plans/YYMMDD-name/logs.txt","message":"Phase started"})` tool creates an append-only progress log on first use; pass the physical path, not the `.difflab` symlink. There is no log CLI command.
|
|
78
78
|
|
|
79
|
-
The [plan authoring guide](../../skills/difflab-plan/references/authoring.md) requires component/process/artifact visuals, compact interfaces, and a nested repo tree at the start of `Consequences`. Add a `Testing` outline
|
|
79
|
+
The [plan authoring guide](../../skills/difflab-plan/references/authoring.md) requires component/process/artifact visuals, compact interfaces, and a nested repo tree at the start of `Consequences`. Add a `Testing` outline with `[M/A/D/R]` notation and BDD-style `given`/`when`/`then` clauses mapped to existing suites or clearly labeled manual acceptance checks. Keep expected commit and green-CI gates, including for `plan go --commit`. That flag permits scoped commits. Push requires separate authorization. Write `N/A.` when infrastructure stays unchanged. Source examples live in the skill's `references/examples/` and are not CLI templates.
|
|
80
80
|
|
|
81
|
-
The [review rubric](../../skills/difflab-review/references/rubric.md) follows
|
|
81
|
+
The [review rubric](../../skills/difflab-review/references/rubric.md) follows written `AGENTS.md` rules and named style guides. Existing patterns are context, not requirements. Flag material antipatterns even when nearby code shares them. Refactor unclear code at the scope needed. Prefer outside-in tests (`e2e` > `integration` > `unit`) with human-verifiable outputs, and scrutinize unit test organization for BDD/Gherkin structure and clear Arrange/Act/Assert blocks. Untested private functions alone are not findings. Keep whole reports and comments short (one sentence per comment ideally) and use simple English; prefer code snippets or diagrams over walls of text. State findings once and keep detailed coverage in YAML. Omit nitpicks and minor optimizations. Explicit security/performance focuses deepen those audits.
|
|
82
|
+
|
|
83
|
+
Reviews keep the selected frontier model regardless of vendor. One reviewer covers the full rubric. `--bg` runs a complete review in the background. `--council [model-a,model-b]` uses full reviewers per model and saves reports under `council/`. Names accept aliases and clear typos. The lead aggregates supported findings and publishes once. `--adversarial` challenges all dimensions, including Security. Missing model capabilities or incomplete passes are reported honestly.
|
|
84
|
+
|
|
85
|
+
PR creation through `pr new`, create, open, or draft uses the installed `pull-request-description` template. Fill its sections before creating the request, then read the saved body back. `pr merge --squash` selects a native forge squash merge before the operation. These are Agent Skill requests, not CLI subcommands.
|
|
82
86
|
|
|
83
87
|
For an upgrade, reinstall changed skills and reload the client. Back up and move aside only the installed templates/examples you want refreshed, then list templates again. For these changes, inspect `~/.difflab/templates/{spec-driven-plan,code-review}.md` and `examples/{plan-feature,plan-migration,review-change}.md`. Preserve customizations in backups and merge deliberately; never reset the whole directory. Older templates still work: skills add missing subsections to generated documents while preserving human content and existing phase completion state.
|
|
84
88
|
|
package/dist/index.js
CHANGED
|
@@ -48362,7 +48362,7 @@ var spec_driven_plan_default = `# [Outcome to deliver]
|
|
|
48362
48362
|
|
|
48363
48363
|
### Big Ideas
|
|
48364
48364
|
|
|
48365
|
-
[Show changed component relationships with a component diagram, new processes with flowcharts, and new file-based artifacts with trees or suitable visuals. Use Mermaid and fenced text where useful. Keep decisions, responsibilities, invariants, and important failure behavior beside the relevant visual. Draw only the affected parts; keep enough detail to execute without the original chat.]
|
|
48365
|
+
[Lead with compact diagrams. Minimize prose and do not repeat the visual. Use short sentences and familiar words. Show changed component relationships with a component diagram, new processes with flowcharts, and new file-based artifacts with trees or suitable visuals. Use Mermaid and fenced text where useful. Keep decisions, responsibilities, invariants, and important failure behavior beside the relevant visual. Draw only the affected parts; keep enough detail to execute without the original chat.]
|
|
48366
48366
|
|
|
48367
48367
|
### Infrastructure Changes
|
|
48368
48368
|
|
|
@@ -48376,11 +48376,11 @@ var spec_driven_plan_default = `# [Outcome to deliver]
|
|
|
48376
48376
|
|
|
48377
48377
|
#### Repo Changes
|
|
48378
48378
|
|
|
48379
|
-
[Start with a selected file tree:
|
|
48379
|
+
[Start with a selected file tree: [M] modified, [A] added, [D] deleted, [R] renamed before changed filenames, including tests. Identify the largest edits in a short note. Include new modules and meaningful structural changes. Use real inspected paths; label proposed files. State when nothing is removed.]
|
|
48380
48380
|
|
|
48381
48381
|
#### Testing
|
|
48382
48382
|
|
|
48383
|
-
[Show a nested outline of
|
|
48383
|
+
[Inspect the actual test setup first. Show a nested outline of behavior checks mapped to existing suites and configured tasks, using [M], [A], [D], or [R] notation on suites and scenarios just like Repo Changes. Prefer BDD-style test organization with nested given/when/then or it clauses. Label skill checks without a harness as manual acceptance. Do not invent an end-to-end suite or runner. Name the entry point, input/action, and expected result for each scenario. Reuse existing fixtures and suites. Match the scenarios to requirements and phase checks.]
|
|
48384
48384
|
|
|
48385
48385
|
#### Trade-offs
|
|
48386
48386
|
|
|
@@ -48662,9 +48662,10 @@ var code_review_default = `# Review: [change or pull request]
|
|
|
48662
48662
|
|
|
48663
48663
|
- **Revision:** [commit or diff]
|
|
48664
48664
|
- **Intent:** [stated objective and source]
|
|
48665
|
-
- **Reviewer:** [
|
|
48665
|
+
- **Reviewer:** [actual model identity]
|
|
48666
|
+
- **Mode:** [normal/adversarial; single model or council with linked model reports]
|
|
48666
48667
|
|
|
48667
|
-
[
|
|
48668
|
+
[Use short sentences, active voice, and familiar words throughout. Keep section assessments brief and link to findings instead of repeating them. Keep detailed criterion coverage in rubric.yaml. Apply AGENTS.md and named style guides. Informal conventions are context, not requirements. Flag material antipatterns even when existing code shares them.]
|
|
48668
48669
|
|
|
48669
48670
|
## Intent Delivery
|
|
48670
48671
|
|
|
@@ -48672,7 +48673,7 @@ var code_review_default = `# Review: [change or pull request]
|
|
|
48672
48673
|
|
|
48673
48674
|
## Readability
|
|
48674
48675
|
|
|
48675
|
-
[Do names and code structure show what happens? Compare names with behavior, side effects, and callers.
|
|
48676
|
+
[Do names and code structure show what happens? Compare names with behavior, side effects, and callers. Apply written naming rules. Do not enforce harmless informal patterns. Flag misleading names and flows that are hard to follow.]
|
|
48676
48677
|
|
|
48677
48678
|
## Semantic Organization
|
|
48678
48679
|
|
|
@@ -48680,7 +48681,7 @@ var code_review_default = `# Review: [change or pull request]
|
|
|
48680
48681
|
|
|
48681
48682
|
## Maintainability
|
|
48682
48683
|
|
|
48683
|
-
[Does the change
|
|
48684
|
+
[Does the change remain understandable and maintainable under applicable written rules? Existing antipatterns do not justify new ones. Check new fields, types, helpers, and dependencies against existing code and callers. Reuse suitable code and remove needless complexity.]
|
|
48684
48685
|
|
|
48685
48686
|
## Reliability/Testing
|
|
48686
48687
|
|
|
@@ -48696,11 +48697,11 @@ var code_review_default = `# Review: [change or pull request]
|
|
|
48696
48697
|
|
|
48697
48698
|
## Security
|
|
48698
48699
|
|
|
48699
|
-
[Optional:
|
|
48700
|
+
[Optional in normal mode: select for a security focus or --adversarial. Adversarial mode challenges all applicable dimensions. Otherwise state that it was not selected. Report clear security defects discovered by other dimensions without claiming a security audit. Avoid unrelated hardening requests.]
|
|
48700
48701
|
|
|
48701
48702
|
## Change Requests
|
|
48702
48703
|
|
|
48703
|
-
|
|
48704
|
+
State each finding once here, with its issue, effect, and useful fix. Use short, plain-English sentences for the whole report, including generated comments and replies. Include a suggested change when a concrete fix is available. State the issue and its effect directly. Phrase recommendations with \u201CLet's\u201D, \u201CI suggest\u201D, or \u201CI recommend\u201D. Include a short snippet or suggested patch only when it clarifies the fix. Use the scope that fixes the problem, including a refactor when needed. Group repeated instances of one cause. Omit repeated context, nitpicks, minor optimizations, and speculative findings. End each generated request and response with its model attribution quote. Preserve human text unchanged.
|
|
48704
48705
|
|
|
48705
48706
|
### [file:line \u2014 request]
|
|
48706
48707
|
|
|
@@ -48717,7 +48718,7 @@ Every generated comment and reply must use simple English and be as short as pos
|
|
|
48717
48718
|
|
|
48718
48719
|
| Severity | Location | Evidence and impact | Required change or question |
|
|
48719
48720
|
| --- | --- | --- | --- |
|
|
48720
|
-
| [blocking/consider/note] | [file:line] | [
|
|
48721
|
+
| [blocking/consider/note] | [file:line] | [short link to Change Request; do not repeat its text] | [short action or link] |
|
|
48721
48722
|
|
|
48722
48723
|
## Overall Assessment
|
|
48723
48724
|
|
|
@@ -48727,22 +48728,24 @@ Every generated comment and reply must use simple English and be as short as pos
|
|
|
48727
48728
|
|
|
48728
48729
|
- **Checks run:** [command and result.]
|
|
48729
48730
|
- **Not verified:** [environment, path, behavior, or applicable repository guidance that could not be checked.]
|
|
48731
|
+
- **Council:** [source reports, actual model identities, unresolved disagreements, or not selected.]
|
|
48730
48732
|
- **Rubric:** [path to the copied YAML rubric with completed criterion results. Disclose missing, pending, skipped, or stale results.]
|
|
48731
48733
|
`;
|
|
48732
48734
|
var init_code_review = () => {};
|
|
48733
48735
|
|
|
48734
48736
|
// templates/code-review-rubric.yaml
|
|
48735
48737
|
var code_review_rubric_default = `version: 1
|
|
48736
|
-
|
|
48737
|
-
|
|
48738
|
-
reasoning_effort: medium
|
|
48738
|
+
review_defaults:
|
|
48739
|
+
model_policy: retain-frontier
|
|
48739
48740
|
review:
|
|
48740
48741
|
base_revision: null
|
|
48741
48742
|
head_revision: null
|
|
48742
48743
|
working_tree: null
|
|
48743
48744
|
changed_files: []
|
|
48744
48745
|
exclusions: []
|
|
48745
|
-
|
|
48746
|
+
reviewers: []
|
|
48747
|
+
model_inputs: []
|
|
48748
|
+
model_results: []
|
|
48746
48749
|
sections:
|
|
48747
48750
|
- title: Intent Delivery
|
|
48748
48751
|
criteria:
|
|
@@ -48762,7 +48765,7 @@ sections:
|
|
|
48762
48765
|
scope: file
|
|
48763
48766
|
default_severity: consider
|
|
48764
48767
|
issue: >-
|
|
48765
|
-
Function or other names misrepresent behavior, hide side effects, or
|
|
48768
|
+
Function or other names misrepresent behavior, hide side effects, or violate written naming rules.
|
|
48766
48769
|
results: []
|
|
48767
48770
|
- id: readability.structure
|
|
48768
48771
|
scope: file
|
|
@@ -48779,7 +48782,7 @@ sections:
|
|
|
48779
48782
|
- id: organization.architecture
|
|
48780
48783
|
scope: review
|
|
48781
48784
|
default_severity: consider
|
|
48782
|
-
issue: Files or classes
|
|
48785
|
+
issue: Files or classes mix responsibilities, obscure ownership, or violate written architecture rules.
|
|
48783
48786
|
results: []
|
|
48784
48787
|
- id: organization.api-ergonomics
|
|
48785
48788
|
scope: applicable-file
|
|
@@ -48835,14 +48838,15 @@ sections:
|
|
|
48835
48838
|
- id: testing.application
|
|
48836
48839
|
scope: review
|
|
48837
48840
|
default_severity: consider
|
|
48838
|
-
issue:
|
|
48841
|
+
issue: >-
|
|
48842
|
+
Required behavior lacks outside-in test evidence (e2e > integration > unit), or e2e/integration tests lack human-verifiable outputs such as snapshots, test logs, or JSON outputs.
|
|
48839
48843
|
results: []
|
|
48840
48844
|
- id: testing.relevance
|
|
48841
48845
|
scope: applicable-file
|
|
48842
48846
|
applies_when: Added or modified test files.
|
|
48843
48847
|
default_severity: consider
|
|
48844
48848
|
issue: >-
|
|
48845
|
-
|
|
48849
|
+
Verbose unit tests pad coverage without proving real contracts, or a test verifies external dependency behavior without establishing behavior of the repository's own source code.
|
|
48846
48850
|
results: []
|
|
48847
48851
|
- id: testing.names
|
|
48848
48852
|
scope: applicable-file
|
|
@@ -48856,7 +48860,7 @@ sections:
|
|
|
48856
48860
|
applies_when: Added or modified test files.
|
|
48857
48861
|
default_severity: consider
|
|
48858
48862
|
issue: >-
|
|
48859
|
-
Test
|
|
48863
|
+
Test organization lacks clear BDD/Gherkin structure (given/when/then) or interleaves setup, actions, and assertions so coverage or expected results are hard to see.
|
|
48860
48864
|
results: []
|
|
48861
48865
|
- id: testing.fixtures
|
|
48862
48866
|
scope: applicable-file
|
|
@@ -48900,8 +48904,6 @@ sections:
|
|
|
48900
48904
|
default_severity: blocking
|
|
48901
48905
|
issue: The change exposes secrets or breaks authorization or a trust boundary.
|
|
48902
48906
|
results: []
|
|
48903
|
-
worker:
|
|
48904
|
-
reasoning_effort: high
|
|
48905
48907
|
`;
|
|
48906
48908
|
var init_code_review_rubric = () => {};
|
|
48907
48909
|
|
|
@@ -49266,8 +49268,6 @@ Project owners need to invite teammates without sharing credentials. Recipients
|
|
|
49266
49268
|
|
|
49267
49269
|
### Big Ideas
|
|
49268
49270
|
|
|
49269
|
-
Keep invitation policy in the service and transport concerns in the handler. Store a single-use token hash, project, recipient, and expiry. Use the existing mail queue; no new service is needed.
|
|
49270
|
-
|
|
49271
49271
|
\`\`\`mermaid
|
|
49272
49272
|
flowchart LR
|
|
49273
49273
|
HTTP["HTTP handler"] --> Service["Invitation service<br/>eligibility and acceptance"]
|
|
@@ -49275,7 +49275,7 @@ flowchart LR
|
|
|
49275
49275
|
Service --> Queue["Existing mail queue"]
|
|
49276
49276
|
\`\`\`
|
|
49277
49277
|
|
|
49278
|
-
|
|
49278
|
+
Store only the token hash. Save before queueing delivery. An email outage must not lose the invitation.
|
|
49279
49279
|
|
|
49280
49280
|
\`\`\`mermaid
|
|
49281
49281
|
flowchart TD
|
|
@@ -49305,34 +49305,37 @@ Never log raw tokens. Apply the existing request rate limit to creation; do not
|
|
|
49305
49305
|
|
|
49306
49306
|
#### Repo Changes
|
|
49307
49307
|
|
|
49308
|
-
Illustrative paths:
|
|
49308
|
+
Illustrative paths: \`[M]\` modified, \`[A]\` added, \`[D]\` deleted, \`[R]\` renamed. No files are removed or renamed. \`service.ts\` contains the largest edits.
|
|
49309
49309
|
|
|
49310
49310
|
\`\`\`text
|
|
49311
49311
|
src/
|
|
49312
49312
|
\u251C\u2500\u2500 invitations/
|
|
49313
|
-
\u2502 \u251C\u2500\u2500 store.ts
|
|
49314
|
-
\u2502 \u251C\u2500\u2500 service.ts
|
|
49315
|
-
\u2502 \u2514\u2500\u2500 service.spec.ts
|
|
49313
|
+
\u2502 \u251C\u2500\u2500 [A] store.ts persistence and transaction
|
|
49314
|
+
\u2502 \u251C\u2500\u2500 [A] service.ts invitation policy
|
|
49315
|
+
\u2502 \u2514\u2500\u2500 [A] service.spec.ts public API with real test store
|
|
49316
49316
|
\u2514\u2500\u2500 http/
|
|
49317
|
-
\u251C\u2500\u2500 routes.ts
|
|
49318
|
-
\u251C\u2500\u2500 invitations.ts
|
|
49319
|
-
\u2514\u2500\u2500 invitations.spec.ts
|
|
49317
|
+
\u251C\u2500\u2500 [M] routes.ts register invitation handlers
|
|
49318
|
+
\u251C\u2500\u2500 [A] invitations.ts transport and authorization
|
|
49319
|
+
\u2514\u2500\u2500 [A] invitations.spec.ts application request scenarios
|
|
49320
49320
|
\`\`\`
|
|
49321
49321
|
|
|
49322
49322
|
#### Testing
|
|
49323
49323
|
|
|
49324
49324
|
\`\`\`text
|
|
49325
|
-
|
|
49326
|
-
\
|
|
49327
|
-
|
|
49328
|
-
|
|
49329
|
-
|
|
49330
|
-
\u2514\u2500\u2500
|
|
49331
|
-
|
|
49332
|
-
\u2514\u2500\u2500
|
|
49325
|
+
src/
|
|
49326
|
+
\u251C\u2500\u2500 http/
|
|
49327
|
+
\u2502 \u2514\u2500\u2500 [A] invitations.spec.ts (application behavior)
|
|
49328
|
+
\u2502 \u2514\u2500\u2500 [A] describe invitation endpoints
|
|
49329
|
+
\u2502 \u251C\u2500\u2500 [A] given an owner invite, when recipient accepts, then membership appears
|
|
49330
|
+
\u2502 \u2514\u2500\u2500 [A] given a wrong recipient or expired/used token, when accepted, then it rejects without changing state
|
|
49331
|
+
\u2514\u2500\u2500 invitations/
|
|
49332
|
+
\u2514\u2500\u2500 [A] service.spec.ts (public module behavior)
|
|
49333
|
+
\u2514\u2500\u2500 [A] describe invitation service
|
|
49334
|
+
\u251C\u2500\u2500 [A] given a failed transaction, when accepting, then membership and token changes roll back
|
|
49335
|
+
\u2514\u2500\u2500 [A] given an email failure, when creating, then the saved invitation stays pending for retry
|
|
49333
49336
|
\`\`\`
|
|
49334
49337
|
|
|
49335
|
-
Use
|
|
49338
|
+
Use BDD-style nested \`given\`/\`when\`/\`then\` scenarios in \`src/http/invitations.spec.ts\` and \`src/invitations/service.spec.ts\`. Reuse fixtures with a real test store.
|
|
49336
49339
|
|
|
49337
49340
|
#### Trade-offs
|
|
49338
49341
|
|
|
@@ -49355,7 +49358,7 @@ Email delivery can fail after persistence. Use existing queue retries and keep t
|
|
|
49355
49358
|
- [ ] Queue delivery after persistence, retry transient mail failures, and expose the pending state to owners.
|
|
49356
49359
|
- [ ] In \`src/http/invitations.spec.ts\`, send an owner invitation, accept as its recipient, and read back membership. Verify wrong-recipient, expired, and used-token requests leave state unchanged. Verify an email failure keeps the saved invitation pending.
|
|
49357
49360
|
- [ ] Validation
|
|
49358
|
-
- [ ] Run the
|
|
49361
|
+
- [ ] Run the application acceptance/rejection scenarios, then the service integration scenarios listed above.
|
|
49359
49362
|
- [ ] Run relevant lint and format checks. This example grants no commit or push permission.
|
|
49360
49363
|
- [ ] If execution authorizes commits and expects CI, commit the changes and confirm CI is green for that commit.
|
|
49361
49364
|
|
|
@@ -49386,8 +49389,6 @@ Readers should retain access to historical activity while the team changes stora
|
|
|
49386
49389
|
|
|
49387
49390
|
### Big Ideas
|
|
49388
49391
|
|
|
49389
|
-
Write to both stores temporarily, backfill older records with stable IDs, compare counts and ordering, then switch readers behind a reversible flag. Keep the legacy reader authoritative until the new store is verified.
|
|
49390
|
-
|
|
49391
49392
|
\`\`\`mermaid
|
|
49392
49393
|
flowchart LR
|
|
49393
49394
|
Writer["Activity writer"] --> Old["Legacy store"]
|
|
@@ -49427,34 +49428,36 @@ readSource = legacy | new # reversible; legacy remains default
|
|
|
49427
49428
|
|
|
49428
49429
|
#### Repo Changes
|
|
49429
49430
|
|
|
49430
|
-
Illustrative paths:
|
|
49431
|
+
Illustrative paths: \`[M]\` modified, \`[A]\` added, \`[D]\` deleted, \`[R]\` renamed. No files are removed or renamed. \`writer.ts\` and \`backfill.ts\` contain the largest edits.
|
|
49431
49432
|
|
|
49432
49433
|
\`\`\`text
|
|
49433
49434
|
infra/
|
|
49434
|
-
\u2514\u2500\u2500 activity-store.tf
|
|
49435
|
+
\u2514\u2500\u2500 [A] activity-store.tf store, credentials, write-failure metrics
|
|
49435
49436
|
src/
|
|
49436
49437
|
\u2514\u2500\u2500 activity/
|
|
49437
|
-
\u251C\u2500\u2500 writer.ts
|
|
49438
|
-
\u251C\u2500\u2500 backfill.ts
|
|
49439
|
-
\u251C\u2500\u2500 reader.ts
|
|
49440
|
-
\u251C\u2500\u2500 migration.spec.ts
|
|
49441
|
-
\u2514\u2500\u2500 history.spec.ts
|
|
49438
|
+
\u251C\u2500\u2500 [M] writer.ts dual writes and retries
|
|
49439
|
+
\u251C\u2500\u2500 [A] backfill.ts resumable batches and comparison
|
|
49440
|
+
\u251C\u2500\u2500 [M] reader.ts reversible read source
|
|
49441
|
+
\u251C\u2500\u2500 [A] migration.spec.ts public API parity and restart scenarios
|
|
49442
|
+
\u2514\u2500\u2500 [M] history.spec.ts application history across cutover/rollback
|
|
49442
49443
|
\`\`\`
|
|
49443
49444
|
|
|
49444
49445
|
#### Testing
|
|
49445
49446
|
|
|
49446
49447
|
\`\`\`text
|
|
49447
|
-
|
|
49448
|
-
\u2514\u2500\u2500 activity
|
|
49449
|
-
\u251C\u2500\u2500
|
|
49450
|
-
\u2514\u2500\u2500
|
|
49451
|
-
|
|
49452
|
-
\u2514\u2500\u2500
|
|
49453
|
-
\
|
|
49454
|
-
|
|
49448
|
+
src/
|
|
49449
|
+
\u2514\u2500\u2500 activity/
|
|
49450
|
+
\u251C\u2500\u2500 [M] history.spec.ts (application behavior)
|
|
49451
|
+
\u2502 \u2514\u2500\u2500 [A] describe activity history cutover
|
|
49452
|
+
\u2502 \u251C\u2500\u2500 [A] given dual writes, when paging history across cutover, then records and cursors match
|
|
49453
|
+
\u2502 \u2514\u2500\u2500 [A] given writes after cutover, when rolling back, then no events are lost
|
|
49454
|
+
\u2514\u2500\u2500 [A] migration.spec.ts (public module behavior)
|
|
49455
|
+
\u2514\u2500\u2500 [A] describe activity storage migration
|
|
49456
|
+
\u251C\u2500\u2500 [A] given a failed destination write, when retried, then one logical event exists in each store
|
|
49457
|
+
\u2514\u2500\u2500 [A] given an interrupted backfill, when resumed, then IDs and order match without duplicates
|
|
49455
49458
|
\`\`\`
|
|
49456
49459
|
|
|
49457
|
-
Use \`src/activity/history.spec.ts\` for application
|
|
49460
|
+
Use BDD-style nested \`given\`/\`when\`/\`then\` scenarios in \`src/activity/history.spec.ts\` for application behavior and \`src/activity/migration.spec.ts\` for public storage APIs with real test stores.
|
|
49458
49461
|
|
|
49459
49462
|
#### Trade-offs
|
|
49460
49463
|
|
|
@@ -49486,7 +49489,7 @@ Dual writes increase latency and allow partial failure. Record discrepancies and
|
|
|
49486
49489
|
- [ ] Extend application scenarios in \`src/activity/history.spec.ts\`: write and read paged history, switch stores, write again, and roll back. Assert the same visible history without lost events; do not assert private helper calls.
|
|
49487
49490
|
- [ ] Keep dual writes and monitor parity through the rollback window.
|
|
49488
49491
|
- [ ] Validation
|
|
49489
|
-
- [ ] Run the
|
|
49492
|
+
- [ ] Run the application cutover/rollback scenarios, then the storage integration scenarios listed above.
|
|
49490
49493
|
- [ ] Run relevant lint and format checks. This example grants no commit or push permission.
|
|
49491
49494
|
- [ ] If execution authorizes commits and expects CI, commit the changes and confirm CI is green for that commit.
|
|
49492
49495
|
|
|
@@ -49676,94 +49679,75 @@ var init_prd_onboarding = () => {};
|
|
|
49676
49679
|
var review_change_default = `# Review: invitation acceptance
|
|
49677
49680
|
|
|
49678
49681
|
- **Revision:** illustrative-change-17
|
|
49679
|
-
- **Intent:** Accept
|
|
49682
|
+
- **Intent:** Accept valid invitations without changing membership on rejection.
|
|
49680
49683
|
- **Reviewer:** Authored example, not an executed review.
|
|
49681
|
-
|
|
49682
|
-
This is a fictional example. A real review must use its runtime model name in attribution.
|
|
49684
|
+
- **Mode:** Normal, single model.
|
|
49683
49685
|
|
|
49684
49686
|
## Intent Delivery
|
|
49685
49687
|
|
|
49686
|
-
|
|
49688
|
+
Acceptance lacks a saved-membership check. See [request 2](#request-2).
|
|
49687
49689
|
|
|
49688
49690
|
## Readability
|
|
49689
49691
|
|
|
49690
|
-
|
|
49692
|
+
A query-like name hides a write. See [request 1](#request-1).
|
|
49691
49693
|
|
|
49692
49694
|
## Semantic Organization
|
|
49693
49695
|
|
|
49694
|
-
The handler maps
|
|
49696
|
+
The handler maps requests. The service owns acceptance. The store saves membership.
|
|
49695
49697
|
|
|
49696
49698
|
## Maintainability
|
|
49697
49699
|
|
|
49698
|
-
The
|
|
49700
|
+
The service reuses invitation status without adding duplicate state.
|
|
49699
49701
|
|
|
49700
49702
|
## Reliability/Testing
|
|
49701
49703
|
|
|
49702
|
-
|
|
49703
|
-
|
|
49704
|
-
Repeated setup and nested assertions hide the scenario in \`service.spec.ts:18\`. I suggest a fixture and separate blocks:
|
|
49704
|
+
See [request 2](#request-2).
|
|
49705
49705
|
|
|
49706
|
-
|
|
49707
|
-
describe('acceptInvitation', () => {
|
|
49708
|
-
test('rejects an expired invitation without adding membership', async () => {
|
|
49709
|
-
// Arrange
|
|
49710
|
-
const { service, members, recipient, expiredToken } = await invitationFixture()
|
|
49711
|
-
|
|
49712
|
-
// Act
|
|
49713
|
-
const acceptance = service.acceptInvitation(expiredToken, recipient.id)
|
|
49714
|
-
|
|
49715
|
-
// Assert
|
|
49716
|
-
await expect(acceptance).rejects.toThrow(InvitationExpiredError)
|
|
49717
|
-
expect(await members.list(recipient.id)).toEqual([])
|
|
49718
|
-
})
|
|
49719
|
-
})
|
|
49720
|
-
\`\`\`
|
|
49721
|
-
|
|
49722
|
-
The fixture creates a real test store. I recommend keeping the action and assertions visible and reusing shared setup.
|
|
49723
|
-
|
|
49724
|
-
## Repository Guidance
|
|
49706
|
+
## Documentation
|
|
49725
49707
|
|
|
49726
|
-
The
|
|
49708
|
+
The changed API comment explains token consumption.
|
|
49727
49709
|
|
|
49728
49710
|
## Performance
|
|
49729
49711
|
|
|
49730
|
-
|
|
49712
|
+
No material regression found by inspection. No performance measurements ran.
|
|
49731
49713
|
|
|
49732
49714
|
## Security
|
|
49733
49715
|
|
|
49734
|
-
|
|
49716
|
+
Not selected. No security audit is claimed.
|
|
49735
49717
|
|
|
49736
49718
|
## Change Requests
|
|
49737
49719
|
|
|
49738
|
-
###
|
|
49720
|
+
### Request 1
|
|
49739
49721
|
|
|
49740
49722
|
- **Status:** open
|
|
49741
|
-
- **Request:** \`loadInvitation\` also writes membership. I suggest
|
|
49723
|
+
- **Request:** \`src/invitations/service.ts:42\`: \`loadInvitation\` also writes membership. I suggest \`acceptInvitation\` so callers see the write.
|
|
49742
49724
|
|
|
49743
|
-
> Generated via [actual model
|
|
49725
|
+
> Generated via [actual runtime model; illustrative placeholder only]
|
|
49744
49726
|
|
|
49745
|
-
###
|
|
49727
|
+
### Request 2
|
|
49746
49728
|
|
|
49747
49729
|
- **Status:** open
|
|
49748
|
-
- **Request:**
|
|
49730
|
+
- **Request:** \`src/invitations/service.spec.ts:18\`: Helper tests do not establish saved membership. Let's test acceptance and rejection through the public API, then read membership back.
|
|
49749
49731
|
|
|
49750
|
-
> Generated via [actual model
|
|
49732
|
+
> Generated via [actual runtime model; illustrative placeholder only]
|
|
49751
49733
|
|
|
49752
49734
|
## Findings
|
|
49753
49735
|
|
|
49754
|
-
| Severity | Location
|
|
49755
|
-
|
|
|
49756
|
-
| consider | \`
|
|
49757
|
-
| consider | \`
|
|
49736
|
+
| Severity | Location | Request |
|
|
49737
|
+
| -------- | -------------------- | ----------------------- |
|
|
49738
|
+
| consider | \`service.ts:42\` | [Request 1](#request-1) |
|
|
49739
|
+
| consider | \`service.spec.ts:18\` | [Request 2](#request-2) |
|
|
49758
49740
|
|
|
49759
49741
|
## Overall Assessment
|
|
49760
49742
|
|
|
49761
|
-
|
|
49743
|
+
Address the two requests. No unrelated cleanup is needed.
|
|
49762
49744
|
|
|
49763
49745
|
## Verification and Limits
|
|
49764
49746
|
|
|
49765
|
-
- **Checks run:**
|
|
49766
|
-
- **Not verified:**
|
|
49747
|
+
- **Checks run:** None. This is a fictional example.
|
|
49748
|
+
- **Not verified:** Execution and real repository guidance.
|
|
49749
|
+
- **Rubric:** A real review links its filled rubric here.
|
|
49750
|
+
- **Council:** Not selected.
|
|
49767
49751
|
`;
|
|
49768
49752
|
var init_review_change = () => {};
|
|
49769
49753
|
|
|
@@ -52552,7 +52536,7 @@ function createProgram(write = console.log, version = "0.1.0", options = {}) {
|
|
|
52552
52536
|
|
|
52553
52537
|
// src/index.ts
|
|
52554
52538
|
init_errors3();
|
|
52555
|
-
var version2 = "0.
|
|
52539
|
+
var version2 = "0.12.0";
|
|
52556
52540
|
try {
|
|
52557
52541
|
await createProgram(console.log, version2).parseAsync(process.argv);
|
|
52558
52542
|
} catch (error) {
|