specfact-cli 0.25.2__tar.gz → 0.26.0__tar.gz

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 (253) hide show
  1. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/PKG-INFO +11 -3
  2. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/README.md +8 -2
  3. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/pyproject.toml +3 -1
  4. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/prompts/specfact.06-sync.md +45 -3
  5. specfact_cli-0.26.0/resources/prompts/specfact.backlog-refine.md +239 -0
  6. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/prompts/specfact.sync-backlog.md +69 -11
  7. specfact_cli-0.26.0/resources/templates/backlog/defaults/defect_v1.yaml +22 -0
  8. specfact_cli-0.26.0/resources/templates/backlog/defaults/enabler_v1.yaml +21 -0
  9. specfact_cli-0.26.0/resources/templates/backlog/defaults/spike_v1.yaml +20 -0
  10. specfact_cli-0.26.0/resources/templates/backlog/defaults/user_story_v1.yaml +19 -0
  11. specfact_cli-0.26.0/resources/templates/backlog/frameworks/safe/safe_feature_v1.yaml +26 -0
  12. specfact_cli-0.26.0/resources/templates/backlog/frameworks/scrum/user_story_v1.yaml +23 -0
  13. specfact_cli-0.26.0/resources/templates/backlog/personas/developer/developer_task_v1.yaml +28 -0
  14. specfact_cli-0.26.0/resources/templates/backlog/personas/product-owner/user_story_v1.yaml +24 -0
  15. specfact_cli-0.26.0/resources/templates/backlog/providers/ado/work_item_v1.yaml +21 -0
  16. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/__init__.py +1 -1
  17. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/__init__.py +1 -1
  18. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/adapters/ado.py +229 -13
  19. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/adapters/github.py +217 -5
  20. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/agents/analyze_agent.py +1 -0
  21. specfact_cli-0.26.0/src/specfact_cli/backlog/__init__.py +24 -0
  22. specfact_cli-0.26.0/src/specfact_cli/backlog/adapters/__init__.py +13 -0
  23. specfact_cli-0.26.0/src/specfact_cli/backlog/adapters/base.py +166 -0
  24. specfact_cli-0.26.0/src/specfact_cli/backlog/adapters/local_yaml_adapter.py +177 -0
  25. specfact_cli-0.26.0/src/specfact_cli/backlog/ai_refiner.py +296 -0
  26. specfact_cli-0.26.0/src/specfact_cli/backlog/converter.py +312 -0
  27. specfact_cli-0.26.0/src/specfact_cli/backlog/filters.py +50 -0
  28. specfact_cli-0.26.0/src/specfact_cli/backlog/format_detector.py +50 -0
  29. specfact_cli-0.26.0/src/specfact_cli/backlog/formats/__init__.py +14 -0
  30. specfact_cli-0.26.0/src/specfact_cli/backlog/formats/base.py +98 -0
  31. specfact_cli-0.26.0/src/specfact_cli/backlog/formats/markdown_format.py +130 -0
  32. specfact_cli-0.26.0/src/specfact_cli/backlog/formats/structured_format.py +97 -0
  33. specfact_cli-0.26.0/src/specfact_cli/backlog/template_detector.py +260 -0
  34. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/cli.py +12 -1
  35. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/__init__.py +2 -0
  36. specfact_cli-0.26.0/src/specfact_cli/commands/auth.py +341 -0
  37. specfact_cli-0.26.0/src/specfact_cli/commands/backlog_commands.py +747 -0
  38. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/import_cmd.py +4 -4
  39. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/sync.py +4 -1
  40. specfact_cli-0.26.0/src/specfact_cli/contracts/__init__.py +3 -0
  41. specfact_cli-0.26.0/src/specfact_cli/contracts/crosshair_props.py +25 -0
  42. specfact_cli-0.26.0/src/specfact_cli/models/backlog_item.py +102 -0
  43. specfact_cli-0.26.0/src/specfact_cli/models/dor_config.py +159 -0
  44. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/source_tracking.py +8 -0
  45. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/bridge_sync.py +37 -3
  46. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/telemetry.py +1 -0
  47. specfact_cli-0.26.0/src/specfact_cli/templates/defaults/defect_v1.yaml +22 -0
  48. specfact_cli-0.26.0/src/specfact_cli/templates/defaults/enabler_v1.yaml +21 -0
  49. specfact_cli-0.26.0/src/specfact_cli/templates/defaults/spike_v1.yaml +20 -0
  50. specfact_cli-0.26.0/src/specfact_cli/templates/defaults/user_story_v1.yaml +19 -0
  51. specfact_cli-0.26.0/src/specfact_cli/templates/frameworks/scrum/user_story_v1.yaml +23 -0
  52. specfact_cli-0.26.0/src/specfact_cli/templates/personas/product-owner/user_story_v1.yaml +24 -0
  53. specfact_cli-0.26.0/src/specfact_cli/templates/providers/ado/work_item_v1.yaml +21 -0
  54. specfact_cli-0.26.0/src/specfact_cli/templates/registry.py +319 -0
  55. specfact_cli-0.26.0/src/specfact_cli/utils/auth_tokens.py +182 -0
  56. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/ide_setup.py +1 -0
  57. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/repro_checker.py +76 -15
  58. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/orchestrator.py +2 -2
  59. specfact_cli-0.25.2/resources/templates/sidecar/STRUCTURE.md +0 -70
  60. specfact_cli-0.25.2/resources/templates/sidecar/__init__.py +0 -0
  61. specfact_cli-0.25.2/resources/templates/sidecar/common/README.md +0 -208
  62. specfact_cli-0.25.2/resources/templates/sidecar/common/adapters.py +0 -926
  63. specfact_cli-0.25.2/resources/templates/sidecar/common/bindings.yaml.example +0 -42
  64. specfact_cli-0.25.2/resources/templates/sidecar/common/crosshair_plugin.py +0 -34
  65. specfact_cli-0.25.2/resources/templates/sidecar/common/generate_harness.py +0 -561
  66. specfact_cli-0.25.2/resources/templates/sidecar/common/harness_contracts.py.example +0 -26
  67. specfact_cli-0.25.2/resources/templates/sidecar/common/populate_contracts.py +0 -1013
  68. specfact_cli-0.25.2/resources/templates/sidecar/common/run_sidecar.sh +0 -579
  69. specfact_cli-0.25.2/resources/templates/sidecar/common/sidecar-init.sh +0 -108
  70. specfact_cli-0.25.2/resources/templates/sidecar/frameworks/django/__init__.py +0 -0
  71. specfact_cli-0.25.2/resources/templates/sidecar/frameworks/django/crosshair_django_wrapper.py +0 -140
  72. specfact_cli-0.25.2/resources/templates/sidecar/frameworks/django/django_form_extractor.py +0 -440
  73. specfact_cli-0.25.2/resources/templates/sidecar/frameworks/django/django_url_extractor.py +0 -338
  74. specfact_cli-0.25.2/resources/templates/sidecar/frameworks/drf/__init__.py +0 -0
  75. specfact_cli-0.25.2/resources/templates/sidecar/frameworks/drf/drf_serializer_extractor.py +0 -372
  76. specfact_cli-0.25.2/resources/templates/sidecar/frameworks/fastapi/__init__.py +0 -0
  77. specfact_cli-0.25.2/resources/templates/sidecar/frameworks/fastapi/fastapi_route_extractor.py +0 -643
  78. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/.gitignore +0 -0
  79. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/LICENSE.md +0 -0
  80. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/mappings/node-async.yaml +0 -0
  81. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/mappings/python-async.yaml +0 -0
  82. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/mappings/speckit-default.yaml +0 -0
  83. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/prompts/shared/cli-enforcement.md +0 -0
  84. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/prompts/specfact.01-import.md +0 -0
  85. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/prompts/specfact.02-plan.md +0 -0
  86. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/prompts/specfact.03-review.md +0 -0
  87. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/prompts/specfact.04-sdd.md +0 -0
  88. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/prompts/specfact.05-enforce.md +0 -0
  89. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/prompts/specfact.07-contracts.md +0 -0
  90. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/prompts/specfact.compare.md +0 -0
  91. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/prompts/specfact.validate.md +0 -0
  92. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/schemas/deviation.schema.json +0 -0
  93. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/schemas/plan.schema.json +0 -0
  94. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/schemas/protocol.schema.json +0 -0
  95. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/templates/github-action.yml.j2 +0 -0
  96. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/templates/persona/architect.md.j2 +0 -0
  97. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/templates/persona/developer.md.j2 +0 -0
  98. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/templates/persona/product-owner.md.j2 +0 -0
  99. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/templates/plan.bundle.yaml.j2 +0 -0
  100. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/templates/pr-template.md.j2 +0 -0
  101. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/templates/protocol.yaml.j2 +0 -0
  102. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/resources/templates/telemetry.yaml.example +0 -0
  103. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/adapters/__init__.py +0 -0
  104. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/adapters/backlog_base.py +0 -0
  105. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/adapters/base.py +0 -0
  106. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/adapters/openspec.py +0 -0
  107. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/adapters/openspec_parser.py +0 -0
  108. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/adapters/registry.py +0 -0
  109. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/adapters/speckit.py +0 -0
  110. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/agents/__init__.py +0 -0
  111. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/agents/base.py +0 -0
  112. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/agents/plan_agent.py +0 -0
  113. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/agents/registry.py +0 -0
  114. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/agents/sync_agent.py +0 -0
  115. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/analyzers/__init__.py +0 -0
  116. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/analyzers/ambiguity_scanner.py +0 -0
  117. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/analyzers/code_analyzer.py +0 -0
  118. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/analyzers/constitution_evidence_extractor.py +0 -0
  119. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/analyzers/contract_extractor.py +0 -0
  120. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/analyzers/control_flow_analyzer.py +0 -0
  121. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/analyzers/graph_analyzer.py +0 -0
  122. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/analyzers/relationship_mapper.py +0 -0
  123. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/analyzers/requirement_extractor.py +0 -0
  124. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/analyzers/test_pattern_extractor.py +0 -0
  125. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/analyze.py +0 -0
  126. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/contract_cmd.py +0 -0
  127. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/drift.py +0 -0
  128. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/enforce.py +0 -0
  129. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/generate.py +0 -0
  130. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/init.py +0 -0
  131. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/migrate.py +0 -0
  132. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/plan.py +0 -0
  133. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/project_cmd.py +0 -0
  134. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/repro.py +0 -0
  135. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/sdd.py +0 -0
  136. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/spec.py +0 -0
  137. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/commands/validate.py +0 -0
  138. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/common/__init__.py +0 -0
  139. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/common/logger_setup.py +0 -0
  140. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/common/logging_utils.py +0 -0
  141. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/common/text_utils.py +0 -0
  142. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/common/utils.py +0 -0
  143. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/comparators/__init__.py +0 -0
  144. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/comparators/plan_comparator.py +0 -0
  145. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/enrichers/constitution_enricher.py +0 -0
  146. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/enrichers/plan_enricher.py +0 -0
  147. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/generators/__init__.py +0 -0
  148. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/generators/contract_generator.py +0 -0
  149. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/generators/openapi_extractor.py +0 -0
  150. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/generators/persona_exporter.py +0 -0
  151. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/generators/plan_generator.py +0 -0
  152. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/generators/protocol_generator.py +0 -0
  153. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/generators/report_generator.py +0 -0
  154. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/generators/task_generator.py +0 -0
  155. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/generators/test_to_openapi.py +0 -0
  156. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/generators/workflow_generator.py +0 -0
  157. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/importers/__init__.py +0 -0
  158. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/importers/speckit_converter.py +0 -0
  159. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/importers/speckit_scanner.py +0 -0
  160. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/integrations/__init__.py +0 -0
  161. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/integrations/specmatic.py +0 -0
  162. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/merge/__init__.py +0 -0
  163. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/merge/resolver.py +0 -0
  164. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/migrations/__init__.py +0 -0
  165. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/migrations/plan_migrator.py +0 -0
  166. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/__init__.py +0 -0
  167. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/bridge.py +0 -0
  168. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/capabilities.py +0 -0
  169. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/change.py +0 -0
  170. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/contract.py +0 -0
  171. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/deviation.py +0 -0
  172. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/enforcement.py +0 -0
  173. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/persona_template.py +0 -0
  174. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/plan.py +0 -0
  175. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/project.py +0 -0
  176. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/protocol.py +0 -0
  177. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/quality.py +0 -0
  178. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/sdd.py +0 -0
  179. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/models/task.py +0 -0
  180. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/modes/__init__.py +0 -0
  181. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/modes/detector.py +0 -0
  182. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/modes/router.py +0 -0
  183. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/parsers/__init__.py +0 -0
  184. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/parsers/persona_importer.py +0 -0
  185. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/resources/semgrep/async.yml +0 -0
  186. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/resources/semgrep/code-quality.yml +0 -0
  187. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/resources/semgrep/feature-detection.yml +0 -0
  188. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/runtime.py +0 -0
  189. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/__init__.py +0 -0
  190. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/bridge_probe.py +0 -0
  191. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/bridge_watch.py +0 -0
  192. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/change_detector.py +0 -0
  193. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/code_to_spec.py +0 -0
  194. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/drift_detector.py +0 -0
  195. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/repository_sync.py +0 -0
  196. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/spec_to_code.py +0 -0
  197. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/spec_to_tests.py +0 -0
  198. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/watcher.py +0 -0
  199. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/sync/watcher_enhanced.py +0 -0
  200. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/templates/__init__.py +0 -0
  201. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/templates/bridge_templates.py +0 -0
  202. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/templates/specification_templates.py +0 -0
  203. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/__init__.py +0 -0
  204. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/acceptance_criteria.py +0 -0
  205. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/bundle_loader.py +0 -0
  206. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/code_change_detector.py +0 -0
  207. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/console.py +0 -0
  208. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/content_sanitizer.py +0 -0
  209. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/context_detection.py +0 -0
  210. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/enrichment_context.py +0 -0
  211. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/enrichment_parser.py +0 -0
  212. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/env_manager.py +0 -0
  213. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/feature_keys.py +0 -0
  214. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/git.py +0 -0
  215. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/github_annotations.py +0 -0
  216. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/incremental_check.py +0 -0
  217. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/optional_deps.py +0 -0
  218. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/performance.py +0 -0
  219. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/progress.py +0 -0
  220. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/progressive_disclosure.py +0 -0
  221. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/prompts.py +0 -0
  222. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/sdd_discovery.py +0 -0
  223. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/source_scanner.py +0 -0
  224. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/structure.py +0 -0
  225. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/structured_io.py +0 -0
  226. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/suggestions.py +0 -0
  227. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/terminal.py +0 -0
  228. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/utils/yaml_utils.py +0 -0
  229. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/__init__.py +0 -0
  230. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/agile_validation.py +0 -0
  231. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/change_proposal_integration.py +0 -0
  232. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/cli_first_validator.py +0 -0
  233. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/contract_validator.py +0 -0
  234. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/fsm.py +0 -0
  235. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/schema.py +0 -0
  236. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/__init__.py +0 -0
  237. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/contract_populator.py +0 -0
  238. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/crosshair_runner.py +0 -0
  239. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/crosshair_summary.py +0 -0
  240. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/dependency_installer.py +0 -0
  241. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/framework_detector.py +0 -0
  242. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/frameworks/__init__.py +0 -0
  243. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/frameworks/base.py +0 -0
  244. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/frameworks/django.py +0 -0
  245. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/frameworks/drf.py +0 -0
  246. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/frameworks/fastapi.py +0 -0
  247. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/frameworks/flask.py +0 -0
  248. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/harness_generator.py +0 -0
  249. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/models.py +0 -0
  250. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/specmatic_runner.py +0 -0
  251. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/validators/sidecar/unannotated_detector.py +0 -0
  252. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/versioning/__init__.py +0 -0
  253. {specfact_cli-0.25.2 → specfact_cli-0.26.0}/src/specfact_cli/versioning/analyzer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: specfact-cli
