@nick848/fet 1.1.3 → 1.1.4

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 CHANGED
@@ -104,7 +104,7 @@ fet init --lang en
104
104
  | `fet fill-context` | `fet fill-context [--yes]` | 刷新 IDE 交接命令,引导 AI 替换 `AGENTS.md` 占位符。 |
105
105
  | `fet doctor` | `fet doctor [--fix-lock]` | 诊断 OpenSpec、FET 状态、上下文文件、工具集成和锁文件。 |
106
106
  | `fet explore` | `fet explore [...args] [--change <id>]` | 通过 FET 执行 OpenSpec 原生 explore,保留交互式需求澄清。 |
107
- | `fet propose` | `fet propose <change-id>` | 创建新的 OpenSpec change,并进入提案工作流。 |
107
+ | `fet propose` | `fet propose <change-id-or-description>` | 创建 OpenSpec change,并生成第一个 ready 规划产物;后续产物用 `continue` 逐步推进。 |
108
108
  | `fet new` | `fet new <change-id>` | 创建新的 OpenSpec change。 |
109
109
  | `fet continue` | `fet continue [...args] [--change <id>]` | 通过 FET 执行 OpenSpec 原生 continue。 |
110
110
  | `fet ff` | `fet ff [...args] [--change <id>]` | 通过 FET 执行 OpenSpec 原生 ff。 |
package/README_en.md CHANGED
@@ -106,7 +106,7 @@ fet init --lang en
106
106
  | `fet fill-context` | `fet fill-context [--yes]` | Refresh IDE handoff commands that ask AI to replace `AGENTS.md` placeholders. |
107
107
  | `fet doctor` | `fet doctor [--fix-lock]` | Diagnose OpenSpec, FET state, context files, tool integration, and lock files. |
108
108
  | `fet explore` | `fet explore [...args] [--change <id>]` | Run native OpenSpec explore through FET so clarification prompts remain interactive. |
109
- | `fet propose` | `fet propose <change-id>` | Create a new OpenSpec change and enter the proposal workflow. |
109
+ | `fet propose` | `fet propose <change-id-or-description>` | Create an OpenSpec change and the first ready planning artifact; use `continue` for each subsequent artifact after review. |
110
110
  | `fet new` | `fet new <change-id>` | Create a new OpenSpec change. |
111
111
  | `fet continue` | `fet continue [...args] [--change <id>]` | Run native OpenSpec continue through FET. |
112
112
  | `fet ff` | `fet ff [...args] [--change <id>]` | Run native OpenSpec ff through FET. |
