contextcompass 2.15.0__py3-none-any.whl

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 (452) hide show
  1. contextcompass-2.15.0.dist-info/METADATA +673 -0
  2. contextcompass-2.15.0.dist-info/RECORD +452 -0
  3. contextcompass-2.15.0.dist-info/WHEEL +4 -0
  4. contextcompass-2.15.0.dist-info/entry_points.txt +2 -0
  5. contextcompass-2.15.0.dist-info/licenses/LICENSE +21 -0
  6. contextcompass_cli/__init__.py +74 -0
  7. contextcompass_cli/__main__.py +195 -0
  8. contextcompass_cli/_package/AGENTS.MD +310 -0
  9. contextcompass_cli/_package/CONTEXT_COMPACTION.md +110 -0
  10. contextcompass_cli/_package/MANIFEST.md +485 -0
  11. contextcompass_cli/_package/PROFILE_CLASS_CREATION_GUIDE.md +426 -0
  12. contextcompass_cli/_package/README.md +266 -0
  13. contextcompass_cli/_package/SKILLS.MD +144 -0
  14. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/AGENTS.MD +54 -0
  15. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/README.md +43 -0
  16. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/SKILLS.MD +44 -0
  17. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/WORKFLOWS.MD +15 -0
  18. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/behavioral_guidelines/continuity_fact_checker_workflow.md +23 -0
  19. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/examples/continuity_fact_checker_task_flow.md +24 -0
  20. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/policies/continuity_fact_checker_handoff_policy.md +20 -0
  21. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/policies/continuity_fact_checker_quality_policy.md +22 -0
  22. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/skills/continuity_fact_checker.md +37 -0
  23. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/skills/continuity_fact_checker_advanced_context.md +17 -0
  24. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/skills/continuity_fact_checker_deliverables.md +26 -0
  25. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/skills/continuity_fact_checker_execution.md +23 -0
  26. contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/workflows/README.md +8 -0
  27. contextcompass_cli/_package/agent_onboarding/default/design_engineer/AGENTS.MD +85 -0
  28. contextcompass_cli/_package/agent_onboarding/default/design_engineer/README.md +62 -0
  29. contextcompass_cli/_package/agent_onboarding/default/design_engineer/SKILLS.MD +74 -0
  30. contextcompass_cli/_package/agent_onboarding/default/design_engineer/WORKFLOWS.MD +15 -0
  31. contextcompass_cli/_package/agent_onboarding/default/design_engineer/behavioral_guidelines/design_engineer_workflow.md +25 -0
  32. contextcompass_cli/_package/agent_onboarding/default/design_engineer/behavioral_guidelines/design_validation_and_handoff.md +25 -0
  33. contextcompass_cli/_package/agent_onboarding/default/design_engineer/examples/adr_example.md +40 -0
  34. contextcompass_cli/_package/agent_onboarding/default/design_engineer/examples/design_task_flow.md +33 -0
  35. contextcompass_cli/_package/agent_onboarding/default/design_engineer/policies/decision_record_policy.md +23 -0
  36. contextcompass_cli/_package/agent_onboarding/default/design_engineer/policies/design_quality_policy.md +30 -0
  37. contextcompass_cli/_package/agent_onboarding/default/design_engineer/policies/design_review_policy.md +22 -0
  38. contextcompass_cli/_package/agent_onboarding/default/design_engineer/policies/system_document_quality_rubric.md +236 -0
  39. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/adr_and_decision_hygiene.md +38 -0
  40. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/api_and_interface_design.md +36 -0
  41. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/architecture_contexts.md +40 -0
  42. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/architecture_patch_contracts.md +43 -0
  43. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/architecture_tradeoffs.md +33 -0
  44. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/code_description_patch_contracts.md +46 -0
  45. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/component_patch_contracts.md +41 -0
  46. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/data_modeling.md +34 -0
  47. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/decomposition_and_boundaries.md +42 -0
  48. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/design_engineer_execution.md +65 -0
  49. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/design_review_protocol.md +34 -0
  50. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/nonfunctional_requirements.md +34 -0
  51. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/patch_framework_design.md +79 -0
  52. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/requirements_to_architecture.md +39 -0
  53. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/src_architecture_instructions.md +347 -0
  54. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/src_components_instructions.md +405 -0
  55. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/system_design_method.md +45 -0
  56. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/tests_architecture_instructions.md +375 -0
  57. contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/tests_components_instructions.md +406 -0
  58. contextcompass_cli/_package/agent_onboarding/default/design_engineer/workflows/README.md +8 -0
  59. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/AGENTS.MD +53 -0
  60. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/README.md +42 -0
  61. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/SKILLS.MD +44 -0
  62. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/WORKFLOWS.MD +15 -0
  63. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/behavioral_guidelines/developmental_editor_workflow.md +23 -0
  64. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/examples/developmental_editor_task_flow.md +23 -0
  65. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/policies/developmental_editor_handoff_policy.md +20 -0
  66. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/policies/developmental_editor_quality_policy.md +22 -0
  67. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/skills/developmental_editor.md +36 -0
  68. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/skills/developmental_editor_advanced_context.md +17 -0
  69. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/skills/developmental_editor_deliverables.md +25 -0
  70. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/skills/developmental_editor_execution.md +23 -0
  71. contextcompass_cli/_package/agent_onboarding/default/developmental_editor/workflows/README.md +8 -0
  72. contextcompass_cli/_package/agent_onboarding/default/draft_writer/AGENTS.MD +54 -0
  73. contextcompass_cli/_package/agent_onboarding/default/draft_writer/README.md +43 -0
  74. contextcompass_cli/_package/agent_onboarding/default/draft_writer/SKILLS.MD +44 -0
  75. contextcompass_cli/_package/agent_onboarding/default/draft_writer/WORKFLOWS.MD +15 -0
  76. contextcompass_cli/_package/agent_onboarding/default/draft_writer/behavioral_guidelines/draft_writer_workflow.md +23 -0
  77. contextcompass_cli/_package/agent_onboarding/default/draft_writer/examples/draft_writer_task_flow.md +24 -0
  78. contextcompass_cli/_package/agent_onboarding/default/draft_writer/policies/draft_writer_handoff_policy.md +20 -0
  79. contextcompass_cli/_package/agent_onboarding/default/draft_writer/policies/draft_writer_quality_policy.md +22 -0
  80. contextcompass_cli/_package/agent_onboarding/default/draft_writer/skills/draft_writer.md +37 -0
  81. contextcompass_cli/_package/agent_onboarding/default/draft_writer/skills/draft_writer_advanced_context.md +17 -0
  82. contextcompass_cli/_package/agent_onboarding/default/draft_writer/skills/draft_writer_deliverables.md +26 -0
  83. contextcompass_cli/_package/agent_onboarding/default/draft_writer/skills/draft_writer_execution.md +23 -0
  84. contextcompass_cli/_package/agent_onboarding/default/draft_writer/workflows/README.md +8 -0
  85. contextcompass_cli/_package/agent_onboarding/default/engineer/AGENTS.MD +493 -0
  86. contextcompass_cli/_package/agent_onboarding/default/engineer/README.md +53 -0
  87. contextcompass_cli/_package/agent_onboarding/default/engineer/SKILLS.MD +263 -0
  88. contextcompass_cli/_package/agent_onboarding/default/engineer/WORKFLOWS.MD +15 -0
  89. contextcompass_cli/_package/agent_onboarding/default/engineer/behavioral_guidelines/engineer_workflow.md +24 -0
  90. contextcompass_cli/_package/agent_onboarding/default/engineer/behavioral_guidelines/task_execution_and_validation.md +34 -0
  91. contextcompass_cli/_package/agent_onboarding/default/engineer/examples/artifact_workflow.md +104 -0
  92. contextcompass_cli/_package/agent_onboarding/default/engineer/examples/eng_task_flow.md +30 -0
  93. contextcompass_cli/_package/agent_onboarding/default/engineer/policies/ctx_autonomy_policy.md +34 -0
  94. contextcompass_cli/_package/agent_onboarding/default/engineer/policies/ctx_autonomy_rubric.md +161 -0
  95. contextcompass_cli/_package/agent_onboarding/default/engineer/policies/engineer_quality_policy.md +33 -0
  96. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/context_protocol.md +70 -0
  97. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/documentation_standards.md +120 -0
  98. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/engineer_execution.md +62 -0
  99. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/package_maintenance.md +195 -0
  100. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/patch_artifact_consumption.md +68 -0
  101. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/patch_framework_gating.md +72 -0
  102. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/src_graph_generation.md +341 -0
  103. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/src_graph_usage.md +161 -0
  104. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/staleness_protocol.md +49 -0
  105. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/system_document_build.md +360 -0
  106. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/system_orientation.md +83 -0
  107. contextcompass_cli/_package/agent_onboarding/default/engineer/skills/technical_expertise.md +48 -0
  108. contextcompass_cli/_package/agent_onboarding/default/engineer/workflows/README.md +9 -0
  109. contextcompass_cli/_package/agent_onboarding/default/general/AGENTS.MD +283 -0
  110. contextcompass_cli/_package/agent_onboarding/default/general/README.md +38 -0
  111. contextcompass_cli/_package/agent_onboarding/default/general/SKILLS.MD +92 -0
  112. contextcompass_cli/_package/agent_onboarding/default/general/WORKFLOWS.MD +23 -0
  113. contextcompass_cli/_package/agent_onboarding/default/general/behavioral_guidelines/README.md +12 -0
  114. contextcompass_cli/_package/agent_onboarding/default/general/behavioral_guidelines/agent_lifecycle_and_heartbeat.md +37 -0
  115. contextcompass_cli/_package/agent_onboarding/default/general/behavioral_guidelines/onboarding_summary.md +41 -0
  116. contextcompass_cli/_package/agent_onboarding/default/general/behavioral_guidelines/work_intake_and_execution.md +44 -0
  117. contextcompass_cli/_package/agent_onboarding/default/general/policies/policy_skills.md +174 -0
  118. contextcompass_cli/_package/agent_onboarding/default/general/skills/active_documentation.md +86 -0
  119. contextcompass_cli/_package/agent_onboarding/default/general/skills/active_pointerboard.md +81 -0
  120. contextcompass_cli/_package/agent_onboarding/default/general/skills/agent_identity.md +38 -0
  121. contextcompass_cli/_package/agent_onboarding/default/general/skills/agent_lifecycle.md +21 -0
  122. contextcompass_cli/_package/agent_onboarding/default/general/skills/agent_stance.md +38 -0
  123. contextcompass_cli/_package/agent_onboarding/default/general/skills/career_selection.md +83 -0
  124. contextcompass_cli/_package/agent_onboarding/default/general/skills/compaction_requirements.md +147 -0
  125. contextcompass_cli/_package/agent_onboarding/default/general/skills/configuration_standards.md +72 -0
  126. contextcompass_cli/_package/agent_onboarding/default/general/skills/context_compaction.md +104 -0
  127. contextcompass_cli/_package/agent_onboarding/default/general/skills/context_gold.md +31 -0
  128. contextcompass_cli/_package/agent_onboarding/default/general/skills/context_management.md +79 -0
  129. contextcompass_cli/_package/agent_onboarding/default/general/skills/context_window_budget.md +64 -0
  130. contextcompass_cli/_package/agent_onboarding/default/general/skills/execution_contract.md +234 -0
  131. contextcompass_cli/_package/agent_onboarding/default/general/skills/general.md +22 -0
  132. contextcompass_cli/_package/agent_onboarding/default/general/skills/llm_full_usage.md +111 -0
  133. contextcompass_cli/_package/agent_onboarding/default/general/skills/mailbox_protocol.md +85 -0
  134. contextcompass_cli/_package/agent_onboarding/default/general/skills/memory_management.md +28 -0
  135. contextcompass_cli/_package/agent_onboarding/default/general/skills/mrp_policy.md +40 -0
  136. contextcompass_cli/_package/agent_onboarding/default/general/skills/package_upgrade.md +135 -0
  137. contextcompass_cli/_package/agent_onboarding/default/general/skills/reactive_documentation.md +105 -0
  138. contextcompass_cli/_package/agent_onboarding/default/general/skills/repo_topology.md +25 -0
  139. contextcompass_cli/_package/agent_onboarding/default/general/skills/role_local_workflows.md +41 -0
  140. contextcompass_cli/_package/agent_onboarding/default/general/skills/security_and_secrets.md +46 -0
  141. contextcompass_cli/_package/agent_onboarding/default/general/skills/self_certification.md +49 -0
  142. contextcompass_cli/_package/agent_onboarding/default/general/skills/ticket_closure_attention_sync.md +57 -0
  143. contextcompass_cli/_package/agent_onboarding/default/general/skills/ticket_microcycle.md +44 -0
  144. contextcompass_cli/_package/agent_onboarding/default/general/skills/ticketing.md +175 -0
  145. contextcompass_cli/_package/agent_onboarding/default/general/skills/ticketing_skill_contract.md +52 -0
  146. contextcompass_cli/_package/agent_onboarding/default/general/skills/unknowns_gate_reference.md +66 -0
  147. contextcompass_cli/_package/agent_onboarding/default/general/skills/user_approved_certification.md +32 -0
  148. contextcompass_cli/_package/agent_onboarding/default/general/skills/workflow.md +289 -0
  149. contextcompass_cli/_package/agent_onboarding/default/general/workflows/README.md +9 -0
  150. contextcompass_cli/_package/agent_onboarding/default/general/workflows/cleanup_context_compass.md +205 -0
  151. contextcompass_cli/_package/agent_onboarding/default/general/workflows/role_creation.md +39 -0
  152. contextcompass_cli/_package/agent_onboarding/default/general/workflows/start_context_compass_work.md +102 -0
  153. contextcompass_cli/_package/agent_onboarding/default/general/workflows/sync_attention_board.md +91 -0
  154. contextcompass_cli/_package/agent_onboarding/default/general/workflows/turn_in_selected_tickets.md +95 -0
  155. contextcompass_cli/_package/agent_onboarding/default/general/workflows/workflow_creation.md +38 -0
  156. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/AGENTS.MD +53 -0
  157. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/README.md +42 -0
  158. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/SKILLS.MD +44 -0
  159. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/WORKFLOWS.MD +15 -0
  160. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/behavioral_guidelines/line_copy_editor_workflow.md +23 -0
  161. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/examples/line_copy_editor_task_flow.md +23 -0
  162. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/policies/line_copy_editor_handoff_policy.md +20 -0
  163. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/policies/line_copy_editor_quality_policy.md +22 -0
  164. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/skills/line_copy_editor.md +36 -0
  165. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/skills/line_copy_editor_advanced_context.md +17 -0
  166. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/skills/line_copy_editor_deliverables.md +25 -0
  167. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/skills/line_copy_editor_execution.md +23 -0
  168. contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/workflows/README.md +8 -0
  169. contextcompass_cli/_package/agent_onboarding/default/new/AGENTS.MD +79 -0
  170. contextcompass_cli/_package/agent_onboarding/default/new/README.md +54 -0
  171. contextcompass_cli/_package/agent_onboarding/default/new/SKILLS.MD +35 -0
  172. contextcompass_cli/_package/agent_onboarding/default/new/WORKFLOWS.MD +15 -0
  173. contextcompass_cli/_package/agent_onboarding/default/new/behavioral_guidelines/user_onboarding_flow.md +52 -0
  174. contextcompass_cli/_package/agent_onboarding/default/new/policies/new_onboarding_policy.md +59 -0
  175. contextcompass_cli/_package/agent_onboarding/default/new/skills/configuration_map_guide.md +83 -0
  176. contextcompass_cli/_package/agent_onboarding/default/new/skills/first_time_profile_setup.md +60 -0
  177. contextcompass_cli/_package/agent_onboarding/default/new/skills/new.md +54 -0
  178. contextcompass_cli/_package/agent_onboarding/default/new/skills/onboarding_completion_and_next_step.md +54 -0
  179. contextcompass_cli/_package/agent_onboarding/default/new/skills/profile_model_explained.md +120 -0
  180. contextcompass_cli/_package/agent_onboarding/default/new/skills/system_overview_for_user.md +51 -0
  181. contextcompass_cli/_package/agent_onboarding/default/new/workflows/README.md +8 -0
  182. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/AGENTS.MD +63 -0
  183. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/README.md +41 -0
  184. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/SKILLS.MD +62 -0
  185. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/WORKFLOWS.MD +15 -0
  186. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/behavioral_guidelines/incident_workflow.md +17 -0
  187. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/behavioral_guidelines/platform_engineer_workflow.md +18 -0
  188. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/examples/platform_task_flow.md +22 -0
  189. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/policies/operational_safety_policy.md +20 -0
  190. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/policies/platform_quality_policy.md +22 -0
  191. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/policies/production_change_management_policy.md +18 -0
  192. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/ci_cd_and_release.md +28 -0
  193. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/deployment_and_environments.md +25 -0
  194. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/incident_response_and_runbooks.md +35 -0
  195. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/infrastructure_as_code.md +24 -0
  196. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/observability_and_monitoring.md +28 -0
  197. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/performance_capacity_cost.md +20 -0
  198. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/platform_engineer_execution.md +41 -0
  199. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/platform_security_basics.md +25 -0
  200. contextcompass_cli/_package/agent_onboarding/default/platform_engineer/workflows/README.md +8 -0
  201. contextcompass_cli/_package/agent_onboarding/default/proofreader/AGENTS.MD +53 -0
  202. contextcompass_cli/_package/agent_onboarding/default/proofreader/README.md +42 -0
  203. contextcompass_cli/_package/agent_onboarding/default/proofreader/SKILLS.MD +44 -0
  204. contextcompass_cli/_package/agent_onboarding/default/proofreader/WORKFLOWS.MD +15 -0
  205. contextcompass_cli/_package/agent_onboarding/default/proofreader/behavioral_guidelines/proofreader_workflow.md +23 -0
  206. contextcompass_cli/_package/agent_onboarding/default/proofreader/examples/proofreader_task_flow.md +23 -0
  207. contextcompass_cli/_package/agent_onboarding/default/proofreader/policies/proofreader_handoff_policy.md +20 -0
  208. contextcompass_cli/_package/agent_onboarding/default/proofreader/policies/proofreader_quality_policy.md +22 -0
  209. contextcompass_cli/_package/agent_onboarding/default/proofreader/skills/proofreader.md +36 -0
  210. contextcompass_cli/_package/agent_onboarding/default/proofreader/skills/proofreader_advanced_context.md +17 -0
  211. contextcompass_cli/_package/agent_onboarding/default/proofreader/skills/proofreader_deliverables.md +25 -0
  212. contextcompass_cli/_package/agent_onboarding/default/proofreader/skills/proofreader_execution.md +23 -0
  213. contextcompass_cli/_package/agent_onboarding/default/proofreader/workflows/README.md +8 -0
  214. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/AGENTS.MD +58 -0
  215. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/README.md +41 -0
  216. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/SKILLS.MD +61 -0
  217. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/WORKFLOWS.MD +15 -0
  218. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/behavioral_guidelines/qa_workflow.md +18 -0
  219. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/behavioral_guidelines/release_signoff_workflow.md +17 -0
  220. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/examples/qa_task_flow.md +24 -0
  221. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/policies/defect_severity_policy.md +24 -0
  222. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/policies/quality_gate_policy.md +18 -0
  223. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/policies/test_evidence_policy.md +18 -0
  224. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/bug_triage_and_repro.md +23 -0
  225. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/qa_engineer_execution.md +29 -0
  226. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/quality_metrics.md +24 -0
  227. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/regression_and_release_quality.md +28 -0
  228. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/test_automation_practices.md +30 -0
  229. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/test_case_design.md +27 -0
  230. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/test_data_and_environments.md +20 -0
  231. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/test_strategy_and_planning.md +31 -0
  232. contextcompass_cli/_package/agent_onboarding/default/qa_engineer/workflows/README.md +8 -0
  233. contextcompass_cli/_package/agent_onboarding/default/researcher/AGENTS.MD +55 -0
  234. contextcompass_cli/_package/agent_onboarding/default/researcher/README.md +44 -0
  235. contextcompass_cli/_package/agent_onboarding/default/researcher/SKILLS.MD +44 -0
  236. contextcompass_cli/_package/agent_onboarding/default/researcher/WORKFLOWS.MD +15 -0
  237. contextcompass_cli/_package/agent_onboarding/default/researcher/behavioral_guidelines/researcher_workflow.md +23 -0
  238. contextcompass_cli/_package/agent_onboarding/default/researcher/examples/researcher_task_flow.md +25 -0
  239. contextcompass_cli/_package/agent_onboarding/default/researcher/policies/researcher_handoff_policy.md +20 -0
  240. contextcompass_cli/_package/agent_onboarding/default/researcher/policies/researcher_quality_policy.md +22 -0
  241. contextcompass_cli/_package/agent_onboarding/default/researcher/skills/researcher.md +38 -0
  242. contextcompass_cli/_package/agent_onboarding/default/researcher/skills/researcher_advanced_context.md +17 -0
  243. contextcompass_cli/_package/agent_onboarding/default/researcher/skills/researcher_deliverables.md +27 -0
  244. contextcompass_cli/_package/agent_onboarding/default/researcher/skills/researcher_execution.md +23 -0
  245. contextcompass_cli/_package/agent_onboarding/default/researcher/workflows/README.md +8 -0
  246. contextcompass_cli/_package/agent_onboarding/default/security_engineer/AGENTS.MD +55 -0
  247. contextcompass_cli/_package/agent_onboarding/default/security_engineer/README.md +43 -0
  248. contextcompass_cli/_package/agent_onboarding/default/security_engineer/SKILLS.MD +62 -0
  249. contextcompass_cli/_package/agent_onboarding/default/security_engineer/WORKFLOWS.MD +15 -0
  250. contextcompass_cli/_package/agent_onboarding/default/security_engineer/behavioral_guidelines/security_signoff_and_escalation.md +22 -0
  251. contextcompass_cli/_package/agent_onboarding/default/security_engineer/behavioral_guidelines/security_workflow.md +18 -0
  252. contextcompass_cli/_package/agent_onboarding/default/security_engineer/examples/security_review_flow.md +22 -0
  253. contextcompass_cli/_package/agent_onboarding/default/security_engineer/policies/risk_acceptance_policy.md +17 -0
  254. contextcompass_cli/_package/agent_onboarding/default/security_engineer/policies/secrets_and_keys_policy.md +19 -0
  255. contextcompass_cli/_package/agent_onboarding/default/security_engineer/policies/security_review_policy.md +22 -0
  256. contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/authn_authz_basics.md +24 -0
  257. contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/dependency_and_supply_chain.md +20 -0
  258. contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/incident_response_security.md +22 -0
  259. contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/logging_audit_privacy.md +16 -0
  260. contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/secure_architecture_review.md +20 -0
  261. contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/secure_coding_review.md +22 -0
  262. contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/security_engineer_execution.md +28 -0
  263. contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/threat_modeling.md +25 -0
  264. contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/vulnerability_management.md +22 -0
  265. contextcompass_cli/_package/agent_onboarding/default/security_engineer/workflows/README.md +8 -0
  266. contextcompass_cli/_package/agent_onboarding/default/story_designer/AGENTS.MD +56 -0
  267. contextcompass_cli/_package/agent_onboarding/default/story_designer/README.md +45 -0
  268. contextcompass_cli/_package/agent_onboarding/default/story_designer/SKILLS.MD +44 -0
  269. contextcompass_cli/_package/agent_onboarding/default/story_designer/WORKFLOWS.MD +15 -0
  270. contextcompass_cli/_package/agent_onboarding/default/story_designer/behavioral_guidelines/story_designer_workflow.md +23 -0
  271. contextcompass_cli/_package/agent_onboarding/default/story_designer/examples/story_designer_task_flow.md +26 -0
  272. contextcompass_cli/_package/agent_onboarding/default/story_designer/policies/story_designer_handoff_policy.md +20 -0
  273. contextcompass_cli/_package/agent_onboarding/default/story_designer/policies/story_designer_quality_policy.md +22 -0
  274. contextcompass_cli/_package/agent_onboarding/default/story_designer/skills/story_designer.md +39 -0
  275. contextcompass_cli/_package/agent_onboarding/default/story_designer/skills/story_designer_advanced_context.md +17 -0
  276. contextcompass_cli/_package/agent_onboarding/default/story_designer/skills/story_designer_deliverables.md +28 -0
  277. contextcompass_cli/_package/agent_onboarding/default/story_designer/skills/story_designer_execution.md +23 -0
  278. contextcompass_cli/_package/agent_onboarding/default/story_designer/workflows/README.md +8 -0
  279. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/AGENTS.MD +56 -0
  280. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/README.md +45 -0
  281. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/SKILLS.MD +44 -0
  282. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/WORKFLOWS.MD +15 -0
  283. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/behavioral_guidelines/story_novel_artist_workflow.md +23 -0
  284. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/examples/story_novel_artist_task_flow.md +26 -0
  285. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/policies/story_novel_artist_handoff_policy.md +20 -0
  286. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/policies/story_novel_artist_quality_policy.md +22 -0
  287. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/skills/story_novel_artist.md +39 -0
  288. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/skills/story_novel_artist_advanced_context.md +17 -0
  289. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/skills/story_novel_artist_deliverables.md +28 -0
  290. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/skills/story_novel_artist_execution.md +23 -0
  291. contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/workflows/README.md +8 -0
  292. contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/AGENTS.MD +66 -0
  293. contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/SKILLS.MD +15 -0
  294. contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/WORKFLOWS.MD +15 -0
  295. contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/behavioral_guidelines/data_engineer_behavior_overrides.md +6 -0
  296. contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/policies/data_engineer_policy_overrides.md +6 -0
  297. contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/profile_overrides.md +9 -0
  298. contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/skills/data_engineer_skill_overrides.md +6 -0
  299. contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/workflows/README.md +8 -0
  300. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/AGENTS.MD +145 -0
  301. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/SKILLS.MD +37 -0
  302. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/WORKFLOWS.MD +17 -0
  303. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/behavioral_guidelines/synaptic_finishing_developer_behavior_overrides.md +12 -0
  304. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/examples/python/comment_finishing_examples.py +65 -0
  305. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/examples/python/docstring_finishing_examples.py +126 -0
  306. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/examples/python/pytest_component_finishing_examples.py +51 -0
  307. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/examples/python/pytest_integration_finishing_examples.py +59 -0
  308. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/examples/python/pytest_unit_finishing_examples.py +66 -0
  309. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/policies/synaptic_finishing_developer_policy_overrides.md +14 -0
  310. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/profile_overrides.md +17 -0
  311. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/documentation/comment_craft.md +51 -0
  312. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/documentation/docstring_craft.md +86 -0
  313. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/documentation/docstring_test_alignment.md +51 -0
  314. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/documentation/system_aware_docstrings.md +64 -0
  315. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/synaptic_finishing_developer_skill_overrides.md +11 -0
  316. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/component_tests.md +45 -0
  317. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/evidence_reporting.md +25 -0
  318. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/mocking.md +35 -0
  319. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/pytest_integration.md +32 -0
  320. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/pytest_unit.md +49 -0
  321. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/regression_tests.md +24 -0
  322. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/testing_overview.md +71 -0
  323. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/workflows/README.md +8 -0
  324. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/workflows/optimize_pytests_for_repo.md +272 -0
  325. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/workflows/polish_repo_documentation.md +247 -0
  326. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/AGENTS.MD +386 -0
  327. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/README.md +31 -0
  328. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/SKILLS.MD +44 -0
  329. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/WORKFLOWS.MD +16 -0
  330. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/behavioral_guidelines/synaptic_behavior_overrides.md +17 -0
  331. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/anti_patterns.py +19 -0
  332. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/cleanup_patterns.py +22 -0
  333. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/docstrings.py +19 -0
  334. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/logging_patterns.py +11 -0
  335. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/protocols_and_abc.py +15 -0
  336. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/pytest_component_examples.py +15 -0
  337. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/pytest_integration_examples.py +17 -0
  338. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/pytest_unit_examples.py +13 -0
  339. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/policies/synaptic_policy_overrides.md +22 -0
  340. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/profile_overrides.md +27 -0
  341. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/attribute_aliasing_skill_benchmark.py +35 -0
  342. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/banned_patterns.md +110 -0
  343. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/cleanup_and_disposal.md +79 -0
  344. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/comments.md +39 -0
  345. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/docstrings.md +90 -0
  346. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/error_model.md +28 -0
  347. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/hot_path_attribute_aliasing.md +52 -0
  348. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/init_and_ownership.md +35 -0
  349. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/interfaces.md +47 -0
  350. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/logging.md +37 -0
  351. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/module_scope.md +38 -0
  352. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/refactor_limits.md +44 -0
  353. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/typing.md +52 -0
  354. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/synaptic_skill_overrides.md +24 -0
  355. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/evidence_reporting.md +35 -0
  356. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/mocking.md +31 -0
  357. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/pytest_integration.md +36 -0
  358. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/pytest_unit.md +42 -0
  359. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/regression_tests.md +26 -0
  360. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/testing_overview.md +196 -0
  361. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/workflows/README.md +8 -0
  362. contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/workflows/synaptic_python_developer_onboarding.md +226 -0
  363. contextcompass_cli/_package/artifact_board.md +64 -0
  364. contextcompass_cli/_package/artifacts/IMPORTANT_CONSIDERATION.md +43 -0
  365. contextcompass_cli/_package/artifacts/README.md +41 -0
  366. contextcompass_cli/_package/attention_board.md +79 -0
  367. contextcompass_cli/_package/config/context_compass_config.yaml +101 -0
  368. contextcompass_cli/_package/context_management/README.md +21 -0
  369. contextcompass_cli/_package/context_management/artifacts/.gitkeep +1 -0
  370. contextcompass_cli/_package/context_management/context_artifact_template.md +42 -0
  371. contextcompass_cli/_package/context_management/context_board.md +27 -0
  372. contextcompass_cli/_package/examples/adr_example.md +29 -0
  373. contextcompass_cli/_package/examples/artifact_workflow.md +20 -0
  374. contextcompass_cli/_package/examples/continuity_fact_checker_task_flow.md +23 -0
  375. contextcompass_cli/_package/examples/design_task_flow.md +35 -0
  376. contextcompass_cli/_package/examples/developmental_editor_task_flow.md +22 -0
  377. contextcompass_cli/_package/examples/draft_writer_task_flow.md +23 -0
  378. contextcompass_cli/_package/examples/eng_task_flow.md +31 -0
  379. contextcompass_cli/_package/examples/example_architecture/.gitkeep +0 -0
  380. contextcompass_cli/_package/examples/example_architecture/src_architecture.md +136 -0
  381. contextcompass_cli/_package/examples/example_architecture/src_architecture_index.md +46 -0
  382. contextcompass_cli/_package/examples/example_architecture/tests_architecture.md +148 -0
  383. contextcompass_cli/_package/examples/example_architecture/tests_architecture_index.md +46 -0
  384. contextcompass_cli/_package/examples/example_completed/.gitkeep +0 -0
  385. contextcompass_cli/_package/examples/example_completed/2026-02-19_context_compass_release_overview_artifact.md +33 -0
  386. contextcompass_cli/_package/examples/example_components/.gitkeep +0 -0
  387. contextcompass_cli/_package/examples/example_components/src_components.md +169 -0
  388. contextcompass_cli/_package/examples/example_components/src_components_index.md +44 -0
  389. contextcompass_cli/_package/examples/example_components/tests_components.md +96 -0
  390. contextcompass_cli/_package/examples/example_components/tests_components_index.md +42 -0
  391. contextcompass_cli/_package/examples/example_epics/.gitkeep +0 -0
  392. contextcompass_cli/_package/examples/example_epics/2026-02-19_context_compass_release_readiness_example_pack_epic.md +130 -0
  393. contextcompass_cli/_package/examples/example_graph_details/README.md +131 -0
  394. contextcompass_cli/_package/examples/example_graph_details/src/example/__init__.py +4 -0
  395. contextcompass_cli/_package/examples/example_graph_details/src/example/core/interfaces.py +10 -0
  396. contextcompass_cli/_package/examples/example_graph_details/src/example/core/resource.py +15 -0
  397. contextcompass_cli/_package/examples/example_graph_details/src/example/pipeline/pipeline.py +20 -0
  398. contextcompass_cli/_package/examples/example_graph_details/src/example/pipeline/stage.py +11 -0
  399. contextcompass_cli/_package/examples/example_graph_details/src/example/storage/store.py +20 -0
  400. contextcompass_cli/_package/examples/example_graph_details/src_graph.md +192 -0
  401. contextcompass_cli/_package/examples/example_graph_details/src_graph_index.md +32 -0
  402. contextcompass_cli/_package/examples/example_stories/.gitkeep +0 -0
  403. contextcompass_cli/_package/examples/example_stories/2026-02-19_context_compass_release_readiness_examples_story.md +120 -0
  404. contextcompass_cli/_package/examples/example_tasks/.gitkeep +0 -0
  405. contextcompass_cli/_package/examples/example_tasks/2026-02-19_context_compass_release_readiness_pack_task.md +147 -0
  406. contextcompass_cli/_package/examples/line_copy_editor_task_flow.md +23 -0
  407. contextcompass_cli/_package/examples/platform_task_flow.md +26 -0
  408. contextcompass_cli/_package/examples/proofreader_task_flow.md +23 -0
  409. contextcompass_cli/_package/examples/qa_task_flow.md +26 -0
  410. contextcompass_cli/_package/examples/repo_overview.md +63 -0
  411. contextcompass_cli/_package/examples/researcher_task_flow.md +23 -0
  412. contextcompass_cli/_package/examples/security_review_flow.md +24 -0
  413. contextcompass_cli/_package/examples/story_designer_task_flow.md +23 -0
  414. contextcompass_cli/_package/examples/story_novel_artist_task_flow.md +22 -0
  415. contextcompass_cli/_package/mailbox_board.md +79 -0
  416. contextcompass_cli/_package/special_instructions/README.md +16 -0
  417. contextcompass_cli/_package/system_docs/.gitkeep +0 -0
  418. contextcompass_cli/_package/system_docs/patches/active/README.md +25 -0
  419. contextcompass_cli/_package/system_docs/patches/active/_template_patch_id/architecture_patch.md +53 -0
  420. contextcompass_cli/_package/system_docs/patches/active/_template_patch_id/code_description_patch_TEMPLATE_COMPONENT.md +39 -0
  421. contextcompass_cli/_package/system_docs/patches/active/_template_patch_id/component_patch_TEMPLATE_COMPONENT.md +48 -0
  422. contextcompass_cli/_package/system_docs/system_docs_read_first.md +107 -0
  423. contextcompass_cli/_package/templates/epic_template.md +149 -0
  424. contextcompass_cli/_package/templates/story_template.md +131 -0
  425. contextcompass_cli/_package/templates/task_template.md +124 -0
  426. contextcompass_cli/_package/templates/workflow_advanced_template.md +111 -0
  427. contextcompass_cli/_package/templates/workflow_simple_template.md +65 -0
  428. contextcompass_cli/_package/tickets/README.md +24 -0
  429. contextcompass_cli/_package/tickets/epics/README.md +68 -0
  430. contextcompass_cli/_package/tickets/epics/archive/.gitkeep +0 -0
  431. contextcompass_cli/_package/tickets/epics/backlog/.gitkeep +0 -0
  432. contextcompass_cli/_package/tickets/epics/completed/.gitkeep +0 -0
  433. contextcompass_cli/_package/tickets/stories/README.md +68 -0
  434. contextcompass_cli/_package/tickets/stories/archive/.gitkeep +0 -0
  435. contextcompass_cli/_package/tickets/stories/backlog/.gitkeep +0 -0
  436. contextcompass_cli/_package/tickets/stories/completed/.gitkeep +0 -0
  437. contextcompass_cli/_package/tickets/tasks/README.md +67 -0
  438. contextcompass_cli/_package/tickets/tasks/archive/.gitkeep +0 -0
  439. contextcompass_cli/_package/tickets/tasks/backlog/.gitkeep +0 -0
  440. contextcompass_cli/_package/tickets/tasks/completed/.gitkeep +0 -0
  441. contextcompass_cli/_package/tools/build_llm_full.py +307 -0
  442. contextcompass_cli/_package/tools/cleanup_context_compass.py +488 -0
  443. contextcompass_cli/_package/tools/migrate_boards.py +218 -0
  444. contextcompass_cli/_package/tools/package_manifest.py +351 -0
  445. contextcompass_cli/_package/tools/system_documents/index_document.py +476 -0
  446. contextcompass_cli/_package/tools/system_documents/python/assemble_graph.py +387 -0
  447. contextcompass_cli/_package/tools/system_documents/python/extract_graph.py +626 -0
  448. contextcompass_cli/_package/tools/system_documents/python/graph_semantics_tickets.py +405 -0
  449. contextcompass_cli/_package/tools/system_documents/python/graph_walker.py +375 -0
  450. contextcompass_cli/_package/tools/system_documents/python/migrate_authored_graph.py +179 -0
  451. contextcompass_cli/_package/tools/update_context_compass.py +511 -0
  452. contextcompass_cli/_package/user_defined/README.md +49 -0
