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.
- contextcompass-2.15.0.dist-info/METADATA +673 -0
- contextcompass-2.15.0.dist-info/RECORD +452 -0
- contextcompass-2.15.0.dist-info/WHEEL +4 -0
- contextcompass-2.15.0.dist-info/entry_points.txt +2 -0
- contextcompass-2.15.0.dist-info/licenses/LICENSE +21 -0
- contextcompass_cli/__init__.py +74 -0
- contextcompass_cli/__main__.py +195 -0
- contextcompass_cli/_package/AGENTS.MD +310 -0
- contextcompass_cli/_package/CONTEXT_COMPACTION.md +110 -0
- contextcompass_cli/_package/MANIFEST.md +485 -0
- contextcompass_cli/_package/PROFILE_CLASS_CREATION_GUIDE.md +426 -0
- contextcompass_cli/_package/README.md +266 -0
- contextcompass_cli/_package/SKILLS.MD +144 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/AGENTS.MD +54 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/README.md +43 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/SKILLS.MD +44 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/behavioral_guidelines/continuity_fact_checker_workflow.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/examples/continuity_fact_checker_task_flow.md +24 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/policies/continuity_fact_checker_handoff_policy.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/policies/continuity_fact_checker_quality_policy.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/skills/continuity_fact_checker.md +37 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/skills/continuity_fact_checker_advanced_context.md +17 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/skills/continuity_fact_checker_deliverables.md +26 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/skills/continuity_fact_checker_execution.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/continuity_fact_checker/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/AGENTS.MD +85 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/README.md +62 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/SKILLS.MD +74 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/behavioral_guidelines/design_engineer_workflow.md +25 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/behavioral_guidelines/design_validation_and_handoff.md +25 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/examples/adr_example.md +40 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/examples/design_task_flow.md +33 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/policies/decision_record_policy.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/policies/design_quality_policy.md +30 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/policies/design_review_policy.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/policies/system_document_quality_rubric.md +236 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/adr_and_decision_hygiene.md +38 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/api_and_interface_design.md +36 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/architecture_contexts.md +40 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/architecture_patch_contracts.md +43 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/architecture_tradeoffs.md +33 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/code_description_patch_contracts.md +46 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/component_patch_contracts.md +41 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/data_modeling.md +34 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/decomposition_and_boundaries.md +42 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/design_engineer_execution.md +65 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/design_review_protocol.md +34 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/nonfunctional_requirements.md +34 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/patch_framework_design.md +79 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/requirements_to_architecture.md +39 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/src_architecture_instructions.md +347 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/src_components_instructions.md +405 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/system_design_method.md +45 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/tests_architecture_instructions.md +375 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/skills/tests_components_instructions.md +406 -0
- contextcompass_cli/_package/agent_onboarding/default/design_engineer/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/AGENTS.MD +53 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/README.md +42 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/SKILLS.MD +44 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/behavioral_guidelines/developmental_editor_workflow.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/examples/developmental_editor_task_flow.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/policies/developmental_editor_handoff_policy.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/policies/developmental_editor_quality_policy.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/skills/developmental_editor.md +36 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/skills/developmental_editor_advanced_context.md +17 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/skills/developmental_editor_deliverables.md +25 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/skills/developmental_editor_execution.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/developmental_editor/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/AGENTS.MD +54 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/README.md +43 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/SKILLS.MD +44 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/behavioral_guidelines/draft_writer_workflow.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/examples/draft_writer_task_flow.md +24 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/policies/draft_writer_handoff_policy.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/policies/draft_writer_quality_policy.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/skills/draft_writer.md +37 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/skills/draft_writer_advanced_context.md +17 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/skills/draft_writer_deliverables.md +26 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/skills/draft_writer_execution.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/draft_writer/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/AGENTS.MD +493 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/README.md +53 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/SKILLS.MD +263 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/behavioral_guidelines/engineer_workflow.md +24 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/behavioral_guidelines/task_execution_and_validation.md +34 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/examples/artifact_workflow.md +104 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/examples/eng_task_flow.md +30 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/policies/ctx_autonomy_policy.md +34 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/policies/ctx_autonomy_rubric.md +161 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/policies/engineer_quality_policy.md +33 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/context_protocol.md +70 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/documentation_standards.md +120 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/engineer_execution.md +62 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/package_maintenance.md +195 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/patch_artifact_consumption.md +68 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/patch_framework_gating.md +72 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/src_graph_generation.md +341 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/src_graph_usage.md +161 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/staleness_protocol.md +49 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/system_document_build.md +360 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/system_orientation.md +83 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/skills/technical_expertise.md +48 -0
- contextcompass_cli/_package/agent_onboarding/default/engineer/workflows/README.md +9 -0
- contextcompass_cli/_package/agent_onboarding/default/general/AGENTS.MD +283 -0
- contextcompass_cli/_package/agent_onboarding/default/general/README.md +38 -0
- contextcompass_cli/_package/agent_onboarding/default/general/SKILLS.MD +92 -0
- contextcompass_cli/_package/agent_onboarding/default/general/WORKFLOWS.MD +23 -0
- contextcompass_cli/_package/agent_onboarding/default/general/behavioral_guidelines/README.md +12 -0
- contextcompass_cli/_package/agent_onboarding/default/general/behavioral_guidelines/agent_lifecycle_and_heartbeat.md +37 -0
- contextcompass_cli/_package/agent_onboarding/default/general/behavioral_guidelines/onboarding_summary.md +41 -0
- contextcompass_cli/_package/agent_onboarding/default/general/behavioral_guidelines/work_intake_and_execution.md +44 -0
- contextcompass_cli/_package/agent_onboarding/default/general/policies/policy_skills.md +174 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/active_documentation.md +86 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/active_pointerboard.md +81 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/agent_identity.md +38 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/agent_lifecycle.md +21 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/agent_stance.md +38 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/career_selection.md +83 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/compaction_requirements.md +147 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/configuration_standards.md +72 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/context_compaction.md +104 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/context_gold.md +31 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/context_management.md +79 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/context_window_budget.md +64 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/execution_contract.md +234 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/general.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/llm_full_usage.md +111 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/mailbox_protocol.md +85 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/memory_management.md +28 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/mrp_policy.md +40 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/package_upgrade.md +135 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/reactive_documentation.md +105 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/repo_topology.md +25 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/role_local_workflows.md +41 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/security_and_secrets.md +46 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/self_certification.md +49 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/ticket_closure_attention_sync.md +57 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/ticket_microcycle.md +44 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/ticketing.md +175 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/ticketing_skill_contract.md +52 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/unknowns_gate_reference.md +66 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/user_approved_certification.md +32 -0
- contextcompass_cli/_package/agent_onboarding/default/general/skills/workflow.md +289 -0
- contextcompass_cli/_package/agent_onboarding/default/general/workflows/README.md +9 -0
- contextcompass_cli/_package/agent_onboarding/default/general/workflows/cleanup_context_compass.md +205 -0
- contextcompass_cli/_package/agent_onboarding/default/general/workflows/role_creation.md +39 -0
- contextcompass_cli/_package/agent_onboarding/default/general/workflows/start_context_compass_work.md +102 -0
- contextcompass_cli/_package/agent_onboarding/default/general/workflows/sync_attention_board.md +91 -0
- contextcompass_cli/_package/agent_onboarding/default/general/workflows/turn_in_selected_tickets.md +95 -0
- contextcompass_cli/_package/agent_onboarding/default/general/workflows/workflow_creation.md +38 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/AGENTS.MD +53 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/README.md +42 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/SKILLS.MD +44 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/behavioral_guidelines/line_copy_editor_workflow.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/examples/line_copy_editor_task_flow.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/policies/line_copy_editor_handoff_policy.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/policies/line_copy_editor_quality_policy.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/skills/line_copy_editor.md +36 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/skills/line_copy_editor_advanced_context.md +17 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/skills/line_copy_editor_deliverables.md +25 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/skills/line_copy_editor_execution.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/line_copy_editor/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/new/AGENTS.MD +79 -0
- contextcompass_cli/_package/agent_onboarding/default/new/README.md +54 -0
- contextcompass_cli/_package/agent_onboarding/default/new/SKILLS.MD +35 -0
- contextcompass_cli/_package/agent_onboarding/default/new/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/new/behavioral_guidelines/user_onboarding_flow.md +52 -0
- contextcompass_cli/_package/agent_onboarding/default/new/policies/new_onboarding_policy.md +59 -0
- contextcompass_cli/_package/agent_onboarding/default/new/skills/configuration_map_guide.md +83 -0
- contextcompass_cli/_package/agent_onboarding/default/new/skills/first_time_profile_setup.md +60 -0
- contextcompass_cli/_package/agent_onboarding/default/new/skills/new.md +54 -0
- contextcompass_cli/_package/agent_onboarding/default/new/skills/onboarding_completion_and_next_step.md +54 -0
- contextcompass_cli/_package/agent_onboarding/default/new/skills/profile_model_explained.md +120 -0
- contextcompass_cli/_package/agent_onboarding/default/new/skills/system_overview_for_user.md +51 -0
- contextcompass_cli/_package/agent_onboarding/default/new/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/AGENTS.MD +63 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/README.md +41 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/SKILLS.MD +62 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/behavioral_guidelines/incident_workflow.md +17 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/behavioral_guidelines/platform_engineer_workflow.md +18 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/examples/platform_task_flow.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/policies/operational_safety_policy.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/policies/platform_quality_policy.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/policies/production_change_management_policy.md +18 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/ci_cd_and_release.md +28 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/deployment_and_environments.md +25 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/incident_response_and_runbooks.md +35 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/infrastructure_as_code.md +24 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/observability_and_monitoring.md +28 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/performance_capacity_cost.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/platform_engineer_execution.md +41 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/skills/platform_security_basics.md +25 -0
- contextcompass_cli/_package/agent_onboarding/default/platform_engineer/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/AGENTS.MD +53 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/README.md +42 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/SKILLS.MD +44 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/behavioral_guidelines/proofreader_workflow.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/examples/proofreader_task_flow.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/policies/proofreader_handoff_policy.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/policies/proofreader_quality_policy.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/skills/proofreader.md +36 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/skills/proofreader_advanced_context.md +17 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/skills/proofreader_deliverables.md +25 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/skills/proofreader_execution.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/proofreader/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/AGENTS.MD +58 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/README.md +41 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/SKILLS.MD +61 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/behavioral_guidelines/qa_workflow.md +18 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/behavioral_guidelines/release_signoff_workflow.md +17 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/examples/qa_task_flow.md +24 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/policies/defect_severity_policy.md +24 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/policies/quality_gate_policy.md +18 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/policies/test_evidence_policy.md +18 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/bug_triage_and_repro.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/qa_engineer_execution.md +29 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/quality_metrics.md +24 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/regression_and_release_quality.md +28 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/test_automation_practices.md +30 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/test_case_design.md +27 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/test_data_and_environments.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/skills/test_strategy_and_planning.md +31 -0
- contextcompass_cli/_package/agent_onboarding/default/qa_engineer/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/AGENTS.MD +55 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/README.md +44 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/SKILLS.MD +44 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/behavioral_guidelines/researcher_workflow.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/examples/researcher_task_flow.md +25 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/policies/researcher_handoff_policy.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/policies/researcher_quality_policy.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/skills/researcher.md +38 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/skills/researcher_advanced_context.md +17 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/skills/researcher_deliverables.md +27 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/skills/researcher_execution.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/researcher/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/AGENTS.MD +55 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/README.md +43 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/SKILLS.MD +62 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/behavioral_guidelines/security_signoff_and_escalation.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/behavioral_guidelines/security_workflow.md +18 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/examples/security_review_flow.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/policies/risk_acceptance_policy.md +17 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/policies/secrets_and_keys_policy.md +19 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/policies/security_review_policy.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/authn_authz_basics.md +24 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/dependency_and_supply_chain.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/incident_response_security.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/logging_audit_privacy.md +16 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/secure_architecture_review.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/secure_coding_review.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/security_engineer_execution.md +28 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/threat_modeling.md +25 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/skills/vulnerability_management.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/security_engineer/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/AGENTS.MD +56 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/README.md +45 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/SKILLS.MD +44 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/behavioral_guidelines/story_designer_workflow.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/examples/story_designer_task_flow.md +26 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/policies/story_designer_handoff_policy.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/policies/story_designer_quality_policy.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/skills/story_designer.md +39 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/skills/story_designer_advanced_context.md +17 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/skills/story_designer_deliverables.md +28 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/skills/story_designer_execution.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/story_designer/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/AGENTS.MD +56 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/README.md +45 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/SKILLS.MD +44 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/behavioral_guidelines/story_novel_artist_workflow.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/examples/story_novel_artist_task_flow.md +26 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/policies/story_novel_artist_handoff_policy.md +20 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/policies/story_novel_artist_quality_policy.md +22 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/skills/story_novel_artist.md +39 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/skills/story_novel_artist_advanced_context.md +17 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/skills/story_novel_artist_deliverables.md +28 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/skills/story_novel_artist_execution.md +23 -0
- contextcompass_cli/_package/agent_onboarding/default/story_novel_artist/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/AGENTS.MD +66 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/SKILLS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/WORKFLOWS.MD +15 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/behavioral_guidelines/data_engineer_behavior_overrides.md +6 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/policies/data_engineer_policy_overrides.md +6 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/profile_overrides.md +9 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/skills/data_engineer_skill_overrides.md +6 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/data_engineer/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/AGENTS.MD +145 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/SKILLS.MD +37 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/WORKFLOWS.MD +17 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/behavioral_guidelines/synaptic_finishing_developer_behavior_overrides.md +12 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/examples/python/comment_finishing_examples.py +65 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/examples/python/docstring_finishing_examples.py +126 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/examples/python/pytest_component_finishing_examples.py +51 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/examples/python/pytest_integration_finishing_examples.py +59 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/examples/python/pytest_unit_finishing_examples.py +66 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/policies/synaptic_finishing_developer_policy_overrides.md +14 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/profile_overrides.md +17 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/documentation/comment_craft.md +51 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/documentation/docstring_craft.md +86 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/documentation/docstring_test_alignment.md +51 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/documentation/system_aware_docstrings.md +64 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/synaptic_finishing_developer_skill_overrides.md +11 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/component_tests.md +45 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/evidence_reporting.md +25 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/mocking.md +35 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/pytest_integration.md +32 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/pytest_unit.md +49 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/regression_tests.md +24 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/skills/testing/testing_overview.md +71 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/workflows/optimize_pytests_for_repo.md +272 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_finishing_developer/workflows/polish_repo_documentation.md +247 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/AGENTS.MD +386 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/README.md +31 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/SKILLS.MD +44 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/WORKFLOWS.MD +16 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/behavioral_guidelines/synaptic_behavior_overrides.md +17 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/anti_patterns.py +19 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/cleanup_patterns.py +22 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/docstrings.py +19 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/logging_patterns.py +11 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/protocols_and_abc.py +15 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/pytest_component_examples.py +15 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/pytest_integration_examples.py +17 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/examples/python/pytest_unit_examples.py +13 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/policies/synaptic_policy_overrides.md +22 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/profile_overrides.md +27 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/attribute_aliasing_skill_benchmark.py +35 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/banned_patterns.md +110 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/cleanup_and_disposal.md +79 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/comments.md +39 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/docstrings.md +90 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/error_model.md +28 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/hot_path_attribute_aliasing.md +52 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/init_and_ownership.md +35 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/interfaces.md +47 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/logging.md +37 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/module_scope.md +38 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/refactor_limits.md +44 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/python/typing.md +52 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/synaptic_skill_overrides.md +24 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/evidence_reporting.md +35 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/mocking.md +31 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/pytest_integration.md +36 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/pytest_unit.md +42 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/regression_tests.md +26 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/skills/testing/testing_overview.md +196 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/workflows/README.md +8 -0
- contextcompass_cli/_package/agent_onboarding/user_defined/synaptic_python_developer/workflows/synaptic_python_developer_onboarding.md +226 -0
- contextcompass_cli/_package/artifact_board.md +64 -0
- contextcompass_cli/_package/artifacts/IMPORTANT_CONSIDERATION.md +43 -0
- contextcompass_cli/_package/artifacts/README.md +41 -0
- contextcompass_cli/_package/attention_board.md +79 -0
- contextcompass_cli/_package/config/context_compass_config.yaml +101 -0
- contextcompass_cli/_package/context_management/README.md +21 -0
- contextcompass_cli/_package/context_management/artifacts/.gitkeep +1 -0
- contextcompass_cli/_package/context_management/context_artifact_template.md +42 -0
- contextcompass_cli/_package/context_management/context_board.md +27 -0
- contextcompass_cli/_package/examples/adr_example.md +29 -0
- contextcompass_cli/_package/examples/artifact_workflow.md +20 -0
- contextcompass_cli/_package/examples/continuity_fact_checker_task_flow.md +23 -0
- contextcompass_cli/_package/examples/design_task_flow.md +35 -0
- contextcompass_cli/_package/examples/developmental_editor_task_flow.md +22 -0
- contextcompass_cli/_package/examples/draft_writer_task_flow.md +23 -0
- contextcompass_cli/_package/examples/eng_task_flow.md +31 -0
- contextcompass_cli/_package/examples/example_architecture/.gitkeep +0 -0
- contextcompass_cli/_package/examples/example_architecture/src_architecture.md +136 -0
- contextcompass_cli/_package/examples/example_architecture/src_architecture_index.md +46 -0
- contextcompass_cli/_package/examples/example_architecture/tests_architecture.md +148 -0
- contextcompass_cli/_package/examples/example_architecture/tests_architecture_index.md +46 -0
- contextcompass_cli/_package/examples/example_completed/.gitkeep +0 -0
- contextcompass_cli/_package/examples/example_completed/2026-02-19_context_compass_release_overview_artifact.md +33 -0
- contextcompass_cli/_package/examples/example_components/.gitkeep +0 -0
- contextcompass_cli/_package/examples/example_components/src_components.md +169 -0
- contextcompass_cli/_package/examples/example_components/src_components_index.md +44 -0
- contextcompass_cli/_package/examples/example_components/tests_components.md +96 -0
- contextcompass_cli/_package/examples/example_components/tests_components_index.md +42 -0
- contextcompass_cli/_package/examples/example_epics/.gitkeep +0 -0
- contextcompass_cli/_package/examples/example_epics/2026-02-19_context_compass_release_readiness_example_pack_epic.md +130 -0
- contextcompass_cli/_package/examples/example_graph_details/README.md +131 -0
- contextcompass_cli/_package/examples/example_graph_details/src/example/__init__.py +4 -0
- contextcompass_cli/_package/examples/example_graph_details/src/example/core/interfaces.py +10 -0
- contextcompass_cli/_package/examples/example_graph_details/src/example/core/resource.py +15 -0
- contextcompass_cli/_package/examples/example_graph_details/src/example/pipeline/pipeline.py +20 -0
- contextcompass_cli/_package/examples/example_graph_details/src/example/pipeline/stage.py +11 -0
- contextcompass_cli/_package/examples/example_graph_details/src/example/storage/store.py +20 -0
- contextcompass_cli/_package/examples/example_graph_details/src_graph.md +192 -0
- contextcompass_cli/_package/examples/example_graph_details/src_graph_index.md +32 -0
- contextcompass_cli/_package/examples/example_stories/.gitkeep +0 -0
- contextcompass_cli/_package/examples/example_stories/2026-02-19_context_compass_release_readiness_examples_story.md +120 -0
- contextcompass_cli/_package/examples/example_tasks/.gitkeep +0 -0
- contextcompass_cli/_package/examples/example_tasks/2026-02-19_context_compass_release_readiness_pack_task.md +147 -0
- contextcompass_cli/_package/examples/line_copy_editor_task_flow.md +23 -0
- contextcompass_cli/_package/examples/platform_task_flow.md +26 -0
- contextcompass_cli/_package/examples/proofreader_task_flow.md +23 -0
- contextcompass_cli/_package/examples/qa_task_flow.md +26 -0
- contextcompass_cli/_package/examples/repo_overview.md +63 -0
- contextcompass_cli/_package/examples/researcher_task_flow.md +23 -0
- contextcompass_cli/_package/examples/security_review_flow.md +24 -0
- contextcompass_cli/_package/examples/story_designer_task_flow.md +23 -0
- contextcompass_cli/_package/examples/story_novel_artist_task_flow.md +22 -0
- contextcompass_cli/_package/mailbox_board.md +79 -0
- contextcompass_cli/_package/special_instructions/README.md +16 -0
- contextcompass_cli/_package/system_docs/.gitkeep +0 -0
- contextcompass_cli/_package/system_docs/patches/active/README.md +25 -0
- contextcompass_cli/_package/system_docs/patches/active/_template_patch_id/architecture_patch.md +53 -0
- contextcompass_cli/_package/system_docs/patches/active/_template_patch_id/code_description_patch_TEMPLATE_COMPONENT.md +39 -0
- contextcompass_cli/_package/system_docs/patches/active/_template_patch_id/component_patch_TEMPLATE_COMPONENT.md +48 -0
- contextcompass_cli/_package/system_docs/system_docs_read_first.md +107 -0
- contextcompass_cli/_package/templates/epic_template.md +149 -0
- contextcompass_cli/_package/templates/story_template.md +131 -0
- contextcompass_cli/_package/templates/task_template.md +124 -0
- contextcompass_cli/_package/templates/workflow_advanced_template.md +111 -0
- contextcompass_cli/_package/templates/workflow_simple_template.md +65 -0
- contextcompass_cli/_package/tickets/README.md +24 -0
- contextcompass_cli/_package/tickets/epics/README.md +68 -0
- contextcompass_cli/_package/tickets/epics/archive/.gitkeep +0 -0
- contextcompass_cli/_package/tickets/epics/backlog/.gitkeep +0 -0
- contextcompass_cli/_package/tickets/epics/completed/.gitkeep +0 -0
- contextcompass_cli/_package/tickets/stories/README.md +68 -0
- contextcompass_cli/_package/tickets/stories/archive/.gitkeep +0 -0
- contextcompass_cli/_package/tickets/stories/backlog/.gitkeep +0 -0
- contextcompass_cli/_package/tickets/stories/completed/.gitkeep +0 -0
- contextcompass_cli/_package/tickets/tasks/README.md +67 -0
- contextcompass_cli/_package/tickets/tasks/archive/.gitkeep +0 -0
- contextcompass_cli/_package/tickets/tasks/backlog/.gitkeep +0 -0
- contextcompass_cli/_package/tickets/tasks/completed/.gitkeep +0 -0
- contextcompass_cli/_package/tools/build_llm_full.py +307 -0
- contextcompass_cli/_package/tools/cleanup_context_compass.py +488 -0
- contextcompass_cli/_package/tools/migrate_boards.py +218 -0
- contextcompass_cli/_package/tools/package_manifest.py +351 -0
- contextcompass_cli/_package/tools/system_documents/index_document.py +476 -0
- contextcompass_cli/_package/tools/system_documents/python/assemble_graph.py +387 -0
- contextcompass_cli/_package/tools/system_documents/python/extract_graph.py +626 -0
- contextcompass_cli/_package/tools/system_documents/python/graph_semantics_tickets.py +405 -0
- contextcompass_cli/_package/tools/system_documents/python/graph_walker.py +375 -0
- contextcompass_cli/_package/tools/system_documents/python/migrate_authored_graph.py +179 -0
- contextcompass_cli/_package/tools/update_context_compass.py +511 -0
- contextcompass_cli/_package/user_defined/README.md +49 -0
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Upgrade an installed Context Compass to a newer version of the package.
|
|
3
|
+
|
|
4
|
+
Point it at a new package and an existing install. It decides, per file, whether
|
|
5
|
+
replacing is safe - and refuses rather than guessing when it is not.
|
|
6
|
+
|
|
7
|
+
THE THREE-HASH RULE
|
|
8
|
+
|
|
9
|
+
One hash tells you a file changed. It cannot tell you WHO changed it, and that is
|
|
10
|
+
the only question that matters when deciding whether to overwrite.
|
|
11
|
+
|
|
12
|
+
shipped what the installed version's manifest recorded
|
|
13
|
+
current what is on disk in the install right now
|
|
14
|
+
new what the incoming version ships
|
|
15
|
+
|
|
16
|
+
current == shipped, new != shipped -> clean update, replace
|
|
17
|
+
current == shipped, new == shipped -> already current, skip
|
|
18
|
+
current != shipped, new == shipped -> the user edited it, package did not:
|
|
19
|
+
KEEP their version
|
|
20
|
+
current != shipped, new != shipped -> both moved: CONFORM to the new
|
|
21
|
+
version, and say so.
|
|
22
|
+
|
|
23
|
+
Without `shipped` you cannot separate rows three and four from row one, so you
|
|
24
|
+
either overwrite the user's edits or never update anything. There is no version
|
|
25
|
+
of this that works with a single hash.
|
|
26
|
+
|
|
27
|
+
WHY ROW FOUR CONFORMS RATHER THAN REFUSING
|
|
28
|
+
|
|
29
|
+
Package files belong to the package. An edit to one is a divergence that has to
|
|
30
|
+
be re-resolved on every future upgrade, forever - so preserving it is not a
|
|
31
|
+
kindness, it is a debt. The install gets two directories where local work is
|
|
32
|
+
untouchable (`user_defined/` and `agent_onboarding/user_defined/`), plus the
|
|
33
|
+
RESET lanes, and that is where customisation belongs.
|
|
34
|
+
|
|
35
|
+
So the default is to conform, and to name every file it conformed. Row three
|
|
36
|
+
still keeps your edit when the package did not move, because there is nothing to
|
|
37
|
+
conform to. `--preserve-local` restores the old refusal if you are mid-migration
|
|
38
|
+
and not ready yet.
|
|
39
|
+
|
|
40
|
+
WHAT IS NEVER TOUCHED
|
|
41
|
+
|
|
42
|
+
RESET lanes tickets, artifacts, system docs, project instructions.
|
|
43
|
+
The install owns these outright. An upgrade that rewrites
|
|
44
|
+
someone's architecture map is not an upgrade.
|
|
45
|
+
INSTANCE `user_defined/` and `agent_onboarding/user_defined/`. The
|
|
46
|
+
first is a free space for anything; the second holds role
|
|
47
|
+
overlays. Never replaced, never restored, never removed - not
|
|
48
|
+
even a role the package originally shipped as a sample, because
|
|
49
|
+
by the time it is in someone's repo it is theirs to edit.
|
|
50
|
+
|
|
51
|
+
WHAT GETS SPECIAL HANDLING
|
|
52
|
+
|
|
53
|
+
LIVE files the boards. Only the text between MANAGED markers is swapped.
|
|
54
|
+
Routing rows are the install's, and survive.
|
|
55
|
+
CONFIG merged key by key: new keys are added with package defaults, a
|
|
56
|
+
value the user already set is never overwritten, and keys the
|
|
57
|
+
new version dropped are reported rather than deleted.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
from __future__ import annotations
|
|
61
|
+
|
|
62
|
+
import argparse
|
|
63
|
+
import hashlib
|
|
64
|
+
import pathlib
|
|
65
|
+
import re
|
|
66
|
+
import sys
|
|
67
|
+
|
|
68
|
+
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
|
|
69
|
+
from package_manifest import ( # noqa: E402
|
|
70
|
+
MANIFEST_NAME, parse, is_permissive, check_manifest_compatible,
|
|
71
|
+
)
|
|
72
|
+
from cleanup_context_compass import ( # noqa: E402
|
|
73
|
+
swap_managed, carry_user_regions, orphaned_user_regions, user_regions,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def conform_text(new_bytes: bytes, install_path: pathlib.Path) -> tuple[bytes, list[str], list[str]]:
|
|
78
|
+
"""The new version's file, with the install's user regions carried across.
|
|
79
|
+
|
|
80
|
+
Returns (bytes_to_write, carried_names, orphaned_names).
|
|
81
|
+
|
|
82
|
+
Binary or undecodable files, and files with no user region on either side,
|
|
83
|
+
pass through untouched - the fast path is also the common one.
|
|
84
|
+
"""
|
|
85
|
+
if not install_path.is_file():
|
|
86
|
+
return new_bytes, [], []
|
|
87
|
+
try:
|
|
88
|
+
incoming = new_bytes.decode("utf-8")
|
|
89
|
+
current = install_path.read_text(encoding="utf-8")
|
|
90
|
+
except (UnicodeDecodeError, ValueError):
|
|
91
|
+
return new_bytes, [], []
|
|
92
|
+
try:
|
|
93
|
+
if not user_regions(current):
|
|
94
|
+
return new_bytes, [], []
|
|
95
|
+
merged, carried = carry_user_regions(incoming, current)
|
|
96
|
+
orphaned = orphaned_user_regions(incoming, current)
|
|
97
|
+
except ValueError:
|
|
98
|
+
# An unterminated region means we cannot tell where the install's text
|
|
99
|
+
# ends. Conform the file rather than splice blindly, and say so.
|
|
100
|
+
return new_bytes, [], ["(malformed region - not carried)"]
|
|
101
|
+
return merged.encode("utf-8"), carried, orphaned
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def sha_bytes(b: bytes) -> str:
|
|
105
|
+
return hashlib.sha256(b).hexdigest()
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def top_level_keys(yaml_text: str) -> dict[str, tuple[int, int]]:
|
|
109
|
+
"""Map each top-level YAML key to its (start_line, end_line_exclusive).
|
|
110
|
+
|
|
111
|
+
Deliberately not a YAML parser. This tool only needs to know where a
|
|
112
|
+
top-level block begins and ends so it can append a missing one verbatim,
|
|
113
|
+
comments and all. Parsing and re-emitting would reformat the user's file and
|
|
114
|
+
drop their comments, which is a worse outcome than not merging at all.
|
|
115
|
+
"""
|
|
116
|
+
lines = yaml_text.split("\n")
|
|
117
|
+
starts = [(i, m.group(1)) for i, ln in enumerate(lines)
|
|
118
|
+
if (m := re.match(r"^([A-Za-z_][A-Za-z0-9_]*):", ln))]
|
|
119
|
+
out: dict[str, tuple[int, int]] = {}
|
|
120
|
+
for idx, (i, key) in enumerate(starts):
|
|
121
|
+
end = starts[idx + 1][0] if idx + 1 < len(starts) else len(lines)
|
|
122
|
+
while end > i + 1 and lines[end - 1].strip() == "":
|
|
123
|
+
end -= 1
|
|
124
|
+
out[key] = (i, end)
|
|
125
|
+
return out
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def merge_config(current: str, new: str) -> tuple[str, list[str], list[str]]:
|
|
129
|
+
"""Add top-level keys the install lacks. Never overwrite one it has."""
|
|
130
|
+
cur_keys = top_level_keys(current)
|
|
131
|
+
new_keys = top_level_keys(new)
|
|
132
|
+
new_lines = new.split("\n")
|
|
133
|
+
|
|
134
|
+
added, dropped = [], []
|
|
135
|
+
additions: list[str] = []
|
|
136
|
+
for key, (s, e) in new_keys.items():
|
|
137
|
+
if key not in cur_keys:
|
|
138
|
+
block = "\n".join(new_lines[s:e])
|
|
139
|
+
# carry the comment block immediately above the key
|
|
140
|
+
lead = s
|
|
141
|
+
while lead > 0 and (new_lines[lead - 1].startswith("#")
|
|
142
|
+
or new_lines[lead - 1].strip() == ""):
|
|
143
|
+
lead -= 1
|
|
144
|
+
if new_lines[lead].strip() == "" and lead < s - 1:
|
|
145
|
+
break
|
|
146
|
+
comment = "\n".join(new_lines[lead:s]).strip("\n")
|
|
147
|
+
additions.append((comment + "\n" + block) if comment else block)
|
|
148
|
+
added.append(key)
|
|
149
|
+
for key in cur_keys:
|
|
150
|
+
if key not in new_keys:
|
|
151
|
+
dropped.append(key)
|
|
152
|
+
|
|
153
|
+
if additions:
|
|
154
|
+
current = current.rstrip("\n") + "\n\n" + "\n\n".join(additions) + "\n"
|
|
155
|
+
return current, added, dropped
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def main() -> int:
|
|
159
|
+
ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
|
160
|
+
ap.add_argument("--install", required=True, type=pathlib.Path,
|
|
161
|
+
help="the existing install to upgrade")
|
|
162
|
+
ap.add_argument("--new", required=True, type=pathlib.Path,
|
|
163
|
+
help="the new package version")
|
|
164
|
+
ap.add_argument("--check", action="store_true", help="report only, change nothing")
|
|
165
|
+
ap.add_argument("--apply", action="store_true", help="perform the upgrade")
|
|
166
|
+
ap.add_argument("--keep-retired", action="store_true",
|
|
167
|
+
help="do NOT sweep files in strict lanes that the new version does "
|
|
168
|
+
"not ship. They are reported either way")
|
|
169
|
+
ap.add_argument("--seed-instance", action="store_true",
|
|
170
|
+
help="also create INSTANCE files the manifest lists but that are "
|
|
171
|
+
"missing from disk. Repairs installs upgraded before 2.5.0, "
|
|
172
|
+
"where a new instance lane was recorded but never written. "
|
|
173
|
+
"Existing files are still never replaced; this only creates "
|
|
174
|
+
"absent ones, so pass it only if you did not delete them")
|
|
175
|
+
ap.add_argument("--preserve-local", action="store_true",
|
|
176
|
+
help="do NOT conform package files you have edited; report them as "
|
|
177
|
+
"conflicts and leave them alone. Use when you deliberately "
|
|
178
|
+
"customised a package file and are not ready to move it into "
|
|
179
|
+
"user_defined/")
|
|
180
|
+
ap.add_argument("--force-conflicts", action="store_true",
|
|
181
|
+
help=argparse.SUPPRESS) # retained: conform is now the default
|
|
182
|
+
args = ap.parse_args()
|
|
183
|
+
|
|
184
|
+
install, new = args.install, args.new
|
|
185
|
+
for label, root in (("install", install), ("new", new)):
|
|
186
|
+
if not (root / "AGENTS.MD").is_file():
|
|
187
|
+
print(f"ERROR: --{label} {root} is not a package root")
|
|
188
|
+
return 2
|
|
189
|
+
if not (new / MANIFEST_NAME).is_file():
|
|
190
|
+
print(f"ERROR: --new {new} has no {MANIFEST_NAME} - run package_manifest.py on it")
|
|
191
|
+
return 2
|
|
192
|
+
if not args.check and not args.apply:
|
|
193
|
+
print("Refusing to act without --apply. Use --check to see the plan.")
|
|
194
|
+
return 2
|
|
195
|
+
|
|
196
|
+
incoming_text = (new / MANIFEST_NAME).read_text(encoding="utf-8")
|
|
197
|
+
problem = check_manifest_compatible(incoming_text, f"--new {new}")
|
|
198
|
+
if problem:
|
|
199
|
+
print(f"ERROR: {problem}")
|
|
200
|
+
return 2
|
|
201
|
+
incoming = parse(incoming_text)
|
|
202
|
+
|
|
203
|
+
# An install predating the manifest has no shipped hashes, so for every file
|
|
204
|
+
# that differs we cannot tell a local edit from an upstream change. Every
|
|
205
|
+
# difference lands in the conform bucket and is named, so the user sees
|
|
206
|
+
# exactly what the upgrade brought into line. `--preserve-local` stops it.
|
|
207
|
+
first_adoption = not (install / MANIFEST_NAME).is_file()
|
|
208
|
+
if not first_adoption:
|
|
209
|
+
installed_text = (install / MANIFEST_NAME).read_text(encoding="utf-8")
|
|
210
|
+
problem = check_manifest_compatible(installed_text, f"--install {install}")
|
|
211
|
+
if problem:
|
|
212
|
+
print(f"ERROR: {problem}")
|
|
213
|
+
return 2
|
|
214
|
+
shipped = parse(installed_text)
|
|
215
|
+
else:
|
|
216
|
+
shipped = {}
|
|
217
|
+
if first_adoption:
|
|
218
|
+
print(f"NOTE: {install} has no {MANIFEST_NAME}, so this is its first")
|
|
219
|
+
print(" manifest-aware upgrade. Without shipped hashes a local edit and an")
|
|
220
|
+
print(" upstream change are indistinguishable, so every differing package")
|
|
221
|
+
print(" file is conformed to the new version and named below. Your lanes -")
|
|
222
|
+
print(" system_docs, tickets, artifacts, special_instructions, and both")
|
|
223
|
+
print(" user_defined directories - are untouched. Use --preserve-local to")
|
|
224
|
+
print(" review instead of conforming.")
|
|
225
|
+
print()
|
|
226
|
+
|
|
227
|
+
def version_of(root: pathlib.Path) -> str:
|
|
228
|
+
man = root / MANIFEST_NAME
|
|
229
|
+
if not man.is_file():
|
|
230
|
+
return "unknown (no manifest)"
|
|
231
|
+
for line in man.read_text(encoding="utf-8").splitlines():
|
|
232
|
+
if line.startswith("| package_version |"):
|
|
233
|
+
return line.split("|")[2].strip()
|
|
234
|
+
return "?"
|
|
235
|
+
|
|
236
|
+
replace, skip, keep, conflict, added, gone = [], [], [], [], [], []
|
|
237
|
+
blocks, cfg = [], None
|
|
238
|
+
live_conform: list[str] = [] # boards with regions: whole file updates
|
|
239
|
+
unmigrated_live: list[str] = [] # boards without: managed block only
|
|
240
|
+
|
|
241
|
+
for rel, (cls, new_sha) in sorted(incoming.items()):
|
|
242
|
+
p = install / rel
|
|
243
|
+
old_sha = shipped.get(rel, (None, None))[1]
|
|
244
|
+
|
|
245
|
+
if cls == "RESET":
|
|
246
|
+
continue # the install owns these
|
|
247
|
+
if cls == "INSTANCE":
|
|
248
|
+
# Never replaced, never removed - but a lane the package introduces
|
|
249
|
+
# has to arrive once, or it never exists. Skipping INSTANCE outright
|
|
250
|
+
# meant `user_defined/` was listed in the manifest of installs that
|
|
251
|
+
# did not have the directory at all: a manifest describing a lane
|
|
252
|
+
# nobody could find, and a free space the docs told you to use.
|
|
253
|
+
#
|
|
254
|
+
# `rel not in shipped` is what makes seeding safe, and it is the
|
|
255
|
+
# three-hash rule doing the same job it does everywhere else. A file
|
|
256
|
+
# the PREVIOUS version also shipped, now missing, was deleted by the
|
|
257
|
+
# install - restoring it would resurrect something someone removed on
|
|
258
|
+
# purpose. A file only the NEW version ships has never existed here,
|
|
259
|
+
# so creating it takes nothing away.
|
|
260
|
+
#
|
|
261
|
+
# `--seed-instance` exists for one specific repair. Before 2.5.0 the
|
|
262
|
+
# updater skipped INSTANCE entirely, so a lane could be recorded in
|
|
263
|
+
# the install's manifest while never having been written to disk.
|
|
264
|
+
# Such a file is absent AND in `shipped`, which is indistinguishable
|
|
265
|
+
# from a deliberate deletion - so the flag makes the operator assert
|
|
266
|
+
# which it is, rather than the tool guessing.
|
|
267
|
+
if not p.exists() and (rel not in shipped or args.seed_instance):
|
|
268
|
+
added.append(rel)
|
|
269
|
+
continue
|
|
270
|
+
if cls == "CONFIG":
|
|
271
|
+
if p.is_file():
|
|
272
|
+
merged, a, d = merge_config(p.read_text(encoding="utf-8"),
|
|
273
|
+
(new / rel).read_text(encoding="utf-8"))
|
|
274
|
+
cfg = (rel, merged, a, d)
|
|
275
|
+
else:
|
|
276
|
+
added.append(rel)
|
|
277
|
+
continue
|
|
278
|
+
if not p.is_file():
|
|
279
|
+
added.append(rel)
|
|
280
|
+
continue
|
|
281
|
+
|
|
282
|
+
cur_sha = sha_bytes(p.read_bytes())
|
|
283
|
+
if cls == "LIVE":
|
|
284
|
+
# A board carrying USER-DEFINED regions can be conformed whole: the
|
|
285
|
+
# package owns the headings, the table headers and the contract
|
|
286
|
+
# prose, and `conform_text` carries the install's regions across. So
|
|
287
|
+
# a board's SHAPE can finally be updated, which swapping only the
|
|
288
|
+
# managed block never allowed - that is why an install could end up
|
|
289
|
+
# with the managed block sitting above its own H1 and a duplicated
|
|
290
|
+
# directive underneath, with no way for an upgrade to fix it.
|
|
291
|
+
#
|
|
292
|
+
# A board WITHOUT regions has all its rows outside any protected
|
|
293
|
+
# area. Conforming it would delete them, so it stays on the old
|
|
294
|
+
# managed-block-only path and is named as needing migration.
|
|
295
|
+
try:
|
|
296
|
+
migrated = bool(user_regions(p.read_text(encoding="utf-8")))
|
|
297
|
+
except (UnicodeDecodeError, ValueError):
|
|
298
|
+
migrated = False
|
|
299
|
+
if migrated:
|
|
300
|
+
(live_conform if cur_sha != new_sha else skip).append(rel)
|
|
301
|
+
continue
|
|
302
|
+
_, ch = swap_managed(p.read_text(encoding="utf-8"),
|
|
303
|
+
(new / rel).read_text(encoding="utf-8"))
|
|
304
|
+
if ch:
|
|
305
|
+
blocks.append((rel, ch))
|
|
306
|
+
unmigrated_live.append(rel)
|
|
307
|
+
continue
|
|
308
|
+
if cur_sha == new_sha:
|
|
309
|
+
skip.append(rel)
|
|
310
|
+
elif old_sha is None:
|
|
311
|
+
conflict.append(rel) # not in the old manifest
|
|
312
|
+
elif cur_sha == old_sha:
|
|
313
|
+
replace.append(rel)
|
|
314
|
+
elif new_sha == old_sha:
|
|
315
|
+
keep.append(rel)
|
|
316
|
+
else:
|
|
317
|
+
conflict.append(rel)
|
|
318
|
+
|
|
319
|
+
# Retired files: present in the install's package lanes, absent from the new
|
|
320
|
+
# version. Never deleted - the package no longer shipping something is not
|
|
321
|
+
# the same as the project not wanting it - but always named, because a
|
|
322
|
+
# retired document left in place still gets read.
|
|
323
|
+
#
|
|
324
|
+
# Derived by walking the install rather than by reading the shipped manifest.
|
|
325
|
+
# The manifest looks like the obvious source and is wrong twice: it is empty
|
|
326
|
+
# on first adoption, and after any upgrade it lists only what the CURRENT
|
|
327
|
+
# version ships - so a file retired two versions ago appears in neither
|
|
328
|
+
# manifest and stays invisible forever. Walking the tree finds it either way.
|
|
329
|
+
# Found by upgrading a real install that still carried `policy_router.md`
|
|
330
|
+
# from the retired dual-router era.
|
|
331
|
+
# A case-insensitive filesystem makes `SKILLS.md` and `SKILLS.MD` one file.
|
|
332
|
+
# The manifest lists the uppercase name, so a lowercase copy looks retired -
|
|
333
|
+
# and unlinking it destroys the file the manifest name also resolves to.
|
|
334
|
+
# This is not hypothetical: it deleted a real install's role registry, and
|
|
335
|
+
# the upgrade had just written the correct content into that same inode.
|
|
336
|
+
#
|
|
337
|
+
# So a path whose case-insensitive twin is in the manifest is never swept. On
|
|
338
|
+
# a case-sensitive filesystem this skips a genuinely stale duplicate, which
|
|
339
|
+
# costs one leftover file. The other way costs the registry.
|
|
340
|
+
incoming_ci = {k.lower() for k in incoming}
|
|
341
|
+
case_twins: list[str] = []
|
|
342
|
+
for p in sorted(install.rglob("*")):
|
|
343
|
+
if not p.is_file() or any(x in {"__pycache__", ".git"} for x in p.parts):
|
|
344
|
+
continue
|
|
345
|
+
rel = p.relative_to(install).as_posix()
|
|
346
|
+
if rel in incoming or is_permissive(rel) or rel == MANIFEST_NAME:
|
|
347
|
+
continue
|
|
348
|
+
if rel.lower() in incoming_ci:
|
|
349
|
+
case_twins.append(rel)
|
|
350
|
+
continue
|
|
351
|
+
gone.append(rel)
|
|
352
|
+
|
|
353
|
+
# Computed before printing so --check can show it. An upgrade that only
|
|
354
|
+
# reveals what it preserved AFTER writing is an upgrade you have to trust
|
|
355
|
+
# rather than review.
|
|
356
|
+
would_carry: list[tuple[str, list[str]]] = []
|
|
357
|
+
would_orphan: list[tuple[str, list[str]]] = []
|
|
358
|
+
for rel in replace + added + conflict + live_conform:
|
|
359
|
+
if not (install / rel).is_file() or not (new / rel).is_file():
|
|
360
|
+
continue
|
|
361
|
+
_, c, o = conform_text((new / rel).read_bytes(), install / rel)
|
|
362
|
+
if c:
|
|
363
|
+
would_carry.append((rel, c))
|
|
364
|
+
if o:
|
|
365
|
+
would_orphan.append((rel, o))
|
|
366
|
+
|
|
367
|
+
print(f"install {install} (version {version_of(install)})")
|
|
368
|
+
print(f"new {new} (version {version_of(new)})")
|
|
369
|
+
print()
|
|
370
|
+
print(f" replace {len(replace):>5} package changed, install untouched")
|
|
371
|
+
print(f" skip {len(skip):>5} already current")
|
|
372
|
+
print(f" keep {len(keep):>5} locally edited, package unchanged")
|
|
373
|
+
print(f" conform {len(conflict):>5} package file you edited - will be conformed"
|
|
374
|
+
f"{' (SKIPPED: --preserve-local)' if args.preserve_local else ''}")
|
|
375
|
+
print(f" added {len(added):>5} new files in this version")
|
|
376
|
+
print(f" sweep {len(gone):>5} in a strict lane, not in the new version"
|
|
377
|
+
f"{' (KEPT: --keep-retired)' if args.keep_retired else ' - will be REMOVED'}")
|
|
378
|
+
print(f" blocks {len(blocks):>5} managed blocks to swap in live files")
|
|
379
|
+
if live_conform:
|
|
380
|
+
print(f" boards {len(live_conform):>5} live files updated whole, USER-DEFINED "
|
|
381
|
+
f"content carried")
|
|
382
|
+
if unmigrated_live:
|
|
383
|
+
print(f" MIGRATE {len(unmigrated_live):>5} live files with no USER-DEFINED region "
|
|
384
|
+
f"- managed block only")
|
|
385
|
+
for rel in unmigrated_live:
|
|
386
|
+
print(f" migrate {rel}")
|
|
387
|
+
print(" Their rows sit outside any protected area, so the board's shape")
|
|
388
|
+
print(" cannot be updated without risking them. To migrate:")
|
|
389
|
+
print(" python tools/migrate_boards.py --install <dir> --new <dir> --check")
|
|
390
|
+
if case_twins:
|
|
391
|
+
print(f" CASE {len(case_twins):>5} differ from a manifest path only by case - NOT swept")
|
|
392
|
+
for rel in case_twins[:5]:
|
|
393
|
+
match = next(k for k in incoming if k.lower() == rel.lower())
|
|
394
|
+
print(f" {rel} vs manifest `{match}`")
|
|
395
|
+
print(" On a case-insensitive filesystem these are ONE file and sweeping")
|
|
396
|
+
print(" it would delete the real one. Rename by hand, then re-run.")
|
|
397
|
+
if cfg:
|
|
398
|
+
print(f" config {len(cfg[2])} keys to add, {len(cfg[3])} dropped upstream")
|
|
399
|
+
if would_carry:
|
|
400
|
+
print(f" regions {len(would_carry):>5} files whose USER-DEFINED content is carried "
|
|
401
|
+
f"across")
|
|
402
|
+
for rel, names in would_carry[:8]:
|
|
403
|
+
print(f" keep {rel}: {', '.join(names)}")
|
|
404
|
+
if would_orphan:
|
|
405
|
+
print(f" ORPHAN {len(would_orphan):>5} user regions this version no longer offers "
|
|
406
|
+
f"- NOT carried")
|
|
407
|
+
for rel, names in would_orphan[:8]:
|
|
408
|
+
print(f" orphan {rel}: {', '.join(names)}")
|
|
409
|
+
for rel in conflict[:15]:
|
|
410
|
+
print(f" conform {rel}")
|
|
411
|
+
for rel in keep[:10]:
|
|
412
|
+
print(f" keep {rel}")
|
|
413
|
+
for rel in added[:10]:
|
|
414
|
+
print(f" added {rel}")
|
|
415
|
+
for rel in gone[:12]:
|
|
416
|
+
print(f" sweep {rel}")
|
|
417
|
+
if len(gone) > 12:
|
|
418
|
+
print(f" ... +{len(gone) - 12} more")
|
|
419
|
+
for rel, ch in blocks[:10]:
|
|
420
|
+
print(f" block {rel}: {', '.join(ch)}")
|
|
421
|
+
if cfg and cfg[2]:
|
|
422
|
+
print(f" config add keys: {', '.join(cfg[2])}")
|
|
423
|
+
if cfg and cfg[3]:
|
|
424
|
+
print(f" config dropped upstream (kept): {', '.join(cfg[3])}")
|
|
425
|
+
|
|
426
|
+
if args.check:
|
|
427
|
+
print()
|
|
428
|
+
if conflict and args.preserve_local:
|
|
429
|
+
print("CONFLICTS - --preserve-local will leave them untouched")
|
|
430
|
+
return 1
|
|
431
|
+
if conflict:
|
|
432
|
+
print(f"READY - {len(conflict)} edited package files will be CONFORMED to the")
|
|
433
|
+
print(" new version. Anything you need to keep belongs in user_defined/.")
|
|
434
|
+
else:
|
|
435
|
+
print("READY")
|
|
436
|
+
return 0
|
|
437
|
+
|
|
438
|
+
conform = not args.preserve_local
|
|
439
|
+
carried_report: list[tuple[str, list[str]]] = []
|
|
440
|
+
orphan_report: list[tuple[str, list[str]]] = []
|
|
441
|
+
for rel in replace + added + live_conform + (conflict if conform else []):
|
|
442
|
+
src, dst = new / rel, install / rel
|
|
443
|
+
dst.parent.mkdir(parents=True, exist_ok=True)
|
|
444
|
+
payload, carried, orphaned = conform_text(src.read_bytes(), dst)
|
|
445
|
+
if carried:
|
|
446
|
+
carried_report.append((rel, carried))
|
|
447
|
+
if orphaned:
|
|
448
|
+
orphan_report.append((rel, orphaned))
|
|
449
|
+
dst.write_bytes(payload)
|
|
450
|
+
|
|
451
|
+
for rel, _ in blocks:
|
|
452
|
+
p = install / rel
|
|
453
|
+
merged, _ = swap_managed(p.read_text(encoding="utf-8"),
|
|
454
|
+
(new / rel).read_text(encoding="utf-8"))
|
|
455
|
+
p.write_bytes(merged.encode("utf-8"))
|
|
456
|
+
|
|
457
|
+
swept = 0
|
|
458
|
+
if not args.keep_retired:
|
|
459
|
+
for rel in gone:
|
|
460
|
+
try:
|
|
461
|
+
(install / rel).unlink()
|
|
462
|
+
swept += 1
|
|
463
|
+
except OSError as exc:
|
|
464
|
+
print(f" could not remove {rel}: {exc.strerror or exc}")
|
|
465
|
+
for d in sorted((p for p in install.rglob('*') if p.is_dir()),
|
|
466
|
+
key=lambda x: len(x.parts), reverse=True):
|
|
467
|
+
rel = d.relative_to(install).as_posix() + '/'
|
|
468
|
+
if is_permissive(rel):
|
|
469
|
+
continue
|
|
470
|
+
try:
|
|
471
|
+
if not any(d.iterdir()):
|
|
472
|
+
d.rmdir()
|
|
473
|
+
except OSError:
|
|
474
|
+
pass
|
|
475
|
+
|
|
476
|
+
if cfg:
|
|
477
|
+
rel, merged, a, _ = cfg
|
|
478
|
+
if a:
|
|
479
|
+
(install / rel).write_bytes(merged.encode("utf-8"))
|
|
480
|
+
|
|
481
|
+
(install / MANIFEST_NAME).write_bytes((new / MANIFEST_NAME).read_bytes())
|
|
482
|
+
|
|
483
|
+
print()
|
|
484
|
+
print(f"APPLIED: replaced {len(replace)}, added {len(added)}, "
|
|
485
|
+
f"blocks {len(blocks)}, config keys {len(cfg[2]) if cfg else 0}, "
|
|
486
|
+
f"kept {len(keep)} local edits, "
|
|
487
|
+
f"{'conformed' if conform else 'left'} {len(conflict)} edited package files, "
|
|
488
|
+
f"swept {swept} retired")
|
|
489
|
+
if carried_report:
|
|
490
|
+
print(f" user regions carried across in {len(carried_report)} file(s):")
|
|
491
|
+
for rel, names in carried_report[:10]:
|
|
492
|
+
print(f" {rel}: {', '.join(names)}")
|
|
493
|
+
print(" The package text around them was updated; your content was not.")
|
|
494
|
+
if orphan_report:
|
|
495
|
+
print(f" {len(orphan_report)} file(s) hold a user region this version no")
|
|
496
|
+
print(" longer offers. NOT carried, and the old file is gone - recover from")
|
|
497
|
+
print(" version control if you need it:")
|
|
498
|
+
for rel, names in orphan_report[:10]:
|
|
499
|
+
print(f" {rel}: {', '.join(names)}")
|
|
500
|
+
if conflict and not conform:
|
|
501
|
+
print(" Edited package files were NOT changed (--preserve-local).")
|
|
502
|
+
print(" Each one is a divergence you will re-resolve on every future")
|
|
503
|
+
print(" upgrade. Move what you need into user_defined/ instead.")
|
|
504
|
+
if gone and args.keep_retired:
|
|
505
|
+
print(f" {len(gone)} retired files kept (--keep-retired). They are still"
|
|
506
|
+
f" readable by agents.")
|
|
507
|
+
return 0
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
if __name__ == "__main__":
|
|
511
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# user_defined
|
|
2
|
+
|
|
3
|
+
Your space. Put anything here.
|
|
4
|
+
|
|
5
|
+
The package never writes into this directory. Not on upgrade, not on cleanup,
|
|
6
|
+
not in any mode. Nothing here is listed in `MANIFEST.md` as package content, and
|
|
7
|
+
no tool will restore, replace, or remove what you put in it.
|
|
8
|
+
|
|
9
|
+
## Why this exists
|
|
10
|
+
|
|
11
|
+
Everything else at the top level belongs to the package: `AGENTS.MD`, `SKILLS.MD`,
|
|
12
|
+
`agent_onboarding/default/`, `templates/`, `tools/`, `examples/`. An upgrade
|
|
13
|
+
conforms those to the new version, because they are the library and keeping a
|
|
14
|
+
local edit there only preserves a divergence you will have to re-resolve on every
|
|
15
|
+
future upgrade.
|
|
16
|
+
|
|
17
|
+
So when you need something the package does not provide, it goes here rather than
|
|
18
|
+
into a package file. That way an upgrade never has to choose between your work
|
|
19
|
+
and the new version - the question does not arise.
|
|
20
|
+
|
|
21
|
+
## What belongs here
|
|
22
|
+
|
|
23
|
+
- scripts, notes, checklists, conventions specific to this repository
|
|
24
|
+
- reference material you want agents to be able to find
|
|
25
|
+
- anything you would otherwise have been tempted to paste into a package file
|
|
26
|
+
|
|
27
|
+
## What does NOT belong here
|
|
28
|
+
|
|
29
|
+
- **role overlays.** Those go in `agent_onboarding/user_defined/<name>/` and need
|
|
30
|
+
a row in the `SKILLS.MD` registry to be selectable. This directory is not on
|
|
31
|
+
any role's readset, so a role placed here is invisible to routing.
|
|
32
|
+
- **project instructions agents must follow.** Those go in
|
|
33
|
+
`special_instructions/`, which every role reads during onboarding. Files here
|
|
34
|
+
are not read automatically - an agent finds them only if something points at
|
|
35
|
+
them.
|
|
36
|
+
|
|
37
|
+
## The other lanes that are yours
|
|
38
|
+
|
|
39
|
+
| lane | holds |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `user_defined/` | this directory - anything at all |
|
|
42
|
+
| `agent_onboarding/user_defined/` | role overlays, registered in `SKILLS.MD` |
|
|
43
|
+
| `special_instructions/` | project rules, read during onboarding |
|
|
44
|
+
| `system_docs/` | your architecture, component and test maps |
|
|
45
|
+
| `tickets/` | your work |
|
|
46
|
+
| `artifacts/` | your findings |
|
|
47
|
+
| `context_management/` | your context board |
|
|
48
|
+
|
|
49
|
+
Everything outside those is the package's and is conformed on upgrade.
|