@difflab/difflab-cli 0.7.1 → 0.8.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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/dist/index.js +168 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -66,11 +66,11 @@ difflab-cli templates list
66
66
  difflab-cli templates scaffold spec-driven-plan docs/plans first-plan.md --cwd /absolute/project/path
67
67
  ```
68
68
 
69
- The CLI defaults `--cwd` to its current directory. The MCP server exposes `template_list({})` and `scaffold({"name":"spec-driven-plan","cwd":"/absolute/project/path","path":"docs/plans","filename":"first-plan.md"})`. Both interfaces take a hyphenated template name, a relative destination **directory** (`path`, or `.` for `cwd`), and a separate **filename**. MCP always requires an absolute existing `cwd`. Missing destination directories are created. Available names: `spec-driven-plan`, `software-architecture-design`, `architecture-decision-record`, `product-requirements-document`, `code-review`, `planning-intent`, `ui-component-architecture`, `pull-request-description` (adapted from Diffpi's PR template), `flow-definition`, and `flow-instance`.
69
+ The CLI defaults `--cwd` to its current directory. The MCP server exposes `template_list({})` and `scaffold({"name":"spec-driven-plan","cwd":"/absolute/project/path","path":"docs/plans","filename":"first-plan.md"})`. Both interfaces take a hyphenated template name, a relative destination **directory** (`path`, or `.` for `cwd`), and a separate **filename**. MCP always requires an absolute existing `cwd`. Missing destination directories are created. Available names: `spec-driven-plan`, `software-architecture-design`, `architecture-decision-record`, `product-requirements-document`, `code-review`, `planning-intent`, `ui-component-architecture`, `pull-request-description` (adapted from Diffpi's PR template), `flow-definition`, `flow-instance`, `exploration-summary`, `exploration-research`, `exploration-proposal`, and `poc-readme`.
70
70
 
71
71
  On first use, missing bundled templates and filled examples are copied to `~/.difflab/templates` and `~/.difflab/templates/examples`. Edit the installed templates to customize future documents. Later runs add missing files but never replace existing ones, even after an upgrade. Examples are for reference, not selectable templates. Copying is literal: prompts and placeholders are not substituted. An unknown name, missing or invalid source, unsafe path, symlink, or existing destination causes an error; destination files are never overwritten. The target directory must remain inside `cwd` and the filename must be a single file name without separators. The one symlink exception is an initialized repository's `.difflab` link to its own user project store: `templates scaffold spec-driven-plan .difflab/plans/YYMMDD-name PLAN.md --cwd /absolute/repo` works in Git worktrees as well. To restore a bundled default, move your installed copy aside before listing again.
72
72
 
73
- The portable `skills/difflab-plan`, `skills/difflab-review`, and `skills/difflab-flow` 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.
73
+ 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.
74
74
 
75
75
  ## Flow definitions and runs
76
76
 
package/dist/index.js CHANGED
@@ -48446,13 +48446,23 @@ var architecture_decision_record_default = `# [Decision: problem and chosen solu
48446
48446
 
48447
48447
  ### [Option A]
48448
48448
 
48449
- - Good: [reason.]
48450
- - Bad: [reason.]
48449
+ #### Pros
48450
+
48451
+ - [Benefit.]
48452
+
48453
+ #### Cons
48454
+
48455
+ - [Drawback.]
48451
48456
 
48452
48457
  ### [Option B]
48453
48458
 
48454
- - Good: [reason.]
48455
- - Bad: [reason.]
48459
+ #### Pros
48460
+
48461
+ - [Benefit.]
48462
+
48463
+ #### Cons
48464
+
48465
+ - [Drawback.]
48456
48466
 
48457
48467
  ## Decision Outcome
48458
48468
 