3
- Version: 0.25.2
3
+ Version: 0.26.0
4
4
  Summary: Brownfield-first CLI: Reverse engineer legacy Python → specs → enforced contracts. Automate legacy code documentation and prevent modernization regressions.
5
5
  Project-URL: Homepage, https://github.com/nold-ai/specfact-cli
6
6
  Project-URL: Repository, https://github.com/nold-ai/specfact-cli.git
@@ -223,6 +223,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
223
223
  Classifier: Topic :: Software Development :: Quality Assurance
224
224
  Classifier: Topic :: Software Development :: Testing
225
225
  Requires-Python: >=3.11
226
+ Requires-Dist: azure-identity>=1.17.1
226
227
  Requires-Dist: beartype>=0.22.4
227
228
  Requires-Dist: crosshair-tool>=0.0.97
228
229
  Requires-Dist: gitpython>=3.1.45
@@ -237,6 +238,7 @@ Requires-Dist: opentelemetry-sdk>=1.27.0
237
238
  Requires-Dist: pydantic>=2.12.3
238
239
  Requires-Dist: python-dotenv>=1.2.1
239
240
  Requires-Dist: pyyaml>=6.0.3
241
+ Requires-Dist: requests>=2.32.3
240
242
  Requires-Dist: rich<13.6.0,>=13.5.2