package/dist/cli/index.js CHANGED
@@ -2287,8 +2287,9 @@ async function artifactWorkflowCommand(ctx, command, args) {
2287
2287
  warnings: runState.graphContext?.warnings,
2288
2288
  nextSteps: [
2289
2289
  `Create or update openspec/changes/${changeId}/${resolveOutputPath(status, artifactId)}`,
2290
+ "Review the artifact with the user before generating the next planning file.",
2290
2291
  `Run fet passthrough status --change ${changeId}`,
2291
- status.isComplete ? `Run fet apply --change ${changeId}` : `Run fet continue --change ${changeId}`
2292
+ status.isComplete ? `Run fet apply --change ${changeId}` : `Run fet continue --change ${changeId} when ready for the next artifact`
2292
2293
  ],
2293
2294
  data: {
2294
2295
  changeId,
@@ -3442,12 +3443,15 @@ After the command completes, report the GitNexus state, generated handoff files,
3442
3443
  `;
3443
3444
  }
3444
3445
  function renderSlashPrompt(command, language) {
3445
- if (command === "ff" || command === "propose") {
3446
- return renderFastForwardSlashPrompt(command, language);
3446
+ if (command === "ff") {
3447
+ return renderFastForwardSlashPrompt(language);
3447
3448
  }
3448
3449
  if (language !== "en") {
3449
3450
  return renderSlashPromptZh(command);
3450
3451
  }
3452
+ if (command === "propose") {
3453
+ return renderProposeSlashPrompt(language);
3454
+ }
3451
3455
  if (command === "continue") {
3452
3456
  return renderContinueSlashPrompt(language);
3453
3457
  }
@@ -3561,12 +3565,12 @@ ${commandGoalZh(command)}
3561
3565
  - \u9ED8\u8BA4\u4F7F\u7528\u4E2D\u6587\u4EA7\u51FA\u3002
3562
3566
  - \u4E0D\u8981\u7ED5\u8FC7 FET \u76F4\u63A5\u8C03\u7528 openspec\uFF0C\u9664\u975E FET \u547D\u4EE4\u672C\u8EAB\u4E0D\u53EF\u7528\u3002
3563
3567
  - change \u4E0D\u660E\u786E\u65F6\u5148\u8BE2\u95EE\u7528\u6237\u3002
3564
- ${command === "fill-context" ? "- \u66FF\u6362 AGENTS.md \u4E2D\u6BCF\u4E2A `[NEEDS LLM INPUT]` \u6216 `[NEED LLM INPUT]` \u5360\u4F4D\u7B26\uFF0C\u4FDD\u7559 FET \u6258\u7BA1\u6807\u8BB0\uFF0C\u4E0D\u8981\u4FEE\u6539\u4E1A\u52A1\u4EE3\u7801\u3002\n" : ""}${command === "continue" ? "- \u4E00\u6B21\u53EA\u521B\u5EFA\u4E00\u4E2A ready artifact\uFF0C\u5E76\u5728\u5199\u5165\u524D\u9605\u8BFB\u4F9D\u8D56\u6587\u4EF6\u3002\n" : ""}${command === "apply" ? "- \u4E0D\u8981\u5728\u672A\u5B8C\u6210\u771F\u5B9E\u5B9E\u73B0\u524D\u52FE\u9009 tasks.md\uFF1B\u4E0D\u8981\u4ECE apply \u9636\u6BB5\u76F4\u63A5 sync \u6216 archive\u3002\n" : ""}`;
3568
+ ${command === "fill-context" ? "- \u66FF\u6362 AGENTS.md \u4E2D\u6BCF\u4E2A `[NEEDS LLM INPUT]` \u6216 `[NEED LLM INPUT]` \u5360\u4F4D\u7B26\uFF0C\u4FDD\u7559 FET \u6258\u7BA1\u6807\u8BB0\uFF0C\u4E0D\u8981\u4FEE\u6539\u4E1A\u52A1\u4EE3\u7801\u3002\n" : ""}${command === "propose" || command === "continue" ? "- \u4E00\u6B21\u53EA\u521B\u5EFA\u4E00\u4E2A ready artifact\uFF0C\u5E76\u5728\u5199\u5165\u524D\u9605\u8BFB\u4F9D\u8D56\u6587\u4EF6\u3002\n" : ""}${command === "propose" || command === "continue" ? "- \u4E0D\u8981\u5728\u7528\u6237\u5BA1\u9605\u5F53\u524D\u4EA7\u7269\u524D\u81EA\u52A8\u8FD0\u884C fet continue\u3001fet ff \u6216\u5FAA\u73AF\u751F\u6210\u540E\u7EED\u4EA7\u7269\uFF1B\u9700\u8981\u7528\u6237\u660E\u786E\u786E\u8BA4\u540E\u518D\u63A8\u8FDB\u3002\n" : ""}${command === "apply" ? "- \u4E0D\u8981\u5728\u672A\u5B8C\u6210\u771F\u5B9E\u5B9E\u73B0\u524D\u52FE\u9009 tasks.md\uFF1B\u4E0D\u8981\u4ECE apply \u9636\u6BB5\u76F4\u63A5 sync \u6216 archive\u3002\n" : ""}`;
3565
3569
  }
3566
3570
  function commandTitleZh(command) {
3567
3571
  const titles = {
3568
3572
  explore: "\u63A2\u7D22 FET/OpenSpec \u9700\u6C42",
3569
- propose: "\u521B\u5EFA\u5E76\u8865\u9F50 FET/OpenSpec \u63D0\u6848\u4EA7\u7269",
3573
+ propose: "\u521B\u5EFA FET/OpenSpec change \u5E76\u751F\u6210\u9996\u4E2A\u89C4\u5212\u4EA7\u7269",
3570
3574
  new: "\u521B\u5EFA\u65B0\u7684 FET/OpenSpec change \u9AA8\u67B6",
3571
3575
  continue: "\u63A8\u8FDB\u5F53\u524D FET/OpenSpec change \u7684\u4E0B\u4E00\u4E2A\u4EA7\u7269",
3572
3576
  ff: "\u5FEB\u901F\u751F\u6210 FET/OpenSpec \u6240\u9700\u4EA7\u7269",
@@ -3591,9 +3595,15 @@ function commandGoalZh(command) {
3591
3595
  if (command === "fill-context") {
3592
3596
  return "\u8865\u9F50 FET \u81EA\u52A8\u751F\u6210\u7684\u9879\u76EE\u4E0A\u4E0B\u6587\uFF0C\u8BA9\u540E\u7EED AI \u7F16\u7801\u548C OpenSpec \u5DE5\u4F5C\u6D41\u62E5\u6709\u7A33\u5B9A\u7684\u9879\u76EE\u4E8B\u5B9E\u3002";
3593
3597
  }
3598
+ if (command === "propose") {
3599
+ return "\u6839\u636E change id \u6216\u63CF\u8FF0\u521B\u5EFA OpenSpec change\uFF08\u5982\u4E0D\u5B58\u5728\uFF09\uFF0C\u5E76\u53EA\u751F\u6210\u5F53\u524D\u7B2C\u4E00\u4E2A ready \u7684\u89C4\u5212\u4EA7\u7269\u3002";
3600
+ }
3594
3601
  if (command === "continue") {
3595
3602
  return "\u57FA\u4E8E active change \u6216\u7528\u6237\u6307\u5B9A\u7684 change\uFF0C\u521B\u5EFA\u4E0B\u4E00\u4E2A ready \u7684 OpenSpec \u89C4\u5212\u4EA7\u7269\u3002";
3596
3603
  }
3604
+ if (command === "ff") {
3605
+ return "\u5728\u7528\u6237\u660E\u786E\u8981\u6C42\u5FEB\u8FDB\u65F6\uFF0C\u4E00\u6B21\u6027\u751F\u6210 change \u6240\u9700\u7684\u5168\u90E8\u89C4\u5212\u4EA7\u7269\u3002";
3606
+ }
3597
3607
  if (command === "apply") {
3598
3608
  return "\u8BFB\u53D6 OpenSpec \u4EA7\u7269\u5E76\u6309 tasks.md \u5B9E\u65BD\u4EE3\u7801\u53D8\u66F4\u3002";
3599
3609
  }
@@ -4007,6 +4017,45 @@ Guardrails:
4007
4017
  language
4008
4018
  );
4009
4019
  }
4020
+ function renderProposeSlashPrompt(language) {
4021
+ return renderManagedSlashPrompt(
4022
+ "fet propose [...args]",
4023
+ "Create a FET/OpenSpec change and its first ready artifact",
4024
+ `Start proposal planning for a FET-managed OpenSpec change by creating exactly one ready artifact.
4025
+
4026
+ Input after the slash command may be a change id or a short description of what the user wants to build. If omitted, ask the user.
4027
+
4028
+ Steps:
4029
+
4030
+ 1. Load project context from AGENTS.md and openspec/config.yaml.
4031
+ 2. Derive a kebab-case change id when the user provided a description. If ambiguous, ask the user.
4032
+ 3. Run the native OpenSpec propose flow through FET. This creates the change when needed and returns instructions for only the next ready artifact:
4033
+ \`\`\`sh
4034
+ fet propose <change-id-or-description> --json
4035
+ \`\`\`
4036
+ 4. Follow the native output. When it provides template, instruction, dependencies, and outputPath, use those fields.
4037
+ 5. Read dependency files before writing.
4038
+ 6. Create only that artifact file at outputPath. Do not copy context/rules wrapper text into the artifact.
4039
+ 7. Verify the file exists, then run:
4040
+ \`\`\`sh
4041
+ fet passthrough status --change <change-id>
4042
+ \`\`\`
4043
+
4044
+ Output:
4045
+ - Change id and location.
4046
+ - Which single artifact was created and its file path.
4047
+ - Current status.
4048
+ - Tell the user to review the artifact and run /prompts:fet-continue <change-id> when ready for the next artifact. Mention /prompts:fet-ff <change-id> only if they explicitly want to fast-forward all remaining artifacts.
4049
+
4050
+ Guardrails:
4051
+ - Create one artifact per invocation. Do not run fet continue or fet ff in the same session unless the user explicitly asks after reviewing the artifact just created.
4052
+ - Never skip dependency order.
4053
+ - Do not substitute one FET/OpenSpec workflow command for another after a command-not-found or unsupported-version error.
4054
+ - Ask the user if instructions are ambiguous enough that a useful artifact cannot be written.`,
4055
+ void 0,
4056
+ language
4057
+ );
4058
+ }
4010
4059
  function renderContinueSlashPrompt(language) {
4011
4060
  return renderManagedSlashPrompt(
4012
4061
  "fet continue [...args]",
@@ -4049,27 +4098,27 @@ Guardrails:
4049
4098
  language
4050
4099
  );
4051
4100
  }
