openfeel 1.5.25 → 1.6.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 (109) hide show
  1. package/README.en.md +14 -0
  2. package/README.zh-CN.md +14 -0
  3. package/dist/commands/dashboard.d.ts.map +1 -1
  4. package/dist/commands/dashboard.js +10 -1
  5. package/dist/commands/dashboard.js.map +1 -1
  6. package/dist/commands/flow.d.ts.map +1 -1
  7. package/dist/commands/flow.js +126 -25
  8. package/dist/commands/flow.js.map +1 -1
  9. package/dist/commands/lint.d.ts +5 -1
  10. package/dist/commands/lint.d.ts.map +1 -1
  11. package/dist/commands/lint.js +373 -0
  12. package/dist/commands/lint.js.map +1 -1
  13. package/dist/commands/req.d.ts.map +1 -1
  14. package/dist/commands/req.js +814 -88
  15. package/dist/commands/req.js.map +1 -1
  16. package/dist/commands/stage.d.ts.map +1 -1
  17. package/dist/commands/stage.js +19 -0
  18. package/dist/commands/stage.js.map +1 -1
  19. package/dist/core/adherence.d.ts +135 -0
  20. package/dist/core/adherence.d.ts.map +1 -0
  21. package/dist/core/adherence.js +221 -0
  22. package/dist/core/adherence.js.map +1 -0
  23. package/dist/core/dashboard/aggregate.d.ts +39 -0
  24. package/dist/core/dashboard/aggregate.d.ts.map +1 -1
  25. package/dist/core/dashboard/aggregate.js +64 -5
  26. package/dist/core/dashboard/aggregate.js.map +1 -1
  27. package/dist/core/dashboard/render.d.ts.map +1 -1
  28. package/dist/core/dashboard/render.js +88 -1
  29. package/dist/core/dashboard/render.js.map +1 -1
  30. package/dist/core/dev-status.d.ts +25 -0
  31. package/dist/core/dev-status.d.ts.map +1 -1
  32. package/dist/core/dev-status.js +35 -0
  33. package/dist/core/dev-status.js.map +1 -1
  34. package/dist/core/errors.d.ts +38 -3
  35. package/dist/core/errors.d.ts.map +1 -1
  36. package/dist/core/errors.js +22 -3
  37. package/dist/core/errors.js.map +1 -1
  38. package/dist/core/flow/gate-override.d.ts +72 -0
  39. package/dist/core/flow/gate-override.d.ts.map +1 -0
  40. package/dist/core/flow/gate-override.js +71 -0
  41. package/dist/core/flow/gate-override.js.map +1 -0
  42. package/dist/core/flow-manager.d.ts +118 -3
  43. package/dist/core/flow-manager.d.ts.map +1 -1
  44. package/dist/core/flow-manager.js +357 -14
  45. package/dist/core/flow-manager.js.map +1 -1
  46. package/dist/core/i18n-data/en.d.ts.map +1 -1
  47. package/dist/core/i18n-data/en.js +96 -5
  48. package/dist/core/i18n-data/en.js.map +1 -1
  49. package/dist/core/i18n-data/zh-CN.d.ts.map +1 -1
  50. package/dist/core/i18n-data/zh-CN.js +96 -5
  51. package/dist/core/i18n-data/zh-CN.js.map +1 -1
  52. package/dist/core/lint-req.d.ts +17 -1
  53. package/dist/core/lint-req.d.ts.map +1 -1
  54. package/dist/core/lint-req.js +14 -2
  55. package/dist/core/lint-req.js.map +1 -1
  56. package/dist/core/plan/body-lint.d.ts +58 -0
  57. package/dist/core/plan/body-lint.d.ts.map +1 -0
  58. package/dist/core/plan/body-lint.js +197 -0
  59. package/dist/core/plan/body-lint.js.map +1 -0
  60. package/dist/core/plan/filled.d.ts +143 -0
  61. package/dist/core/plan/filled.d.ts.map +1 -0
  62. package/dist/core/plan/filled.js +244 -0
  63. package/dist/core/plan/filled.js.map +1 -0
  64. package/dist/core/plan/path.d.ts +24 -0
  65. package/dist/core/plan/path.d.ts.map +1 -1
  66. package/dist/core/plan/path.js +56 -0
  67. package/dist/core/plan/path.js.map +1 -1
  68. package/dist/core/req/aggregate.d.ts.map +1 -1
  69. package/dist/core/req/aggregate.js +5 -0
  70. package/dist/core/req/aggregate.js.map +1 -1
  71. package/dist/core/req/body-file.d.ts +103 -0
  72. package/dist/core/req/body-file.d.ts.map +1 -1
  73. package/dist/core/req/body-file.js +221 -2
  74. package/dist/core/req/body-file.js.map +1 -1
  75. package/dist/core/req/plan-file.d.ts +83 -0
  76. package/dist/core/req/plan-file.d.ts.map +1 -0
  77. package/dist/core/req/plan-file.js +205 -0
  78. package/dist/core/req/plan-file.js.map +1 -0
  79. package/dist/core/req/requirement-ops.d.ts +151 -15
  80. package/dist/core/req/requirement-ops.d.ts.map +1 -1
  81. package/dist/core/req/requirement-ops.js +402 -22
  82. package/dist/core/req/requirement-ops.js.map +1 -1
  83. package/dist/core/req/types.d.ts +63 -2
  84. package/dist/core/req/types.d.ts.map +1 -1
  85. package/dist/core/req/types.js +10 -2
  86. package/dist/core/req/types.js.map +1 -1
  87. package/dist/core/template-loader.d.ts.map +1 -1
  88. package/dist/core/template-loader.js +87 -0
  89. package/dist/core/template-loader.js.map +1 -1
  90. package/dist/core/templates.d.ts +1 -1
  91. package/dist/core/templates.d.ts.map +1 -1
  92. package/dist/core/templates.js +18 -0
  93. package/dist/core/templates.js.map +1 -1
  94. package/dsh/ACTION-GUIDE.md +50 -8
  95. package/dsh/ADAPTER.md +119 -13
  96. package/dsh/README.md +49 -26
  97. package/dsh/docs/compat/persistence.md +26 -0
  98. package/dsh/docs/compat/pipeline.md +24 -0
  99. package/dsh/docs/compat/req.md +29 -0
  100. package/dsh/docs/compat/stage.md +25 -0
  101. package/dsh/lib/adapters/dispatch-ledger.js +432 -0
  102. package/dsh/lib/adapters/dispatch.js +54 -6
  103. package/dsh/lib/adapters/next-action.js +336 -0
  104. package/dsh/lib/guard.js +694 -24
  105. package/dsh/lib/index.js +37 -0
  106. package/dsh/lib/surface/prompt.js +66 -178
  107. package/dsh/lib/tools/index.js +527 -12
  108. package/dsh/package.json +2 -2
  109. package/package.json +2 -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,UAoZlB,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,UA6HjB,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,UA+BlB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,UAmblB,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,UAqJjB,CAAC;AAGF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,UA2DvB,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 = {
@@ -678,6 +688,17 @@ export const lint = {
678
688
  'req.suspectTmpl': { key: 'lint.req.suspectTmpl', zh: '', en: 'L{line}: `{span}` → suspected unknown command group (tail `{tail}` is registered)' },
679
689
  'req.argAsCommandTmpl': { key: 'lint.req.argAsCommandTmpl', zh: '', en: 'L{line}: `{span}` → suspected positional argument written as a command name (`{token}` is a registered command name; command path undeterminable)' },
680
690
  'req.unclosedRegionWarn': { key: 'lint.req.unclosedRegionWarn', zh: '', en: '⚠️ {path} L{line}: unclosed ignore-start region (no matching ignore-end); suppressed to end of file' },
691
+ // v1.6.1 / REQ-066 A66.3: adherence metrics (lint adherence; read-only)
692
+ 'adherence.title': { key: 'lint.adherence.title', zh: '', en: 'Adherence (read-only observation; numerator/denominator and sample window of each metric are in its definition)' },
693
+ 'adherence.sampleTmpl': { key: 'lint.adherence.sampleTmpl', zh: '', en: 'Sample: {dispatches} dispatch record(s) / {audit} guard decision(s) / {sessions} session(s) / {requirements} in-progress requirement(s)' },
694
+ 'adherence.mainWriteRatio': { key: 'lint.adherence.mainWriteRatio', zh: '', en: 'Main-session write ratio' },
695
+ 'adherence.subagentPerReq': { key: 'lint.adherence.subagentPerReq', zh: '', en: 'Executor dispatches per requirement' },
696
+ 'adherence.syncGap': { key: 'lint.adherence.syncGap', zh: '', en: 'Ledger sync gap' },
697
+ 'adherence.violationRate': { key: 'lint.adherence.violationRate', zh: '', en: 'Guard denial rate' },
698
+ 'adherence.insufficient': { key: 'lint.adherence.insufficient', zh: '', en: 'insufficient sample (null)' },
699
+ 'adherence.percentTmpl': { key: 'lint.adherence.percentTmpl', zh: '', en: '{percent}% ({count})' },
700
+ 'adherence.decimalTmpl': { key: 'lint.adherence.decimalTmpl', zh: '', en: '{value} ({count})' },
701
+ 'adherence.minutesTmpl': { key: 'lint.adherence.minutesTmpl', zh: '', en: '{minutes} minute(s)' },
681
702
  };
682
703
  /* ==================== help ==================== */
683
704
  export const help = {
@@ -749,11 +770,12 @@ export const help = {
749
770
  '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
771
  '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
772
  'flow.stage.reset.dryRun': { key: 'help.flow.stage.reset.dryRun', zh: '', en: 'Preview only; nothing is written' },
773
+ 'flow.stage.reset.force': { key: 'help.flow.stage.reset.force', zh: '', en: 'Logged override: bypass the plan gate for entering exec_running and record one audit entry in flow.json.log (missing snapshot + by/reason/from/to/at)' },
752
774
  'flow.advance': { key: 'help.flow.advance', zh: '', en: 'Advance pipeline stage' },
753
775
  'flow.advance.op': { key: 'help.flow.advance.op', zh: '', en: 'Operation ID (e.g. stage-01.op-001), for logging/display only' },
754
776
  'flow.advance.to': { key: 'help.flow.advance.to', zh: '', en: 'Target phase (e.g. exec_running). Valid phases & transitions: openfeel flow phases' },
755
777
  'flow.advance.stage': { key: 'help.flow.advance.stage', zh: '', en: 'Stage ID (e.g. stage-03), required' },
756
- 'flow.advance.force': { key: 'help.flow.advance.force', zh: '', en: 'Force execution (skip invalid phase check and phase jump check, but not REV block check)' },
778
+ 'flow.advance.force': { key: 'help.flow.advance.force', zh: '', en: 'Logged override: skip invalid phase check and phase jump check; gate (plan/dev_sync) passes are always audited and the REV block check cannot be bypassed' },
757
779
  'flow.advance.dryRun': { key: 'help.flow.advance.dryRun', zh: '', en: 'Validate only without modifying (preview output). When combined with --force, skips validation but still does not modify' },
758
780
  'flow.advance.reviewTier': { key: 'help.flow.advance.reviewTier', zh: '', en: 'Review tier (full / lean / skip; default = full (zero pruning); the tier trims review gates only when declared explicitly, and cannot bypass the REV block check)' },
759
781
  'flow.advance.quiet': { key: 'help.flow.advance.quiet', zh: '', en: 'Silence non-error output (no success confirmation or Git warning)' },
@@ -933,13 +955,17 @@ export const help = {
933
955
  'instructions.change': { key: 'help.instructions.change', zh: '', en: 'Change name (e.g. feat-login)' },
934
956
  'instructions.json': { key: 'help.instructions.json', zh: '', en: 'Output JSON format instead of XML' },
935
957
  '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)' },
958
+ 'lint': { key: 'help.lint', zh: '', en: 'Project health checks (i18n key consistency, kb reference validity, requirement command names, empty-doc list)' },
937
959
  'lint.i18n': { key: 'help.lint.i18n', zh: '', en: 'Validate i18n key consistency (empty values / zh-CN-only / en-only keys)' },
938
960
  'lint.i18n.json': { key: 'help.lint.i18n.json', zh: '', en: 'Output { schemaVersion, target, ok, issues: [{ path, message }] } as JSON' },
939
961
  'lint.kb': { key: 'help.lint.kb', zh: '', en: 'Detect stale file references in .openfeel/kb/' },
940
962
  'lint.kb.json': { key: 'help.lint.kb.json', zh: '', en: 'Output { schemaVersion, target, ok, issues: [{ path, message }] } as JSON' },
941
963
  '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' },
964
+ 'lint.req.json': { key: 'help.lint.req.json', zh: '', en: 'Output { schemaVersion, target, ok, issues, suspects, unknownCount, suspectCount, fill } as JSON' },
965
+ 'lint.fill': { key: 'help.lint.fill', zh: '', en: 'List empty requirement bodies / missing requirement plans / empty stage docs (advisory, exit code unchanged)' },
966
+ 'lint.fill.json': { key: 'help.lint.fill.json', zh: '', en: 'Output { schemaVersion, target, ok, checked, empty, missingPlan, stageDocs } as JSON' },
967
+ 'lint.adherence': { key: 'help.lint.adherence', zh: '', en: 'Adherence metrics (main-session write ratio / executor dispatches per requirement / ledger sync gap / guard denial rate; read-only)' },
968
+ 'lint.adherence.json': { key: 'help.lint.adherence.json', zh: '', en: 'Output { schemaVersion, target, ok, main_write_ratio, subagent_per_req, sync_gap, violation_rate } (each { value, definition }) as JSON' },
943
969
  // migrate (legacy layout migration)
944
970
  'migrate': { key: 'help.migrate', zh: '', en: 'Legacy layout migration (detect/backup/migrate/rollback existing project legacy layout)' },
945
971
  'migrate.dryRun': { key: 'help.migrate.dryRun', zh: '', en: 'Detect and preview only, do not write' },
@@ -1002,6 +1028,8 @@ export const help = {
1002
1028
  'req.complete.evidence': { key: 'help.req.complete.evidence', zh: '', en: 'Evidence (test command / report path / summary)' },
1003
1029
  'req.complete.independent': { key: 'help.req.complete.independent', zh: '', en: 'Independent review (recommended)' },
1004
1030
  'req.complete.self': { key: 'help.req.complete.self', zh: '', en: 'Self review (non-independent; marked in the archive summary)' },
1031
+ '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)' },
1032
+ 'req.complete.json': { key: 'help.req.complete.json', zh: '', en: 'Output { schemaVersion, id, from, to, status, gates? } as JSON (v1.6.1 / REQ-063)' },
1005
1033
  'req.list': { key: 'help.req.list', zh: '', en: 'List requirements (filter by status/version/owner; --include-archived merges archived ones)' },
1006
1034
  'req.list.status': { key: 'help.req.list.status', zh: '', en: 'Filter by status (draft/scheduled/in_progress/done/blocked/cancelled/rejected)' },
1007
1035
  'req.list.targetVersion': { key: 'help.req.list.targetVersion', zh: '', en: 'Filter by target version' },
@@ -1014,6 +1042,8 @@ export const help = {
1014
1042
  'req.claim': { key: 'help.req.claim', zh: '', en: 'Claim a requirement (occupancy checked; rejected if claimed by another)' },
1015
1043
  'req.claim.argid': { key: 'help.req.claim.argid', zh: '', en: 'Requirement ID (e.g. REQ-001)' },
1016
1044
  'req.claim.owner': { key: 'help.req.claim.owner', zh: '', en: 'Owner (default: .openfeel/.info.json user -> git config user.name)' },
1045
+ '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' },
1046
+ 'req.claim.json': { key: 'help.req.claim.json', zh: '', en: 'Output { schemaVersion, id, from, to, status, gates? } as JSON (v1.6.1 / REQ-063)' },
1017
1047
  'req.release': { key: 'help.req.release', zh: '', en: 'Release claim (no-op success if unclaimed)' },
1018
1048
  'req.release.argid': { key: 'help.req.release.argid', zh: '', en: 'Requirement ID (e.g. REQ-001)' },
1019
1049
  'req.set': { key: 'help.req.set', zh: '', en: 'Update requirement fields (whitelist; transition legality checked by engine)' },
@@ -1030,7 +1060,9 @@ export const help = {
1030
1060
  '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)' },
1031
1061
  'req.advance.argid': { key: 'help.req.advance.argid', zh: '', en: 'Requirement ID (e.g. REQ-001)' },
1032
1062
  'req.advance.to': { key: 'help.req.advance.to', zh: '', en: 'Target status (legality checked by engine)' },
1033
- 'req.board': { key: 'help.req.board', zh: '', en: 'Requirement board (grouped by status; 7 fixed groups)' },
1063
+ '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, in_progress→done review skip records req_review; files still need filling in)' },
1064
+ 'req.advance.json': { key: 'help.req.advance.json', zh: '', en: 'Output { schemaVersion, id, from, to, status, gates? } as JSON (v1.6.1 / REQ-063)' },
1065
+ 'req.board': { key: 'help.req.board', zh: '', en: 'Requirement board (grouped by status; 8 fixed groups)' },
1034
1066
  'req.board.targetVersion': { key: 'help.req.board.targetVersion', zh: '', en: 'Filter by target version' },
1035
1067
  'req.board.json': { key: 'help.req.board.json', zh: '', en: 'Output JSON { schemaVersion, groups }' },
1036
1068
  'req.next': { key: 'help.req.next', zh: '', en: 'Recommend the next claimable requirement (scheduled & unclaimed; by target version ascending)' },
@@ -1065,6 +1097,26 @@ export const help = {
1065
1097
  'req.rollover.to': { key: 'help.req.rollover.to', zh: '', en: 'Target version (e.g. v1.6.0)' },
1066
1098
  'req.rollover.id': { key: 'help.req.rollover.id', zh: '', en: 'Roll over only this requirement (mutually exclusive with --all)' },
1067
1099
  'req.rollover.all': { key: 'help.req.rollover.all', zh: '', en: 'Roll over every unfinished requirement of that version (mutually exclusive with --id)' },
1100
+ // v1.6.0-stage-132 / T2: requirement body write-through (req body) and req add body sections
1101
+ '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)' },
1102
+ 'req.body.argid': { key: 'help.req.body.argid', zh: '', en: 'Requirement ID (e.g. REQ-001)' },
1103
+ 'req.body.section': { key: 'help.req.body.section', zh: '', en: 'Section name (e.g. 摘要 / 目标与验收 / 问题 / 初步规划; mutually exclusive with --from)' },
1104
+ 'req.body.text': { key: 'help.req.body.text', zh: '', en: 'Section body (Markdown; mutually exclusive with --file)' },
1105
+ '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)' },
1106
+ 'req.body.append': { key: 'help.req.body.append', zh: '', en: 'Append to the end of the section (default replaces the whole section)' },
1107
+ 'req.body.replace': { key: 'help.req.body.replace', zh: '', en: 'Replace the whole section (default; mutually exclusive with --append)' },
1108
+ 'req.body.json': { key: 'help.req.body.json', zh: '', en: 'Output JSON { schemaVersion, id, section, path, lines, created }' },
1109
+ // v1.6.1 / REQ-064: req body --from + req plan (requirement-level plan generation)
1110
+ 'req.body.from': { key: 'help.req.body.from', zh: '', en: 'Import several business sections at once from a Markdown file split by ## (mutually exclusive with --section/--text/--file)' },
1111
+ 'req.plan': { key: 'help.req.plan', zh: '', en: 'Generate the requirement-level plan skeleton (four sections; refuses to overwrite unless --force)' },
1112
+ 'req.plan.argid': { key: 'help.req.plan.argid', zh: '', en: 'Requirement ID (e.g. REQ-001)' },
1113
+ 'req.plan.force': { key: 'help.req.plan.force', zh: '', en: 'Overwrite an existing plan (discards hand-written content; default refuses and writes nothing)' },
1114
+ 'req.plan.json': { key: 'help.req.plan.json', zh: '', en: 'Output JSON { schemaVersion, id, path, created, overwritten, lines } (adds replaced:true at the end when --force overwrites an existing plan; 7 keys in that case)' },
1115
+ 'req.add.problem': { key: 'help.req.add.problem', zh: '', en: 'Body section ## 问题 (v1.6.0: filled body)' },
1116
+ 'req.add.goal': { key: 'help.req.add.goal', zh: '', en: 'Body section ## 目标与验收 -> 目标 subsection (v1.6.0: filled body)' },
1117
+ 'req.add.acceptance': { key: 'help.req.add.acceptance', zh: '', en: 'Body section ## 目标与验收 -> 验收 subsection (v1.6.0: filled body)' },
1118
+ 'req.add.plan': { key: 'help.req.add.plan', zh: '', en: 'Body section ## 初步规划 (v1.6.0: filled body)' },
1119
+ '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)' },
1068
1120
  };