241
243
  Requires-Dist: ruamel-yaml>=0.18.16
242
244
  Requires-Dist: ruff>=0.14.2
@@ -446,8 +448,11 @@ specfact validate sidecar run my-project /path/to/repo
446
448
  - **Role-based workflows** - Product Owners, Architects, Developers work in parallel
447
449
  - **Markdown-based** - No YAML editing required
448
450
  - **Agile/scrum ready** - DoR checklists, story points, dependencies
451
+ - **Backlog standardization** 🆕 - Template-driven refinement with persona/framework filtering
452
+ - **Sprint/iteration filtering** 🆕 - Filter by sprint, release, iteration for agile workflows
449
453
 
450
- 👉 **[Agile/Scrum Workflows](docs/guides/agile-scrum-workflows.md)** - Team collaboration guide
454
+ 👉 **[Agile/Scrum Workflows](docs/guides/agile-scrum-workflows.md)** - Team collaboration guide
455
+ 👉 **[Backlog Refinement](docs/guides/backlog-refinement.md)** 🆕 - Standardize backlog items with templates
451
456
 
452
457
  ### 🔌 Integrations
453
458
 
@@ -455,9 +460,11 @@ specfact validate sidecar run my-project /path/to/repo
455
460
  - **GitHub Actions** - Automated quality gates
456
461
  - **AI IDEs** - Generate prompts for fixing gaps
457
462
  - **DevOps tools** - Sync with GitHub Issues, Linear, Jira
463
+ - **Backlog Refinement** 🆕 - AI-assisted template-driven refinement for standardizing work items
458
464
  - **Spec-Kit, OpenSpec, Specmatic** - Works with your existing tools
459
465
 
460
- 👉 **[Integrations Overview](docs/guides/integrations-overview.md)** - All integration options
466
+ 👉 **[Integrations Overview](docs/guides/integrations-overview.md)** - All integration options
467
+ 👉 **[Backlog Refinement Guide](docs/guides/backlog-refinement.md)** 🆕 **NEW** - Template-driven backlog standardization
461
468
 
462
469
  ---
463
470
 
@@ -523,6 +530,7 @@ specfact validate sidecar run my-project /path/to/repo
523
530
  - **[OpenSpec Journey](docs/guides/openspec-journey.md)** - OpenSpec integration
