@difflab/difflab-cli 0.7.1 → 0.8.1

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 +3 -3
  2. package/dist/index.js +184 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -31,7 +31,7 @@ Initialization requires a GitHub HTTPS or SSH origin and never creates a Git rep
31
31
 
32
32
  If initialization is interrupted, retry `difflab init <PROJECT_KEY>`; matching partial links and database rows can be reused, but conflicting paths require manual inspection. Do not delete the shared database to repair a repository link.
33
33
 
34
- The `project_context({ cwd })` MCP tool inspects initialized repositories without creating files or applying migrations. If it reports missing or inconsistent setup, load the portable `skills/difflab-init/SKILL.md` in your client's Agent Skills directory and follow its CLI steps. Existing `todo_*` MCP tools remain available.
34
+ The `project_context({ cwd })` MCP tool inspects initialized repositories without creating files or applying migrations. Existing `todo_*` MCP tools remain available.
35
35
 
36
36
  ## MCP setup
37
37
 
@@ -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,162 @@ 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
+ ## Setup and tasks
48922
+
48923
+ {{Tool versions, dependency installation, environment inputs, and required services.}}
48924
+
48925
+ | Task | Command | Purpose | Observed result |
48926
+ | ---------------- | ------------------------- | ------------------------------------------------- | ---------------------------- |
48927
+ | Build | \`mise run {{build-task}}\` | {{Build the experiment}} | {{Actual result or pending}} |
48928
+ | Test | \`mise run {{test-task}}\` | {{Validate the experimental behavior}} | {{Actual result or pending}} |
48929
+ | Run {{approach}} | \`mise run {{run-task}}\` | {{Run this prototype; repeat for every approach}} | {{Actual result or pending}} |
48930
+
48931
+ {{Explain any genuinely inapplicable build/test task and its alternative validation. Identify unrun checks explicitly.}}
48932
+
48933
+ ## Code map
48934
+
48935
+ {{Focused submodules, their responsibilities and small public APIs, entrypoints, and minimal examples. Keep the experiment direct and avoid speculative abstractions or giant implementation files.}}
48936
+
48937
+ ## Alternatives
48938
+
48939
+ - {{Alternative or variation to compare, if any.}}
48940
+
48941
+ ## Experiments
48942
+
48943
+ | Approach | What changed | How to run | Result |
48944
+ | ------------ | ------------ | ------------- | --------------- |
48945
+ | {{approach}} | {{scope}} | \`{{command}}\` | {{observation}} |
48946
+
48947
+ ## Learnings
48948
+
48949
+ - {{Evidence-based result, caveat, and what remains unknown.}}
48950
+
48951
+ ## Compare with main at branch creation
48952
+
48953
+ 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\`.
48954
+
48955
+ ## Disposition
48956
+
48957
+ {{Follow-up decision or experiment; freeze with an annotated tag, never merge this branch.}}
48958
+ `;
48959
+ var init_poc_readme = () => {};
48960
+
48795
48961
  // templates/examples/plan-feature.md
48796
48962
  var plan_feature_default = `# Invite teammates to a project
48797
48963
 
@@ -49309,6 +49475,10 @@ var init_source = __esm(() => {
49309
49475
  init_pull_request_description();
49310
49476
  init_flow_definition();
49311
49477
  init_flow_instance();
49478
+ init_exploration_summary();
49479
+ init_exploration_research();
49480
+ init_exploration_proposal();
49481
+ init_poc_readme();
49312
49482
  init_plan_feature();
49313
49483
  init_plan_migration();
49314
49484
  init_design_service();
@@ -49329,7 +49499,11 @@ var init_source = __esm(() => {
49329
49499
  { name: "ui-component-architecture", description: "UI component design and implementation" },
49330
49500
  { name: "pull-request-description", description: "Draft pull request description" },
49331
49501
  { name: "flow-definition", description: "Reusable global Agent Skill flow definition" },
49332
- { name: "flow-instance", description: "Frozen repository-local flow run" }
49502
+ { name: "flow-instance", description: "Frozen repository-local flow run" },
49503
+ { name: "exploration-summary", description: "Source-grounded technical exploration summary" },
49504
+ { name: "exploration-research", description: "Technical exploration research notes" },
49505
+ { name: "exploration-proposal", description: "Optional technical exploration approach" },
49506
+ { name: "poc-readme", description: "Disposable proof-of-concept branch README" }
49333
49507
  ];
49334
49508
  contents = {
49335
49509
  "spec-driven-plan.md": spec_driven_plan_default,
@@ -49342,6 +49516,10 @@ var init_source = __esm(() => {
49342
49516
  "pull-request-description.md": pull_request_description_default,
49343
49517
  "flow-definition.md": flow_definition_default,
49344
49518
  "flow-instance.md": flow_instance_default,
49519
+ "exploration-summary.md": exploration_summary_default,
49520
+ "exploration-research.md": exploration_research_default,
49521
+ "exploration-proposal.md": exploration_proposal_default,
49522
+ "poc-readme.md": poc_readme_default,
49345
49523
  "examples/plan-feature.md": plan_feature_default,
49346
49524
  "examples/plan-migration.md": plan_migration_default,
49347
49525
  "examples/design-service.md": design_service_default,
@@ -51908,7 +52086,7 @@ function createProgram(write = console.log, version = "0.1.0", options = {}) {
51908
52086
 
51909
52087
  // src/index.ts
51910
52088
  init_errors3();
51911
- var version2 = "0.7.1";
52089
+ var version2 = "0.8.1";
51912
52090
  try {
51913
52091
  await createProgram(console.log, version2).parseAsync(process.argv);
51914
52092
  } 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.1",
4
4
  "private": false,
5
5
  "description": "A minimal Bun CLI starter built with Commander",
6
6
  "license": "Apache-2.0",