4052
- function renderFastForwardSlashPrompt(command, language) {
4053
- const title = language === "en" ? command === "propose" ? "Propose a new FET/OpenSpec change" : "Fast-forward FET/OpenSpec artifact creation" : command === "propose" ? "\u521B\u5EFA\u5E76\u8865\u9F50 FET/OpenSpec \u63D0\u6848\u4EA7\u7269" : "\u5FEB\u901F\u751F\u6210 FET/OpenSpec \u6240\u9700\u4EA7\u7269";
4054
- const commandLine = command === "propose" ? "fet propose <change-id-or-description>" : "fet ff --change <change-id>";
4101
+ function renderFastForwardSlashPrompt(language) {
4055
4102
  return renderManagedSlashPrompt(
4056
- `fet ${command} [...args]`,
4057
- language === "en" ? command === "propose" ? "Create a change and generate required OpenSpec artifacts" : "Generate required OpenSpec artifacts for a change" : command === "propose" ? "\u521B\u5EFA\u5E76\u8865\u9F50 FET/OpenSpec \u63D0\u6848\u4EA7\u7269" : "\u5FEB\u901F\u751F\u6210 FET/OpenSpec \u6240\u9700\u4EA7\u7269",
4058
- `${title}.
4103
+ "fet ff [...args]",
4104
+ language === "en" ? "Fast-forward FET/OpenSpec artifact creation" : "\u5FEB\u901F\u751F\u6210 FET/OpenSpec \u6240\u9700\u4EA7\u7269",
4105
+ `${language === "en" ? "Fast-forward FET/OpenSpec artifact creation" : "\u5FEB\u901F\u751F\u6210 FET/OpenSpec \u6240\u9700\u4EA7\u7269"}.
4106
+
4107
+ Use this command only when the user explicitly wants to generate all remaining planning artifacts in one session without reviewing each artifact between steps. For step-by-step review, use /prompts:fet-propose or /prompts:fet-continue instead.
4059
4108
 
4060
- Input after the slash command may be a change id or a description of what the user wants to build. For ff, it may be omitted when the active OpenSpec change is unambiguous.
4109
+ Input after the slash command may be a change id. It may be omitted when the active OpenSpec change is unambiguous.
4061
4110
 
4062
4111
  Steps:
4063
4112
 
4064
4113
  1. Load project context from AGENTS.md and openspec/config.yaml.
4065
- 2. Resolve the change id or description. If ambiguous, ask the user.
4066
- 3. Run the native OpenSpec ${command} flow through FET:
4114
+ 2. Resolve the change id. If ambiguous, ask the user.
4115
+ 3. Run the native OpenSpec ff flow through FET:
4067
4116
  \`\`\`sh
4068
- ${commandLine}
4117
+ fet ff --change <change-id>
4069
4118
  \`\`\`
4070
4119
  4. Follow the native output. If it asks for clarification, ask the user rather than inventing details.
4071
- 5. If the native output includes artifact paths or templates to write, create only those files and preserve OpenSpec structure.
4072
- 6. If FET reports that the OpenSpec CLI does not expose the requested command, stop immediately. Do not run \`fet ff\`, \`openspec ff\`, \`openspec change\`, or any alternative workflow command unless the user explicitly chooses that fallback after seeing the error.
4120
+ 5. If the native output includes artifact paths or templates to write, create those files and preserve OpenSpec structure.
4121
+ 6. If FET reports that the OpenSpec CLI does not expose the requested command, stop immediately. Do not run \`fet continue\`, \`openspec change\`, or any alternative workflow command unless the user explicitly chooses that fallback after seeing the error.
4073
4122
 
4074
4123
  Artifact rules:
4075
4124
  - Follow the instruction field from OpenSpec/FET for each artifact.