@difflab/difflab-cli 0.9.0 → 0.10.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 +3 -1
- package/dist/index.js +62 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,7 +66,9 @@ 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`, `flow-instance`, `exploration-summary`, `exploration-research`, `exploration-proposal`, and `poc-readme`.
|
|
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`, `agents`, `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
|
+
|
|
71
|
+
Use `difflab-cli templates scaffold agents . AGENTS.md --cwd /absolute/project/path` to start repository guidance. Fill the prompts with known rules and remove unused prompts. The template separates Hard Rules, Organization, Style, and Testing. Hard Rules name required task runners and repository tools. Organization separates directory layout from section headers, code ordering, and grouping within files. Review addressing saves explicit user repository rules immediately and marks inferred or uncertain rules with `[Proposed]`. It asks before reorganizing existing guidance to match the template and adapts the existing structure if permission is declined. It retains terse file-level organization rules and keeps guidance within 500 soft-wrapped source lines.
|
|
70
72
|
|
|
71
73
|
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
74
|
|
package/dist/index.js
CHANGED
|
@@ -48618,6 +48618,45 @@ var product_requirements_document_default = `# [User outcome or product change]
|
|
|
48618
48618
|
`;
|
|
48619
48619
|
var init_product_requirements_document = () => {};
|
|
48620
48620
|
|
|
48621
|
+
// templates/agents.md
|
|
48622
|
+
var agents_default = `# Repository Guidance
|
|
48623
|
+
|
|
48624
|
+
<!-- Fill the prompts with known repository rules and remove unused prompts. Write terse, imperative bullets in simple English. Use soft wrapping and keep the whole file at or below 500 source lines, including headings and blank lines. Replace contradictory rules, merge duplicates, and prune less important guidance when adding rules. Prefix inferred or uncertain rules with [Proposed]; omit the prefix only for rules the user explicitly asks to add or says must always apply in this repo. Link to maintained docs for details; omit architecture explanations, README repetition, and code snippets. -->
|
|
48625
|
+
|
|
48626
|
+
## Hard Rules
|
|
48627
|
+
|
|
48628
|
+
- Prefer the repository's existing task-runner tasks. See [task definitions](path-to-task-definitions).
|
|
48629
|
+
- [State required scaffolding and repository management tools. Link to their configuration.]
|
|
48630
|
+
- [Add other essential repository constraints.]
|
|
48631
|
+
|
|
48632
|
+
## Organization
|
|
48633
|
+
|
|
48634
|
+
### Repository layout
|
|
48635
|
+
|
|
48636
|
+
- [State directory layout and file naming conventions. Link to maintained docs for details.]
|
|
48637
|
+
|
|
48638
|
+
### File layout
|
|
48639
|
+
|
|
48640
|
+
- [State prescribed section headers, code ordering, and grouping within each file type.]
|
|
48641
|
+
- [Retain terse rules for import, type, API, hook, and helper placement.]
|
|
48642
|
+
|
|
48643
|
+
## Style
|
|
48644
|
+
|
|
48645
|
+
### Languages
|
|
48646
|
+
|
|
48647
|
+
- [Replace this heading with each language used here and add its rules.]
|
|
48648
|
+
|
|
48649
|
+
### Frameworks
|
|
48650
|
+
|
|
48651
|
+
- [Replace this heading with each framework that needs specific rules.]
|
|
48652
|
+
|
|
48653
|
+
## Testing
|
|
48654
|
+
|
|
48655
|
+
- [State where unit, integration, and end-to-end tests belong.]
|
|
48656
|
+
- [State test naming, structure, shared helper, and validation rules. Link to task definitions.]
|
|
48657
|
+
`;
|
|
48658
|
+
var init_agents = () => {};
|
|
48659
|
+
|
|
48621
48660
|
// templates/code-review.md
|
|
48622
48661
|
var code_review_default = `# Review: [change or pull request]
|
|
48623
48662
|
|
|
@@ -49701,12 +49740,13 @@ Add invitation resend and cancellation in a separate change.
|
|
|
49701
49740
|
var init_pull_request_feature = () => {};
|
|
49702
49741
|
|
|
49703
49742
|
// src/templates/source.ts
|
|
49704
|
-
var
|
|
49743
|
+
var contents, catalog, embeddedSource;
|
|
49705
49744
|
var init_source = __esm(() => {
|
|
49706
49745
|
init_spec_driven_plan();
|
|
49707
49746
|
init_software_architecture_design();
|
|
49708
49747
|
init_architecture_decision_record();
|
|
49709
49748
|
init_product_requirements_document();
|
|
49749
|
+
init_agents();
|
|
49710
49750
|
init_code_review();
|
|
49711
49751
|
init_planning_intent();
|
|
49712
49752
|
init_ui_component_architecture();
|
|
@@ -49727,27 +49767,12 @@ var init_source = __esm(() => {
|
|
|
49727
49767
|
init_component_dialog();
|
|
49728
49768
|
init_component_navigation();
|
|
49729
49769
|
init_pull_request_feature();
|
|
49730
|
-
catalog = [
|
|
49731
|
-
{ name: "spec-driven-plan", description: "Spec-driven implementation plan" },
|
|
49732
|
-
{ name: "software-architecture-design", description: "Software architecture design" },
|
|
49733
|
-
{ name: "architecture-decision-record", description: "Architecture decision record" },
|
|
49734
|
-
{ name: "product-requirements-document", description: "Product requirements document" },
|
|
49735
|
-
{ name: "code-review", description: "Thorough code review" },
|
|
49736
|
-
{ name: "planning-intent", description: "Planning intent for a user to fill in" },
|
|
49737
|
-
{ name: "ui-component-architecture", description: "UI component design and implementation" },
|
|
49738
|
-
{ name: "pull-request-description", description: "Draft pull request description" },
|
|
49739
|
-
{ name: "flow-definition", description: "Reusable global Agent Skill flow definition" },
|
|
49740
|
-
{ name: "flow-instance", description: "Frozen repository-local flow run" },
|
|
49741
|
-
{ name: "exploration-summary", description: "Source-grounded technical exploration summary" },
|
|
49742
|
-
{ name: "exploration-research", description: "Technical exploration research notes" },
|
|
49743
|
-
{ name: "exploration-proposal", description: "Optional technical exploration approach" },
|
|
49744
|
-
{ name: "poc-readme", description: "Disposable proof-of-concept branch README" }
|
|
49745
|
-
];
|
|
49746
49770
|
contents = {
|
|
49747
49771
|
"spec-driven-plan.md": spec_driven_plan_default,
|
|
49748
49772
|
"software-architecture-design.md": software_architecture_design_default,
|
|
49749
49773
|
"architecture-decision-record.md": architecture_decision_record_default,
|
|
49750
49774
|
"product-requirements-document.md": product_requirements_document_default,
|
|
49775
|
+
"agents.md": agents_default,
|
|
49751
49776
|
"code-review.md": code_review_default,
|
|
49752
49777
|
"planning-intent.md": planning_intent_default,
|
|
49753
49778
|
"ui-component-architecture.md": ui_component_architecture_default,
|
|
@@ -49769,6 +49794,23 @@ var init_source = __esm(() => {
|
|
|
49769
49794
|
"examples/component-navigation.md": component_navigation_default,
|
|
49770
49795
|
"examples/pull-request-feature.md": pull_request_feature_default
|
|
49771
49796
|
};
|
|
49797
|
+
catalog = [
|
|
49798
|
+
{ name: "spec-driven-plan", description: "Spec-driven implementation plan" },
|
|
49799
|
+
{ name: "software-architecture-design", description: "Software architecture design" },
|
|
49800
|
+
{ name: "architecture-decision-record", description: "Architecture decision record" },
|
|
49801
|
+
{ name: "product-requirements-document", description: "Product requirements document" },
|
|
49802
|
+
{ name: "agents", description: "Concise repository rules for AGENTS.md" },
|
|
49803
|
+
{ name: "code-review", description: "Thorough code review" },
|
|
49804
|
+
{ name: "planning-intent", description: "Planning intent for a user to fill in" },
|
|
49805
|
+
{ name: "ui-component-architecture", description: "UI component design and implementation" },
|
|
49806
|
+
{ name: "pull-request-description", description: "Draft pull request description" },
|
|
49807
|
+
{ name: "flow-definition", description: "Reusable global Agent Skill flow definition" },
|
|
49808
|
+
{ name: "flow-instance", description: "Frozen repository-local flow run" },
|
|
49809
|
+
{ name: "exploration-summary", description: "Source-grounded technical exploration summary" },
|
|
49810
|
+
{ name: "exploration-research", description: "Technical exploration research notes" },
|
|
49811
|
+
{ name: "exploration-proposal", description: "Optional technical exploration approach" },
|
|
49812
|
+
{ name: "poc-readme", description: "Disposable proof-of-concept branch README" }
|
|
49813
|
+
];
|
|
49772
49814
|
embeddedSource = {
|
|
49773
49815
|
catalog,
|
|
49774
49816
|
assets: Object.keys(contents),
|
|
@@ -50134,7 +50176,7 @@ function agentAdapter(name) {
|
|
|
50134
50176
|
return Object.hasOwn(agentAdapters, name) ? agentAdapters[name] : undefined;
|
|
50135
50177
|
}
|
|
50136
50178
|
var agentAdapters, agentNames;
|
|
50137
|
-
var
|
|
50179
|
+
var init_agents2 = __esm(() => {
|
|
50138
50180
|
init_adapter();
|
|
50139
50181
|
init_claude_code();
|
|
50140
50182
|
init_codex();
|
|
@@ -50177,7 +50219,7 @@ async function setupMcpClients(clients, write) {
|
|
|
50177
50219
|
write("Restart or reload the selected client to use the Difflab MCP tools.");
|
|
50178
50220
|
}
|
|
50179
50221
|
var init_setup = __esm(() => {
|
|
50180
|
-
|
|
50222
|
+
init_agents2();
|
|
50181
50223
|
});
|
|
50182
50224
|
|
|
50183
50225
|
// src/mcp/index.ts
|
|
@@ -52324,7 +52366,7 @@ function createProgram(write = console.log, version = "0.1.0", options = {}) {
|
|
|
52324
52366
|
|
|
52325
52367
|
// src/index.ts
|
|
52326
52368
|
init_errors3();
|
|
52327
|
-
var version2 = "0.
|
|
52369
|
+
var version2 = "0.10.0";
|
|
52328
52370
|
try {
|
|
52329
52371
|
await createProgram(console.log, version2).parseAsync(process.argv);
|
|
52330
52372
|
} catch (error) {
|