@@ -0,0 +1,375 @@
1
+ #!/usr/bin/env python3
2
+ """Reconcile the graph's authored tier against source. Read-only by default.
3
+
4
+ graph_walker.py --descriptors <dir> --report
5
+ graph_walker.py --descriptors <dir> --report --by package
6
+ graph_walker.py --descriptors <dir> --accept app.mod.Alpha --apply
7
+
8
+ WHAT THIS ANSWERS
9
+
10
+ The mechanical tier self-heals: re-run the extractor and classes, bases and line
11
+ numbers are correct again. The authored tier does not. It is written once, and
12
+ nothing has ever said which parts are still true. Over months that produces a
13
+ graph full of confident descriptions of code that no longer works that way, and
14
+ no way to tell those from the accurate ones.
15
+
16
+ FOUR STATES
17
+
18
+ UNSEMANTIC no authored fields. The extractor refusing to guess.
19
+ AUTHORED authored, and the source has not moved since.
20
+ SEMANTICS_STALE authored, but its source changed underneath it.
21
+ RETIRED gone from source; prose retained under `nodes_retired`.
22
+
23
+ `UNSEMANTIC` is a state, not a defect. A brand new project is entirely
24
+ unsemantic and that is correct.
25
+
26
+ WHY IT IS READ-ONLY
27
+
28
+ Everything here except `--accept` reports. Deleting authored prose is reserved
29
+ for an explicit act, because the failure this subsystem exists to prevent is a
30
+ regeneration quietly discarding human work - and a walker that tidies up on its
31
+ own would be that failure wearing a different hat.
32
+
33
+ `--accept` is the one write, and it is narrow: it re-stamps a node whose
34
+ semantics you have RE-READ and confirmed. It changes no prose. Accepting without
35
+ reading is how a graph becomes confidently wrong, so the stamp records the
36
+ source it was accepted against, not the fact that someone ran a command.
37
+ """
38
+
39
+ from __future__ import annotations
40
+
41
+ import argparse
42
+ import collections
43
+ import json
44
+ import pathlib
45
+ import sys
46
+
47
+ AUTHORED_NODE_FIELDS = ("include", "role", "responsibilities", "owns_state", "phases")
48
+ STAMP = "semantics_authored_against"
49
+
50
+
51
+ def load(root: pathlib.Path) -> dict[pathlib.Path, dict]:
52
+ out: dict[pathlib.Path, dict] = {}
53
+ for p in sorted(root.rglob("*.json")):
54
+ if p.name == "_package_candidates.json":
55
+ continue
56
+ try:
57
+ d = json.loads(p.read_text(encoding="utf-8"))
58
+ except json.JSONDecodeError as exc:
59
+ print(f" SKIP (bad json) {p}: {exc}", file=sys.stderr)
60
+ continue
61
+ if isinstance(d, dict) and "source" in d and "nodes" in d:
62
+ out[p] = d
63
+ return out
64
+
65
+
66
+ def stranded_descriptors(descriptors: dict[pathlib.Path, dict],
67
+ src_root: pathlib.Path) -> list[tuple[pathlib.Path, str, int]]:
68
+ """Descriptors whose source file no longer exists.
69
+
70
+ A blind spot the extractor cannot have: it walks SOURCE files and merges each
71
+ into its descriptor, so a file deleted from source is never visited, its
72
+ descriptor is never opened, and every node in it keeps counting as live and
73
+ AUTHORED forever. Deleting one class gets reported; deleting the file holding
74
+ it is silent.
75
+
76
+ Only a pass that starts from the DESCRIPTORS and looks back at source can
77
+ see it, which is this tool.
78
+ """
79
+ out = []
80
+ for path, d in descriptors.items():
81
+ source = d.get("source", "")
82
+ # `source` is `<src_root.name>/<rel>`; strip the root name to rejoin.
83
+ rel = source.split("/", 1)[1] if "/" in source else source
84
+ if not (src_root / rel).is_file():
85
+ authored = sum(1 for n in d.get("nodes", {}).values()
86
+ if any(f in n for f in AUTHORED_NODE_FIELDS))
87
+ out.append((path, source, authored))
88
+ return out
89
+
90
+
91
+ def state_of(node: dict) -> str:
92
+ if not any(f in node for f in AUTHORED_NODE_FIELDS):
93
+ return "UNSEMANTIC"
94
+ stamp, current = node.get(STAMP), node.get("span_sha256", "")
95
+ if stamp and current and stamp != current:
96
+ return "SEMANTICS_STALE"
97
+ return "AUTHORED"
98
+
99
+
100
+ def census(descriptors: dict[pathlib.Path, dict]) -> list[dict]:
101
+ """One row per node, with the state and where it lives."""
102
+ rows = []
103
+ for path, d in descriptors.items():
104
+ source = d.get("source", str(path))
105
+ package = source.rsplit("/", 1)[0] if "/" in source else source
106
+ for nid, node in d.get("nodes", {}).items():
107
+ rows.append({"id": nid, "state": state_of(node), "source": source,
108
+ "package": package, "descriptor": path})
109
+ for nid, node in d.get("nodes_retired", {}).items():
110
+ rows.append({"id": nid, "state": "RETIRED", "source": source,
111
+ "package": package, "descriptor": path})
112
+ return rows
113
+
114
+
115
+ def find_rename_candidates(descriptors: dict[pathlib.Path, dict]) -> list[tuple[str, str, str]]:
116
+ """Retired nodes whose label reappears elsewhere - a probable cross-file move.
117
+
118
+ The extractor works one file at a time, so it cannot see that a class it
119
+ just retired turned up in a different descriptor. Only a whole-graph pass
120
+ can, which is the main reason this tool exists rather than being folded into
121
+ extraction.
122
+
123
+ SUGGESTED, never applied. A same-label match is evidence, not proof, and
124
+ moving someone's authored prose onto the wrong class is worse than leaving
125
+ it retired where they can see it.
126
+ """
127
+ live_by_label: dict[str, list[str]] = collections.defaultdict(list)
128
+ for d in descriptors.values():
129
+ for nid, node in d.get("nodes", {}).items():
130
+ live_by_label[node.get("label", "")].append(nid)
131
+
132
+ out = []
133
+ for d in descriptors.values():
134
+ for nid, node in d.get("nodes_retired", {}).items():
135
+ for candidate in live_by_label.get(node.get("label", ""), []):
136
+ if candidate != nid:
137
+ out.append((nid, candidate, node.get("label", "")))
138
+ return out
139
+
140
+
141
+ def report(descriptors: dict[pathlib.Path, dict], group_by: str,
142
+ src_root: pathlib.Path | None) -> int:
143
+ rows = census(descriptors)
144
+ if not rows:
145
+ print("no nodes found - is --descriptors pointing at an extractor output tree?")
146
+ return 2
147
+
148
+ counts = collections.Counter(r["state"] for r in rows)
149
+ total = len(rows)
150
+ print(f" {len(descriptors)} descriptors, {total} nodes\n")
151
+ print(f" {'state':<18} {'count':>6} share")
152
+ print(f" {'-' * 18} {'-' * 6} -----")
153
+ for state in ("AUTHORED", "SEMANTICS_STALE", "UNSEMANTIC", "RETIRED"):
154
+ n = counts.get(state, 0)
155
+ print(f" {state:<18} {n:>6} {100 * n / total:5.1f}%")
156
+
157
+ stale = [r for r in rows if r["state"] == "SEMANTICS_STALE"]
158
+ retired = [r for r in rows if r["state"] == "RETIRED"]
159
+
160
+ if stale:
161
+ print(f"\n SEMANTICS_STALE - re-read the source, then --accept:")
162
+ for r in stale[:20]:
163
+ print(f" {r['id']} ({r['source']})")
164
+ if len(stale) > 20:
165
+ print(f" ... +{len(stale) - 20} more")
166
+
167
+ if retired:
168
+ print(f"\n RETIRED - prose retained, gone from source:")
169
+ for r in retired[:20]:
170
+ print(f" {r['id']} (was in {r['source']})")
171
+ if len(retired) > 20:
172
+ print(f" ... +{len(retired) - 20} more")
173
+
174
+ stranded = stranded_descriptors(descriptors, src_root) if src_root else []
175
+ if stranded:
176
+ print(f"\n STRANDED DESCRIPTORS - their source file is gone: {len(stranded)}")
177
+ for path, source, authored in stranded[:15]:
178
+ note = f"{authored} authored node(s)" if authored else "no authored content"
179
+ print(f" {source} -> {note}")
180
+ print(" The extractor walks SOURCE, so it never opens these and their nodes")
181
+ print(" keep counting as live. Move any authored prose you want to keep,")
182
+ print(" then delete the descriptor by hand.")
183
+ elif src_root is None:
184
+ print("\n (pass --src to also detect descriptors whose source file is gone)")
185
+
186
+ renames = find_rename_candidates(descriptors)
187
+ if renames:
188
+ print(f"\n POSSIBLE MOVES - a retired label that exists elsewhere now:")
189
+ for old, new, label in renames[:10]:
190
+ print(f" {old}\n -> {new} (both labelled `{label}`)")
191
+ print(" Suggested only. Verify, then copy the authored fields across by")
192
+ print(" hand - a same-label match is evidence, not proof.")
193
+
194
+ # Aggregated at the unit an agent actually works in: a subsystem at a time.
195
+ # Per-node output on a real codebase is thousands of lines nobody reads.
196
+ key = "package" if group_by == "package" else "source"
197
+ grouped: dict[str, collections.Counter] = collections.defaultdict(collections.Counter)
198
+ for r in rows:
199
+ grouped[r[key]][r["state"]] += 1
200
+
201
+ needs_work = {k: c for k, c in grouped.items()
202
+ if c["UNSEMANTIC"] or c["SEMANTICS_STALE"]}
203
+ if needs_work:
204
+ print(f"\n BY {key.upper()} - where the work is ({len(needs_work)} with any):\n")
205
+ print(f" {'unsem':>6} {'stale':>6} {'auth':>6} {key}")
206
+ for k, c in sorted(needs_work.items(),
207
+ key=lambda kv: -(kv[1]['UNSEMANTIC'] + kv[1]['SEMANTICS_STALE'])):
208
+ print(f" {c['UNSEMANTIC']:>6} {c['SEMANTICS_STALE']:>6} "
209
+ f"{c['AUTHORED']:>6} {k}")
210
+
211
+ print(f"\n Nothing was written. Semantics must be AUTHORED BY READING THE CODE -")
212
+ print(f" `owns_lifecycle_of`, `uses` and `borrows` are the same syntax, so a")
213
+ print(f" name-based guess is worse than leaving a node unsemantic.")
214
+ return 1 if (counts.get("SEMANTICS_STALE") or counts.get("RETIRED")) else 0
215
+
216
+
217
+ def accept(descriptors: dict[pathlib.Path, dict], ids: list[str], apply: bool) -> int:
218
+ """Re-stamp nodes whose semantics have been re-verified against source."""
219
+ wanted = set(ids)
220
+ hits: list[tuple[pathlib.Path, str, str]] = []
221
+ for path, d in descriptors.items():
222
+ for nid, node in d.get("nodes", {}).items():
223
+ if nid in wanted:
224
+ hits.append((path, nid, state_of(node)))
225
+
226
+ missing = wanted - {nid for _, nid, _ in hits}
227
+ for nid in sorted(missing):
228
+ print(f" NOT FOUND: {nid}")
229
+
230
+ for path, nid, state in hits:
231
+ if state == "UNSEMANTIC":
232
+ print(f" SKIP {nid} - unsemantic; there is nothing to accept. Author it first.")
233
+ continue
234
+ print(f" {'ACCEPT' if apply else 'WOULD ACCEPT'} {nid} (was {state})")
235
+
236
+ if not apply:
237
+ print("\n Nothing written. Re-run with --apply once you have RE-READ each one.")
238
+ return 0
239
+
240
+ written = 0
241
+ for path, d in descriptors.items():
242
+ touched = False
243
+ for nid, node in d.get("nodes", {}).items():
244
+ if nid in wanted and state_of(node) != "UNSEMANTIC":
245
+ node[STAMP] = node.get("span_sha256", "")
246
+ touched = True
247
+ if touched:
248
+ path.write_text(json.dumps(d, indent=2) + "\n", encoding="utf-8")
249
+ written += 1
250
+ print(f"\n ACCEPTED into {written} descriptor(s). Reassemble to refresh the document.")
251
+ return 0 if not missing else 1
252
+
253
+
254
+ def confirm(question: str, assume_yes: bool) -> bool:
255
+ """Ask before doing something irreversible.
256
+
257
+ Refuses rather than assuming when there is no terminal to ask at. A prompt
258
+ that silently self-answers in CI is not a prompt, and the one verb this
259
+ guards is the only one that destroys authored work.
260
+ """
261
+ if assume_yes:
262
+ print(f" {question} [--yes]")
263
+ return True
264
+ if not sys.stdin.isatty():
265
+ print(f" {question}")
266
+ print(" REFUSED: not a terminal, so there is nobody to ask. Pass --yes if you")
267
+ print(" mean it, having read the list above.")
268
+ return False
269
+ try:
270
+ answer = input(f" {question} [y/N] ").strip().lower()
271
+ except EOFError:
272
+ # `isatty()` said yes and then there was nothing to read. Some CI
273
+ # harnesses hand a process a stdin that claims to be a terminal but
274
+ # closes on first read, so this is the same situation as no terminal
275
+ # at all - and it gets the same answer and the same wording, rather
276
+ # than a softer one that reads like the user chose to cancel.
277
+ print("\n REFUSED: stdin closed before answering, so nobody confirmed.")
278
+ print(" Pass --yes if you mean it, having read the list above.")
279
+ return False
280
+ except KeyboardInterrupt:
281
+ print("\n cancelled")
282
+ return False
283
+ return answer in ("y", "yes")
284
+
285
+
286
+ def reconcile(descriptors: dict[pathlib.Path, dict], assume_yes: bool) -> int:
287
+ """Delete retired nodes. The only sanctioned path for structural deletion.
288
+
289
+ A node reaches `nodes_retired` because it left source. Clearing it is the
290
+ act that says "that removal was real and its semantics are not coming back"
291
+ - which is a judgement, not a derivation, so it is asked rather than
292
+ inferred. Everything else in this tool reports.
293
+ """
294
+ victims: list[tuple[pathlib.Path, str, dict]] = []
295
+ for path, d in descriptors.items():
296
+ for nid, node in d.get("nodes_retired", {}).items():
297
+ victims.append((path, nid, node))
298
+
299
+ if not victims:
300
+ print(" nothing retired - nothing to reconcile")
301
+ return 0
302
+
303
+ print(f" {len(victims)} retired node(s) would be DELETED, with their authored prose:\n")
304
+ for path, nid, node in victims[:25]:
305
+ role = str(node.get("role", "")).strip()
306
+ summary = (role[:72] + "...") if len(role) > 72 else (role or "(no role)")
307
+ fields = [f for f in AUTHORED_NODE_FIELDS if f in node]
308
+ print(f" {nid}")
309
+ print(f" was in : {node.get('file', '?')}")
310
+ print(f" fields : {', '.join(fields)}")
311
+ print(f" role : {summary}")
312
+ if len(victims) > 25:
313
+ print(f" ... +{len(victims) - 25} more")
314
+
315
+ print("\n This is not recoverable from the descriptor afterwards - only from")
316
+ print(" version control. If any of these is a MOVE rather than a deletion,")
317
+ print(" copy its authored fields onto the new node first (--report lists")
318
+ print(" possible moves).")
319
+
320
+ if not confirm(f"Delete {len(victims)} retired node(s)?", assume_yes):
321
+ print(" nothing written")
322
+ return 1
323
+
324
+ written = 0
325
+ for path, d in descriptors.items():
326
+ if d.pop("nodes_retired", None):
327
+ path.write_text(json.dumps(d, indent=2) + "\n", encoding="utf-8")
328
+ written += 1
329
+ print(f"\n RECONCILED: cleared retired nodes from {written} descriptor(s).")
330
+ print(" Reassemble to refresh the document.")
331
+ return 0
332
+
333
+
334
+ def main() -> int:
335
+ ap = argparse.ArgumentParser(description=__doc__,
336
+ formatter_class=argparse.RawDescriptionHelpFormatter)
337
+ ap.add_argument("--descriptors", required=True, type=pathlib.Path)
338
+ ap.add_argument("--src", type=pathlib.Path, default=None,
339
+ help="source root; enables detection of descriptors whose "
340
+ "source file no longer exists")
341
+ ap.add_argument("--report", action="store_true", help="four-state census (default)")
342
+ ap.add_argument("--by", choices=("package", "file"), default="package",
343
+ help="aggregate the work table by package or by file")
344
+ ap.add_argument("--accept", metavar="NODE_ID", action="append", default=[],
345
+ help="re-stamp a node whose semantics you have re-verified; repeatable")
346
+ ap.add_argument("--reconcile", action="store_true",
347
+ help="DELETE retired nodes and their authored prose. Prompts first; "
348
+ "the only sanctioned path for structural deletion")
349
+ ap.add_argument("--yes", action="store_true",
350
+ help="answer the confirmation prompt yes (for automation)")
351
+ ap.add_argument("--apply", action="store_true", help="write the accepted stamps")
352
+ args = ap.parse_args()
353
+
354
+ if not args.descriptors.is_dir():
355
+ print(f"ERROR: descriptor root not found: {args.descriptors}")
356
+ return 2
357
+
358
+ descriptors = load(args.descriptors)
359
+ if not descriptors:
360
+ print(f"ERROR: no descriptors under {args.descriptors}")
361
+ return 2
362
+
363
+ if args.src is not None and not args.src.is_dir():
364
+ print(f"ERROR: source root not found: {args.src}")
365
+ return 2
366
+
367
+ if args.accept:
368
+ return accept(descriptors, args.accept, args.apply)
369
+ if args.reconcile:
370
+ return reconcile(descriptors, args.yes)
371
+ return report(descriptors, args.by, args.src)
372
+
373
+
374
+ if __name__ == "__main__":
375
+ raise SystemExit(main())
@@ -0,0 +1,179 @@
1
+ #!/usr/bin/env python3
2
+ """Carry an authored graph in the retired JSON format into per-file descriptors.
3
+
4
+ Run this ONCE when a repository holds a graph written before the descriptor
5
+ format existed. After it succeeds and the document reassembles, the legacy JSON
6
+ can be deleted - everything it held now lives in the descriptors, which are the
7
+ only thing the pipeline reads.
8
+
9
+ WHY THIS EXISTS RATHER THAN "JUST RE-EXTRACT"
10
+
11
+ `extract_graph.py` rebuilds the mechanical tier and cannot invent the authored
12
+ one. `owns_lifecycle_of`, `uses` and `borrows` are the same syntax - "A holds a
13
+ reference to B" - so a fresh extraction produces a structurally perfect graph
14
+ with an empty authored layer, and nothing warns you, because an empty authored
15
+ layer is also what a brand new project looks like.
16
+
17
+ Measured on a real repository that did exactly this: 1,188 nodes recovered,
18
+ 446 derived edges, and **zero** of 997 authored edges. The authored work was
19
+ still on disk in the old JSON. It simply never arrived.
20
+
21
+ The general rule, worth saying plainly: the better a repository's existing
22
+ graph, the more a naive re-extraction destroys, because a mature graph is
23
+ edge-richer than a young one.
24
+
25
+ MATCHING
26
+
27
+ Two passes, most precise first:
28
+
29
+ 1. exact node id
30
+ 2. `(file, label)` - catches a node whose id changed because its module moved
31
+
32
+ Anything unmatched is REPORTED, never guessed at. A node that cannot be located
33
+ keeps its authored prose in the report so you can place it by hand.
34
+ """
35
+
36
+ from __future__ import annotations
37
+
38
+ import argparse
39
+ import json
40
+ import pathlib
41
+ import sys
42
+
43
+ AUTHORED_NODE_FIELDS = ("include", "role", "responsibilities", "owns_state", "phases")
44
+ AUTHORED_EDGE_FIELDS = ("from", "to", "relation", "why", "cardinality", "phase", "strength")
45
+
46
+
47
+ def load_legacy(path: pathlib.Path) -> tuple[list[dict], list[dict]]:
48
+ d = json.loads(path.read_text(encoding="utf-8"))
49
+ nodes = d.get("nodes") or {}
50
+ edges = d.get("edges") or []
51
+ nodes = list(nodes.values()) if isinstance(nodes, dict) else list(nodes)
52
+ edges = list(edges.values()) if isinstance(edges, dict) else list(edges)
53
+ return nodes, edges
54
+
55
+
56
+ def load_descriptors(root: pathlib.Path) -> dict[pathlib.Path, dict]:
57
+ out = {}
58
+ for p in sorted(root.rglob("*.json")):
59
+ try:
60
+ d = json.loads(p.read_text(encoding="utf-8"))
61
+ except Exception:
62
+ continue
63
+ if isinstance(d, dict) and "source" in d and "nodes" in d:
64
+ out[p] = d
65
+ return out
66
+
67
+
68
+ def main() -> int:
69
+ ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
70
+ ap.add_argument("--legacy", required=True, type=pathlib.Path,
71
+ help="the retired graph JSON holding the authored tier")
72
+ ap.add_argument("--descriptors", required=True, type=pathlib.Path,
73
+ help="descriptor root produced by extract_graph.py")
74
+ ap.add_argument("--check", action="store_true", help="report only, write nothing")
75
+ ap.add_argument("--apply", action="store_true", help="write the authored tier in")
76
+ args = ap.parse_args()
77
+
78
+ if not args.legacy.is_file():
79
+ print(f"legacy graph not found: {args.legacy}", file=sys.stderr)
80
+ return 2
81
+ if not args.descriptors.is_dir():
82
+ print(f"descriptor root not found: {args.descriptors}", file=sys.stderr)
83
+ return 2
84
+ if not args.check and not args.apply:
85
+ print("Refusing to act without --apply. Use --check to see the plan.")
86
+ return 2
87
+
88
+ legacy_nodes, legacy_edges = load_legacy(args.legacy)
89
+ descriptors = load_descriptors(args.descriptors)
90
+
91
+ by_id: dict[str, tuple[pathlib.Path, str]] = {}
92
+ by_file_label: dict[tuple[str, str], tuple[pathlib.Path, str]] = {}
93
+ for path, d in descriptors.items():
94
+ for nid, node in d.get("nodes", {}).items():
95
+ by_id[nid] = (path, nid)
96
+ key = (node.get("file", ""), node.get("label", ""))
97
+ by_file_label.setdefault(key, (path, nid))
98
+
99
+ node_edits: dict[pathlib.Path, dict[str, dict]] = {}
100
+ matched_id = matched_fl = 0
101
+ unmatched_nodes: list[dict] = []
102
+
103
+ for ln in legacy_nodes:
104
+ authored = {k: ln[k] for k in AUTHORED_NODE_FIELDS if ln.get(k)}
105
+ if not authored:
106
+ continue
107
+ hit = by_id.get(ln.get("id", ""))
108
+ if hit:
109
+ matched_id += 1
110
+ else:
111
+ hit = by_file_label.get((ln.get("file", ""), ln.get("label", "")))
112
+ if hit:
113
+ matched_fl += 1
114
+ if not hit:
115
+ unmatched_nodes.append(ln)
116
+ continue
117
+ path, nid = hit
118
+ node_edits.setdefault(path, {})[nid] = authored
119
+
120
+ # An authored edge belongs to the descriptor owning its SOURCE node, which is
121
+ # how `assemble_graph.py` renders it - under the file the edge leaves from.
122
+ edge_edits: dict[pathlib.Path, list[dict]] = {}
123
+ placed = 0
124
+ unmatched_edges: list[dict] = []
125
+ for le in legacy_edges:
126
+ src = le.get("from", "")
127
+ hit = by_id.get(src)
128
+ if not hit:
129
+ unmatched_edges.append(le)
130
+ continue
131
+ path, _ = hit
132
+ edge_edits.setdefault(path, []).append(
133
+ {k: le[k] for k in AUTHORED_EDGE_FIELDS if le.get(k) is not None})
134
+ placed += 1
135
+
136
+ print(f"legacy {args.legacy}")
137
+ print(f"descriptors {args.descriptors} ({len(descriptors)} files, {len(by_id)} nodes)")
138
+ print()
139
+ print(f" nodes with authored fields : {matched_id + matched_fl + len(unmatched_nodes)}")
140
+ print(f" matched by id : {matched_id}")
141
+ print(f" matched by (file, label) : {matched_fl}")
142
+ print(f" UNMATCHED : {len(unmatched_nodes)}")
143
+ print(f" authored edges : {len(legacy_edges)}")
144
+ print(f" placed on a descriptor : {placed}")
145
+ print(f" UNMATCHED source node : {len(unmatched_edges)}")
146
+ for n in unmatched_nodes[:10]:
147
+ print(f" unmatched node {n.get('id')} ({n.get('file')})")
148
+ for e in unmatched_edges[:10]:
149
+ print(f" unmatched edge {e.get('from')} -> {e.get('to')}")
150
+
151
+ if args.check:
152
+ print()
153
+ print("READY" if not (unmatched_nodes or unmatched_edges)
154
+ else "READY, with unmatched items listed above - place those by hand")
155
+ return 0
156
+
157
+ written = 0
158
+ for path, d in descriptors.items():
159
+ nodes = node_edits.get(path)
160
+ edges = edge_edits.get(path)
161
+ if not nodes and not edges:
162
+ continue
163
+ for nid, authored in (nodes or {}).items():
164
+ d["nodes"][nid].update(authored)
165
+ if edges:
166
+ d["edges_authored"] = edges
167
+ path.write_text(json.dumps(d, indent=2) + "\n", encoding="utf-8")
168
+ written += 1
169
+
170
+ print()
171
+ print(f"APPLIED: authored tier written into {written} descriptors")
172
+ print(" Reassemble now: assemble_graph.py --descriptors <root> --out <system_docs>")
173
+ print(" Verify the document shows authored rows and why lines, THEN delete the")
174
+ print(" legacy JSON. Not before - it is the only copy until the descriptors hold it.")
175
+ return 0
176
+
177
+
178
+ if __name__ == "__main__":
179
+ raise SystemExit(main())