524
531
  - **[Specmatic Integration](docs/guides/specmatic-integration.md)** - API contract testing
525
532
  - **[DevOps Adapter Integration](docs/guides/devops-adapter-integration.md)** - GitHub Issues, Linear, Jira
533
+ - **[Backlog Refinement](docs/guides/backlog-refinement.md)** 🆕 **NEW** - AI-assisted template-driven backlog standardization
526
534
 
527
535
  👉 **[Full Documentation Index](docs/README.md)** - Browse all documentation
528
536
  👉 **[Online Documentation](https://docs.specfact.io/)** - Complete documentation site
@@ -171,8 +171,11 @@ specfact validate sidecar run my-project /path/to/repo
171
171
  - **Role-based workflows** - Product Owners, Architects, Developers work in parallel
172
172
  - **Markdown-based** - No YAML editing required
173
173
  - **Agile/scrum ready** - DoR checklists, story points, dependencies
174
+ - **Backlog standardization** 🆕 - Template-driven refinement with persona/framework filtering
175
+ - **Sprint/iteration filtering** 🆕 - Filter by sprint, release, iteration for agile workflows
174
176
 
175
- 👉 **[Agile/Scrum Workflows](docs/guides/agile-scrum-workflows.md)** - Team collaboration guide
177
+ 👉 **[Agile/Scrum Workflows](docs/guides/agile-scrum-workflows.md)** - Team collaboration guide
178
+ 👉 **[Backlog Refinement](docs/guides/backlog-refinement.md)** 🆕 - Standardize backlog items with templates
176
179
 
177
180
  ### 🔌 Integrations
178
181
 
@@ -180,9 +183,11 @@ specfact validate sidecar run my-project /path/to/repo
180
183
  - **GitHub Actions** - Automated quality gates
181
184
  - **AI IDEs** - Generate prompts for fixing gaps
182
185
  - **DevOps tools** - Sync with GitHub Issues, Linear, Jira
186
+ - **Backlog Refinement** 🆕 - AI-assisted template-driven refinement for standardizing work items
183
187
  - **Spec-Kit, OpenSpec, Specmatic** - Works with your existing tools
184
188
 
185
- 👉 **[Integrations Overview](docs/guides/integrations-overview.md)** - All integration options
189
+ 👉 **[Integrations Overview](docs/guides/integrations-overview.md)** - All integration options
190
+ 👉 **[Backlog Refinement Guide](docs/guides/backlog-refinement.md)** 🆕 **NEW** - Template-driven backlog standardization
186
191
 
187
192
  ---
188
193
 
@@ -248,6 +253,7 @@ specfact validate sidecar run my-project /path/to/repo
248
253
  - **[OpenSpec Journey](docs/guides/openspec-journey.md)** - OpenSpec integration
249
254
  - **[Specmatic Integration](docs/guides/specmatic-integration.md)** - API contract testing
250
255
  - **[DevOps Adapter Integration](docs/guides/devops-adapter-integration.md)** - GitHub Issues, Linear, Jira
256
+ - **[Backlog Refinement](docs/guides/backlog-refinement.md)** 🆕 **NEW** - AI-assisted template-driven backlog standardization
251
257
 
252
258
  👉 **[Full Documentation Index](docs/README.md)** - Browse all documentation
253
259
  👉 **[Online Documentation](https://docs.specfact.io/)** - Complete documentation site
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "specfact-cli"
7
- version = "0.25.2"
7
+ version = "0.26.0"
8
8
  description = "Brownfield-first CLI: Reverse engineer legacy Python → specs → enforced contracts. Automate legacy code documentation and prevent modernization regressions."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -31,6 +31,8 @@ dependencies = [
31
31
  "python-dotenv>=1.2.1",
32
32
  "typing-extensions>=4.15.0",
33
33
  "PyYAML>=6.0.3",
34
+ "requests>=2.32.3",
35
+ "azure-identity>=1.17.1",
34
36
 
35
37
  # CLI framework
36
38
  "typer>=0.20.0",
@@ -36,9 +36,24 @@ Synchronize artifacts from external tools (Spec-Kit, Linear, Jira) with SpecFact
36
36
 
37
37
  ### Advanced/Configuration
38
38
 
39
- - `--adapter TYPE` - Adapter type (speckit, generic-markdown). Default: auto-detect
39
+ - `--adapter TYPE` - Adapter type (speckit, generic-markdown, openspec, github, ado). Default: auto-detect
40
40
  - `--interval SECONDS` - Watch interval in seconds. Default: 5 (range: 1+)
41
41
 
42
+ **GitHub Adapter Options (for backlog sync):**
43
+
44
+ - `--repo-owner OWNER` - GitHub repository owner (required for GitHub backlog sync)
45
+ - `--repo-name NAME` - GitHub repository name (required for GitHub backlog sync)
46
+ - `--github-token TOKEN` - GitHub API token (optional, uses GITHUB_TOKEN env var or gh CLI if not provided)
47
+ - `--use-gh-cli/--no-gh-cli` - Use GitHub CLI (`gh auth token`) to get token automatically (default: True)
48
+
49
+ **Azure DevOps Adapter Options (for backlog sync):**
50
+
51
+ - `--ado-org ORG` - Azure DevOps organization (required for ADO backlog sync)
52
+ - `--ado-project PROJECT` - Azure DevOps project (required for ADO backlog sync)
53
+ - `--ado-base-url URL` - Azure DevOps base URL (optional, defaults to <https://dev.azure.com>). Use for Azure DevOps Server (on-prem)
54
+ - `--ado-token TOKEN` - Azure DevOps PAT (optional, uses AZURE_DEVOPS_TOKEN env var if not provided)
55
+ - `--ado-work-item-type TYPE` - Azure DevOps work item type (optional, derived from process template if not provided)
56
+
42
57
  ## Workflow
43
58
 
44
59
  ### Step 1: Parse Arguments
@@ -50,7 +65,15 @@ Synchronize artifacts from external tools (Spec-Kit, Linear, Jira) with SpecFact
50
65
  ### Step 2: Execute CLI
51
66
 
52
67
  ```bash
53
- specfact sync bridge --adapter <adapter> --repo <path> [--bidirectional] [--bundle <name>] [--overwrite] [--watch] [--interval <seconds>]
68
+ # Spec-Kit adapter (default)
69
+ specfact sync bridge --adapter speckit --repo <path> [--bidirectional] [--bundle <name>] [--overwrite] [--watch] [--interval <seconds>]
70
+
71
+ # GitHub adapter (for backlog sync)
72
+ specfact sync bridge --adapter github --repo <path> --repo-owner <owner> --repo-name <name> [--bidirectional] [--bundle <name>] [--github-token <token>] [--use-gh-cli]
73
+
74
+ # Azure DevOps adapter (for backlog sync)
75
+ specfact sync bridge --adapter ado --repo <path> --ado-org <org> --ado-project <project> [--bidirectional] [--bundle <name>] [--ado-token <token>] [--ado-base-url <url>]
76
+
54
77
  # --bundle defaults to active plan if not specified
55
78
  ```
56
79
 
@@ -143,16 +166,35 @@ Conflicts Resolved: 2
143
166
 
144
167
  ```text
145
168
  ✗ Unsupported adapter: invalid-adapter
146
- Supported adapters: speckit, generic-markdown
169
+ Supported adapters: speckit, generic-markdown, openspec, github, ado
170
+ ```
171
+
172
+ ### Error (Missing Required Parameters)
173
+
174
+ ```text
175
+ ✗ GitHub adapter requires both --repo-owner and --repo-name options
176
+ Example: specfact sync bridge --adapter github --repo-owner 'nold-ai' --repo-name 'specfact-cli' --bidirectional
177
+ ```
178
+
179
+ ```text
180
+ ✗ Azure DevOps adapter requires both --ado-org and --ado-project options
181
+ Example: specfact sync bridge --adapter ado --ado-org 'my-org' --ado-project 'my-project' --bidirectional
147
182
  ```
148
183
 
149
184
  ## Common Patterns
150
185
 
151
186
  ```bash
187
+ # Spec-Kit adapter
152
188
  /specfact.06-sync --adapter speckit --repo . --bidirectional
153
189
  /specfact.06-sync --adapter speckit --repo . --bundle legacy-api
154
190
  /specfact.06-sync --adapter speckit --repo . --watch --interval 5
155
191
  /specfact.06-sync --repo . --bidirectional # Auto-detect adapter
192
+
193
+ # GitHub adapter (backlog sync)
194
+ /specfact.06-sync --adapter github --repo . --repo-owner nold-ai --repo-name specfact-cli --bidirectional
195
+
196
+ # Azure DevOps adapter (backlog sync)
197
+ /specfact.06-sync --adapter ado --repo . --ado-org my-org --ado-project my-project --bidirectional
156
198
  ```
157
199
 
158
200
  ## Context
@@ -0,0 +1,239 @@
1
+ ---
2
+ description: "Refine backlog items using template-driven AI assistance"
3
+ ---
4
+
5
+ # SpecFact Backlog Refinement Command
6
+
7
+ ## User Input
8
+
9
+ ```text
10
+ $ARGUMENTS
11
+ ```
12
+
13
+ You **MUST** consider the user input before proceeding (if not empty).
14
+
15
+ ## Purpose
16
+
17
+ Refine backlog items from DevOps tools (GitHub Issues, Azure DevOps, etc.) into structured, template-compliant work items using AI-assisted refinement with template detection and validation.
18
+
19
+ **When to use:** Standardizing backlog items, enforcing corporate templates (user stories, defects, spikes, enablers), preparing items for sprint planning.
20
+
21
+ **Quick:** `/specfact.backlog-refine --adapter github --labels feature,enhancement` or `/specfact.backlog-refine --adapter ado --sprint "Sprint 1"`
22
+
23
+ ## Parameters
24
+
25
+ ### Required
26
+
27
+ - `ADAPTER` - Backlog adapter name (github, ado, etc.)
28
+
29
+ ### Adapter Configuration (Required for GitHub/ADO)
30
+
31
+ **GitHub Adapter:**
32
+
33
+ - `--repo-owner OWNER` - GitHub repository owner (required for GitHub adapter)
34
+ - `--repo-name NAME` - GitHub repository name (required for GitHub adapter)
35
+ - `--github-token TOKEN` - GitHub API token (optional, uses GITHUB_TOKEN env var or gh CLI if not provided)
36
+
37
+ **Azure DevOps Adapter:**
38
+
39
+ - `--ado-org ORG` - Azure DevOps organization (required for ADO adapter)
40
+ - `--ado-project PROJECT` - Azure DevOps project (required for ADO adapter)
41
+ - `--ado-token TOKEN` - Azure DevOps PAT (optional, uses AZURE_DEVOPS_TOKEN env var if not provided)
42
+
43
+ ### Filters
44
+
45
+ - `--labels LABELS` or `--tags TAGS` - Filter by labels/tags (comma-separated, e.g., "feature,enhancement")
46
+ - `--state STATE` - Filter by state (open, closed, etc.)
47
+ - `--assignee USERNAME` - Filter by assignee username
48
+ - `--iteration PATH` - Filter by iteration path (ADO format: "Project\\Sprint 1")
49
+ - `--sprint SPRINT` - Filter by sprint identifier
50
+ - `--release RELEASE` - Filter by release identifier
51
+ - `--persona PERSONA` - Filter templates by persona (product-owner, architect, developer)
52
+ - `--framework FRAMEWORK` - Filter templates by framework (agile, scrum, safe, kanban)
53
+
54
+ ### Template Selection
55
+
56
+ - `--template TEMPLATE_ID` or `-t TEMPLATE_ID` - Target template ID (default: auto-detect)
57
+ - `--auto-accept-high-confidence` - Auto-accept refinements with confidence >= 0.85
58
+
59
+ ### Preview and Writeback
60
+
61
+ - `--preview` / `--no-preview` - Preview mode: show what will be written without updating backlog (default: --preview)
62
+ - `--write` - Write mode: explicitly opt-in to update remote backlog (requires --write flag)
63
+
64
+ ### Definition of Ready (DoR)
65
+
66
+ - `--check-dor` - Check Definition of Ready (DoR) rules before refinement (loads from `.specfact/dor.yaml`)
67
+
68
+ ### OpenSpec Integration
69
+
70
+ - `--bundle BUNDLE` or `-b BUNDLE` - OpenSpec bundle path to import refined items
71
+ - `--auto-bundle` - Auto-import refined items to OpenSpec bundle
72
+ - `--openspec-comment` - Add OpenSpec change proposal reference as comment (preserves original body)
73
+
74
+ ### Generic Search
75
+
76
+ - `--search QUERY` or `-s QUERY` - Search query using provider-specific syntax (e.g., GitHub: "is:open label:feature")
77
+
78
+ ## Workflow
79
+
80
+ ### Step 1: Execute CLI Command
81
+
82
+ Execute the SpecFact CLI command with user-provided arguments:
83
+
84
+ ```bash
85
+ specfact backlog refine $ADAPTER \
86
+ [--labels LABELS] [--state STATE] [--assignee USERNAME] \
87
+ [--iteration PATH] [--sprint SPRINT] [--release RELEASE] \
88
+ [--persona PERSONA] [--framework FRAMEWORK] \
89
+ [--template TEMPLATE_ID] [--auto-accept-high-confidence] \
90
+ [--preview] [--write] \
91
+ [--bundle BUNDLE] [--auto-bundle] \
92
+ [--search QUERY]
93
+ ```
94
+
95
+ **Capture CLI output**:
96
+
97
+ - List of backlog items found
98
+ - Template detection results for each item
99
+ - Refinement prompts for IDE AI copilot
100
+ - Validation results
101
+ - Preview of what will be written (if --preview)
102
+ - Writeback confirmation (if --write)
103
+
104
+ ### Step 2: Process Refinement Prompts (If Items Need Refinement)
105
+
106
+ **When CLI generates refinement prompts**:
107
+
108
+ 1. **For each item needing refinement**:
109
+ - CLI displays a refinement prompt
110
+ - Copy the prompt and execute it in your IDE AI copilot
111
+ - Get refined content from AI copilot response
112
+ - Paste refined content back to CLI when prompted
113
+
114
+ 2. **CLI validation**:
115
+ - CLI validates refined content against template requirements
116
+ - CLI provides confidence score
117
+ - CLI shows preview of changes (original vs refined)
118
+
119
+ 3. **User confirmation**:
120
+ - Review preview (fields that will be updated vs preserved)
121
+ - Accept or reject refinement
122
+ - If accepted and --write flag set, CLI updates remote backlog
123
+
124
+ ### Step 3: Present Results
125
+
126
+ Display refinement results:
127
+
128
+ - Number of items refined
129
+ - Number of items skipped
130
+ - Template matches found
131
+ - Confidence scores
132
+ - Preview status (if --preview)
133
+ - Writeback status (if --write)
134
+
135
+ ## CLI Enforcement
136
+
137
+ **CRITICAL**: Always use SpecFact CLI commands. See [CLI Enforcement Rules](./shared/cli-enforcement.md) for details.
138
+
139
+ **Rules**:
140
+
141
+ - Execute CLI first - never modify backlog items directly
142
+ - Use refinement prompts generated by CLI
143
+ - Validate refined content through CLI
144
+ - Use --preview flag by default for safety
145
+ - Use --write flag only when ready to update backlog
146
+
147
+ ## Field Preservation Policy
148
+
149
+ **Fields that will be UPDATED**:
150
+
151
+ - `title`: Updated if changed during refinement
152
+ - `body_markdown`: Updated with refined content
153
+
154
+ **Fields that will be PRESERVED** (not modified):
155
+
156
+ - `assignees`: Preserved
157
+ - `tags`: Preserved
158
+ - `state`: Preserved
159
+ - `priority`: Preserved (if present in provider_fields)
160
+ - `due_date`: Preserved (if present in provider_fields)
161
+ - `story_points`: Preserved (if present in provider_fields)
162
+ - `sprint`: Preserved (if present)
163
+ - `release`: Preserved (if present)
164
+ - All other metadata: Preserved in provider_fields
165
+
166
+ **OpenSpec Comment Integration**:
167
+
168
+ - When `--openspec-comment` is used, a structured comment is added to the backlog item
169
+ - The comment includes: Change ID, template used, confidence score, refinement timestamp
170
+ - Original body is preserved; comment provides OpenSpec reference for cross-sync
171
+
172
+ ## Architecture Note
173
+
174
+ SpecFact CLI follows a CLI-first architecture:
175
+
176
+ - SpecFact CLI generates prompts/instructions for IDE AI copilots
177
+ - IDE AI copilots execute those instructions using their native LLM
178
+ - IDE AI copilots feed results back to SpecFact CLI
179
+ - SpecFact CLI validates and processes the results
180
+ - SpecFact CLI does NOT directly invoke LLM APIs
181
+
182
+ ## Expected Output
183
+
184
+ ### Success (Preview Mode)
185
+
186
+ ```text
187
+ ✓ Refinement completed (Preview Mode)
188
+
189
+ Found 5 backlog items
190
+ Refined: 3
191
+ Skipped: 2
192
+
193
+ Preview mode: Refinement will NOT be written to backlog
194
+ Use --write flag to explicitly opt-in to writeback
195
+ ```
196
+
197
+ ### Success (Write Mode)
198
+
199
+ ```text
200
+ ✓ Refinement completed and written to backlog
201
+
202
+ Found 5 backlog items
203
+ Refined: 3
204
+ Skipped: 2
205
+
206
+ Items updated in remote backlog:
207
+ - #123: User Story Template Applied
208
+ - #124: Defect Template Applied
209
+ - #125: Spike Template Applied
210
+ ```
211
+
212
+ ## Common Patterns
213
+
214
+ ```bash
215
+ # Refine GitHub issues with feature label (requires repo-owner and repo-name)
216
+ /specfact.backlog-refine --adapter github --repo-owner nold-ai --repo-name specfact-cli --labels feature
217
+
218
+ # Refine ADO work items in specific sprint (requires ado-org and ado-project)
219
+ /specfact.backlog-refine --adapter ado --ado-org my-org --ado-project my-project --sprint "Sprint 1"
220
+
221
+ # Refine with Scrum framework and Product Owner persona
222
+ /specfact.backlog-refine --adapter github --repo-owner nold-ai --repo-name specfact-cli --framework scrum --persona product-owner
223
+
224
+ # Preview refinement without writing
225
+ /specfact.backlog-refine --adapter github --repo-owner nold-ai --repo-name specfact-cli --preview
226
+
227
+ # Write refinement to backlog with OpenSpec comment (explicit opt-in)
228
+ /specfact.backlog-refine --adapter github --repo-owner nold-ai --repo-name specfact-cli --write --openspec-comment
229
+
230
+ # Check Definition of Ready before refinement
231
+ /specfact.backlog-refine --adapter github --repo-owner nold-ai --repo-name specfact-cli --check-dor --labels feature
232
+
233
+ # Refine and import to OpenSpec bundle
234
+ /specfact.backlog-refine --adapter github --repo-owner nold-ai --repo-name specfact-cli --bundle my-project --auto-bundle --state open
235
+ ```
236
+
237
+ ## Context
238
+
239
+ {ARGS}
@@ -65,11 +65,22 @@ Sync OpenSpec change proposals to DevOps backlog tools (GitHub Issues, ADO, Line
65
65
  ### Advanced/Configuration
66
66
 
67
67
  - `--adapter TYPE` - DevOps adapter type (github, ado, linear, jira). Default: github
68
- - `--repo-owner OWNER` - Repository owner (for GitHub/ADO). Optional, can use bridge config
69
- - `--repo-name NAME` - Repository name (for GitHub/ADO). Optional, can use bridge config
68
+
69
+ **GitHub Adapter Options:**
70
+
71
+ - `--repo-owner OWNER` - Repository owner (for GitHub adapter). Optional, can use bridge config
72
+ - `--repo-name NAME` - Repository name (for GitHub adapter). Optional, can use bridge config
70
73
  - `--github-token TOKEN` - GitHub API token (optional, uses GITHUB_TOKEN env var or gh CLI if not provided)
71
74
  - `--use-gh-cli/--no-gh-cli` - Use GitHub CLI (`gh auth token`) to get token automatically (default: True). Useful in enterprise environments where PAT creation is restricted
72
75
 
76
+ **Azure DevOps Adapter Options:**
77
+
78
+ - `--ado-org ORG` - Azure DevOps organization (required for ADO adapter)
79
+ - `--ado-project PROJECT` - Azure DevOps project (required for ADO adapter)
80
+ - `--ado-base-url URL` - Azure DevOps base URL (optional, defaults to <https://dev.azure.com>). Use for Azure DevOps Server (on-prem)
81
+ - `--ado-token TOKEN` - Azure DevOps PAT (optional, uses AZURE_DEVOPS_TOKEN env var if not provided). Requires Work Items (Read & Write) permissions
82
+ - `--ado-work-item-type TYPE` - Azure DevOps work item type (optional, derived from process template if not provided). Examples: 'User Story', 'Product Backlog Item', 'Bug'
83
+
73
84
  ## Workflow
74
85
 
75
86
  ### Step 1: Parse Arguments
@@ -114,24 +125,41 @@ Sync OpenSpec change proposals to DevOps backlog tools (GitHub Issues, ADO, Line
114
125
  **For non-sanitized proposals** (direct export):
115
126
 
116
127
  ```bash
128
+ # GitHub adapter
117
129
  specfact sync bridge --adapter github --mode export-only --repo <openspec-path> \
118
130
  --no-sanitize --change-ids <id1,id2> \
119
131
  [--code-repo <source-code-path>] \
120
132
  [--track-code-changes] [--add-progress-comment] \
121
133
  [--target-repo <owner/repo>] [--repo-owner <owner>] [--repo-name <name>] \
122
134
  [--github-token <token>] [--use-gh-cli]
135
+
136
+ # Azure DevOps adapter
137
+ specfact sync bridge --adapter ado --mode export-only --repo <openspec-path> \
138
+ --no-sanitize --change-ids <id1,id2> \
139
+ [--code-repo <source-code-path>] \
140
+ [--track-code-changes] [--add-progress-comment] \
141
+ --ado-org <org> --ado-project <project> \
142
+ [--ado-token <token>] [--ado-base-url <url>] [--ado-work-item-type <type>]
123
143
  ```
124
144
 
125
145
  **For sanitized proposals** (requires LLM review):
126
146
 
127
147
  ```bash
128
- # Step 3a: Export to temporary file for LLM review
148
+ # Step 3a: Export to temporary file for LLM review (GitHub)
129
149
  specfact sync bridge --adapter github --mode export-only --repo <openspec-path> \
130
150
  --sanitize --change-ids <id1,id2> \
131
151
  [--code-repo <source-code-path>] \
132
152
  --export-to-tmp --tmp-file /tmp/specfact-proposal-<change-id>.md \
133
153
  [--target-repo <owner/repo>] [--repo-owner <owner>] [--repo-name <name>] \
134
154
  [--github-token <token>] [--use-gh-cli]
155
+
156
+ # Step 3a: Export to temporary file for LLM review (ADO)
157
+ specfact sync bridge --adapter ado --mode export-only --repo <openspec-path> \
158
+ --sanitize --change-ids <id1,id2> \
159
+ [--code-repo <source-code-path>] \
160
+ --export-to-tmp --tmp-file /tmp/specfact-proposal-<change-id>.md \
161
+ --ado-org <org> --ado-project <project> \
162
+ [--ado-token <token>] [--ado-base-url <url>]
135
163
  ```
136
164
 
137
165
  **Note**: When `--code-repo` is provided, code change detection uses that repository. Otherwise, code changes are detected in the OpenSpec repository (`--repo`).
@@ -173,12 +201,19 @@ specfact sync bridge --adapter github --mode export-only --repo <openspec-path>
173
201
  **For sanitized proposals** (after LLM review):
174
202
 
175
203
  ```bash
176
- # Step 5a: Import sanitized content from temporary file
204
+ # Step 5a: Import sanitized content from temporary file (GitHub)
177
205
  specfact sync bridge --adapter github --mode export-only --repo <path> \
178
206
  --import-from-tmp --tmp-file /tmp/specfact-proposal-<change-id>-sanitized.md \
179
207
  --change-ids <id1,id2> \
180
208
  [--target-repo <owner/repo>] [--repo-owner <owner>] [--repo-name <name>] \
181
209
  [--github-token <token>] [--use-gh-cli]
210
+
211
+ # Step 5a: Import sanitized content from temporary file (ADO)
212
+ specfact sync bridge --adapter ado --mode export-only --repo <path> \
213
+ --import-from-tmp --tmp-file /tmp/specfact-proposal-<change-id>-sanitized.md \
214
+ --change-ids <id1,id2> \
215
+ --ado-org <org> --ado-project <project> \
216
+ [--ado-token <token>] [--ado-base-url <url>]
182
217
  ```
183
218
 
184
219
  **For non-sanitized proposals** (already exported in Step 3):
@@ -244,11 +279,17 @@ When in copilot mode, follow this workflow:
244
279
  **What to do**:
245
280
 
246
281
  ```bash
247
- # For each sanitized proposal, export to temp file
282
+ # For each sanitized proposal, export to temp file (GitHub)
248
283
  specfact sync bridge --adapter github --mode export-only --repo <openspec-path> \
249
284
  --change-ids <change-id> --export-to-tmp --tmp-file /tmp/specfact-proposal-<change-id>.md \
250
285
  [--code-repo <source-code-path>] \
251
- [other options]
286
+ [--repo-owner <owner>] [--repo-name <name>] [--github-token <token>] [--use-gh-cli]
287
+
288
+ # For each sanitized proposal, export to temp file (ADO)
289
+ specfact sync bridge --adapter ado --mode export-only --repo <openspec-path> \
290
+ --change-ids <change-id> --export-to-tmp --tmp-file /tmp/specfact-proposal-<change-id>.md \
291
+ [--code-repo <source-code-path>] \
292
+ --ado-org <org> --ado-project <project> [--ado-token <token>] [--ado-base-url <url>]
252
293
  ```
253
294
 
254
295
  **Capture**:
@@ -315,12 +356,19 @@ specfact sync bridge --adapter github --mode export-only --repo <openspec-path>
315
356
  **What to do**:
316
357
 
317
358
  ```bash
318
- # Export non-sanitized proposals directly
359
+ # Export non-sanitized proposals directly (GitHub)
319
360
  specfact sync bridge --adapter github --mode export-only --repo <openspec-path> \
320
361
  --change-ids <id1,id2> --no-sanitize \
321
362
  [--code-repo <source-code-path>] \
322
363
  [--track-code-changes] [--add-progress-comment] \
323
- [other options]
364
+ [--repo-owner <owner>] [--repo-name <name>] [--github-token <token>] [--use-gh-cli]
365
+
366
+ # Export non-sanitized proposals directly (ADO)
367
+ specfact sync bridge --adapter ado --mode export-only --repo <openspec-path> \
368
+ --change-ids <id1,id2> --no-sanitize \
369
+ [--code-repo <source-code-path>] \
370
+ [--track-code-changes] [--add-progress-comment] \
371
+ --ado-org <org> --ado-project <project> [--ado-token <token>] [--ado-base-url <url>]
324
372
  ```
325
373
 
326
374
  **Result**: Issues created directly without LLM review
@@ -334,12 +382,19 @@ specfact sync bridge --adapter github --mode export-only --repo <openspec-path>
334
382
  **What to do**:
335
383
 
336
384
  ```bash
337
- # For each approved sanitized proposal, import from temp file and create issue
385
+ # For each approved sanitized proposal, import from temp file and create issue (GitHub)
338
386
  specfact sync bridge --adapter github --mode export-only --repo <openspec-path> \
339
387
  --change-ids <change-id> --import-from-tmp --tmp-file /tmp/specfact-proposal-<change-id>-sanitized.md \
340
388
  [--code-repo <source-code-path>] \
341
389
  [--track-code-changes] [--add-progress-comment] \
342
- [other options]
390
+ [--repo-owner <owner>] [--repo-name <name>] [--github-token <token>] [--use-gh-cli]
391
+
392
+ # For each approved sanitized proposal, import from temp file and create work item (ADO)
393
+ specfact sync bridge --adapter ado --mode export-only --repo <openspec-path> \
394
+ --change-ids <change-id> --import-from-tmp --tmp-file /tmp/specfact-proposal-<change-id>-sanitized.md \
395
+ [--code-repo <source-code-path>] \
396
+ [--track-code-changes] [--add-progress-comment] \
397
+ --ado-org <org> --ado-project <project> [--ado-token <token>] [--ado-base-url <url>]
343
398
  ```
344
399
 
345
400
  **Result**: Issues created with sanitized content
@@ -461,9 +516,12 @@ Competitive analysis and internal strategy sections removed
461
516
  # Auto-detect sanitization (filters based on repo setup)
462
517
  /specfact.sync-backlog --adapter github
463
518
 
464
- # Explicit repository configuration
519
+ # Explicit repository configuration (GitHub)
465
520
  /specfact.sync-backlog --adapter github --repo-owner nold-ai --repo-name specfact-cli-internal
466
521
 
522
+ # Azure DevOps adapter (requires org and project)
523
+ /specfact.sync-backlog --adapter ado --ado-org my-org --ado-project my-project
524
+
467
525
  # Use GitHub CLI for token (enterprise-friendly)
468
526
  /specfact.sync-backlog --adapter github --use-gh-cli
469
527
  ```
@@ -0,0 +1,22 @@
1
+ template_id: defect_v1
2
+ name: Defect
3
+ description: Standard defect/bug template with reproduction steps and expected behavior
4
+ scope: corporate
5
+ required_sections:
6
+ - Description
7
+ - Steps to Reproduce
8
+ - Expected Behavior
9
+ - Actual Behavior
10
+ optional_sections:
11
+ - Environment
12
+ - Screenshots
13
+ - Related Issues
14
+ body_patterns:
15
+ steps_to_reproduce: "[Ss]teps? to [Rr]eproduce"
16
+ expected_behavior: "[Ee]xpected [Bb]ehavior"
17
+ actual_behavior: "[Aa]ctual [Bb]ehavior"
18
+ title_patterns:
19
+ - "^.*[Bb]ug.*$"
20
+ - "^.*[Dd]efect.*$"
21
+ - "^.*[Ii]ssue.*$"
22
+ schema_ref: openspec/templates/defect_v1/
@@ -0,0 +1,21 @@
1
+ template_id: enabler_v1
2
+ name: Enabler
3
+ description: Enabler work template for infrastructure and technical improvements
4
+ scope: corporate
5
+ required_sections:
6
+ - Objective
7
+ - Technical Approach
8
+ - Success Criteria
9
+ optional_sections:
10
+ - Dependencies
11
+ - Risks
12
+ - Timeline
13
+ body_patterns:
14
+ objective: "[Oo]bjective"
15
+ technical_approach: "[Tt]echnical [Aa]pproach"
16
+ success_criteria: "[Ss]uccess [Cc]riteria"
17
+ title_patterns:
18
+ - "^.*[Ee]nabler.*$"
19
+ - "^.*[Ii]nfrastructure.*$"
20
+ - "^.*[Tt]echnical [Dd]ebt.*$"
21
+ schema_ref: openspec/templates/enabler_v1/
@@ -0,0 +1,20 @@
1
+ template_id: spike_v1
2
+ name: Spike
3
+ description: Research spike template for investigating technical feasibility
4
+ scope: corporate
5
+ required_sections:
6
+ - Research Question
7
+ - Investigation Approach
8
+ - Findings
9
+ optional_sections:
10
+ - Recommendations
11
+ - Time Box
12
+ - Related Work
13
+ body_patterns:
14
+ research_question: "[Rr]esearch [Qq]uestion"
15
+ investigation_approach: "[Ii]nvestigation [Aa]pproach"
16
+ findings: "[Ff]indings"
17
+ title_patterns:
18
+ - "^.*[Ss]pike.*$"
19
+ - "^.*[Rr]esearch.*$"
20
+ schema_ref: openspec/templates/spike_v1/