@@ -48792,6 +48802,146 @@ This is the frozen execution snapshot. Include only selected executable steps; n
48792
48802
  `;
48793
48803
  var init_flow_instance = () => {};
48794
48804
 
48805
+ // templates/exploration-summary.md
48806
+ var exploration_summary_default = `# Exploration: {{topic}}
48807
+
48808
+ - **Status:** research in progress
48809
+ - **Started:** {{YYYY-MM-DD}}
48810
+ - **Updated:** {{YYYY-MM-DD}}
48811
+ - **Scope:** {{question and constraints}}
48812
+
48813
+ ## Question
48814
+
48815
+ {{What is being investigated, and why?}}
48816
+
48817
+ ## Findings
48818
+
48819
+ {{Evidence-backed findings with links to research notes. Separate facts from inference.}}
48820
+
48821
+ ## Prior art and options
48822
+
48823
+ {{Existing codebase approaches, comparable open-source implementations, and distinct possible directions. No recommendation is required.}}
48824
+
48825
+ ## Proposals
48826
+
48827
+ {{Optional: links to proposals/*.md. If research-only, say "Not requested".}}
48828
+
48829
+ ## Evidence and freshness
48830
+
48831
+ {{Fetched primary-source URLs, dates accessed and relevant versions; note what changed since the previous revision, if any.}}
48832
+
48833
+ ## Unknowns and next questions
48834
+
48835
+ {{Unverified claims, constraints to confirm, and follow-up research.}}
48836
+
48837
+ ## Revisit history
48838
+
48839
+ {{For updates, date, request (including a revisit without feedback), revision number, and changed evidence. Never replace earlier revisions.}}
48840
+ `;
48841
+ var init_exploration_summary = () => {};
48842
+
48843
+ // templates/exploration-research.md
48844
+ var exploration_research_default = `# Research: {{angle}}
48845
+
48846
+ - **Exploration:** {{topic}}
48847
+ - **Researched:** {{YYYY-MM-DD}}
48848
+ - **Scope:** {{angle and constraints}}
48849
+
48850
+ ## Existing approaches and prior art
48851
+
48852
+ {{Local code paths and comparable external projects; distinguish direct observations from inference.}}
48853
+
48854
+ ## Evidence
48855
+
48856
+ {{Findings with inline citations to fetched primary documentation, source code, or release notes. Cite specific URLs and relevant versions/dates.}}
48857
+
48858
+ ## Library and tool landscape
48859
+
48860
+ {{Relevant alternatives, maintenance activity, licensing, compatibility, and integration constraints. Say when these were not verified.}}
48861
+
48862
+ ## Trade-offs
48863
+
48864
+ {{Supported benefits, drawbacks, and applicability to this repository.}}
48865
+
48866
+ ## Unknowns
48867
+
48868
+ {{Gaps, stale evidence, conflicting sources, and follow-up checks.}}
48869
+
48870
+ ## Sources fetched
48871
+
48872
+ - {{Title \u2014 primary URL \u2014 accessed YYYY-MM-DD \u2014 version/commit where applicable \u2014 what this source supports}}
48873
+ `;
48874
+ var init_exploration_research = () => {};
48875
+
48876
+ // templates/exploration-proposal.md
48877
+ var exploration_proposal_default = `# Proposal: {{distinct approach}}
48878
+
48879
+ - **Exploration:** {{topic}}
48880
+ - **Status:** option, not a decision
48881
+
48882
+ ## Fit
48883
+
48884
+ {{When this approach makes sense and the constraints it meets.}}
48885
+
48886
+ ## Evidence and prior art
48887
+
48888
+ {{Link to research notes, fetched primary sources, and analogous implementations. Label inferences.}}
48889
+
48890
+ ## Design shape
48891
+
48892
+ {{Integration boundary, likely components and interfaces, without writing implementation code or a task plan. Use Mermaid if a diagram clarifies structure.}}
48893
+
48894
+ ## Trade-offs
48895
+
48896
+ {{Costs, risks, maintenance and licensing considerations, and differences from other approaches.}}
48897
+
48898
+ ## Open questions
48899
+
48900
+ {{Unverified claims and checks needed before choosing this approach.}}
48901
+
48902
+ ## Sources
48903
+
48904
+ - {{Primary URL \u2014 accessed YYYY-MM-DD \u2014 version/commit where relevant}}
48905
+ `;
48906
+ var init_exploration_proposal = () => {};
48907
+
48908
+ // templates/poc-readme.md
48909
+ var poc_readme_default = `---
48910
+ base_commit: '{{full SHA of origin/main at branch creation}}'
48911
+ ---
48912
+
48913
+ # PoC: {{name}}
48914
+
48915
+ > Experimental branch only. Do not merge into production or publish as a release.
48916
+
48917
+ ## Purpose
48918
+
48919
+ {{Question to answer and the smallest useful success criterion.}}
48920
+
48921
+ ## Alternatives
48922
+
48923
+ - {{Alternative or variation to compare, if any.}}
48924
+
48925
+ ## Experiments
48926
+
48927
+ | Approach | What changed | How to run | Result |
48928
+ | ------------ | ------------ | ------------- | --------------- |
48929
+ | {{approach}} | {{scope}} | \`{{command}}\` | {{observation}} |
48930
+
48931
+ ## Learnings
48932
+
48933
+ - {{Evidence-based result, caveat, and what remains unknown.}}
48934
+
48935
+ ## Compare with main at branch creation
48936
+
48937
+ The \`base_commit\` is the full SHA of \`origin/main\` when this branch was created; do not update it when main moves. Compare this PoC with its starting point using \`git diff <base_commit> HEAD\`.
48938
+
48939
+ ## Disposition
48940
+
48941
+ {{Follow-up decision or experiment; freeze with an annotated tag, never merge this branch.}}
48942
+ `;
48943
+ var init_poc_readme = () => {};
48944
+
48795
48945
  // templates/examples/plan-feature.md
48796
48946
  var plan_feature_default = `# Invite teammates to a project
48797
48947
 
@@ -49309,6 +49459,10 @@ var init_source = __esm(() => {
49309
49459
  init_pull_request_description();
49310
49460
  init_flow_definition();
49311
49461
  init_flow_instance();
49462
+ init_exploration_summary();
49463
+ init_exploration_research();
49464
+ init_exploration_proposal();
49465
+ init_poc_readme();
49312
49466
  init_plan_feature();
49313
49467
  init_plan_migration();
49314
49468
  init_design_service();
@@ -49329,7 +49483,11 @@ var init_source = __esm(() => {
49329
49483
  { name: "ui-component-architecture", description: "UI component design and implementation" },
49330
49484
  { name: "pull-request-description", description: "Draft pull request description" },
49331
49485
  { name: "flow-definition", description: "Reusable global Agent Skill flow definition" },
49332
- { name: "flow-instance", description: "Frozen repository-local flow run" }
49486
+ { name: "flow-instance", description: "Frozen repository-local flow run" },
49487
+ { name: "exploration-summary", description: "Source-grounded technical exploration summary" },
49488
+ { name: "exploration-research", description: "Technical exploration research notes" },
49489
+ { name: "exploration-proposal", description: "Optional technical exploration approach" },
49490
+ { name: "poc-readme", description: "Disposable proof-of-concept branch README" }
49333
49491
  ];
49334
49492
  contents = {
49335
49493
  "spec-driven-plan.md": spec_driven_plan_default,
@@ -49342,6 +49500,10 @@ var init_source = __esm(() => {
49342
49500
  "pull-request-description.md": pull_request_description_default,
49343
49501
  "flow-definition.md": flow_definition_default,
49344
49502
  "flow-instance.md": flow_instance_default,
49503
+ "exploration-summary.md": exploration_summary_default,
49504
+ "exploration-research.md": exploration_research_default,
49505
+ "exploration-proposal.md": exploration_proposal_default,
49506
+ "poc-readme.md": poc_readme_default,
49345
49507
  "examples/plan-feature.md": plan_feature_default,
49346
49508
  "examples/plan-migration.md": plan_migration_default,
49347
49509
  "examples/design-service.md": design_service_default,
@@ -51908,7 +52070,7 @@ function createProgram(write = console.log, version = "0.1.0", options = {}) {
51908
52070
 
51909
52071
  // src/index.ts
51910
52072
  init_errors3();
51911
- var version2 = "0.7.1";
52073
+ var version2 = "0.8.0";
51912
52074
  try {
51913
52075
  await createProgram(console.log, version2).parseAsync(process.argv);
51914
52076
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difflab/difflab-cli",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "private": false,
5
5
  "description": "A minimal Bun CLI starter built with Commander",
6
6
  "license": "Apache-2.0",