openfeel 1.5.24 → 1.6.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 (82) hide show
  1. package/README.en.md +7 -0
  2. package/README.zh-CN.md +7 -0
  3. package/dist/commands/flow.d.ts.map +1 -1
  4. package/dist/commands/flow.js +117 -23
  5. package/dist/commands/flow.js.map +1 -1
  6. package/dist/commands/lint.d.ts +3 -1
  7. package/dist/commands/lint.d.ts.map +1 -1
  8. package/dist/commands/lint.js +96 -0
  9. package/dist/commands/lint.js.map +1 -1
  10. package/dist/commands/req.d.ts.map +1 -1
  11. package/dist/commands/req.js +392 -17
  12. package/dist/commands/req.js.map +1 -1
  13. package/dist/commands/stage.d.ts.map +1 -1
  14. package/dist/commands/stage.js +19 -0
  15. package/dist/commands/stage.js.map +1 -1
  16. package/dist/core/dev-status.d.ts +25 -0
  17. package/dist/core/dev-status.d.ts.map +1 -1
  18. package/dist/core/dev-status.js +35 -0
  19. package/dist/core/dev-status.js.map +1 -1
  20. package/dist/core/errors.d.ts +13 -3
  21. package/dist/core/errors.d.ts.map +1 -1
  22. package/dist/core/errors.js +9 -3
  23. package/dist/core/errors.js.map +1 -1
  24. package/dist/core/flow-manager.d.ts +109 -3
  25. package/dist/core/flow-manager.d.ts.map +1 -1
  26. package/dist/core/flow-manager.js +326 -14
  27. package/dist/core/flow-manager.js.map +1 -1
  28. package/dist/core/i18n-data/en.d.ts.map +1 -1
  29. package/dist/core/i18n-data/en.js +56 -2
  30. package/dist/core/i18n-data/en.js.map +1 -1
  31. package/dist/core/i18n-data/zh-CN.d.ts.map +1 -1
  32. package/dist/core/i18n-data/zh-CN.js +56 -2
  33. package/dist/core/i18n-data/zh-CN.js.map +1 -1
  34. package/dist/core/lint-req.d.ts +17 -1
  35. package/dist/core/lint-req.d.ts.map +1 -1
  36. package/dist/core/lint-req.js +14 -2
  37. package/dist/core/lint-req.js.map +1 -1
  38. package/dist/core/plan/body-lint.d.ts +58 -0
  39. package/dist/core/plan/body-lint.d.ts.map +1 -0
  40. package/dist/core/plan/body-lint.js +197 -0
  41. package/dist/core/plan/body-lint.js.map +1 -0
  42. package/dist/core/plan/filled.d.ts +143 -0
  43. package/dist/core/plan/filled.d.ts.map +1 -0
  44. package/dist/core/plan/filled.js +244 -0
  45. package/dist/core/plan/filled.js.map +1 -0
  46. package/dist/core/plan/path.d.ts +24 -0
  47. package/dist/core/plan/path.d.ts.map +1 -1
  48. package/dist/core/plan/path.js +56 -0
  49. package/dist/core/plan/path.js.map +1 -1
  50. package/dist/core/req/aggregate.d.ts.map +1 -1
  51. package/dist/core/req/aggregate.js +5 -0
  52. package/dist/core/req/aggregate.js.map +1 -1
  53. package/dist/core/req/body-file.d.ts +66 -0
  54. package/dist/core/req/body-file.d.ts.map +1 -1
  55. package/dist/core/req/body-file.js +184 -2
  56. package/dist/core/req/body-file.js.map +1 -1
  57. package/dist/core/req/requirement-ops.d.ts +128 -14
  58. package/dist/core/req/requirement-ops.d.ts.map +1 -1
  59. package/dist/core/req/requirement-ops.js +341 -16
  60. package/dist/core/req/requirement-ops.js.map +1 -1
  61. package/dist/core/req/types.d.ts +55 -0
  62. package/dist/core/req/types.d.ts.map +1 -1
  63. package/dist/core/template-loader.d.ts.map +1 -1
  64. package/dist/core/template-loader.js +75 -0
  65. package/dist/core/template-loader.js.map +1 -1
  66. package/dsh/ACTION-GUIDE.md +41 -8
  67. package/dsh/ADAPTER.md +58 -13
  68. package/dsh/README.md +45 -24
  69. package/dsh/docs/compat/persistence.md +13 -0
  70. package/dsh/docs/compat/pipeline.md +12 -0
  71. package/dsh/docs/compat/req.md +14 -0
  72. package/dsh/docs/compat/stage.md +13 -0
  73. package/dsh/lib/adapters/dashboard.js +10 -0
  74. package/dsh/lib/adapters/dispatch-ledger.js +293 -0
  75. package/dsh/lib/adapters/dispatch.js +54 -6
  76. package/dsh/lib/adapters/next-action.js +336 -0
  77. package/dsh/lib/guard.js +9 -2
  78. package/dsh/lib/index.js +37 -0
  79. package/dsh/lib/surface/prompt.js +62 -173
  80. package/dsh/lib/tools/index.js +435 -9
  81. package/dsh/package.json +2 -2
  82. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/core/i18n-data/en.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C,eAAO,MAAM,MAAM,EAAE,UAgCpB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,UAwYlB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,UAyBlB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,UAmCpB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,UA8CrB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,UAyCnB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,UAsClB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,UAiCvB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,UAcrB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,UAAe,CAAC;AAGtC,eAAO,MAAM,IAAI,EAAE,UAMlB,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,UAAe,CAAC;AAG3C,eAAO,MAAM,IAAI,EAAE,UAoBlB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,UAmZlB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,UA+BpB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,UA4BrB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,UAqBnB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,UAkCnB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,UAUrB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,UAMlB,CAAC;AAGF,eAAO,MAAM,GAAG,EAAE,UA4HjB,CAAC;AAGF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,UA4CvB,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAuBlE,CAAC"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/core/i18n-data/en.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C,eAAO,MAAM,MAAM,EAAE,UAgCpB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,UAoZlB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,UAyBlB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,UAmCpB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,UA8CrB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,UAyCnB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,UAsClB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,UAiCvB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,UAcrB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,UAAe,CAAC;AAGtC,eAAO,MAAM,IAAI,EAAE,UAMlB,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,UAAe,CAAC;AAG3C,eAAO,MAAM,IAAI,EAAE,UAoBlB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,UAwalB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,UA+BpB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,UA4BrB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,UAqBnB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,UAkCnB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,UAUrB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,UAMlB,CAAC;AAGF,eAAO,MAAM,GAAG,EAAE,UAmJjB,CAAC;AAGF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,UA4CvB,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAuBlE,CAAC"}