1069
1121
  /* ==================== config ==================== */
1070
1122
  export const config = {
@@ -1228,7 +1280,7 @@ export const req = {
1228
1280
  'trivial.noMarkTmpl': { key: 'req.trivial.noMarkTmpl', zh: '', en: '{id} has no trivial mark; nothing to revoke' },
1229
1281
  'trivial.alreadyDoneTmpl': { key: 'req.trivial.alreadyDoneTmpl', zh: '', en: '{id} is already done; cannot mark it trivial' },
1230
1282
  'complete.doneTmpl': { key: 'req.complete.doneTmpl', zh: '', en: '✓ {id} completed: review {result} / verify {kind} → done' },
1231
- 'complete.statusTmpl': { key: 'req.complete.statusTmpl', zh: '', en: '{id} is in status {status}: `req complete` only accepts draft / scheduled / in_progress (handle blocked or terminal states first)' },
1283
+ 'complete.statusTmpl': { key: 'req.complete.statusTmpl', zh: '', en: '{id} is in status {status}: `req complete` only accepts draft / scheduled / in_progress / review_pending (handle blocked or terminal states first)' },
1232
1284
  'add.bodyTmpl': { key: 'req.add.bodyTmpl', zh: '', en: 'Body skeleton: {path}' },
1233
1285
  // shared validation messages
1234
1286
  'invalidIdTmpl': { key: 'req.invalidIdTmpl', zh: '', en: '{input} -> invalid requirement ID (expected REQ-NNN, e.g. REQ-001)' },
@@ -1334,6 +1386,30 @@ export const req = {
1334
1386
  'rollover.invalidVersionTmpl': { key: 'req.rollover.invalidVersionTmpl', zh: '', en: '--from {from} and --to {to} must be non-empty and different' },
1335
1387
  'rollover.notInVersionTmpl': { key: 'req.rollover.notInVersionTmpl', zh: '', en: '{id} targets version {current}, not {from}; cannot roll over' },
1336
1388
  'rollover.terminalTmpl': { key: 'req.rollover.terminalTmpl', zh: '', en: '{id} is in a terminal status ({status}); cannot roll over' },
1389
+ // v1.6.0-stage-132 / T2: requirement body write-through (req body)
1390
+ 'body.doneTmpl': { key: 'req.body.doneTmpl', zh: '', en: 'Updated {id} body: ## {section} ({lines} line(s), {action}) -> {path}' },
1391
+ 'body.actionCreated': { key: 'req.body.actionCreated', zh: '', en: 'section created' },
1392
+ 'body.actionReplaced': { key: 'req.body.actionReplaced', zh: '', en: 'replaced' },
1393
+ 'body.actionAppended': { key: 'req.body.actionAppended', zh: '', en: 'appended' },
1394
+ 'body.noTextTmpl': { key: 'req.body.noTextTmpl', zh: '', en: 'One of --text <md> or --file <path> is required (the body cannot be empty)' },
1395
+ 'body.exclusiveTmpl': { key: 'req.body.exclusiveTmpl', zh: '', en: '--text and --file are mutually exclusive and one is required' },
1396
+ 'body.flagExclusiveTmpl': { key: 'req.body.flagExclusiveTmpl', zh: '', en: '--append and --replace cannot be used together' },
1397
+ '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)' },
1398
+ 'body.emptyTmpl': { key: 'req.body.emptyTmpl', zh: '', en: 'Section body is empty (--text / --file content cannot be blank)' },
1399
+ '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 #)' },
1400
+ // v1.6.0-stage-132 / T6: plan deviation write-back (machine-checkable evidence)
1401
+ '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)' },
1402
+ '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' },
1403
+ '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' },
1404
+ 'advance.planDeviationForcedSuffix': { key: 'req.advance.planDeviationForcedSuffix', zh: '', en: ' [plan deviation force-allowed with audit trail: plan.deviations += 1]' },
1405
+ /* v1.6.0-stage-132 / T4 body gate + T7 requirement-plan gate (hard gate with --force audit trail) */
1406
+ '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' },
1407
+ '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)' },
1408
+ 'claim.bodyForcedSuffix': { key: 'req.claim.bodyForcedSuffix', zh: '', en: ' [body gate force-allowed with audit trail: body_waiver + audit requirement_body_forced]' },
1409
+ 'advance.gateForcedSuffix': { key: 'req.advance.gateForcedSuffix', zh: '', en: ' [gate force-allowed with audit trail: body_waiver / plan_waiver + audit]' },
1410
+ 'complete.gateForcedSuffix': { key: 'req.complete.gateForcedSuffix', zh: '', en: ' [gate force-allowed with audit trail: body_waiver / plan_waiver + audit]' },
1411
+ // v1.6.1 / REQ-063 A63.1: review phase (in_progress → review_pending → done)
1412
+ 'err.reviewPhaseRequiredTmpl': { key: 'req.err.reviewPhaseRequiredTmpl', zh: '', en: 'Requirement {id} cannot complete directly from in_progress: enter the review phase first with `openfeel req advance {id} --to review_pending`, record review and verification, then `--to done`; to skip the review phase use `--force` (audited as gate_overrides=[req_review])' },
1337
1413
  };
1338
1414
  /* ==================== dashboard domain: dashboard HTML rendering copy (v1.5.10 / stage-125 op-002) ==================== */
1339
1415
  /**
@@ -1385,6 +1461,21 @@ export const dashboard = {
1385
1461
  'jsonOpenConflict': { key: 'dashboard.jsonOpenConflict', zh: '', en: '--json and --open cannot be combined (--json starts no external process)' },
1386
1462
  'outEmpty': { key: 'dashboard.outEmpty', zh: '', en: 'The --out path must not be empty' },
1387
1463
  'outIsDirectory': { key: 'dashboard.outIsDirectory', zh: '', en: 'The --out path is an existing directory: {path}' },
1464
+ // v1.6.1 / REQ-065 A65.2: process-debt panel (4 counts + first 5 items each)
1465
+ 'html.section.flowDebt': { key: 'dashboard.html.section.flowDebt', zh: '', en: 'Process debt' },
1466
+ 'html.debt.emptyBody': { key: 'dashboard.html.debt.emptyBody', zh: '', en: 'Empty bodies' },
1467
+ 'html.debt.missingPlan': { key: 'dashboard.html.debt.missingPlan', zh: '', en: 'Missing requirement plans' },
1468
+ 'html.debt.unstamped': { key: 'dashboard.html.debt.unstamped', zh: '', en: 'Unstamped requirements' },
1469
+ 'html.debt.devStale': { key: 'dashboard.html.debt.devStale', zh: '', en: 'Dev ledger stale' },
1470
+ 'html.debt.due': { key: 'dashboard.html.debt.due', zh: '', en: 'stale' },
1471
+ 'html.debt.fresh': { key: 'dashboard.html.debt.fresh', zh: '', en: 'fresh' },
1472
+ 'html.debt.lastSync': { key: 'dashboard.html.debt.lastSync', zh: '', en: 'Last sync' },
1473
+ 'html.debt.moreTmpl': { key: 'dashboard.html.debt.moreTmpl', zh: '', en: '...and {count} more' },
1474
+ // Command summary line 4 (A65.2 human exit)
1475
+ 'debtTmpl': { key: 'dashboard.debtTmpl', zh: '', en: 'Process debt: empty bodies {emptyBody} / missing plans {missingPlan} / unstamped {unstamped} / dev ledger {devState} (last sync {lastSync})' },
1476
+ 'debtDue': { key: 'dashboard.debtDue', zh: '', en: 'stale' },
1477
+ 'debtFresh': { key: 'dashboard.debtFresh', zh: '', en: 'fresh' },
1478
+ 'debtNever': { key: 'dashboard.debtNever', zh: '', en: 'never synced' },
1388
1479
  };
1389
1480
  /* ==================== 聚合导出 ==================== */
1390
1481
  export const allDomains = [