@@ -404,6 +404,16 @@ export const flow = {
404
404
  'dev.cleanLegacyConfirmTmpl': { key: 'flow.dev.cleanLegacyConfirmTmpl', zh: '', en: 'These legacy files will be deleted (unrecoverable; git history still keeps them): {files}\nRe-run with --yes to confirm; use --dry-run to only list them.' },
405
405
  'dev.cleanIncludeRequiresLegacyTmpl': { key: 'flow.dev.cleanIncludeRequiresLegacyTmpl', zh: '', en: '`--include-archive` must be used together with `--legacy`.' },
406
406
  'preflightRequiredTmpl': { key: 'flow.preflightRequiredTmpl', zh: '', en: 'Run `openfeel flow next` (or `flow status`) before a write operation (preflight missing or expired).' },
407
+ // Plan-before-exec gate (v1.6.0 / REQ-056 T5): entering exec_running requires a real plan
408
+ 'manager.stagePlanMissingTmpl': { key: 'flow.manager.stagePlanMissingTmpl', zh: '', en: 'Cannot enter the execution phase for {stage}: the stage plan plan.md is missing; write the plan first, or add --force (logged override)' },
409
+ 'manager.stagePlanUnfilledTmpl': { key: 'flow.manager.stagePlanUnfilledTmpl', zh: '', en: 'Cannot enter the execution phase for {stage}: the stage plan plan.md is not substantive (placeholder lines or too little content); fill in real content, or add --force (logged override)' },
410
+ 'manager.requirementsMissingPlanTmpl': { key: 'flow.manager.requirementsMissingPlanTmpl', zh: '', en: 'Cannot enter the execution phase for {stage}: these in-flight requirements have no plan file ({items}); write .openfeel/plan/reqs/<REQ>.plan.md for each' },
411
+ 'manager.requirementsUnfilledPlanTmpl': { key: 'flow.manager.requirementsUnfilledPlanTmpl', zh: '', en: 'Cannot enter the execution phase for {stage}: the plans of these in-flight requirements are not substantive ({items}); fill in Goal / Task breakdown / Acceptance criteria' },
412
+ 'manager.stagePlanGateHint': { key: 'flow.manager.stagePlanGateHint', zh: '', en: 'Options: (1) write the plan files (recommended); (2) add --force for a logged override (flow.json.log records gate_overrides / gate_missing)' },
413
+ // Dev ledger stale gate (v1.6.0 / REQ-059 T8): before done the dev ledger must not be due
414
+ 'manager.devSyncStaleTmpl': { key: 'flow.manager.devSyncStaleTmpl', zh: '', en: 'Cannot advance {stage} to done: the dev ledger is still due (due=true){reason}; make .openfeel/dev writable and retry, or add --force (logged override)' },
415
+ 'manager.devSyncStaleHint': { key: 'flow.manager.devSyncStaleHint', zh: '', en: 'Options: (1) make .openfeel/dev writable and retry (recommended); (2) add --force for a logged override (flow.json.log records gate_overrides=[dev_sync])' },
416
+ 'dev.syncFailedTmpl': { key: 'flow.dev.syncFailedTmpl', zh: '', en: '[openfeel] dev ledger sync failed: {err} (this write was not blocked; the done gate will re-check)' },
407
417
  };
408
418
  /* ==================== init ==================== */
409
419
  export const init = {
@@ -749,6 +759,7 @@ export const help = {
749
759
  'flow.stage.reset.argstageId': { key: 'help.flow.stage.reset.argstageId', zh: '', en: 'Stage ID (e.g. stage-01 or v1.0.0-stage-01)' },
750
760
  'flow.stage.reset.to': { key: 'help.flow.stage.reset.to', zh: '', en: 'Target phase (e.g. review_pending / test_pending / done); valid values: openfeel flow phases' },
751
761
  'flow.stage.reset.dryRun': { key: 'help.flow.stage.reset.dryRun', zh: '', en: 'Preview only; nothing is written' },
762
+ 'flow.stage.reset.force': { key: 'help.flow.stage.reset.force', zh: '', en: 'Override the plan gate for entering exec_running (allowed and recorded as gate_overrides/gate_missing in flow.json.log)' },
752
763
  'flow.advance': { key: 'help.flow.advance', zh: '', en: 'Advance pipeline stage' },
753
764
  'flow.advance.op': { key: 'help.flow.advance.op', zh: '', en: 'Operation ID (e.g. stage-01.op-001), for logging/display only' },
754
765
  'flow.advance.to': { key: 'help.flow.advance.to', zh: '', en: 'Target phase (e.g. exec_running). Valid phases & transitions: openfeel flow phases' },
@@ -933,13 +944,15 @@ export const help = {
933
944
  'instructions.change': { key: 'help.instructions.change', zh: '', en: 'Change name (e.g. feat-login)' },
934
945
  'instructions.json': { key: 'help.instructions.json', zh: '', en: 'Output JSON format instead of XML' },
935
946
  'instructions.schema': { key: 'help.instructions.schema', zh: '', en: 'Schema name (default spec-driven)' },
936
- 'lint': { key: 'help.lint', zh: '', en: 'Project health checks (i18n key consistency, kb reference validity, requirement command names)' },
947
+ 'lint': { key: 'help.lint', zh: '', en: 'Project health checks (i18n key consistency, kb reference validity, requirement command names, empty-doc list)' },
937
948
  'lint.i18n': { key: 'help.lint.i18n', zh: '', en: 'Validate i18n key consistency (empty values / zh-CN-only / en-only keys)' },
938
949
  'lint.i18n.json': { key: 'help.lint.i18n.json', zh: '', en: 'Output { schemaVersion, target, ok, issues: [{ path, message }] } as JSON' },
939
950
  'lint.kb': { key: 'help.lint.kb', zh: '', en: 'Detect stale file references in .openfeel/kb/' },
940
951
  'lint.kb.json': { key: 'help.lint.kb.json', zh: '', en: 'Output { schemaVersion, target, ok, issues: [{ path, message }] } as JSON' },
941
952
  'lint.req': { key: 'help.lint.req', zh: '', en: 'Validate command names in requirement bodies (resolved against the real command tree)' },
942
- 'lint.req.json': { key: 'help.lint.req.json', zh: '', en: 'Output { schemaVersion, target, ok, issues, suspects, unknownCount, suspectCount } as JSON' },
953
+ 'lint.req.json': { key: 'help.lint.req.json', zh: '', en: 'Output { schemaVersion, target, ok, issues, suspects, unknownCount, suspectCount, fill } as JSON' },
954
+ 'lint.fill': { key: 'help.lint.fill', zh: '', en: 'List empty requirement bodies / missing requirement plans / empty stage docs (advisory, exit code unchanged)' },
955
+ 'lint.fill.json': { key: 'help.lint.fill.json', zh: '', en: 'Output { schemaVersion, target, ok, checked, empty, missingPlan, stageDocs } as JSON' },
943
956
  // migrate (legacy layout migration)
944
957
  'migrate': { key: 'help.migrate', zh: '', en: 'Legacy layout migration (detect/backup/migrate/rollback existing project legacy layout)' },
945
958
  'migrate.dryRun': { key: 'help.migrate.dryRun', zh: '', en: 'Detect and preview only, do not write' },
@@ -982,6 +995,7 @@ export const help = {
982
995
  'req.add.workflowMode': { key: 'help.req.add.workflowMode', zh: '', en: 'Workflow mode (full / fast / general; unset by default)' },
983
996
  'req.add.claim': { key: 'help.req.add.claim', zh: '', en: 'Claim immediately after creating (v1.5.23)' },
984
997
  'req.add.stage': { key: 'help.req.add.stage', zh: '', en: 'Link to this stage immediately after creating (v1.5.23)' },
998
+ 'req.add.start': { key: 'help.req.add.start', zh: '', en: 'Start immediately (scheduled → in_progress) after creating (v1.5.25)' },
985
999
  'req.waive': { key: 'help.req.waive', zh: '', en: 'Explicit waiver: drop it from the stage done gate and record why (distinct from cancelled)' },
986
1000
  'req.waive.argid': { key: 'help.req.waive.argid', zh: '', en: 'Requirement ID' },
987
1001
  'req.waive.reason': { key: 'help.req.waive.reason', zh: '', en: 'Why it is waived (required)' },
@@ -1001,6 +1015,7 @@ export const help = {
1001
1015
  'req.complete.evidence': { key: 'help.req.complete.evidence', zh: '', en: 'Evidence (test command / report path / summary)' },
1002
1016
  'req.complete.independent': { key: 'help.req.complete.independent', zh: '', en: 'Independent review (recommended)' },
1003
1017
  'req.complete.self': { key: 'help.req.complete.self', zh: '', en: 'Self review (non-independent; marked in the archive summary)' },
1018
+ 'req.complete.force': { key: 'help.req.complete.force', zh: '', en: 'Force gates through with an audit trail (writes body_waiver / plan_waiver + audit; files still need filling in)' },
1004
1019
  'req.list': { key: 'help.req.list', zh: '', en: 'List requirements (filter by status/version/owner; --include-archived merges archived ones)' },
1005
1020
  'req.list.status': { key: 'help.req.list.status', zh: '', en: 'Filter by status (draft/scheduled/in_progress/done/blocked/cancelled/rejected)' },
1006
1021
  'req.list.targetVersion': { key: 'help.req.list.targetVersion', zh: '', en: 'Filter by target version' },
@@ -1013,6 +1028,7 @@ export const help = {
1013
1028
  'req.claim': { key: 'help.req.claim', zh: '', en: 'Claim a requirement (occupancy checked; rejected if claimed by another)' },
1014
1029
  'req.claim.argid': { key: 'help.req.claim.argid', zh: '', en: 'Requirement ID (e.g. REQ-001)' },
1015
1030
  'req.claim.owner': { key: 'help.req.claim.owner', zh: '', en: 'Owner (default: .openfeel/.info.json user -> git config user.name)' },
1031
+ 'req.claim.force': { key: 'help.req.claim.force', zh: '', en: 'Kept for compatibility: claim does not check the body (the body gate fires only on ->scheduled / ->in_progress / ->done transitions); this option currently has no effect' },
1016
1032
  'req.release': { key: 'help.req.release', zh: '', en: 'Release claim (no-op success if unclaimed)' },
1017
1033
  'req.release.argid': { key: 'help.req.release.argid', zh: '', en: 'Requirement ID (e.g. REQ-001)' },
1018
1034
  'req.set': { key: 'help.req.set', zh: '', en: 'Update requirement fields (whitelist; transition legality checked by engine)' },
@@ -1029,6 +1045,7 @@ export const help = {
1029
1045
  'req.advance': { key: 'help.req.advance', zh: '', en: 'Advance requirement status (legality by engine transition table; done: allowed with no linked stages, or once every linked stage reaches exec_running or later)' },
1030
1046
  'req.advance.argid': { key: 'help.req.advance.argid', zh: '', en: 'Requirement ID (e.g. REQ-001)' },
1031
1047
  'req.advance.to': { key: 'help.req.advance.to', zh: '', en: 'Target status (legality checked by engine)' },
1048
+ 'req.advance.force': { key: 'help.req.advance.force', zh: '', en: 'Force gates through with an audit trail (body/plan gate writes a waiver, plan deviation +1; files still need filling in)' },
1032
1049
  'req.board': { key: 'help.req.board', zh: '', en: 'Requirement board (grouped by status; 7 fixed groups)' },
1033
1050
  'req.board.targetVersion': { key: 'help.req.board.targetVersion', zh: '', en: 'Filter by target version' },
1034
1051
  'req.board.json': { key: 'help.req.board.json', zh: '', en: 'Output JSON { schemaVersion, groups }' },
@@ -1064,6 +1081,20 @@ export const help = {
1064
1081
  'req.rollover.to': { key: 'help.req.rollover.to', zh: '', en: 'Target version (e.g. v1.6.0)' },
1065
1082
  'req.rollover.id': { key: 'help.req.rollover.id', zh: '', en: 'Roll over only this requirement (mutually exclusive with --all)' },
1066
1083
  'req.rollover.all': { key: 'help.req.rollover.all', zh: '', en: 'Roll over every unfinished requirement of that version (mutually exclusive with --id)' },
1084
+ // v1.6.0-stage-132 / T2: requirement body write-through (req body) and req add body sections
1085
+ 'req.body': { key: 'help.req.body', zh: '', en: 'Write a business section of the requirement body (meta sections are protected; every write appends to the change log)' },
1086
+ 'req.body.argid': { key: 'help.req.body.argid', zh: '', en: 'Requirement ID (e.g. REQ-001)' },
1087
+ 'req.body.section': { key: 'help.req.body.section', zh: '', en: 'Section name (e.g. 摘要 / 目标与验收 / 问题 / 初步规划; meta sections are not writable)' },
1088
+ 'req.body.text': { key: 'help.req.body.text', zh: '', en: 'Section body (Markdown; mutually exclusive with --file)' },
1089
+ 'req.body.file': { key: 'help.req.body.file', zh: '', en: 'Read the section body from a file (mutually exclusive with --text; relative paths resolve from the project root)' },
1090
+ 'req.body.append': { key: 'help.req.body.append', zh: '', en: 'Append to the end of the section (default replaces the whole section)' },
1091
+ 'req.body.replace': { key: 'help.req.body.replace', zh: '', en: 'Replace the whole section (default; mutually exclusive with --append)' },
1092
+ 'req.body.json': { key: 'help.req.body.json', zh: '', en: 'Output JSON { schemaVersion, id, section, path, lines, created }' },
1093
+ 'req.add.problem': { key: 'help.req.add.problem', zh: '', en: 'Body section ## 问题 (v1.6.0: filled body)' },
1094
+ 'req.add.goal': { key: 'help.req.add.goal', zh: '', en: 'Body section ## 目标与验收 -> 目标 subsection (v1.6.0: filled body)' },
1095
+ 'req.add.acceptance': { key: 'help.req.add.acceptance', zh: '', en: 'Body section ## 目标与验收 -> 验收 subsection (v1.6.0: filled body)' },
1096
+ 'req.add.plan': { key: 'help.req.add.plan', zh: '', en: 'Body section ## 初步规划 (v1.6.0: filled body)' },
1097
+ 'req.add.summary': { key: 'help.req.add.summary', zh: '', en: 'Body section ## 摘要 (v1.6.0: filled body; with --goal/--acceptance the body is filled in one step)' },
1067
1098
  };
1068
1099
  /* ==================== config ==================== */
1069
1100
  export const config = {
@@ -1213,6 +1244,7 @@ export const req = {
1213
1244
  'add.doneTmpl': { key: 'req.add.doneTmpl', zh: '', en: 'Created {id}: {title} (status: draft)' },
1214
1245
  'add.claimedTmpl': { key: 'req.add.claimedTmpl', zh: '', en: '· Claimed by: {owner}' },
1215
1246
  'add.linkedTmpl': { key: 'req.add.linkedTmpl', zh: '', en: '· Linked to stage: {stage}' },
1247
+ 'add.startedTmpl': { key: 'req.add.startedTmpl', zh: '', en: '· Started: {id} → {status}' },
1216
1248
  'add.claimFailedTmpl': { key: 'req.add.claimFailedTmpl', zh: '', en: 'Cannot claim {id} (occupancy check failed)' },
1217
1249
  'add.linkFailedTmpl': { key: 'req.add.linkFailedTmpl', zh: '', en: 'Cannot link {id} to stage {stage} (stage not found or carrier conflict)' },
1218
1250
  'waive.doneTmpl': { key: 'req.waive.doneTmpl', zh: '', en: '✓ {id} waived ({reason}); excluded from the stage done gate' },
@@ -1332,6 +1364,28 @@ export const req = {
1332
1364
  'rollover.invalidVersionTmpl': { key: 'req.rollover.invalidVersionTmpl', zh: '', en: '--from {from} and --to {to} must be non-empty and different' },
1333
1365
  'rollover.notInVersionTmpl': { key: 'req.rollover.notInVersionTmpl', zh: '', en: '{id} targets version {current}, not {from}; cannot roll over' },
1334
1366
  'rollover.terminalTmpl': { key: 'req.rollover.terminalTmpl', zh: '', en: '{id} is in a terminal status ({status}); cannot roll over' },
1367
+ // v1.6.0-stage-132 / T2: requirement body write-through (req body)
1368
+ 'body.doneTmpl': { key: 'req.body.doneTmpl', zh: '', en: 'Updated {id} body: ## {section} ({lines} line(s), {action}) -> {path}' },
1369
+ 'body.actionCreated': { key: 'req.body.actionCreated', zh: '', en: 'section created' },
1370
+ 'body.actionReplaced': { key: 'req.body.actionReplaced', zh: '', en: 'replaced' },
1371
+ 'body.actionAppended': { key: 'req.body.actionAppended', zh: '', en: 'appended' },
1372
+ 'body.noTextTmpl': { key: 'req.body.noTextTmpl', zh: '', en: 'One of --text <md> or --file <path> is required (the body cannot be empty)' },
1373
+ 'body.exclusiveTmpl': { key: 'req.body.exclusiveTmpl', zh: '', en: '--text and --file are mutually exclusive and one is required' },
1374
+ 'body.flagExclusiveTmpl': { key: 'req.body.flagExclusiveTmpl', zh: '', en: '--append and --replace cannot be used together' },
1375
+ 'body.protectedTmpl': { key: 'req.body.protectedTmpl', zh: '', en: '{section} is a meta section of the requirement body and cannot be modified via req body (writable: 摘要 / 目标与验收 / 问题 / 初步规划 and custom business sections)' },
1376
+ 'body.emptyTmpl': { key: 'req.body.emptyTmpl', zh: '', en: 'Section body is empty (--text / --file content cannot be blank)' },
1377
+ 'body.invalidFieldTmpl': { key: 'req.body.invalidFieldTmpl', zh: '', en: '{section} is an invalid section name or --file is unreadable (a section name must be non-empty and must not contain newlines or #)' },
1378
+ // v1.6.0-stage-132 / T6: plan deviation write-back (machine-checkable evidence)
1379
+ 'err.planDeviationTmpl': { key: 'req.err.planDeviationTmpl', zh: '', en: 'Requirement {id} is not complete yet: the plan file was changed after execution, but "## 偏差与回写" is not filled in (needs >=40 non-whitespace characters and at least one YYYY-MM-DD record). Write it and retry, or run `openfeel req advance {id} --to done --force` to force through with an audit trail (plan.deviations += 1)' },
1380
+ 'warn.planUnstampedTmpl': { key: 'req.warn.planUnstampedTmpl', zh: '', en: 'Note: requirement {id} has no pre-execution plan fingerprint (plan is absent; historical requirement) — allowed this time and audited as plan_unstamped:true; it will be stamped automatically the next time the stage plan gate passes' },
1381
+ 'advance.forceRequiresStampTmpl': { key: 'req.advance.forceRequiresStampTmpl', zh: '', en: 'Requirement {id} has no plan fingerprint (plan absent): --force only forces plan-deviation through with an audit trail; nothing was written this time' },
1382
+ 'advance.planDeviationForcedSuffix': { key: 'req.advance.planDeviationForcedSuffix', zh: '', en: ' [plan deviation force-allowed with audit trail: plan.deviations += 1]' },
1383
+ /* v1.6.0-stage-132 / T4 body gate + T7 requirement-plan gate (hard gate with --force audit trail) */
1384
+ 'err.bodyEmptyTmpl': { key: 'req.err.bodyEmptyTmpl', zh: '', en: 'Requirement {id} has no filled body, so it cannot enter scheduled / in_progress / done (unfilled sections: {sections}). Fill the body first, then retry: `openfeel req body {id} --section 摘要 --text "<problem, current state and conclusion, >=40 chars>"` and `openfeel req body {id} --section 目标与验收 --text "- A1 ... (at least one criterion with a command)"`; if it really must pass, use `--force` (supported by req advance / req complete; writes body_waiver + audit requirement_body_forced); claim does not check the body, so `--force` has no effect on claim' },
1385
+ 'err.planMissingTmpl': { key: 'req.err.planMissingTmpl', zh: '', en: 'Requirement {id} needs a filled requirement-level plan before entering in_progress (a general or zero-linked-stage requirement has no stage exec gate to fall back on). Create `.openfeel/plan/reqs/{id}.plan.md` from the template with sections `## 目标` / `## 任务拆解` / `## 验收判据` (>=40 non-whitespace chars each, last one needs at least one criteria line); fill it and retry, or run `openfeel req advance {id} --to in_progress --force` to force through with an audit trail (writes plan_waiver + audit requirement_plan_forced)' },
1386
+ 'claim.bodyForcedSuffix': { key: 'req.claim.bodyForcedSuffix', zh: '', en: ' [body gate force-allowed with audit trail: body_waiver + audit requirement_body_forced]' },
1387
+ 'advance.gateForcedSuffix': { key: 'req.advance.gateForcedSuffix', zh: '', en: ' [gate force-allowed with audit trail: body_waiver / plan_waiver + audit]' },
1388
+ 'complete.gateForcedSuffix': { key: 'req.complete.gateForcedSuffix', zh: '', en: ' [gate force-allowed with audit trail: body_waiver / plan_waiver + audit]' },
1335
1389
  };
1336
1390
  /* ==================== dashboard domain: dashboard HTML rendering copy (v1.5.10 / stage-125 op-002) ==================== */
1337
1391
  /**