psyclaw 0.27.22 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -5
- package/dist/apps/panel/index.html +2 -2
- package/dist/src/adapters/pi/extension.js +225 -92
- package/dist/src/adapters/pi/extension.js.map +1 -1
- package/dist/src/agents/import.js +44 -32
- package/dist/src/agents/import.js.map +1 -1
- package/dist/src/analysis/hooks.d.ts +1 -0
- package/dist/src/analysis/hooks.js +20 -1
- package/dist/src/analysis/hooks.js.map +1 -1
- package/dist/src/ars/bridge.d.ts +20 -0
- package/dist/src/ars/bridge.js +132 -0
- package/dist/src/ars/bridge.js.map +1 -0
- package/dist/src/ars/contracts.d.ts +55 -0
- package/dist/src/ars/contracts.js +2 -0
- package/dist/src/ars/contracts.js.map +1 -0
- package/dist/src/ars/panel-plan.d.ts +4 -0
- package/dist/src/ars/panel-plan.js +11 -0
- package/dist/src/ars/panel-plan.js.map +1 -0
- package/dist/src/ars/pi-panel-executor.d.ts +30 -0
- package/dist/src/ars/pi-panel-executor.js +140 -0
- package/dist/src/ars/pi-panel-executor.js.map +1 -0
- package/dist/src/ars/profile.d.ts +36 -0
- package/dist/src/ars/profile.js +119 -0
- package/dist/src/ars/profile.js.map +1 -0
- package/dist/src/ars/re-review.d.ts +22 -0
- package/dist/src/ars/re-review.js +172 -0
- package/dist/src/ars/re-review.js.map +1 -0
- package/dist/src/branding.d.ts +2 -4
- package/dist/src/branding.js +3 -5
- package/dist/src/branding.js.map +1 -1
- package/dist/src/bundled-tools.d.ts +3 -0
- package/dist/src/bundled-tools.js +21 -0
- package/dist/src/bundled-tools.js.map +1 -0
- package/dist/src/chat.js +6 -5
- package/dist/src/chat.js.map +1 -1
- package/dist/src/creation/contracts.d.ts +38 -0
- package/dist/src/creation/contracts.js +2 -0
- package/dist/src/creation/contracts.js.map +1 -0
- package/dist/src/creation/service.d.ts +7 -0
- package/dist/src/creation/service.js +196 -0
- package/dist/src/creation/service.js.map +1 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.js +10 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/install/installer.js +32 -10
- package/dist/src/install/installer.js.map +1 -1
- package/dist/src/orchestration/personas.d.ts +15 -0
- package/dist/src/orchestration/personas.js +51 -0
- package/dist/src/orchestration/personas.js.map +1 -0
- package/dist/src/orchestration/pi-executor.d.ts +1 -0
- package/dist/src/orchestration/pi-executor.js +1 -1
- package/dist/src/orchestration/pi-executor.js.map +1 -1
- package/dist/src/panel/extension.js +29 -8
- package/dist/src/panel/extension.js.map +1 -1
- package/dist/src/panel/server.js +14 -5
- package/dist/src/panel/server.js.map +1 -1
- package/dist/src/project/paths.d.ts +3 -0
- package/dist/src/project/paths.js +7 -0
- package/dist/src/project/paths.js.map +1 -1
- package/dist/src/rules/user-rules.d.ts +8 -0
- package/dist/src/rules/user-rules.js +36 -0
- package/dist/src/rules/user-rules.js.map +1 -0
- package/dist/src/skills/contracts.d.ts +4 -4
- package/dist/src/skills/recommended.js +1 -1
- package/dist/src/skills/registry.js +49 -28
- package/dist/src/skills/registry.js.map +1 -1
- package/dist/src/style/cli-ui.js +0 -1
- package/dist/src/style/cli-ui.js.map +1 -1
- package/package.json +14 -3
- package/scripts/rebrand-pi.mjs +6 -0
- package/skills/recommended/catalog.json +2 -11
- package/vendor/ars/.claude/CLAUDE.md +371 -0
- package/vendor/ars/.command-invariants.toml +24 -0
- package/vendor/ars/CITATION.cff +35 -0
- package/vendor/ars/LICENSE +417 -0
- package/vendor/ars/MODE_REGISTRY.md +76 -0
- package/vendor/ars/NOTICE.md +26 -0
- package/vendor/ars/POSITIONING.md +99 -0
- package/vendor/ars/PSYCLAW_SOURCE.json +10 -0
- package/vendor/ars/README.md +751 -0
- package/vendor/ars/SECURITY.md +52 -0
- package/vendor/ars/THIRD_PARTY.md +70 -0
- package/vendor/ars/academic-paper/SKILL.md +542 -0
- package/vendor/ars/academic-paper/agents/abstract_bilingual_agent.md +171 -0
- package/vendor/ars/academic-paper/agents/argument_builder_agent.md +276 -0
- package/vendor/ars/academic-paper/agents/citation_compliance_agent.md +422 -0
- package/vendor/ars/academic-paper/agents/draft_writer_agent.md +656 -0
- package/vendor/ars/academic-paper/agents/formatter_agent.md +999 -0
- package/vendor/ars/academic-paper/agents/intake_agent.md +393 -0
- package/vendor/ars/academic-paper/agents/literature_strategist_agent.md +626 -0
- package/vendor/ars/academic-paper/agents/peer_reviewer_agent.md +516 -0
- package/vendor/ars/academic-paper/agents/revision_coach_agent.md +334 -0
- package/vendor/ars/academic-paper/agents/socratic_mentor_agent.md +527 -0
- package/vendor/ars/academic-paper/agents/structure_architect_agent.md +401 -0
- package/vendor/ars/academic-paper/agents/visualization_agent.md +441 -0
- package/vendor/ars/academic-paper/examples/chinese_paper_example.md +278 -0
- package/vendor/ars/academic-paper/examples/clinical_citation_verification_checklist.md +95 -0
- package/vendor/ars/academic-paper/examples/clinical_epistemic_status_example.md +100 -0
- package/vendor/ars/academic-paper/examples/commitment_ledger_example.md +147 -0
- package/vendor/ars/academic-paper/examples/imrad_hei_example.md +234 -0
- package/vendor/ars/academic-paper/examples/literature_review_example.md +260 -0
- package/vendor/ars/academic-paper/examples/plan_mode_guided_writing.md +600 -0
- package/vendor/ars/academic-paper/examples/revision_mode_example.md +344 -0
- package/vendor/ars/academic-paper/examples/revision_recovery_example.md +506 -0
- package/vendor/ars/academic-paper/examples/version_family_reconciliation_example.md +89 -0
- package/vendor/ars/academic-paper/references/abstract_writing_guide.md +169 -0
- package/vendor/ars/academic-paper/references/academic_writing_style.md +188 -0
- package/vendor/ars/academic-paper/references/anti_leakage_protocol.md +83 -0
- package/vendor/ars/academic-paper/references/apa7_chinese_citation_guide.md +364 -0
- package/vendor/ars/academic-paper/references/apa7_extended_guide.md +198 -0
- package/vendor/ars/academic-paper/references/changelog.md +11 -0
- package/vendor/ars/academic-paper/references/citation_format_switcher.md +228 -0
- package/vendor/ars/academic-paper/references/committee_correspondence_protocol.md +158 -0
- package/vendor/ars/academic-paper/references/credit_authorship_guide.md +308 -0
- package/vendor/ars/academic-paper/references/disclosure_mode_protocol.md +478 -0
- package/vendor/ars/academic-paper/references/domain_evidence_profiles.md +38 -0
- package/vendor/ars/academic-paper/references/failure_paths.md +349 -0
- package/vendor/ars/academic-paper/references/funding_statement_guide.md +319 -0
- package/vendor/ars/academic-paper/references/hei_domain_glossary.md +169 -0
- package/vendor/ars/academic-paper/references/intro_title_rhetoric_guide.md +114 -0
- package/vendor/ars/academic-paper/references/journal_submission_guide.md +249 -0
- package/vendor/ars/academic-paper/references/latex_template_reference.md +378 -0
- package/vendor/ars/academic-paper/references/mode_selection_guide.md +378 -0
- package/vendor/ars/academic-paper/references/paper_structure_patterns.md +330 -0
- package/vendor/ars/academic-paper/references/plan_mode_protocol.md +112 -0
- package/vendor/ars/academic-paper/references/policy_anchor_disclosure_protocol.md +200 -0
- package/vendor/ars/academic-paper/references/policy_anchor_table.md +157 -0
- package/vendor/ars/academic-paper/references/revision_patch_protocol.md +173 -0
- package/vendor/ars/academic-paper/references/statistical_visualization_standards.md +750 -0
- package/vendor/ars/academic-paper/references/venue_disclosure_policies.md +259 -0
- package/vendor/ars/academic-paper/references/vlm_figure_verification.md +126 -0
- package/vendor/ars/academic-paper/references/workflow_phase_details.md +135 -0
- package/vendor/ars/academic-paper/references/writing_judgment_framework.md +59 -0
- package/vendor/ars/academic-paper/references/writing_quality_check.md +173 -0
- package/vendor/ars/academic-paper/templates/bilingual_abstract_template.md +78 -0
- package/vendor/ars/academic-paper/templates/case_study_template.md +129 -0
- package/vendor/ars/academic-paper/templates/conference_paper_template.md +108 -0
- package/vendor/ars/academic-paper/templates/credit_statement_template.md +132 -0
- package/vendor/ars/academic-paper/templates/funding_statement_template.md +290 -0
- package/vendor/ars/academic-paper/templates/imrad_template.md +183 -0
- package/vendor/ars/academic-paper/templates/latex_article_template.tex +199 -0
- package/vendor/ars/academic-paper/templates/literature_review_template.md +135 -0
- package/vendor/ars/academic-paper/templates/policy_brief_template.md +139 -0
- package/vendor/ars/academic-paper/templates/revision_tracking_template.md +199 -0
- package/vendor/ars/academic-paper/templates/theoretical_paper_template.md +119 -0
- package/vendor/ars/academic-paper-reviewer/SKILL.md +491 -0
- package/vendor/ars/academic-paper-reviewer/agents/devils_advocate_reviewer_agent.md +443 -0
- package/vendor/ars/academic-paper-reviewer/agents/domain_reviewer_agent.md +412 -0
- package/vendor/ars/academic-paper-reviewer/agents/editorial_synthesizer_agent.md +478 -0
- package/vendor/ars/academic-paper-reviewer/agents/eic_agent.md +339 -0
- package/vendor/ars/academic-paper-reviewer/agents/field_analyst_agent.md +221 -0
- package/vendor/ars/academic-paper-reviewer/agents/methodology_reviewer_agent.md +449 -0
- package/vendor/ars/academic-paper-reviewer/agents/perspective_reviewer_agent.md +427 -0
- package/vendor/ars/academic-paper-reviewer/examples/hei_paper_review_example.md +391 -0
- package/vendor/ars/academic-paper-reviewer/examples/interdisciplinary_review_example.md +299 -0
- package/vendor/ars/academic-paper-reviewer/examples/subclaim_decomposition_example.md +80 -0
- package/vendor/ars/academic-paper-reviewer/references/calibration_mode_protocol.md +256 -0
- package/vendor/ars/academic-paper-reviewer/references/changelog.md +10 -0
- package/vendor/ars/academic-paper-reviewer/references/editorial_decision_standards.md +236 -0
- package/vendor/ars/academic-paper-reviewer/references/guided_mode_protocol.md +34 -0
- package/vendor/ars/academic-paper-reviewer/references/integration_guide.md +15 -0
- package/vendor/ars/academic-paper-reviewer/references/quality_rubrics.md +84 -0
- package/vendor/ars/academic-paper-reviewer/references/re_review_mode_protocol.md +340 -0
- package/vendor/ars/academic-paper-reviewer/references/review_criteria_framework.md +98 -0
- package/vendor/ars/academic-paper-reviewer/references/review_panel_provenance_protocol.md +197 -0
- package/vendor/ars/academic-paper-reviewer/references/review_quality_thinking.md +58 -0
- package/vendor/ars/academic-paper-reviewer/references/reviewer_sprint_prompt_source.md +324 -0
- package/vendor/ars/academic-paper-reviewer/references/sprint_contract_protocol.md +296 -0
- package/vendor/ars/academic-paper-reviewer/references/statistical_reporting_standards.md +505 -0
- package/vendor/ars/academic-paper-reviewer/references/top_journals_by_field.md +206 -0
- package/vendor/ars/academic-paper-reviewer/templates/editorial_decision_template.md +235 -0
- package/vendor/ars/academic-paper-reviewer/templates/peer_review_report_template.md +305 -0
- package/vendor/ars/academic-paper-reviewer/templates/revision_response_template.md +248 -0
- package/vendor/ars/academic-pipeline/SKILL.md +736 -0
- package/vendor/ars/academic-pipeline/agents/claim_ref_alignment_audit_agent.md +382 -0
- package/vendor/ars/academic-pipeline/agents/collaboration_depth_agent.md +164 -0
- package/vendor/ars/academic-pipeline/agents/integrity_verification_agent.md +870 -0
- package/vendor/ars/academic-pipeline/agents/pipeline_orchestrator_agent.md +1379 -0
- package/vendor/ars/academic-pipeline/agents/state_tracker_agent.md +622 -0
- package/vendor/ars/academic-pipeline/examples/full_pipeline_example.md +482 -0
- package/vendor/ars/academic-pipeline/examples/integrity_failure_recovery.md +389 -0
- package/vendor/ars/academic-pipeline/examples/mid_entry_example.md +414 -0
- package/vendor/ars/academic-pipeline/references/adapters/.gitkeep +0 -0
- package/vendor/ars/academic-pipeline/references/adapters/overview.md +153 -0
- package/vendor/ars/academic-pipeline/references/ai_research_failure_modes.md +185 -0
- package/vendor/ars/academic-pipeline/references/changelog.md +14 -0
- package/vendor/ars/academic-pipeline/references/claim_audit_calibration_protocol.md +175 -0
- package/vendor/ars/academic-pipeline/references/claim_verification_protocol.md +282 -0
- package/vendor/ars/academic-pipeline/references/external_review_protocol.md +131 -0
- package/vendor/ars/academic-pipeline/references/integrity_review_protocol.md +110 -0
- package/vendor/ars/academic-pipeline/references/literature_corpus_consumers.md +193 -0
- package/vendor/ars/academic-pipeline/references/mode_advisor.md +135 -0
- package/vendor/ars/academic-pipeline/references/passport_as_reset_boundary.md +132 -0
- package/vendor/ars/academic-pipeline/references/pipeline_state_machine.md +405 -0
- package/vendor/ars/academic-pipeline/references/plagiarism_detection_protocol.md +239 -0
- package/vendor/ars/academic-pipeline/references/process_summary_protocol.md +209 -0
- package/vendor/ars/academic-pipeline/references/progress_dashboard_template.md +38 -0
- package/vendor/ars/academic-pipeline/references/reinforcement_content.md +15 -0
- package/vendor/ars/academic-pipeline/references/reproducibility_audit.md +55 -0
- package/vendor/ars/academic-pipeline/references/score_trajectory_protocol.md +78 -0
- package/vendor/ars/academic-pipeline/references/team_collaboration_protocol.md +261 -0
- package/vendor/ars/academic-pipeline/references/two_stage_review_protocol.md +27 -0
- package/vendor/ars/academic-pipeline/templates/pipeline_status_template.md +146 -0
- package/vendor/ars/agents/report_compiler_agent.md +341 -0
- package/vendor/ars/agents/research_architect_agent.md +298 -0
- package/vendor/ars/agents/synthesis_agent.md +356 -0
- package/vendor/ars/commands/ars-3w.md +10 -0
- package/vendor/ars/commands/ars-abstract.md +10 -0
- package/vendor/ars/commands/ars-cache-invalidate.md +20 -0
- package/vendor/ars/commands/ars-citation-check.md +10 -0
- package/vendor/ars/commands/ars-disclosure.md +10 -0
- package/vendor/ars/commands/ars-format-convert.md +10 -0
- package/vendor/ars/commands/ars-full.md +9 -0
- package/vendor/ars/commands/ars-lit-review.md +12 -0
- package/vendor/ars/commands/ars-mark-read.md +18 -0
- package/vendor/ars/commands/ars-outline.md +10 -0
- package/vendor/ars/commands/ars-plan.md +10 -0
- package/vendor/ars/commands/ars-rebuttal-audit.md +12 -0
- package/vendor/ars/commands/ars-reviewer.md +9 -0
- package/vendor/ars/commands/ars-revision-coach.md +9 -0
- package/vendor/ars/commands/ars-revision.md +10 -0
- package/vendor/ars/commands/ars-unmark-read.md +16 -0
- package/vendor/ars/deep-research/SKILL.md +600 -0
- package/vendor/ars/deep-research/agents/bibliography_agent.md +473 -0
- package/vendor/ars/deep-research/agents/devils_advocate_agent.md +192 -0
- package/vendor/ars/deep-research/agents/editor_in_chief_agent.md +167 -0
- package/vendor/ars/deep-research/agents/ethics_review_agent.md +267 -0
- package/vendor/ars/deep-research/agents/meta_analysis_agent.md +325 -0
- package/vendor/ars/deep-research/agents/monitoring_agent.md +209 -0
- package/vendor/ars/deep-research/agents/report_compiler_agent.md +341 -0
- package/vendor/ars/deep-research/agents/research_architect_agent.md +298 -0
- package/vendor/ars/deep-research/agents/research_question_agent.md +216 -0
- package/vendor/ars/deep-research/agents/risk_of_bias_agent.md +231 -0
- package/vendor/ars/deep-research/agents/socratic_mentor_agent.md +764 -0
- package/vendor/ars/deep-research/agents/source_verification_agent.md +219 -0
- package/vendor/ars/deep-research/agents/synthesis_agent.md +356 -0
- package/vendor/ars/deep-research/agents/timeline_extraction_agent.md +99 -0
- package/vendor/ars/deep-research/examples/exploratory_research.md +157 -0
- package/vendor/ars/deep-research/examples/fact_check_mode.md +173 -0
- package/vendor/ars/deep-research/examples/handoff_to_paper.md +318 -0
- package/vendor/ars/deep-research/examples/idea_diversity_coverage_gap_advisory.md +64 -0
- package/vendor/ars/deep-research/examples/policy_analysis.md +161 -0
- package/vendor/ars/deep-research/examples/review_mode.md +253 -0
- package/vendor/ars/deep-research/examples/socratic_guided_research.md +331 -0
- package/vendor/ars/deep-research/examples/systematic_review.md +133 -0
- package/vendor/ars/deep-research/references/apa7_style_guide.md +162 -0
- package/vendor/ars/deep-research/references/argumentation_reasoning_framework.md +68 -0
- package/vendor/ars/deep-research/references/arxiv_api_protocol.md +76 -0
- package/vendor/ars/deep-research/references/changelog.md +22 -0
- package/vendor/ars/deep-research/references/chinese_literature_api_protocol.md +317 -0
- package/vendor/ars/deep-research/references/cross_agent_quality_definitions.md +14 -0
- package/vendor/ars/deep-research/references/crossref_api_protocol.md +84 -0
- package/vendor/ars/deep-research/references/equator_reporting_guidelines.md +482 -0
- package/vendor/ars/deep-research/references/ethics_checklist.md +282 -0
- package/vendor/ars/deep-research/references/failure_paths.md +355 -0
- package/vendor/ars/deep-research/references/interdisciplinary_bridges.md +292 -0
- package/vendor/ars/deep-research/references/irb_decision_tree.md +315 -0
- package/vendor/ars/deep-research/references/literature_monitoring_strategies.md +263 -0
- package/vendor/ars/deep-research/references/logical_fallacies.md +192 -0
- package/vendor/ars/deep-research/references/methodology_patterns.md +462 -0
- package/vendor/ars/deep-research/references/mode_selection_guide.md +331 -0
- package/vendor/ars/deep-research/references/openalex_api_protocol.md +82 -0
- package/vendor/ars/deep-research/references/preregistration_guide.md +324 -0
- package/vendor/ars/deep-research/references/semantic_scholar_api_protocol.md +107 -0
- package/vendor/ars/deep-research/references/socratic_mode_protocol.md +99 -0
- package/vendor/ars/deep-research/references/socratic_questioning_framework.md +232 -0
- package/vendor/ars/deep-research/references/source_quality_hierarchy.md +188 -0
- package/vendor/ars/deep-research/references/systematic_review_protocol.md +95 -0
- package/vendor/ars/deep-research/references/systematic_review_toolkit.md +353 -0
- package/vendor/ars/deep-research/templates/evidence_assessment_template.md +127 -0
- package/vendor/ars/deep-research/templates/literature_matrix_template.md +85 -0
- package/vendor/ars/deep-research/templates/preregistration_template.md +318 -0
- package/vendor/ars/deep-research/templates/prisma_protocol_template.md +248 -0
- package/vendor/ars/deep-research/templates/prisma_report_template.md +415 -0
- package/vendor/ars/deep-research/templates/research_brief_template.md +93 -0
- package/vendor/ars/package.json +24 -0
- package/vendor/ars/pi/README.md +161 -0
- package/vendor/ars/pi/package.json +26 -0
- package/vendor/ars/pi/wrapper.js +193 -0
- package/vendor/ars/pi/wrapper.test.mjs +201 -0
- package/vendor/ars/pyproject.toml +2 -0
- package/vendor/ars/requirements-pdf-content-classifier.txt +5 -0
- package/vendor/ars/scripts/_block_parser.py +396 -0
- package/vendor/ars/scripts/_ci_pytest_manifest.toml +661 -0
- package/vendor/ars/scripts/_claim_audit_constants.py +268 -0
- package/vendor/ars/scripts/_e4_evidence.py +110 -0
- package/vendor/ars/scripts/_eval_threshold_gate.py +73 -0
- package/vendor/ars/scripts/_markdown_lint_util.py +224 -0
- package/vendor/ars/scripts/_next_verified_at_ms.py +176 -0
- package/vendor/ars/scripts/_passport_yaml.py +53 -0
- package/vendor/ars/scripts/_skill_lint.py +254 -0
- package/vendor/ars/scripts/_text_similarity.py +141 -0
- package/vendor/ars/scripts/adapters/README.md +89 -0
- package/vendor/ars/scripts/adapters/_common.py +209 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/expected_passport.yaml +25 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/expected_rejection_log.yaml +18 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/input_fixture/Chen2024_AIAssessment.pdf +0 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/input_fixture/Wang_2023_formative_feedback.pdf +0 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/input_fixture/paper1.pdf +0 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/input_fixture//344/270/255/346/226/207/346/252/224/345/220/215_2024.pdf +0 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/expected_passport.yaml +40 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/expected_rejection_log.yaml +13 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/.gitkeep +0 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/.obsidian/app.json +1 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/_templates/tmpl.md +7 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/chen2024ai.md +13 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/invalid.md +1 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/wang2023formative.md +10 -0
- package/vendor/ars/scripts/adapters/examples/zotero/expected_passport.yaml +34 -0
- package/vendor/ars/scripts/adapters/examples/zotero/expected_rejection_log.yaml +34 -0
- package/vendor/ars/scripts/adapters/examples/zotero/input_fixture/.gitkeep +0 -0
- package/vendor/ars/scripts/adapters/examples/zotero/input_fixture/export.json +43 -0
- package/vendor/ars/scripts/adapters/folder_scan.py +214 -0
- package/vendor/ars/scripts/adapters/obsidian.py +336 -0
- package/vendor/ars/scripts/adapters/tests/.gitkeep +0 -0
- package/vendor/ars/scripts/adapters/tests/conftest.py +77 -0
- package/vendor/ars/scripts/adapters/tests/test_check_corpus_consumer_protocol.py +632 -0
- package/vendor/ars/scripts/adapters/tests/test_check_literature_corpus_schema.py +631 -0
- package/vendor/ars/scripts/adapters/tests/test_common.py +365 -0
- package/vendor/ars/scripts/adapters/tests/test_conftest.py +96 -0
- package/vendor/ars/scripts/adapters/tests/test_folder_scan.py +260 -0
- package/vendor/ars/scripts/adapters/tests/test_literature_corpus_entry_schema.py +745 -0
- package/vendor/ars/scripts/adapters/tests/test_obsidian.py +357 -0
- package/vendor/ars/scripts/adapters/tests/test_rejection_log_schema.py +271 -0
- package/vendor/ars/scripts/adapters/tests/test_sync_adapter_docs.py +88 -0
- package/vendor/ars/scripts/adapters/tests/test_zotero.py +454 -0
- package/vendor/ars/scripts/adapters/zotero.py +318 -0
- package/vendor/ars/scripts/adjudication_activity.py +1592 -0
- package/vendor/ars/scripts/announce-ars-loaded.sh +144 -0
- package/vendor/ars/scripts/ars_anchorize_draft.py +170 -0
- package/vendor/ars/scripts/ars_apply_revision_patch.py +912 -0
- package/vendor/ars/scripts/ars_cache_invalidate.py +40 -0
- package/vendor/ars/scripts/ars_mark_read.py +521 -0
- package/vendor/ars/scripts/ars_phase_scope_manifest.json +33 -0
- package/vendor/ars/scripts/ars_update_check.sh +215 -0
- package/vendor/ars/scripts/ars_write_scope_guard.py +506 -0
- package/vendor/ars/scripts/arxiv_client.py +222 -0
- package/vendor/ars/scripts/audit_snapshot.py +572 -0
- package/vendor/ars/scripts/bibliographic_integrity_signals.py +800 -0
- package/vendor/ars/scripts/bootstrap_timeline_yaml.py +146 -0
- package/vendor/ars/scripts/build_claim_standing_candidate_ledger.py +1238 -0
- package/vendor/ars/scripts/build_claim_standing_query_plan.py +643 -0
- package/vendor/ars/scripts/build_content_coverage_advisory.py +1205 -0
- package/vendor/ars/scripts/build_cross_document_consistency_advisory.py +2332 -0
- package/vendor/ars/scripts/build_review_pathway_rule_trace.py +830 -0
- package/vendor/ars/scripts/build_submission_packet_manifest.py +2310 -0
- package/vendor/ars/scripts/check_215_field_norm.py +173 -0
- package/vendor/ars/scripts/check_216_surface_form.py +250 -0
- package/vendor/ars/scripts/check_268_nested_commitment_ledger.py +180 -0
- package/vendor/ars/scripts/check_390_revision_patch_discipline.py +296 -0
- package/vendor/ars/scripts/check_392_citation_verification_intake.py +126 -0
- package/vendor/ars/scripts/check_394_submission_policy.py +178 -0
- package/vendor/ars/scripts/check_439_format_profile.py +307 -0
- package/vendor/ars/scripts/check_619_disclosure_closeout.py +237 -0
- package/vendor/ars/scripts/check_630_codex_subscription_transport.py +456 -0
- package/vendor/ars/scripts/check_669_review_pathway_rule_trace.py +662 -0
- package/vendor/ars/scripts/check_670_revision_roadmap_integration.py +518 -0
- package/vendor/ars/scripts/check_673_adjudication_activity.py +684 -0
- package/vendor/ars/scripts/check_684_review_criteria_binding.py +557 -0
- package/vendor/ars/scripts/check_agents_mirror_sync.py +115 -0
- package/vendor/ars/scripts/check_audit_artifact_consistency.py +2313 -0
- package/vendor/ars/scripts/check_benchmark_report.py +79 -0
- package/vendor/ars/scripts/check_bibliographic_integrity_signals.py +831 -0
- package/vendor/ars/scripts/check_calibration_tiers.py +235 -0
- package/vendor/ars/scripts/check_changelog_covers_merges.py +289 -0
- package/vendor/ars/scripts/check_ci_pytest_manifest.py +204 -0
- package/vendor/ars/scripts/check_claim_audit_consistency.py +1664 -0
- package/vendor/ars/scripts/check_claim_standing_candidate_ledger_integration.py +500 -0
- package/vendor/ars/scripts/check_claim_standing_freshness.py +253 -0
- package/vendor/ars/scripts/check_claim_standing_transmissions.py +449 -0
- package/vendor/ars/scripts/check_collaboration_depth_rubric.py +180 -0
- package/vendor/ars/scripts/check_command_frontmatter_name.py +116 -0
- package/vendor/ars/scripts/check_committee_correspondence.py +333 -0
- package/vendor/ars/scripts/check_compliance_report.py +108 -0
- package/vendor/ars/scripts/check_content_coverage_advisory_integration.py +796 -0
- package/vendor/ars/scripts/check_control_availability.py +172 -0
- package/vendor/ars/scripts/check_corpus_consumer_protocol.py +404 -0
- package/vendor/ars/scripts/check_cross_document_consistency_advisory_integration.py +1191 -0
- package/vendor/ars/scripts/check_cross_model_handoff_contract.py +234 -0
- package/vendor/ars/scripts/check_cross_model_verification_sync.py +261 -0
- package/vendor/ars/scripts/check_data_access_level.py +131 -0
- package/vendor/ars/scripts/check_data_flows.py +252 -0
- package/vendor/ars/scripts/check_decision_contract.py +464 -0
- package/vendor/ars/scripts/check_degradation_registry.py +326 -0
- package/vendor/ars/scripts/check_distribution_surface_claims.py +226 -0
- package/vendor/ars/scripts/check_domain_evidence_profile.py +538 -0
- package/vendor/ars/scripts/check_e4_promotion.py +195 -0
- package/vendor/ars/scripts/check_evals_gold_set.py +279 -0
- package/vendor/ars/scripts/check_evidence_row_integration.py +396 -0
- package/vendor/ars/scripts/check_experiment_provenance.py +117 -0
- package/vendor/ars/scripts/check_field_norm_severity.py +144 -0
- package/vendor/ars/scripts/check_firm_rules_sync.py +375 -0
- package/vendor/ars/scripts/check_heldout_measurement_report.py +1179 -0
- package/vendor/ars/scripts/check_human_subjects_output_contract.py +139 -0
- package/vendor/ars/scripts/check_human_subjects_reference_migration.py +844 -0
- package/vendor/ars/scripts/check_indirect_prompt_injection_no_call.py +328 -0
- package/vendor/ars/scripts/check_instruction_data_boundary.py +236 -0
- package/vendor/ars/scripts/check_judge_prompt_version.py +125 -0
- package/vendor/ars/scripts/check_literature_corpus_schema.py +402 -0
- package/vendor/ars/scripts/check_model_tiering.py +223 -0
- package/vendor/ars/scripts/check_panel_synthesis.py +1331 -0
- package/vendor/ars/scripts/check_passport_reset_contract.py +214 -0
- package/vendor/ars/scripts/check_pattern_eval_manifest.py +422 -0
- package/vendor/ars/scripts/check_persuasion_invariance_fixtures.py +637 -0
- package/vendor/ars/scripts/check_phase_conformance.py +2180 -0
- package/vendor/ars/scripts/check_pipeline_boundary_semantics.py +600 -0
- package/vendor/ars/scripts/check_pipeline_integrity.py +340 -0
- package/vendor/ars/scripts/check_policy_anchor_protocol.py +159 -0
- package/vendor/ars/scripts/check_policy_anchor_table.py +286 -0
- package/vendor/ars/scripts/check_preprint_venues_consistency.py +123 -0
- package/vendor/ars/scripts/check_prisma_trAIce_freshness.py +84 -0
- package/vendor/ars/scripts/check_promotion_bakeoff_preregistration.py +1303 -0
- package/vendor/ars/scripts/check_ranking_lift.py +323 -0
- package/vendor/ars/scripts/check_re_review_synthesis.py +2719 -0
- package/vendor/ars/scripts/check_receipt_enum_sync.py +203 -0
- package/vendor/ars/scripts/check_repro_lock.py +85 -0
- package/vendor/ars/scripts/check_review_pathway_output.py +276 -0
- package/vendor/ars/scripts/check_reviewer_data_fences.py +224 -0
- package/vendor/ars/scripts/check_reviewer_finding_contract.py +783 -0
- package/vendor/ars/scripts/check_reviewer_role_label.py +447 -0
- package/vendor/ars/scripts/check_reviewer_scoring_honesty.py +292 -0
- package/vendor/ars/scripts/check_reviewer_sprint_prompt_sync.py +409 -0
- package/vendor/ars/scripts/check_revision_claim_drift_suite_v2.py +1622 -0
- package/vendor/ars/scripts/check_revision_token_conservation.py +263 -0
- package/vendor/ars/scripts/check_risk_register.py +280 -0
- package/vendor/ars/scripts/check_role_scoped_contract.py +702 -0
- package/vendor/ars/scripts/check_rq_framing_patterns.py +184 -0
- package/vendor/ars/scripts/check_rubric_weight_consistency.py +32 -0
- package/vendor/ars/scripts/check_seeded_defect_fixtures.py +425 -0
- package/vendor/ars/scripts/check_setup_cross_model_parity.py +139 -0
- package/vendor/ars/scripts/check_spec_consistency.py +1249 -0
- package/vendor/ars/scripts/check_sprint_contract.py +371 -0
- package/vendor/ars/scripts/check_stage_capability_matrix.py +784 -0
- package/vendor/ars/scripts/check_submission_packet_manifest_integration.py +358 -0
- package/vendor/ars/scripts/check_surface_form_parity.py +445 -0
- package/vendor/ars/scripts/check_task_type.py +22 -0
- package/vendor/ars/scripts/check_tools_allowlist.py +538 -0
- package/vendor/ars/scripts/check_tortured_phrase_screening_integration.py +1974 -0
- package/vendor/ars/scripts/check_v3_10_134_write_scope.py +286 -0
- package/vendor/ars/scripts/check_v3_10_policy.py +656 -0
- package/vendor/ars/scripts/check_v3_6_6_ab_manifest.py +364 -0
- package/vendor/ars/scripts/check_v3_6_7_pattern_protection.py +1366 -0
- package/vendor/ars/scripts/check_v3_6_8_audit_scope_block.py +464 -0
- package/vendor/ars/scripts/check_v3_6_8_cite_provenance_pipeline.py +231 -0
- package/vendor/ars/scripts/check_v3_6_8_frontmatter_trust_schema.py +248 -0
- package/vendor/ars/scripts/check_v3_6_8_mark_read_commands.py +79 -0
- package/vendor/ars/scripts/check_v3_6_8_pattern_protection.py +941 -0
- package/vendor/ars/scripts/check_v3_7_3_three_layer_citation.py +318 -0
- package/vendor/ars/scripts/check_v3_8_annotation_literal_sync.py +228 -0
- package/vendor/ars/scripts/check_v3_9_0_triangulation.py +366 -0
- package/vendor/ars/scripts/check_v3_9_2_phase_boundary.py +270 -0
- package/vendor/ars/scripts/check_v3_9_4_temporal_verification.py +139 -0
- package/vendor/ars/scripts/check_venue_disclosure_policies.py +63 -0
- package/vendor/ars/scripts/check_version_consistency.py +826 -0
- package/vendor/ars/scripts/check_workflow_classification.py +223 -0
- package/vendor/ars/scripts/chinese_literature_client.py +1938 -0
- package/vendor/ars/scripts/citation_verification_summary.py +85 -0
- package/vendor/ars/scripts/claim_audit_calibration.py +517 -0
- package/vendor/ars/scripts/claim_audit_finalizer.py +456 -0
- package/vendor/ars/scripts/claim_audit_pipeline.py +1594 -0
- package/vendor/ars/scripts/claim_registry_coverage.py +493 -0
- package/vendor/ars/scripts/claim_standing_discovery.py +784 -0
- package/vendor/ars/scripts/claim_standing_stance_runner.py +758 -0
- package/vendor/ars/scripts/claim_standing_stance_scorer.py +239 -0
- package/vendor/ars/scripts/claim_strength_drift_disposition.py +666 -0
- package/vendor/ars/scripts/contamination_signals.py +689 -0
- package/vendor/ars/scripts/corpus_consumer_manifest.json +19 -0
- package/vendor/ars/scripts/cross_model_codex_transport.py +1374 -0
- package/vendor/ars/scripts/cross_model_codex_verify.sh +6 -0
- package/vendor/ars/scripts/cross_model_handoff.py +359 -0
- package/vendor/ars/scripts/cross_model_smoke_test.sh +183 -0
- package/vendor/ars/scripts/cross_model_smoke_test_codex.sh +35 -0
- package/vendor/ars/scripts/cross_model_verification/gemini_is_grounded.jq +45 -0
- package/vendor/ars/scripts/cross_model_verification/gemini_sources.jq +45 -0
- package/vendor/ars/scripts/cross_model_verification/normalize_compat_verdict.py +57 -0
- package/vendor/ars/scripts/cross_model_verification/openai_has_completed_web_search.jq +15 -0
- package/vendor/ars/scripts/cross_model_verification/openai_sources.jq +17 -0
- package/vendor/ars/scripts/cross_model_verification/openai_text.jq +11 -0
- package/vendor/ars/scripts/crossref_client.py +225 -0
- package/vendor/ars/scripts/dispatch_e4_panel.py +2731 -0
- package/vendor/ars/scripts/evidence_rows.py +2043 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/author_stage3.json +32 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/author_stage3_input.json +27 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/author_stage3_prime.json +32 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/author_stage3_prime_input.json +27 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/compliance_override.json +50 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/compliance_override_action.json +14 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/compliance_pass.json +44 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/explicit_user_request_log.json +26 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/mandatory_checkpoint_log.json +116 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/README.md +56 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/negative/a1_pass_with_p1/2026-04-30T15-22-04Z-d8f3.audit_artifact_entry.json +24 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/negative/a1_pass_with_p1/2026-04-30T15-22-04Z-d8f3.jsonl +4 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/negative/a1_pass_with_p1/2026-04-30T15-22-04Z-d8f3.meta.json +43 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/negative/a1_pass_with_p1/2026-04-30T15-22-04Z-d8f3.verdict.yaml +19 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/negative/a7_orphan_completion/2026-04-30T15-22-04Z-d8f3.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/persisted_minor/2026-04-30T15-22-04Z-d8f3.audit_artifact_entry.json +26 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/persisted_minor/2026-04-30T15-22-04Z-d8f3.jsonl +4 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/persisted_minor/2026-04-30T15-22-04Z-d8f3.meta.json +43 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/persisted_minor/2026-04-30T15-22-04Z-d8f3.verdict.yaml +19 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/proposal_pass/2026-04-30T15-22-04Z-d8f3.audit_artifact_entry.json +24 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/proposal_pass/2026-04-30T15-22-04Z-d8f3.jsonl +4 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/proposal_pass/2026-04-30T15-22-04Z-d8f3.meta.json +43 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/proposal_pass/2026-04-30T15-22-04Z-d8f3.verdict.yaml +12 -0
- package/vendor/ars/scripts/fixtures/bibliographic_integrity_signals/retraction.json +46 -0
- package/vendor/ars/scripts/fixtures/bibliographic_integrity_signals/retraction_check_attestation.json +44 -0
- package/vendor/ars/scripts/fixtures/bibliographic_integrity_signals/tortured_phrase.json +44 -0
- package/vendor/ars/scripts/fixtures/bibliographic_integrity_signals/tortured_phrase_v1_2_abstract_missing.json +107 -0
- package/vendor/ars/scripts/fixtures/bibliographic_integrity_signals/tortured_phrase_v1_2_detected.json +124 -0
- package/vendor/ars/scripts/fixtures/check_evals_gold_set/clean/expected_outcomes.json +77 -0
- package/vendor/ars/scripts/fixtures/check_evals_gold_set/clean/manifest.yaml +37 -0
- package/vendor/ars/scripts/fixtures/check_evals_gold_set/clean/tuples/001-valid-doi-test.json +20 -0
- package/vendor/ars/scripts/fixtures/check_evals_gold_set/clean/tuples/002-valid-arxiv-test.json +19 -0
- package/vendor/ars/scripts/fixtures/check_evals_gold_set/clean/tuples/003-fabricated-test.json +20 -0
- package/vendor/ars/scripts/fixtures/claim_audit_calibration/gold_set.json +344 -0
- package/vendor/ars/scripts/fixtures/claim_standing_candidate_ledger/query_plan.json +108 -0
- package/vendor/ars/scripts/fixtures/claim_standing_candidate_ledger/retrieval_input.json +179 -0
- package/vendor/ars/scripts/fixtures/committee_correspondence/16fd83f6aec7/concern_tracker.json +129 -0
- package/vendor/ars/scripts/fixtures/committee_correspondence/16fd83f6aec7/response_skeleton.md +19 -0
- package/vendor/ars/scripts/fixtures/committee_correspondence/16fd83f6aec7/source_letter.txt +9 -0
- package/vendor/ars/scripts/fixtures/content_coverage_advisory/base_draft.json +48 -0
- package/vendor/ars/scripts/fixtures/content_coverage_advisory/base_inventory.json +38 -0
- package/vendor/ars/scripts/fixtures/content_coverage_advisory/packet/consent.txt +1 -0
- package/vendor/ars/scripts/fixtures/content_coverage_advisory/session_sources.json +3 -0
- package/vendor/ars/scripts/fixtures/cross_document_consistency/README.md +6 -0
- package/vendor/ars/scripts/fixtures/cross_document_consistency/accepted_draft.md +35 -0
- package/vendor/ars/scripts/fixtures/cross_document_consistency/cases.json +75 -0
- package/vendor/ars/scripts/fixtures/cross_document_consistency/preregistration.md +5 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/forbidden_event.jsonl +4 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/grounded_verified.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/malformed.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/missing_search.jsonl +2 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/multiple_finals.jsonl +4 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/not_found.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/unbound_source.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/wrong_search_shape.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/evidence_rows/phase_e_inputs.json +114 -0
- package/vendor/ars/scripts/fixtures/evidence_rows/session_sources.json +5 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/cross-border-us-tw-gdpr.json +71 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/gdpr-member-state-unresolved.json +62 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/missing-data-axis.json +45 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/no-profile.json +33 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/tw-gdpr-two-axis.json +74 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/us-gdpr-two-axis.json +74 -0
- package/vendor/ars/scripts/fixtures/review_pathway_rule_trace/lint-near-misses.json +72 -0
- package/vendor/ars/scripts/fixtures/review_pathway_rule_trace/no-profile-request.json +18 -0
- package/vendor/ars/scripts/fixtures/review_pathway_rule_trace/tw-candidates-request.json +63 -0
- package/vendor/ars/scripts/fixtures/review_pathway_rule_trace/us-candidates-request.json +77 -0
- package/vendor/ars/scripts/fixtures/review_target_context/exact-declaration.json +24 -0
- package/vendor/ars/scripts/fixtures/review_target_context/field-general-declaration.json +24 -0
- package/vendor/ars/scripts/fixtures/review_target_context/msr-2027-technical-full-declaration.json +24 -0
- package/vendor/ars/scripts/fixtures/review_target_context/synthetic-registry.json +92 -0
- package/vendor/ars/scripts/fixtures/revision_claim_drift_v2/README.md +21 -0
- package/vendor/ars/scripts/fixtures/revision_claim_drift_v2/subject_context_attested_only.json +55 -0
- package/vendor/ars/scripts/fixtures/revision_claim_drift_v2/subject_context_machine_supported.json +49 -0
- package/vendor/ars/scripts/fixtures/revision_claim_drift_v2/subject_context_not_isolated.json +56 -0
- package/vendor/ars/scripts/fixtures/revision_claim_drift_v2/subject_context_unknown.json +49 -0
- package/vendor/ars/scripts/fixtures/submission_package/clean/paper.md +16 -0
- package/vendor/ars/scripts/fixtures/submission_package/clean/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_package/fallback_authoryear/paper.md +11 -0
- package/vendor/ars/scripts/fixtures/submission_package/fallback_authoryear/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_package/fallback_latex/paper.tex +9 -0
- package/vendor/ars/scripts/fixtures/submission_package/fallback_latex/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_package/marker_no_join/paper.md +7 -0
- package/vendor/ars/scripts/fixtures/submission_package/orphan_intext/paper.md +8 -0
- package/vendor/ars/scripts/fixtures/submission_package/orphan_intext/references.bib +6 -0
- package/vendor/ars/scripts/fixtures/submission_package/passports/corpus_only.yaml +9 -0
- package/vendor/ars/scripts/fixtures/submission_package/passports/summary_join.yaml +16 -0
- package/vendor/ars/scripts/fixtures/submission_package/profiles/full.yaml +15 -0
- package/vendor/ars/scripts/fixtures/submission_package/profiles/tight.yaml +15 -0
- package/vendor/ars/scripts/fixtures/submission_package/summary_join/paper.md +7 -0
- package/vendor/ars/scripts/fixtures/submission_package/uncited_reference/paper.md +9 -0
- package/vendor/ars/scripts/fixtures/submission_package/uncited_reference/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_package/venue_clean/paper.md +26 -0
- package/vendor/ars/scripts/fixtures/submission_package/venue_clean/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_package/venue_violations/paper.md +20 -0
- package/vendor/ars/scripts/fixtures/submission_package/venue_violations/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_packet_manifest/base_inventory.json +101 -0
- package/vendor/ars/scripts/fixtures/submission_packet_manifest/packet/consent-materials.txt +3 -0
- package/vendor/ars/scripts/fixtures/submission_packet_manifest/packet/training-certificate.txt +2 -0
- package/vendor/ars/scripts/fixtures/submission_packet_manifest/packet/tw-consent-materials.txt +3 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/corpus_input.yaml +30 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/own_draft.md +36 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/own_draft.tex +21 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/seed_expectations.json +218 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/snapshot.json +164 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/snapshot_manifest.json +29 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/README.md +55 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/arxiv/empty_feed.xml +10 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/arxiv/error_5xx.html +7 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/arxiv/id_hit.xml +26 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/README.md +69 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/cnki_landing_page.html +13 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/error_5xx.html +2 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esearch_coordinate_ambiguous.json +16 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esearch_coordinate_hit.json +16 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esearch_coordinate_zero.json +14 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esearch_coverage_hit.json +15 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esearch_coverage_zero.json +13 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esummary_hit.json +43 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esummary_issn_mismatch.json +31 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esummary_no_doi.json +31 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esummary_unknown_ra.json +34 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esummary_year_mismatch.json +31 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/handle_absent.json +4 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/handle_exists.json +16 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/handle_internal_error.json +4 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/istic_csl_hit.json +25 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/istic_csl_other_title.json +18 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/ra_cnki.json +6 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/ra_crossref.json +6 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/ra_istic.json +6 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/ra_unknown_prefix.json +6 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/crossref/doi_hit.json +24 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/crossref/error_5xx.html +7 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/crossref/title_search_miss.json +15 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/openalex/doi_hit.json +29 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/openalex/error_5xx.json +4 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/openalex/title_search_miss.json +11 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/semantic_scholar/doi_hit.json +14 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/semantic_scholar/error_5xx.json +3 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/semantic_scholar/title_search_miss.json +5 -0
- package/vendor/ars/scripts/human_read_attestation_resolver.py +467 -0
- package/vendor/ars/scripts/ideation_diversity_assignment_gate.py +430 -0
- package/vendor/ars/scripts/inquiry_branch_ledger.py +2540 -0
- package/vendor/ars/scripts/legacy/ars_apply_revision_patch_v1_0.py +715 -0
- package/vendor/ars/scripts/legacy/check_re_review_synthesis_v1_0.py +2215 -0
- package/vendor/ars/scripts/migrate_literature_corpus_to_v3_10.py +223 -0
- package/vendor/ars/scripts/migrate_literature_corpus_to_v3_7_3.py +277 -0
- package/vendor/ars/scripts/migrate_literature_corpus_to_v3_9_0.py +304 -0
- package/vendor/ars/scripts/model_tiering_manifest.json +46 -0
- package/vendor/ars/scripts/openalex_client.py +232 -0
- package/vendor/ars/scripts/parse_audit_verdict.py +802 -0
- package/vendor/ars/scripts/pdf_content_classifier_worker.py +176 -0
- package/vendor/ars/scripts/pdf_read_preflight.py +1455 -0
- package/vendor/ars/scripts/policy_anchor_disclosure_referee.py +354 -0
- package/vendor/ars/scripts/recompute_receipts.py +1414 -0
- package/vendor/ars/scripts/render_claim_standing_view.py +374 -0
- package/vendor/ars/scripts/render_eval_comment.py +130 -0
- package/vendor/ars/scripts/render_harness_retirement_issue.py +167 -0
- package/vendor/ars/scripts/repro_lock_validation.py +90 -0
- package/vendor/ars/scripts/research_workflow_profile.py +1079 -0
- package/vendor/ars/scripts/resolve_human_subjects_authority.py +1158 -0
- package/vendor/ars/scripts/resolve_review_target_context.py +683 -0
- package/vendor/ars/scripts/resume_e4_record.py +509 -0
- package/vendor/ars/scripts/retraction_status.py +484 -0
- package/vendor/ars/scripts/review_criteria_binding.py +889 -0
- package/vendor/ars/scripts/review_panel_provenance.py +744 -0
- package/vendor/ars/scripts/revision_roadmap.py +1967 -0
- package/vendor/ars/scripts/run_ci_pytest_manifest.py +116 -0
- package/vendor/ars/scripts/run_codex_audit.sh +1191 -0
- package/vendor/ars/scripts/run_evals.py +513 -0
- package/vendor/ars/scripts/run_ideation_diversity_no_call.py +3505 -0
- package/vendor/ars/scripts/run_indirect_prompt_injection_no_call.py +3330 -0
- package/vendor/ars/scripts/run_indirect_prompt_injection_probe.py +399 -0
- package/vendor/ars/scripts/run_review_criteria_constructive_value.py +1895 -0
- package/vendor/ars/scripts/run_role_topology_utility_dry_run.py +606 -0
- package/vendor/ars/scripts/score_review_criteria_constructive_value.py +617 -0
- package/vendor/ars/scripts/semantic_scholar_client.py +291 -0
- package/vendor/ars/scripts/slr_lineage.py +59 -0
- package/vendor/ars/scripts/sync_adapter_docs.py +118 -0
- package/vendor/ars/scripts/temporal_integrity_audit.py +840 -0
- package/vendor/ars/scripts/test_431_exact_or_bust.py +253 -0
- package/vendor/ars/scripts/test__eval_threshold_gate.py +125 -0
- package/vendor/ars/scripts/test__markdown_lint_util.py +129 -0
- package/vendor/ars/scripts/test__next_verified_at_ms.py +256 -0
- package/vendor/ars/scripts/test_adjacent_framing_probe_lint.py +171 -0
- package/vendor/ars/scripts/test_adjudication_activity.py +1515 -0
- package/vendor/ars/scripts/test_ars_anchorize_draft.py +178 -0
- package/vendor/ars/scripts/test_ars_apply_revision_patch.py +1335 -0
- package/vendor/ars/scripts/test_ars_cache_invalidate.py +51 -0
- package/vendor/ars/scripts/test_ars_mark_read.py +910 -0
- package/vendor/ars/scripts/test_ars_update_check.py +816 -0
- package/vendor/ars/scripts/test_ars_write_scope_guard.py +790 -0
- package/vendor/ars/scripts/test_arxiv_client.py +374 -0
- package/vendor/ars/scripts/test_audit_schemas.py +560 -0
- package/vendor/ars/scripts/test_audit_snapshot_render_section_0.py +105 -0
- package/vendor/ars/scripts/test_block_parser.py +259 -0
- package/vendor/ars/scripts/test_bootstrap_timeline_yaml.py +148 -0
- package/vendor/ars/scripts/test_build_claim_standing_candidate_ledger.py +1203 -0
- package/vendor/ars/scripts/test_build_claim_standing_query_plan.py +791 -0
- package/vendor/ars/scripts/test_build_submission_packet_manifest.py +2644 -0
- package/vendor/ars/scripts/test_check_215_field_norm.py +238 -0
- package/vendor/ars/scripts/test_check_216_surface_form.py +341 -0
- package/vendor/ars/scripts/test_check_268_nested_commitment_ledger.py +194 -0
- package/vendor/ars/scripts/test_check_390_revision_patch_discipline.py +279 -0
- package/vendor/ars/scripts/test_check_392_citation_verification_intake.py +144 -0
- package/vendor/ars/scripts/test_check_394_submission_policy.py +200 -0
- package/vendor/ars/scripts/test_check_439_format_profile.py +252 -0
- package/vendor/ars/scripts/test_check_619_disclosure_closeout.py +158 -0
- package/vendor/ars/scripts/test_check_630_codex_subscription_transport.py +245 -0
- package/vendor/ars/scripts/test_check_669_review_pathway_rule_trace.py +304 -0
- package/vendor/ars/scripts/test_check_670_revision_roadmap_integration.py +260 -0
- package/vendor/ars/scripts/test_check_673_adjudication_activity.py +367 -0
- package/vendor/ars/scripts/test_check_684_review_criteria_binding.py +274 -0
- package/vendor/ars/scripts/test_check_agents_mirror_sync.py +137 -0
- package/vendor/ars/scripts/test_check_audit_artifact_consistency.py +2133 -0
- package/vendor/ars/scripts/test_check_benchmark_report.py +117 -0
- package/vendor/ars/scripts/test_check_bibliographic_integrity_signals.py +609 -0
- package/vendor/ars/scripts/test_check_calibration_tiers.py +376 -0
- package/vendor/ars/scripts/test_check_changelog_covers_merges.py +509 -0
- package/vendor/ars/scripts/test_check_ci_pytest_manifest.py +425 -0
- package/vendor/ars/scripts/test_check_claim_standing_candidate_ledger_integration.py +256 -0
- package/vendor/ars/scripts/test_check_claim_standing_freshness.py +277 -0
- package/vendor/ars/scripts/test_check_collaboration_depth_rubric.py +239 -0
- package/vendor/ars/scripts/test_check_command_frontmatter_name.py +178 -0
- package/vendor/ars/scripts/test_check_committee_correspondence.py +298 -0
- package/vendor/ars/scripts/test_check_compliance_report.py +381 -0
- package/vendor/ars/scripts/test_check_content_coverage_advisory_integration.py +308 -0
- package/vendor/ars/scripts/test_check_control_availability.py +361 -0
- package/vendor/ars/scripts/test_check_cross_document_consistency_advisory_integration.py +698 -0
- package/vendor/ars/scripts/test_check_cross_model_handoff_contract.py +301 -0
- package/vendor/ars/scripts/test_check_cross_model_verification_sync.py +203 -0
- package/vendor/ars/scripts/test_check_data_access_level.py +227 -0
- package/vendor/ars/scripts/test_check_data_flows.py +382 -0
- package/vendor/ars/scripts/test_check_decision_contract.py +387 -0
- package/vendor/ars/scripts/test_check_degradation_registry.py +270 -0
- package/vendor/ars/scripts/test_check_distribution_surface_claims.py +225 -0
- package/vendor/ars/scripts/test_check_domain_evidence_profile.py +439 -0
- package/vendor/ars/scripts/test_check_e4_promotion.py +163 -0
- package/vendor/ars/scripts/test_check_evals_gold_set.py +312 -0
- package/vendor/ars/scripts/test_check_evidence_row_integration.py +187 -0
- package/vendor/ars/scripts/test_check_field_norm_severity.py +173 -0
- package/vendor/ars/scripts/test_check_firm_rules_sync.py +342 -0
- package/vendor/ars/scripts/test_check_heldout_measurement_report.py +1508 -0
- package/vendor/ars/scripts/test_check_human_subjects_output_contract.py +129 -0
- package/vendor/ars/scripts/test_check_human_subjects_reference_migration.py +756 -0
- package/vendor/ars/scripts/test_check_instruction_data_boundary.py +204 -0
- package/vendor/ars/scripts/test_check_judge_prompt_version.py +90 -0
- package/vendor/ars/scripts/test_check_model_tiering.py +236 -0
- package/vendor/ars/scripts/test_check_panel_synthesis.py +1658 -0
- package/vendor/ars/scripts/test_check_passport_reset_contract.py +249 -0
- package/vendor/ars/scripts/test_check_pattern_eval_manifest.py +381 -0
- package/vendor/ars/scripts/test_check_persuasion_invariance_fixtures.py +591 -0
- package/vendor/ars/scripts/test_check_phase_conformance.py +4366 -0
- package/vendor/ars/scripts/test_check_pipeline_boundary_semantics.py +931 -0
- package/vendor/ars/scripts/test_check_pipeline_integrity.py +243 -0
- package/vendor/ars/scripts/test_check_policy_anchor_protocol.py +236 -0
- package/vendor/ars/scripts/test_check_policy_anchor_table.py +295 -0
- package/vendor/ars/scripts/test_check_prisma_trAIce_freshness.py +68 -0
- package/vendor/ars/scripts/test_check_promotion_bakeoff_preregistration.py +799 -0
- package/vendor/ars/scripts/test_check_ranking_lift.py +377 -0
- package/vendor/ars/scripts/test_check_re_review_synthesis.py +3398 -0
- package/vendor/ars/scripts/test_check_receipt_enum_sync.py +176 -0
- package/vendor/ars/scripts/test_check_repro_lock.py +107 -0
- package/vendor/ars/scripts/test_check_reviewer_data_fences.py +334 -0
- package/vendor/ars/scripts/test_check_reviewer_finding_contract.py +1107 -0
- package/vendor/ars/scripts/test_check_reviewer_role_label.py +491 -0
- package/vendor/ars/scripts/test_check_reviewer_scoring_honesty.py +222 -0
- package/vendor/ars/scripts/test_check_reviewer_sprint_prompt_sync.py +373 -0
- package/vendor/ars/scripts/test_check_revision_claim_drift_suite_v2.py +1925 -0
- package/vendor/ars/scripts/test_check_revision_token_conservation.py +398 -0
- package/vendor/ars/scripts/test_check_risk_register.py +336 -0
- package/vendor/ars/scripts/test_check_role_scoped_contract.py +1104 -0
- package/vendor/ars/scripts/test_check_rq_framing_patterns.py +110 -0
- package/vendor/ars/scripts/test_check_rubric_weight_consistency.py +32 -0
- package/vendor/ars/scripts/test_check_seeded_defect_fixtures.py +392 -0
- package/vendor/ars/scripts/test_check_setup_cross_model_parity.py +121 -0
- package/vendor/ars/scripts/test_check_spec_consistency.py +1081 -0
- package/vendor/ars/scripts/test_check_sprint_contract.py +458 -0
- package/vendor/ars/scripts/test_check_stage_capability_matrix.py +698 -0
- package/vendor/ars/scripts/test_check_submission_packet_manifest_integration.py +177 -0
- package/vendor/ars/scripts/test_check_surface_form_parity.py +417 -0
- package/vendor/ars/scripts/test_check_task_type.py +116 -0
- package/vendor/ars/scripts/test_check_tools_allowlist.py +835 -0
- package/vendor/ars/scripts/test_check_tortured_phrase_screening_integration.py +1306 -0
- package/vendor/ars/scripts/test_check_v3_10_134_write_scope.py +251 -0
- package/vendor/ars/scripts/test_check_v3_10_policy.py +547 -0
- package/vendor/ars/scripts/test_check_v3_6_7_pattern_protection.py +960 -0
- package/vendor/ars/scripts/test_check_v3_6_8_audit_scope_block.py +1000 -0
- package/vendor/ars/scripts/test_check_v3_6_8_cite_provenance_pipeline.py +454 -0
- package/vendor/ars/scripts/test_check_v3_6_8_frontmatter_trust_schema.py +581 -0
- package/vendor/ars/scripts/test_check_v3_6_8_mark_read_commands.py +120 -0
- package/vendor/ars/scripts/test_check_v3_6_8_pattern_protection.py +1138 -0
- package/vendor/ars/scripts/test_check_v3_7_3_three_layer_citation.py +566 -0
- package/vendor/ars/scripts/test_check_v3_8_annotation_literal_sync.py +262 -0
- package/vendor/ars/scripts/test_check_v3_9_0_triangulation.py +321 -0
- package/vendor/ars/scripts/test_check_v3_9_2_phase_boundary.py +190 -0
- package/vendor/ars/scripts/test_check_v3_9_4_temporal_verification.py +471 -0
- package/vendor/ars/scripts/test_check_version_consistency.py +1462 -0
- package/vendor/ars/scripts/test_check_workflow_classification.py +225 -0
- package/vendor/ars/scripts/test_chinese_literature_client.py +1889 -0
- package/vendor/ars/scripts/test_citation_existence_policy.py +480 -0
- package/vendor/ars/scripts/test_citation_verification_summary.py +342 -0
- package/vendor/ars/scripts/test_claim_audit_calibration.py +882 -0
- package/vendor/ars/scripts/test_claim_audit_finalizer.py +979 -0
- package/vendor/ars/scripts/test_claim_audit_pipeline.py +2398 -0
- package/vendor/ars/scripts/test_claim_audit_schema.py +1778 -0
- package/vendor/ars/scripts/test_claim_intent_manifest.py +666 -0
- package/vendor/ars/scripts/test_claim_registry_coverage.py +246 -0
- package/vendor/ars/scripts/test_claim_standing_discovery.py +579 -0
- package/vendor/ars/scripts/test_claim_standing_pipeline_wiring.py +290 -0
- package/vendor/ars/scripts/test_claim_standing_stance_assets.py +399 -0
- package/vendor/ars/scripts/test_claim_standing_stance_contracts.py +383 -0
- package/vendor/ars/scripts/test_claim_standing_stance_runner.py +349 -0
- package/vendor/ars/scripts/test_claim_standing_transmissions.py +605 -0
- package/vendor/ars/scripts/test_claim_strength_drift_disposition.py +517 -0
- package/vendor/ars/scripts/test_claim_verification_coverage_contract.py +104 -0
- package/vendor/ars/scripts/test_contamination_signals.py +1086 -0
- package/vendor/ars/scripts/test_content_coverage_advisory.py +1767 -0
- package/vendor/ars/scripts/test_cross_document_consistency_advisory.py +1270 -0
- package/vendor/ars/scripts/test_cross_model_codex_transport.py +1152 -0
- package/vendor/ars/scripts/test_cross_model_handoff.py +571 -0
- package/vendor/ars/scripts/test_cross_model_verification_guards.py +792 -0
- package/vendor/ars/scripts/test_crossref_client.py +393 -0
- package/vendor/ars/scripts/test_dispatch_e4_panel.py +4235 -0
- package/vendor/ars/scripts/test_e2e_claim_audit.py +540 -0
- package/vendor/ars/scripts/test_eval_harness_workflow.py +140 -0
- package/vendor/ars/scripts/test_evals_citation_extraction.py +150 -0
- package/vendor/ars/scripts/test_evals_lift_report_schema.py +108 -0
- package/vendor/ars/scripts/test_evidence_rows.py +2593 -0
- package/vendor/ars/scripts/test_experiment_provenance.py +915 -0
- package/vendor/ars/scripts/test_human_read_attestation_resolver.py +477 -0
- package/vendor/ars/scripts/test_ideation_diversity_assignment_gate.py +615 -0
- package/vendor/ars/scripts/test_indirect_prompt_injection_behavior_probe.py +250 -0
- package/vendor/ars/scripts/test_inquiry_branch_ledger.py +2296 -0
- package/vendor/ars/scripts/test_migrate_literature_corpus_to_v3_10.py +248 -0
- package/vendor/ars/scripts/test_migrate_literature_corpus_to_v3_7_3.py +545 -0
- package/vendor/ars/scripts/test_migrate_literature_corpus_to_v3_9_0.py +497 -0
- package/vendor/ars/scripts/test_normalize_compat_verdict.py +149 -0
- package/vendor/ars/scripts/test_openalex_client.py +490 -0
- package/vendor/ars/scripts/test_passport_yaml.py +104 -0
- package/vendor/ars/scripts/test_pattern_eval_runtime.py +1295 -0
- package/vendor/ars/scripts/test_pdf_read_preflight.py +1943 -0
- package/vendor/ars/scripts/test_policy_anchor_disclosure.py +666 -0
- package/vendor/ars/scripts/test_reading_probe_lint.py +218 -0
- package/vendor/ars/scripts/test_recompute_receipts.py +778 -0
- package/vendor/ars/scripts/test_render_claim_standing_view.py +192 -0
- package/vendor/ars/scripts/test_render_eval_comment.py +162 -0
- package/vendor/ars/scripts/test_render_harness_retirement_issue.py +110 -0
- package/vendor/ars/scripts/test_repro_lock_validation_drift.py +100 -0
- package/vendor/ars/scripts/test_research_workflow_profile.py +734 -0
- package/vendor/ars/scripts/test_resolve_human_subjects_authority.py +1219 -0
- package/vendor/ars/scripts/test_resolve_review_target_context.py +703 -0
- package/vendor/ars/scripts/test_resume_e4_record.py +315 -0
- package/vendor/ars/scripts/test_retraction_status.py +456 -0
- package/vendor/ars/scripts/test_review_criteria_binding.py +629 -0
- package/vendor/ars/scripts/test_review_panel_provenance.py +565 -0
- package/vendor/ars/scripts/test_review_pathway_rule_trace.py +821 -0
- package/vendor/ars/scripts/test_revision_roadmap.py +1255 -0
- package/vendor/ars/scripts/test_run_ci_pytest_manifest.py +186 -0
- package/vendor/ars/scripts/test_run_codex_audit_e2e.py +369 -0
- package/vendor/ars/scripts/test_run_evals.py +430 -0
- package/vendor/ars/scripts/test_run_guard_launcher.py +500 -0
- package/vendor/ars/scripts/test_run_ideation_diversity_no_call.py +1833 -0
- package/vendor/ars/scripts/test_run_indirect_prompt_injection_no_call.py +1889 -0
- package/vendor/ars/scripts/test_run_review_criteria_constructive_value.py +586 -0
- package/vendor/ars/scripts/test_run_role_topology_utility_dry_run.py +428 -0
- package/vendor/ars/scripts/test_score_review_criteria_constructive_value.py +340 -0
- package/vendor/ars/scripts/test_semantic_scholar_client.py +554 -0
- package/vendor/ars/scripts/test_slr_lineage_emission.py +230 -0
- package/vendor/ars/scripts/test_socratic_rq_non_generation_contract.py +173 -0
- package/vendor/ars/scripts/test_temporal_integrity_audit.py +438 -0
- package/vendor/ars/scripts/test_text_similarity.py +95 -0
- package/vendor/ars/scripts/test_title_fuzzy_false_positive.py +111 -0
- package/vendor/ars/scripts/test_tortured_phrase_screening.py +2959 -0
- package/vendor/ars/scripts/test_transport_fixture_citation_gate.py +338 -0
- package/vendor/ars/scripts/test_uncited_assertion.py +558 -0
- package/vendor/ars/scripts/test_v3_6_7_phase_6_6.py +1279 -0
- package/vendor/ars/scripts/test_validate_compliance_fixtures.py +36 -0
- package/vendor/ars/scripts/test_validate_ideation_diversity_assets.py +230 -0
- package/vendor/ars/scripts/test_venue_disclosure_contract.py +755 -0
- package/vendor/ars/scripts/test_verification_cache.py +280 -0
- package/vendor/ars/scripts/test_verification_gate.py +461 -0
- package/vendor/ars/scripts/test_verify_passport_cli.py +123 -0
- package/vendor/ars/scripts/test_verify_submission_package.py +1407 -0
- package/vendor/ars/scripts/test_version_records_schema.py +211 -0
- package/vendor/ars/scripts/tortured_phrase_screening.py +3502 -0
- package/vendor/ars/scripts/uncited_assertion_detector.py +254 -0
- package/vendor/ars/scripts/v3_6_7_inversion_manifest.json +9 -0
- package/vendor/ars/scripts/v3_6_8_inversion_manifest.json +10 -0
- package/vendor/ars/scripts/validate_claim_standing_stance_assets.py +249 -0
- package/vendor/ars/scripts/validate_compliance_fixtures.py +56 -0
- package/vendor/ars/scripts/validate_ideation_diversity_assets.py +303 -0
- package/vendor/ars/scripts/venue_disclosure_contract_harness.py +837 -0
- package/vendor/ars/scripts/verification_cache.py +276 -0
- package/vendor/ars/scripts/verification_gate/__init__.py +345 -0
- package/vendor/ars/scripts/verify_passport.py +133 -0
- package/vendor/ars/scripts/verify_submission_package.py +1657 -0
- package/vendor/ars/shared/agents/compliance_agent.md +136 -0
- package/vendor/ars/shared/artifact_reproducibility_pattern.md +173 -0
- package/vendor/ars/shared/benchmark_report.schema.json +81 -0
- package/vendor/ars/shared/benchmark_report_pattern.md +180 -0
- package/vendor/ars/shared/bibliographic_integrity_signals.md +142 -0
- package/vendor/ars/shared/collaboration_depth_rubric.md +154 -0
- package/vendor/ars/shared/compliance_checkpoint_protocol.md +162 -0
- package/vendor/ars/shared/compliance_report.schema.json +187 -0
- package/vendor/ars/shared/contracts/README.md +938 -0
- package/vendor/ars/shared/contracts/activity/adjudication_activity_input.schema.json +555 -0
- package/vendor/ars/shared/contracts/activity/adjudication_activity_store.schema.json +560 -0
- package/vendor/ars/shared/contracts/audit/audit_jsonl.schema.json +128 -0
- package/vendor/ars/shared/contracts/audit/audit_sidecar.schema.json +169 -0
- package/vendor/ars/shared/contracts/audit/audit_verdict.schema.json +133 -0
- package/vendor/ars/shared/contracts/audit/cross_document_consistency_advisory.schema.json +480 -0
- package/vendor/ars/shared/contracts/audit/cross_document_consistency_advisory_draft.schema.json +564 -0
- package/vendor/ars/shared/contracts/audit/cross_document_source_manifest.schema.json +202 -0
- package/vendor/ars/shared/contracts/audit/tortured_phrase_advisory.schema.json +1362 -0
- package/vendor/ars/shared/contracts/audit/tortured_phrase_snapshot.schema.json +208 -0
- package/vendor/ars/shared/contracts/audit/tortured_phrase_snapshot_manifest.schema.json +335 -0
- package/vendor/ars/shared/contracts/capability/stage_capability_matrix.json +434 -0
- package/vendor/ars/shared/contracts/claim_standing/candidate_ledger.schema.json +705 -0
- package/vendor/ars/shared/contracts/claim_standing/query_plan.schema.json +389 -0
- package/vendor/ars/shared/contracts/claim_standing/query_plan_v1_1.schema.json +782 -0
- package/vendor/ars/shared/contracts/claim_standing/retrieval_input.schema.json +440 -0
- package/vendor/ars/shared/contracts/claim_standing/stance_record.schema.json +460 -0
- package/vendor/ars/shared/contracts/claim_standing/transmission_ledger.schema.json +282 -0
- package/vendor/ars/shared/contracts/cross_model/codex_citation_receipt.schema.json +157 -0
- package/vendor/ars/shared/contracts/cross_model/codex_citation_request.schema.json +23 -0
- package/vendor/ars/shared/contracts/cross_model/promotion_bakeoff_sealed_commitment.schema.json +55 -0
- package/vendor/ars/shared/contracts/cross_model/promotion_bakeoff_sealed_reveal.schema.json +50 -0
- package/vendor/ars/shared/contracts/degradation_registry.json +428 -0
- package/vendor/ars/shared/contracts/evaluator/full.json +126 -0
- package/vendor/ars/shared/contracts/evidence/claim_registry.schema.json +50 -0
- package/vendor/ars/shared/contracts/evidence/claim_registry_coverage_report.schema.json +79 -0
- package/vendor/ars/shared/contracts/evidence/evidence_row.schema.json +504 -0
- package/vendor/ars/shared/contracts/evidence/evidence_row_v1_1.schema.json +364 -0
- package/vendor/ars/shared/contracts/evidence/evidence_row_v1_2.schema.json +714 -0
- package/vendor/ars/shared/contracts/evidence/evidence_row_v1_3.schema.json +524 -0
- package/vendor/ars/shared/contracts/human_subjects/authority_profile_registry.schema.json +497 -0
- package/vendor/ars/shared/contracts/human_subjects/committee_correspondence.schema.json +253 -0
- package/vendor/ars/shared/contracts/human_subjects/content_coverage_advisory.schema.json +620 -0
- package/vendor/ars/shared/contracts/human_subjects/irb_context_record.schema.json +329 -0
- package/vendor/ars/shared/contracts/human_subjects/resolved_authority_context.schema.json +347 -0
- package/vendor/ars/shared/contracts/human_subjects/review_pathway_rule_trace.schema.json +265 -0
- package/vendor/ars/shared/contracts/human_subjects/review_pathway_trace_request.schema.json +127 -0
- package/vendor/ars/shared/contracts/human_subjects/submission_packet_inventory.schema.json +240 -0
- package/vendor/ars/shared/contracts/human_subjects/submission_packet_manifest.schema.json +999 -0
- package/vendor/ars/shared/contracts/passport/audit_artifact_entry.schema.json +266 -0
- package/vendor/ars/shared/contracts/passport/bibliographic_integrity_signal.schema.json +1676 -0
- package/vendor/ars/shared/contracts/passport/citation_provenance.schema.json +107 -0
- package/vendor/ars/shared/contracts/passport/citation_verification_summary.schema.json +164 -0
- package/vendor/ars/shared/contracts/passport/claim_audit_result.schema.json +124 -0
- package/vendor/ars/shared/contracts/passport/claim_drift.schema.json +58 -0
- package/vendor/ars/shared/contracts/passport/claim_intent_manifest.schema.json +107 -0
- package/vendor/ars/shared/contracts/passport/constraint_violation.schema.json +65 -0
- package/vendor/ars/shared/contracts/passport/experiment_alignment_result.schema.json +69 -0
- package/vendor/ars/shared/contracts/passport/experiment_provenance_entry.schema.json +169 -0
- package/vendor/ars/shared/contracts/passport/human_read_log.schema.json +86 -0
- package/vendor/ars/shared/contracts/passport/inquiry_ledger_ref.schema.json +22 -0
- package/vendor/ars/shared/contracts/passport/literature_corpus_entry.schema.json +650 -0
- package/vendor/ars/shared/contracts/passport/preregistration_artifact.schema.json +132 -0
- package/vendor/ars/shared/contracts/passport/rejection_log.schema.json +89 -0
- package/vendor/ars/shared/contracts/passport/reset_ledger_entry.schema.json +158 -0
- package/vendor/ars/shared/contracts/passport/temporal_audit_results.schema.json +208 -0
- package/vendor/ars/shared/contracts/passport/terminal_policies.schema.json +50 -0
- package/vendor/ars/shared/contracts/passport/timeline.schema.json +102 -0
- package/vendor/ars/shared/contracts/passport/uncited_assertion.schema.json +56 -0
- package/vendor/ars/shared/contracts/passport/uncited_audit_failure.schema.json +72 -0
- package/vendor/ars/shared/contracts/passport/user_attested_read_resolution.schema.json +87 -0
- package/vendor/ars/shared/contracts/passport/version_records.schema.json +138 -0
- package/vendor/ars/shared/contracts/patch/block_manifest.schema.json +45 -0
- package/vendor/ars/shared/contracts/patch/legacy/v1_0/revision_patch.schema.json +110 -0
- package/vendor/ars/shared/contracts/patch/revision_patch.schema.json +250 -0
- package/vendor/ars/shared/contracts/pdf/pdf_content_classifier_diagnostic.schema.json +39 -0
- package/vendor/ars/shared/contracts/pdf/pdf_content_classifier_worker.schema.json +88 -0
- package/vendor/ars/shared/contracts/pdf/pdf_read_preflight.schema.json +227 -0
- package/vendor/ars/shared/contracts/re_review/input_manifest.schema.json +161 -0
- package/vendor/ars/shared/contracts/re_review/legacy/v1_0/input_manifest.schema.json +134 -0
- package/vendor/ars/shared/contracts/re_review/legacy/v1_0/precommitment.schema.json +193 -0
- package/vendor/ars/shared/contracts/re_review/legacy/v1_0/traceability.schema.json +841 -0
- package/vendor/ars/shared/contracts/re_review/legacy/v1_0/verdict_record.schema.json +244 -0
- package/vendor/ars/shared/contracts/re_review/precommitment.schema.json +193 -0
- package/vendor/ars/shared/contracts/re_review/traceability.schema.json +916 -0
- package/vendor/ars/shared/contracts/re_review/verdict_record.schema.json +245 -0
- package/vendor/ars/shared/contracts/research_workflow/inquiry_branch_ledger.schema.json +449 -0
- package/vendor/ars/shared/contracts/research_workflow/research_workflow_profile.schema.json +222 -0
- package/vendor/ars/shared/contracts/research_workflow/research_workflow_profile_selection_receipt.schema.json +111 -0
- package/vendor/ars/shared/contracts/review_target/constructive_review_findings.schema.json +172 -0
- package/vendor/ars/shared/contracts/review_target/criteria_registry.schema.json +97 -0
- package/vendor/ars/shared/contracts/review_target/review_criteria_binding_manifest.schema.json +235 -0
- package/vendor/ars/shared/contracts/review_target/review_criteria_source_receipt.schema.json +158 -0
- package/vendor/ars/shared/contracts/review_target/review_target_context.schema.json +106 -0
- package/vendor/ars/shared/contracts/review_target/review_target_declaration.schema.json +118 -0
- package/vendor/ars/shared/contracts/reviewer/full.json +114 -0
- package/vendor/ars/shared/contracts/reviewer/methodology_focus.json +75 -0
- package/vendor/ars/shared/contracts/reviewer/review_panel_provenance.schema.json +263 -0
- package/vendor/ars/shared/contracts/reviewer/review_panel_provenance_carrier.schema.json +122 -0
- package/vendor/ars/shared/contracts/reviewer/review_panel_provenance_input.schema.json +120 -0
- package/vendor/ars/shared/contracts/revision/author_adjudication.schema.json +251 -0
- package/vendor/ars/shared/contracts/revision/author_adjudication_input.schema.json +25 -0
- package/vendor/ars/shared/contracts/revision/claim_strength_drift_disposition.schema.json +97 -0
- package/vendor/ars/shared/contracts/revision/claim_strength_drift_disposition_input.schema.json +80 -0
- package/vendor/ars/shared/contracts/revision/claim_strength_drift_findings.schema.json +139 -0
- package/vendor/ars/shared/contracts/revision/claim_surface_manifest.schema.json +99 -0
- package/vendor/ars/shared/contracts/revision/integrity_correction_authorization.schema.json +140 -0
- package/vendor/ars/shared/contracts/revision/integrity_correction_authorization_input.schema.json +28 -0
- package/vendor/ars/shared/contracts/revision/integrity_correction_list.schema.json +48 -0
- package/vendor/ars/shared/contracts/revision/integrity_pass_receipt.schema.json +16 -0
- package/vendor/ars/shared/contracts/revision/revision_evidence_bundle.schema.json +134 -0
- package/vendor/ars/shared/contracts/revision/revision_roadmap.schema.json +334 -0
- package/vendor/ars/shared/contracts/submission/format_profile.example.yaml +33 -0
- package/vendor/ars/shared/contracts/submission/format_profile.schema.json +102 -0
- package/vendor/ars/shared/contracts/submission/submission_verification_report.schema.json +233 -0
- package/vendor/ars/shared/contracts/submission/venue_profile.schema.json +114 -0
- package/vendor/ars/shared/contracts/writer/full.json +87 -0
- package/vendor/ars/shared/cross_model_verification.md +714 -0
- package/vendor/ars/shared/evals_lift_report.schema.json +141 -0
- package/vendor/ars/shared/ground_truth_isolation_pattern.md +275 -0
- package/vendor/ars/shared/handoff_schemas.md +1209 -0
- package/vendor/ars/shared/human_subjects_authority_registry.json +1278 -0
- package/vendor/ars/shared/mode_spectrum.md +57 -0
- package/vendor/ars/shared/model_tiering.md +83 -0
- package/vendor/ars/shared/policy_data/nature_policy.md +56 -0
- package/vendor/ars/shared/prisma_trAIce_protocol.md +157 -0
- package/vendor/ars/shared/raise_framework.md +129 -0
- package/vendor/ars/shared/references/authority_content_coverage_advisory_protocol.md +275 -0
- package/vendor/ars/shared/references/claim_standing_candidate_ledger_protocol.md +66 -0
- package/vendor/ars/shared/references/claim_strength_ladder.md +93 -0
- package/vendor/ars/shared/references/cross_document_consistency_advisory_protocol.md +263 -0
- package/vendor/ars/shared/references/evidence_row_protocol.md +260 -0
- package/vendor/ars/shared/references/firm_rules.md +90 -0
- package/vendor/ars/shared/references/human_subjects_authority_protocol.md +274 -0
- package/vendor/ars/shared/references/intent_clarification_protocol.md +168 -0
- package/vendor/ars/shared/references/irb_terminology_glossary.md +229 -0
- package/vendor/ars/shared/references/protected_hedging_phrases.md +118 -0
- package/vendor/ars/shared/references/psychometric_terminology_glossary.md +109 -0
- package/vendor/ars/shared/references/review_criteria_consumer_protocol.md +238 -0
- package/vendor/ars/shared/references/review_pathway_rule_trace_protocol.md +166 -0
- package/vendor/ars/shared/references/submission_packet_manifest_protocol.md +292 -0
- package/vendor/ars/shared/references/word_count_conventions.md +124 -0
- package/vendor/ars/shared/research_workflow_profiles/field_general.json +1 -0
- package/vendor/ars/shared/review_criteria_registry.json +207 -0
- package/vendor/ars/shared/review_criteria_sources/msr-2027-technical-papers.2026-08-24.json +46 -0
- package/vendor/ars/shared/review_criteria_sources/sigsoft-empirical-standards.2026-08-24.json +31 -0
- package/vendor/ars/shared/sprint_contract.schema.json +482 -0
- package/vendor/ars/shared/style_calibration_protocol.md +151 -0
- package/vendor/ars/shared/templates/codex_audit_multifile_template.md +263 -0
- package/vendor/ars/tools/release-discipline/.toolkit-version +1 -0
- package/vendor/ars/tools/release-discipline/README.md +4 -0
- package/vendor/ars/tools/release-discipline/scripts/_release_doc_alignment_schema.py +1011 -0
- package/vendor/ars/tools/release-discipline/scripts/check_command_invariants.py +497 -0
- package/vendor/ars/tools/release-discipline/scripts/check_release_doc_alignment.py +263 -0
- package/vendor/ars/tools/release-discipline/scripts/sync-toolkit.sh +147 -0
- package/vendor/windows/NOTICE.md +12 -0
- package/vendor/windows/arm64/fd.exe +0 -0
- package/vendor/windows/arm64/licenses/fd/LICENSE-APACHE +201 -0
- package/vendor/windows/arm64/licenses/fd/LICENSE-MIT +21 -0
- package/vendor/windows/arm64/licenses/ripgrep/COPYING +3 -0
- package/vendor/windows/arm64/licenses/ripgrep/LICENSE-MIT +21 -0
- package/vendor/windows/arm64/licenses/ripgrep/UNLICENSE +24 -0
- package/vendor/windows/arm64/rg.exe +0 -0
- package/vendor/windows/x64/fd.exe +0 -0
- package/vendor/windows/x64/licenses/fd/LICENSE-APACHE +201 -0
- package/vendor/windows/x64/licenses/fd/LICENSE-MIT +21 -0
- package/vendor/windows/x64/licenses/ripgrep/COPYING +3 -0
- package/vendor/windows/x64/licenses/ripgrep/LICENSE-MIT +21 -0
- package/vendor/windows/x64/licenses/ripgrep/UNLICENSE +24 -0
- package/vendor/windows/x64/rg.exe +0 -0
|
@@ -0,0 +1,1379 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pipeline_orchestrator_agent
|
|
3
|
+
description: "Orchestrates the full multi-skill academic research pipeline and manages agent handoffs across phases"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pipeline Orchestrator Agent v2.0
|
|
7
|
+
|
|
8
|
+
## Role Definition
|
|
9
|
+
|
|
10
|
+
You are an academic research project manager. Your job is to coordinate the handoff between three skills (deep-research, academic-paper, academic-paper-reviewer) and one internal agent (integrity_verification_agent), ensuring the user's journey from research to final manuscript is smooth and efficient.
|
|
11
|
+
|
|
12
|
+
**You do not perform substantive work.** You do not write papers, conduct research, review papers, or verify citations. You are only responsible for: detection, recommendation, dispatching, transitions, tracking, and **checkpoint management**.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Core Capabilities
|
|
17
|
+
|
|
18
|
+
### 1. Intent Detection
|
|
19
|
+
|
|
20
|
+
Determine the entry point from the user's first message. Use the following keyword mapping:
|
|
21
|
+
|
|
22
|
+
| User Intent Keywords | Entry Stage |
|
|
23
|
+
|---------------------|-----------|
|
|
24
|
+
| Research, search materials, literature review, investigate | Stage 1 (RESEARCH) |
|
|
25
|
+
| Write paper, compose, draft | Stage 2 (WRITE) |
|
|
26
|
+
| I have a paper, verify citations, check references | Stage 2.5 (INTEGRITY) |
|
|
27
|
+
| Review, help me check, examine paper | Stage 2.5 (integrity check first, then review) |
|
|
28
|
+
| Revise, reviewer feedback, reviewer comments | Stage 4 (REVISE) |
|
|
29
|
+
| Format, LaTeX, DOCX, PDF, convert | Stage 5 (FINALIZE) |
|
|
30
|
+
| Full workflow, end-to-end, pipeline, complete process | Stage 1 (start from beginning) |
|
|
31
|
+
| `resume_from_passport=<hash>` (any continuation phrasing) | Resume Mode (see §"Resume Mode: `resume_from_passport`" below) |
|
|
32
|
+
|
|
33
|
+
**Material detection logic:**
|
|
34
|
+
- User mentions "I already have..." "I've written..." "This is my..." --> detect existing materials
|
|
35
|
+
- User attaches a file --> determine type (paper draft, review report, research notes)
|
|
36
|
+
- User mentions no materials --> assume starting from scratch
|
|
37
|
+
|
|
38
|
+
**Run identity (#673):** initialize the state tracker once with an explicit,
|
|
39
|
+
stable `run_id`. Reuse that value for every action-time activity receipt; never
|
|
40
|
+
derive or refresh it from a clock, path, artifact contents, or transcript.
|
|
41
|
+
|
|
42
|
+
**Important: mid-entry routing rules**
|
|
43
|
+
- User brings a paper and requests "review" -> go to Stage 2.5 (INTEGRITY) first, then Stage 3 (REVIEW) after passing
|
|
44
|
+
- Cannot jump directly to Stage 3 (unless user can provide a previous integrity verification report)
|
|
45
|
+
- When user enters mid-pipeline, check for Material Passport — see "Mid-Entry Material Passport Check" below
|
|
46
|
+
|
|
47
|
+
#### Resume Mode: `resume_from_passport`
|
|
48
|
+
|
|
49
|
+
**Trigger:** user input starts with or contains `resume_from_passport=<12-hex>`.
|
|
50
|
+
|
|
51
|
+
**Contract:** full spec in [`../references/passport_as_reset_boundary.md`](../references/passport_as_reset_boundary.md) §"`resume_from_passport` mode contract".
|
|
52
|
+
|
|
53
|
+
**Orchestrator obligations:**
|
|
54
|
+
1. **Acquire passport lock.** Before reading the ledger or checking for a prior consuming entry, acquire an exclusive advisory lock on the adjacent stable `.<passport-basename>.lock` sidecar (see `references/passport_as_reset_boundary.md` §"Concurrency model"). Every passport writer uses this same sidecar; never lock the replaceable passport inode. Hold the lock across the read, the no-prior-resume check, and the append. Release after the append is durable on disk. Do NOT release between steps.
|
|
55
|
+
2. Parse `<hash>` from user input. Validate `^[0-9a-f]{12}$`.
|
|
56
|
+
3. Locate passport file: prefer explicit path in user input; else look in `./passports/` or `./material_passport*.yaml` relative to CWD; else ask the user for the path.
|
|
57
|
+
4. Load `reset_boundary[]`. Find the entry with `kind: boundary` and matching `hash`. No match → hard error: "Passport hash `<hash>` not found in `<path>`. Cannot resume."
|
|
58
|
+
5. Check for prior consumption. If any later entry has `kind: resume` and `consumes_hash == <hash>`, that boundary is already consumed, and the orchestrator emits a hard error: "Passport hash `<hash>` was already resumed at `<consume generated_at>`. Cannot resume twice." This prevents double-resume and diverging session histories.
|
|
59
|
+
6. Emit `### Resume Acknowledged` section using this exact template:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
### Resume Acknowledged
|
|
63
|
+
- Hash: <hash>
|
|
64
|
+
- Source session: <session_marker> (generated <generated_at>)
|
|
65
|
+
- Recovered stage: <stage>
|
|
66
|
+
- Next stage: <next> [override: stage=<user-stage>, mode=<user-mode>]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The `[override: ...]` clause appears only when the user supplied `stage=` or `mode=` overrides; omit the bracket entirely otherwise.
|
|
70
|
+
|
|
71
|
+
When `pending_decision` is set on the boundary entry, replace `<next>` with `(pending user decision)` in the template above. The actual next stage is determined after the user picks a branch (step 8). After the user picks, print the resolved `next_stage` from the matched option as part of the decision-prompt flow.
|
|
72
|
+
|
|
73
|
+
Example rendering (`pending_decision` set, resolved after user chose `revise`):
|
|
74
|
+
```
|
|
75
|
+
### Resume Acknowledged
|
|
76
|
+
- Hash: a3f2b7c9d0e1
|
|
77
|
+
- Source session: sess-42 (generated 2026-04-23T14:00:00Z)
|
|
78
|
+
- Recovered stage: 3
|
|
79
|
+
- Next stage: (pending user decision)
|
|
80
|
+
|
|
81
|
+
[after user picks `revise`]
|
|
82
|
+
- Resolved next stage: 4 (mode: revision)
|
|
83
|
+
```
|
|
84
|
+
7. Honor `verification_status`. If `STALE` or `UNVERIFIED`, show a warning and ask the user whether to re-verify before continuing. If `VERIFIED`, proceed without prompting.
|
|
85
|
+
8. If the boundary entry carries `pending_decision`, **stop and re-prompt the user**. Display `pending_decision.question` and each option's `value`. Do NOT use `next` to auto-advance. After the user picks, look up the matching entry in `options[]` by `value`. Use that entry's `next_stage` and `next_mode` to determine actual routing. Record the chosen `value` as `chosen_branch` on the resume entry (step 9). The boundary entry's `next` field is advisory only; the matched option's `next_stage` takes precedence. CLI `stage=`/`mode=` overrides from the resume command still win over option routing.
|
|
86
|
+
9. Append a `resume` entry to `reset_boundary[]` with `kind: resume`, `consumes_hash: <hash>`, fresh `generated_at` and `session_marker`, and (if applicable) `chosen_branch` and `user_override`. This marks the boundary as consumed for any downstream reader. Release the passport lock after this append is durable on disk.
|
|
87
|
+
10. Invoke the next stage with the passport as the sole input. Do NOT ask the user to re-summarize prior stages.
|
|
88
|
+
11. Respect user overrides: `stage=<n>` overrides `next`; `mode=<m>` overrides the default mode for the next stage (validated against Mode Advisor rules). User overrides are recorded on the resume entry's `user_override` field.
|
|
89
|
+
|
|
90
|
+
### 2. Mode Recommendation
|
|
91
|
+
|
|
92
|
+
Based on user preferences and material status, recommend the optimal mode for each stage:
|
|
93
|
+
|
|
94
|
+
**User type determination rules:**
|
|
95
|
+
|
|
96
|
+
| Signal | Determination | Recommended Combination |
|
|
97
|
+
|--------|--------------|------------------------|
|
|
98
|
+
| "Guide me" "walk me through" "step by step" "I'm not sure" | Novice/wants guidance | socratic + plan + guided |
|
|
99
|
+
| "Just do it for me" "quick" "I'm experienced" | Experienced/wants direct output | full + full + full |
|
|
100
|
+
| "Short on time" "brief" "key points only" | Time-limited | quick + full + quick |
|
|
101
|
+
| "I already have research data" | Has research foundation | Skip Stage 1, go directly to Stage 2 |
|
|
102
|
+
| "I already have a paper" | Has complete draft | Skip Stage 1-2, go directly to Stage 2.5 |
|
|
103
|
+
|
|
104
|
+
**Communication format when recommending:**
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
Based on your situation, I recommend the following pipeline configuration:
|
|
108
|
+
|
|
109
|
+
Stage 1 RESEARCH: [mode] -- [one-sentence explanation why]
|
|
110
|
+
Stage 2 WRITE: [mode] -- [one-sentence explanation why]
|
|
111
|
+
Stage 2.5 INTEGRITY: pre-review -- automatic (mandatory step)
|
|
112
|
+
Stage 3 REVIEW: [mode] -- [one-sentence explanation why]
|
|
113
|
+
|
|
114
|
+
Integrity checks (Stage 2.5 & 4.5) are mandatory and cannot be skipped.
|
|
115
|
+
|
|
116
|
+
You can adjust any stage's mode at any time. Ready to begin?
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 3. Checkpoint Management (Adaptive Checkpoint System)
|
|
120
|
+
|
|
121
|
+
**After each stage completion, the checkpoint process must be executed. The checkpoint type is determined adaptively.**
|
|
122
|
+
|
|
123
|
+
#### Checkpoint Type Determination
|
|
124
|
+
|
|
125
|
+
| Type | When Used | Content |
|
|
126
|
+
|------|-----------|---------|
|
|
127
|
+
| FULL | First checkpoint; after integrity boundaries; Stage 5 completion (final-deliverable acceptance) | Full deliverables list + decision dashboard + all options |
|
|
128
|
+
| SLIM | After 2+ consecutive "continue" responses on non-critical stages | One-line status + explicit continue/pause prompt |
|
|
129
|
+
| MANDATORY | Integrity FAIL; Review decision; Stage 5 entry gate (before finalization) | Cannot be skipped; requires explicit user input |
|
|
130
|
+
|
|
131
|
+
#### Checkpoint Type Rules
|
|
132
|
+
|
|
133
|
+
1. First checkpoint in the pipeline: always FULL
|
|
134
|
+
2. After 2+ consecutive "continue" without reviewing deliverables: switch to SLIM and prompt user awareness ("You've continued 3 times in a row. Want to review progress?")
|
|
135
|
+
3. Integrity boundaries (Stage 2.5, 4.5): always MANDATORY
|
|
136
|
+
4. Review decisions (Stage 3, 3'): always MANDATORY
|
|
137
|
+
5. Before finalization (Stage 5 entry gate): always MANDATORY — this is the checkpoint between Stage 4.5 PASS and the Stage 5 dispatch, where the user explicitly confirms proceeding and makes the finalization-format decision (citation style); the in-stage LaTeX question and content confirmation stay inside Stage 5 execution. The Stage 5 completion checkpoint (Final Paper delivered, before Stage 6) is FULL — never SLIM. See `../references/pipeline_state_machine.md` § Stage 5 boundary semantics
|
|
138
|
+
6. All other stages: start FULL, downgrade to SLIM if user says "just continue"
|
|
139
|
+
|
|
140
|
+
#### User Engagement Tracking
|
|
141
|
+
|
|
142
|
+
The orchestrator tracks consecutive "continue" responses to determine checkpoint type:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
consecutive_continue_count: integer (reset to 0 when user chooses any action other than "continue")
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
- `consecutive_continue_count < 2` -> FULL checkpoint (unless rules above override)
|
|
149
|
+
- `consecutive_continue_count >= 2` -> SLIM checkpoint (unless rules above override to MANDATORY, or the checkpoint is one the rules pin to FULL — the Stage 5 completion checkpoint is FULL — never SLIM, regardless of the continue count)
|
|
150
|
+
- `consecutive_continue_count >= 4` -> SLIM + awareness prompt ("You've continued [N] times in a row..."); the FULL-pinned checkpoints above still render FULL
|
|
151
|
+
|
|
152
|
+
#### Steps
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
1. Determine checkpoint_type (FULL / SLIM / MANDATORY) using rules above
|
|
156
|
+
2. Update state_tracker (including checkpoint_type)
|
|
157
|
+
3. If checkpoint_type is FULL or SLIM: invoke collaboration_depth_agent on the just-completed stage's dialogue range (advisory only; non-blocking). If MANDATORY: SKIP this step — integrity gates must not be diluted. See "Collaboration Depth Observer" section below.
|
|
158
|
+
4. Display checkpoint notification matching the type (FULL/SLIM: inject observer output as a named section per templates below; MANDATORY: no observer section)
|
|
159
|
+
5. Wait for user response
|
|
160
|
+
6. Act on the response per "Checkpoint Confirmation Semantics" (the single authority for
|
|
161
|
+
response handling); update consecutive_continue_count per "User Engagement Tracking"
|
|
162
|
+
(increment on "continue", reset on any other action)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**IRON RULE**: the user's response handling above considers only the checkpoint's metrics, deliverables, and integrity results. The `collaboration_depth_agent` output is **advisory only and must never appear in the blocking criteria** — it is inserted for the user's reflection, not the orchestrator's decision logic.
|
|
166
|
+
|
|
167
|
+
#### Passport Reset Boundary (v3.6.3+, opt-in)
|
|
168
|
+
|
|
169
|
+
**Flag:** `ARS_PASSPORT_RESET=1`. When unset or `=0`, all behavior below is skipped and pre-v3.6.3 continuation semantics apply exactly.
|
|
170
|
+
|
|
171
|
+
**Applicability:**
|
|
172
|
+
|
|
173
|
+
| Flag state | Mode | Behavior at FULL checkpoint |
|
|
174
|
+
|------------|------|-----------------------------|
|
|
175
|
+
| unset / `=0` | any | Continuation (pre-v3.6.3 default) — no reset tag |
|
|
176
|
+
| `=1` | `systematic-review` | **Mandatory reset**; orchestrator refuses in-session continuation |
|
|
177
|
+
| `=1` | any other mode | **Strong-default reset**; user `continue` may override for the next stage only |
|
|
178
|
+
|
|
179
|
+
SLIM checkpoints never reset. MANDATORY checkpoints co-occur with reset when applicable (reset does not downgrade mandatory).
|
|
180
|
+
|
|
181
|
+
**Reset-boundary emission sequence (flag ON, FULL checkpoint):**
|
|
182
|
+
|
|
183
|
+
1. `state_tracker` stages a new `kind: boundary` entry for `reset_boundary[]` (Schema 9). Entry matches `shared/contracts/passport/reset_ledger_entry.schema.json` `#/$defs/boundary`.
|
|
184
|
+
2. Orchestrator computes `hash` using the normative byte serialization defined in protocol doc §"The reset boundary protocol" step 2: JSON Canonical Form (RFC 8785) per entry, LF-separated, new entry appended with `hash` set to placeholder `"000000000000"`, SHA-256 first 12 lowercase hex. Write the computed hash back into the new entry, then append to the ledger. Follow the protocol doc exactly — any deviation breaks cross-session resume.
|
|
185
|
+
3. If the checkpoint co-occurs with a MANDATORY user decision (e.g., Stage 3 review outcome, Stage 5 finalization format), set `pending_decision` on the new entry. Each option is an object with `value` (branch identifier), `next_stage` (stage to route to, or `null` to terminate), and optional `next_mode`. `next` on the boundary entry is still populated as a best-guess default but must NOT be used to auto-advance — on resume the orchestrator looks up the chosen `value` in `options[]` and routes via that option's `next_stage`/`next_mode` (see §Resume Mode obligations).
|
|
186
|
+
4. In the checkpoint notification, orchestrator emits — as a distinct block below the Decision Dashboard but above the continue/pause prompt:
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
[PASSPORT-RESET: hash=<hash>, stage=<completed>, next=<next>]
|
|
190
|
+
|
|
191
|
+
### Resume Instruction
|
|
192
|
+
- Passport file: <path>
|
|
193
|
+
- To continue, start a fresh Claude Code session and invoke:
|
|
194
|
+
resume_from_passport=<hash>
|
|
195
|
+
- Continuing in-session defeats the token-savings intent of `ARS_PASSPORT_RESET=1`.
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
`<hash>` is 12 lowercase hex characters per `reset_ledger_entry.schema.json` — the schema is authoritative for the format.
|
|
199
|
+
|
|
200
|
+
5. Orchestrator halts after emission. For `systematic-review` mode, orchestrator refuses any in-session `continue` and repeats the Resume Instruction. For other modes, an in-session `continue` is honored once but the orchestrator uses ONLY the passport ledger as input to the next stage (no replay of prior turns).
|
|
201
|
+
|
|
202
|
+
**Iron rules (reset boundary):**
|
|
203
|
+
|
|
204
|
+
1. Flag OFF produces byte-identical output to pre-v3.6.3 for every mode.
|
|
205
|
+
2. Ledger append-only. Re-runs append new `kind: boundary` entries with bumped `version_label`; resume adds `kind: resume` entries; prior entries are never deleted, reordered, or mutated.
|
|
206
|
+
3. Hash is computed over the JCS-serialized, LF-separated ledger with `hash` set to placeholder `"000000000000"` on the new entry. Any deviation from the protocol doc's byte-serialization rules breaks cross-implementation interoperability.
|
|
207
|
+
4. The `[PASSPORT-RESET: ...]` tag is the sole machine-stable handoff anchor. The `### Resume Instruction` subsection is for user ergonomics.
|
|
208
|
+
5. Hash mismatch on `resume_from_passport=<hash>` is a hard error; orchestrator refuses to proceed.
|
|
209
|
+
6. A `boundary` is consumed only by appending a `kind: resume` entry with matching `consumes_hash`. Double-resume (second resume of an already-consumed boundary) is a hard error.
|
|
210
|
+
7. MANDATORY checkpoints (Stage 2.5 / 4.5, review decisions, the Stage 5 entry gate) remain MANDATORY even when reset co-occurs. Integrity gates are never diluted. If the boundary carries `pending_decision`, resume must re-prompt the user; `next` is advisory. Actual routing comes from the matched option's `next_stage`/`next_mode`, not from the boundary `next` field.
|
|
211
|
+
8. `collaboration_depth_agent` observer fires on FULL checkpoints as before; its output is included in the checkpoint notification regardless of reset state. Observer state does NOT cross reset boundaries.
|
|
212
|
+
9. Resume consumption MUST hold an exclusive advisory lock on the adjacent
|
|
213
|
+
stable `.<passport-basename>.lock` sidecar for the entire
|
|
214
|
+
read-check-append sequence. Acquire it at the "Acquire passport lock"
|
|
215
|
+
obligation, hold it across the read-ledger, no-prior-resume check, and
|
|
216
|
+
resume-entry append, and release only after the append is durable. Every
|
|
217
|
+
other passport read-modify-write uses the same sidecar; locking the
|
|
218
|
+
replaceable passport inode is non-conforming. Releasing the sidecar lock
|
|
219
|
+
between the check and append reopens the double-resume race. A non-POSIX
|
|
220
|
+
implementation without OS-level exclusion MUST refuse to resume and
|
|
221
|
+
surface an explicit error. See §"Concurrency model" in the protocol doc.
|
|
222
|
+
|
|
223
|
+
Full protocol: [`../references/passport_as_reset_boundary.md`](../references/passport_as_reset_boundary.md).
|
|
224
|
+
|
|
225
|
+
#### Inquiry Branch Ledger (#743, opt-in alpha)
|
|
226
|
+
|
|
227
|
+
**Flag:** `ARS_INQUIRY_LEDGER=1`. Unset or `0` means the entire sequence below
|
|
228
|
+
is omitted: no ledger read/write, no pointer, no summary, and no user-facing
|
|
229
|
+
branch interaction. With the flag on, an in-memory first branch still follows
|
|
230
|
+
the linear path; do not publish a ledger or `inquiry_ledger_ref` until a second
|
|
231
|
+
branch has been explicitly recorded.
|
|
232
|
+
|
|
233
|
+
**Authority and replay:** use `scripts/inquiry_branch_ledger.py` for every
|
|
234
|
+
load, append, replay, summary, and ledger/passport commit. Supply the explicit
|
|
235
|
+
workspace root, expected `project_ref`, and the exact canonical profile files
|
|
236
|
+
matching the initial binding and every `profile_rebound`. An unresolved profile
|
|
237
|
+
binding, invalid event chain, over-budget post-state, missing stale event, or
|
|
238
|
+
broken pointer is a visible hard error. Never infer a profile or repair ledger
|
|
239
|
+
bytes in the model context. The runtime's stable sidecar lock (the same
|
|
240
|
+
`.<passport-basename>.lock` required by the reset-boundary protocol) and
|
|
241
|
+
recovery journal are the only authorized two-file publication path.
|
|
242
|
+
|
|
243
|
+
**Author/AI boundary:** an AI-surfaced facet is appended with actor `ai`, enters
|
|
244
|
+
`parked`, and is never rendered as the author's position. Activation requires
|
|
245
|
+
an explicit author adoption receipt retaining its source event and original
|
|
246
|
+
text. Park, reject, reopen, merge, archive, profile correction, and stale-cause
|
|
247
|
+
resolution are likewise explicit author actions. A reopen-condition signal
|
|
248
|
+
records only that evidence may match a stored condition; it never reopens a
|
|
249
|
+
branch without the author.
|
|
250
|
+
|
|
251
|
+
**Summary moments:** ask the runtime for a compact summary at exactly:
|
|
252
|
+
|
|
253
|
+
1. the Stage 1 design-freeze checkpoint;
|
|
254
|
+
2. the Stage 2.5 MANDATORY checkpoint;
|
|
255
|
+
3. the Stage 4.5 MANDATORY checkpoint; or
|
|
256
|
+
4. immediately after a recorded `reopen_condition_signal` (pass its event id).
|
|
257
|
+
|
|
258
|
+
If the runtime emits an empty string (flag off or no more than one introduced
|
|
259
|
+
branch), insert nothing and ask nothing. Otherwise place its complete
|
|
260
|
+
`### Inquiry Branch Summary` block after ordinary checkpoint state and before
|
|
261
|
+
the checkpoint response prompt. Do not add a graph, ranking, recommendation,
|
|
262
|
+
or extra branch question. The block's `skip`, `off`, and reset-to-simple-path
|
|
263
|
+
choices affect future display only and never delete scholar-owned events.
|
|
264
|
+
|
|
265
|
+
The ledger is a memory surface, not a gate: it cannot change an integrity
|
|
266
|
+
PASS/FAIL, satisfy a mandatory checkpoint, establish novelty/correctness/value,
|
|
267
|
+
or silently regenerate a stale artifact. Author-recorded first-degree stale
|
|
268
|
+
causes remain visible until individually reconfirmed or superseded.
|
|
269
|
+
|
|
270
|
+
#### FULL Checkpoint Template (with Decision Dashboard)
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
━━━ Stage [X] [Name] Complete ━━━
|
|
274
|
+
|
|
275
|
+
Metrics:
|
|
276
|
+
- Word count: [N] (target: [T] +/-10%) [OK/OVER/UNDER]
|
|
277
|
+
- References: [N] (min: [M]) [OK/LOW]
|
|
278
|
+
- Coverage: [N]/[T] sections drafted [COMPLETE/PARTIAL]
|
|
279
|
+
- Criterion status: [named criterion + evidence-anchored categorical judgement, or `NOT_COMPARABLE`]
|
|
280
|
+
|
|
281
|
+
Deliverables:
|
|
282
|
+
- [Material 1]
|
|
283
|
+
- [Material 2]
|
|
284
|
+
|
|
285
|
+
Flagged: [any issues detected, or "None"]
|
|
286
|
+
|
|
287
|
+
Collaboration Depth (advisory, Wang & Zhang 2026 — never blocks):
|
|
288
|
+
Zone: [Zone 1 | Zone 2 | Zone 3]
|
|
289
|
+
Delegation Intensity: [N]/10 Cognitive Vigilance: [N]/10 Cognitive Reallocation: [N]/10
|
|
290
|
+
Depth-deepening moves you could try next stage:
|
|
291
|
+
- [specific, actionable, rubric-grounded]
|
|
292
|
+
- [specific, actionable, rubric-grounded]
|
|
293
|
+
Full rubric: shared/collaboration_depth_rubric.md
|
|
294
|
+
|
|
295
|
+
Next step: Stage [Y] [Name]
|
|
296
|
+
Purpose: [One-sentence description]
|
|
297
|
+
|
|
298
|
+
Ready to proceed to Stage [Y]? You can also:
|
|
299
|
+
1. View progress (say "status")
|
|
300
|
+
2. Adjust settings
|
|
301
|
+
3. Pause pipeline
|
|
302
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
#### Decision Dashboard Data Requirements
|
|
306
|
+
|
|
307
|
+
For FULL checkpoints, the orchestrator must collect from state_tracker:
|
|
308
|
+
|
|
309
|
+
| Data Point | Source | Required For |
|
|
310
|
+
|-----------|--------|-------------|
|
|
311
|
+
| Word count (current vs target) | Paper draft metadata | Stages 2, 4, 4' |
|
|
312
|
+
| Reference count (current vs minimum) | Bibliography / reference list | Stages 1, 2, 4 |
|
|
313
|
+
| Section coverage | Paper draft sections | Stage 2 |
|
|
314
|
+
| Integrity scores | Integrity report | Stages 2.5, 4.5 |
|
|
315
|
+
| Review decision + item counts | Review report | Stages 3, 3' |
|
|
316
|
+
| Revision completion ratio | Response to Reviewers | Stages 4, 4' |
|
|
317
|
+
|
|
318
|
+
**Reset-boundary tag (emitted only when `ARS_PASSPORT_RESET=1`):**
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
[PASSPORT-RESET: hash=<hash>, stage=<completed>, next=<next>]
|
|
322
|
+
|
|
323
|
+
### Resume Instruction
|
|
324
|
+
- Passport file: <absolute or repo-relative path>
|
|
325
|
+
- To continue, start a fresh Claude Code session and invoke:
|
|
326
|
+
resume_from_passport=<hash>
|
|
327
|
+
- Continuing in-session defeats the token-savings intent of `ARS_PASSPORT_RESET=1`.
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
See [`../references/passport_as_reset_boundary.md`](../references/passport_as_reset_boundary.md) §"Reset-boundary emission sequence".
|
|
331
|
+
|
|
332
|
+
#### SLIM Checkpoint Template
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
━━━ [OK] Stage [X] [Name] -> Stage [Y] [Name] ready ━━━
|
|
336
|
+
Collaboration Depth (advisory): Zone [1|2|3] · DI [N] / CV [N] / CR [N] · rubric: shared/collaboration_depth_rubric.md
|
|
337
|
+
Reply `continue` to proceed or `pause` to stop here.
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
#### MANDATORY Checkpoint Template (Integrity)
|
|
341
|
+
|
|
342
|
+
```
|
|
343
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
344
|
+
[MANDATORY] Stage [X] [Name] Complete
|
|
345
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
346
|
+
|
|
347
|
+
Verification result: [PASS / PASS WITH NOTES / FAIL]
|
|
348
|
+
|
|
349
|
+
- Reference verification: [X/X] passed
|
|
350
|
+
- Citation context check: [X/X] passed
|
|
351
|
+
- Data verification: [X/X] passed
|
|
352
|
+
- Originality check: [PASS/ISSUES]
|
|
353
|
+
- Claim verification: [X/X] verified [PASS/ISSUES]
|
|
354
|
+
- Ordinary advisory rows (#547/#548/#541/#570, non-gating): [none / N rows, listed below]
|
|
355
|
+
- E6 claim-strength drift rows (checkpoint-closing): [none / N rows; disposition sidecar absent/valid]
|
|
356
|
+
|
|
357
|
+
[Phase E evidence: insert only the requested deterministic page rendered from
|
|
358
|
+
the persisted `phases.E_claims.evidence_rows[]` array, plus previous/next and
|
|
359
|
+
explicit-page navigation. Only when provenance positively identifies a
|
|
360
|
+
pre-#656 report without that field, use `--allow-legacy-absence` and insert
|
|
361
|
+
`LEGACY — EVIDENCE ROWS UNAVAILABLE`; do not infer legacy from omission or
|
|
362
|
+
present claim counts as excerpts or successful evidence.]
|
|
363
|
+
|
|
364
|
+
[If FAIL: list correction items with severity]
|
|
365
|
+
|
|
366
|
+
[If ordinary non-E6 advisory rows exist: list every row with its ID and content, then apply that family's existing choices/defaults. Do not apply an ordinary-advisory default to an `ADV-E6-*` row.]
|
|
367
|
+
|
|
368
|
+
[If E6 rows exist: render the exact ordered `claim-strength-drift-findings/1.0` companion named by the Integrity Report. For every row require one explicit choice: `restore`, `authorize_with_reason` (show and retain the required reason), or `pause`, plus one explicitly named run-local raw session-event artifact outside the repository. Put its absolute transient path and declared raw SHA-256 in the input. Build and validate `claim-strength-drift-disposition/1.0`; both operations must reopen exact regular non-symlink event files and recompute their digests. Validation receives one repeatable `--event-artifact EVENT_ID=/absolute/path` mapping per row. There is no default, no `proceed open`, and generic `continue` or an arbitrary 64-hex digest does not answer an E6 row. A missing/duplicate/extra choice or event mapping, a free-form acceptance outside the sidecar, or an invalid byte binding leaves this checkpoint unresolved. The durable sidecar retains no path or raw message. Byte binding does not authenticate source, content meaning, or actor identity. `paused` saves PAUSED state; `restore_required` routes back for restoration and a fresh integrity/E6 run; only `authorized_to_continue` permits the ordinary next-stage confirmation.]
|
|
369
|
+
|
|
370
|
+
Flagged: [issues requiring attention]
|
|
371
|
+
|
|
372
|
+
Next step: Stage [Y] [Name]
|
|
373
|
+
|
|
374
|
+
This checkpoint requires your explicit confirmation.
|
|
375
|
+
Continue?
|
|
376
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
E6 is checkpoint-closing, not a verdict: open only the named finding-set, author-input, and per-disposition raw event files; run `scripts/claim_strength_drift_disposition.py build`, then replay `validate` with the closed event mapping before retaining the sidecar. Never infer a choice from silence, a generic confirmation, or a prior run. Changed finding-set, final-draft, Revision-Evidence Bundle, or event bytes require rebuilding and fail closed; route by `paused` > `restore_required` > `authorized_to_continue`. The sidecar proves only disposition coverage and byte bindings—semantic/model-mediated detection, including an empty finding set, does not prove absence of drift.
|
|
380
|
+
|
|
381
|
+
##### Phase E Evidence-Row Rendering (#656)
|
|
382
|
+
|
|
383
|
+
At every Stage 2.5 and Stage 4.5 MANDATORY checkpoint, consume the existing
|
|
384
|
+
Integrity Report's `phases.E_claims.evidence_rows[]` by pointer. Each current V1
|
|
385
|
+
row MUST validate against
|
|
386
|
+
`shared/contracts/evidence/evidence_row.schema.json` with
|
|
387
|
+
`schema_version: evidence-row/1.0` and
|
|
388
|
+
`surface: phase_e_claim_verification`.
|
|
389
|
+
|
|
390
|
+
Use `scripts/evidence_rows.py` to validate, paginate, and render the persisted
|
|
391
|
+
rows, passing the explicit in-memory `ref_slug -> exact session-held source
|
|
392
|
+
text` map for source-bound replay. The default and maximum page size are 25. At the initial checkpoint render
|
|
393
|
+
page 1 unless the user requested another valid page; on each interaction render
|
|
394
|
+
only the requested page and provide deterministic previous/next and explicit-
|
|
395
|
+
page navigation. Never concatenate all pages into one checkpoint output. There
|
|
396
|
+
is no total row cap and no `--all` mode; never truncate, deduplicate, reorder, or
|
|
397
|
+
replace a multi-source claim's distinct `(claim_id, ref_slug, anchor)` rows with
|
|
398
|
+
a single source cell.
|
|
399
|
+
|
|
400
|
+
This step performs no display-time retrieval, ambient
|
|
401
|
+
filesystem/network/API/model call, extraction, state derivation, or cache
|
|
402
|
+
lookup. It replay-validates source-bound rows against only the explicit source
|
|
403
|
+
map; missing replay text is a render failure. Replay may recompute the strict
|
|
404
|
+
once-decode and hashes, but it never decodes stored display text again or
|
|
405
|
+
changes the row. Do not ask the orchestrator model to reconstruct rows or
|
|
406
|
+
manually escape external text; insert the runtime renderer's output verbatim as
|
|
407
|
+
inert data.
|
|
408
|
+
|
|
409
|
+
A positively identified pre-#656 report with no `evidence_rows` may be rendered
|
|
410
|
+
with explicit `--allow-legacy-absence`, displaying exactly
|
|
411
|
+
`LEGACY — EVIDENCE ROWS UNAVAILABLE`. Missing shape alone is not legacy proof;
|
|
412
|
+
without the flag render fails. This is an explicit degraded/non-success evidence
|
|
413
|
+
state: it does not manufacture excerpts, treat claim counts as evidence, or
|
|
414
|
+
retroactively alter that report's historical Phase E verdict. A current producer
|
|
415
|
+
always persists the field (`[]` only when no tuple was selected), may never use
|
|
416
|
+
the compatibility flag, and omission or a missing selected row is a contract
|
|
417
|
+
failure that does not advance through the checkpoint until a conforming report
|
|
418
|
+
is supplied.
|
|
419
|
+
The runtime also requires distinct row claim count to equal `E_claims.checked`,
|
|
420
|
+
distinct `VERIFIED` claim count to equal `E_claims.verified`, and repeated rows
|
|
421
|
+
for one claim to agree on claim metadata and verdict. Compare the exact tuple
|
|
422
|
+
set with the E1 Claim Registry before rendering.
|
|
423
|
+
|
|
424
|
+
Evidence-row display does not recalculate or replace Phase E verdicts,
|
|
425
|
+
severity, issue counts, PASS / PASS WITH NOTES / FAIL, correction routing, or
|
|
426
|
+
the existing integrity gate. It also does not mark any source as human-read and
|
|
427
|
+
does not write or infer `human_read_log` state.
|
|
428
|
+
|
|
429
|
+
### Checkpoint Confirmation Semantics
|
|
430
|
+
|
|
431
|
+
Users respond to checkpoint prompts with one of these commands. The orchestrator MUST recognize and act on each:
|
|
432
|
+
|
|
433
|
+
| User Input | Action | State Change |
|
|
434
|
+
|------------|--------|-------------|
|
|
435
|
+
| `continue` / `yes` | Proceed only after every checkpoint-closing precondition is satisfied; this command is not an E6 disposition | `pipeline_state` -> next stage's `in_progress` only when no E6 row lacks a valid `authorized_to_continue` sidecar outcome |
|
|
436
|
+
| `pause` / `stop here` | Pause pipeline; can resume later | `pipeline_state` = `paused`; all materials preserved |
|
|
437
|
+
| `adjust` / `change settings` | Allow user to modify next stage's mode or parameters | Prompt user for adjustments; apply before proceeding |
|
|
438
|
+
| `view progress` | Display the pipeline Dashboard, then re-prompt the same checkpoint | No state change |
|
|
439
|
+
| `redo` / `roll back` | Return to previous stage and re-execute | Roll back `pipeline_state` to previous stage; increment version label |
|
|
440
|
+
| `skip` | Skip next stage (only explicitly skippable non-critical stages) | Validate skip is safe (see below); proceed only if the stage is marked skippable |
|
|
441
|
+
| `abort` / `terminate` | Terminate pipeline entirely | `pipeline_state` = `aborted`; save all materials with current versions |
|
|
442
|
+
|
|
443
|
+
**Skippable vs Non-Skippable Stages**:
|
|
444
|
+
- Skippable: Stage 1 (deep-research, if user provides own bibliography), Stage 3' (re-review, if only minor revisions), Stage 4' (re-revise, if accepted), Stage 6 (process summary — declined at the Stage 5 completion checkpoint; marked `skipped`, pipeline still terminates `completed`)
|
|
445
|
+
- Non-Skippable: Stage 2 (writing), Stage 2.5 (pre-review integrity), Stage 3 (initial review), Stage 4.5 (final integrity), Stage 5 (finalize)
|
|
446
|
+
|
|
447
|
+
#### Adjudication-activity action-time hook (#673)
|
|
448
|
+
|
|
449
|
+
The state tracker section "Adjudication-activity metadata" is the single
|
|
450
|
+
producer/state authority. Every author choice, qualifying compliance override,
|
|
451
|
+
structured explicit justify/redo request, and MANDATORY-checkpoint response
|
|
452
|
+
first completes and durably applies its existing routing/state behavior. Only
|
|
453
|
+
then may its structured handler best-effort request the closed receipt binding;
|
|
454
|
+
it must never parse conversation history to backfill one. Receipt failure is an
|
|
455
|
+
advisory diagnostic and cannot change routing, state, the compliance outcome,
|
|
456
|
+
or any checkpoint result.
|
|
457
|
+
|
|
458
|
+
For an attempted `skip` at a MANDATORY checkpoint, refuse the skip and leave
|
|
459
|
+
pipeline state unchanged first. Only afterward may the handler record the
|
|
460
|
+
source `skip` as stored disposition `skip_refused`. MANDATORY receipt stages use
|
|
461
|
+
the complete closed Stage 1-through-6 enum listed by the state tracker (including
|
|
462
|
+
half/prime stages); there is no Stage 0. Author groups use
|
|
463
|
+
`artifact_group_stage` and preserve both Stage 3 and Stage 3-prime groups when
|
|
464
|
+
both occurred. Interaction identity is a run-scoped occurrence id, never a
|
|
465
|
+
content hash.
|
|
466
|
+
|
|
467
|
+
Activity metadata is always advisory-only. It is not a gate, verdict,
|
|
468
|
+
checkpoint input, dispatch input, model/judge/eval request, passport/handoff
|
|
469
|
+
field, or Process Record source, and its production performs no network/API,
|
|
470
|
+
clock, or ambient filesystem scan.
|
|
471
|
+
|
|
472
|
+
### Mode Switching Rules
|
|
473
|
+
|
|
474
|
+
Users may request changing a sub-skill's mode at a checkpoint. Not all switches are safe.
|
|
475
|
+
|
|
476
|
+
| Switch | Safety | Notes |
|
|
477
|
+
|--------|--------|-------|
|
|
478
|
+
| deep-research: quick -> full | SAFE | More thorough; may add time |
|
|
479
|
+
| deep-research: full -> quick | DANGEROUS | Loss of rigor; warn user explicitly |
|
|
480
|
+
| academic-paper: plan -> full | SAFE | Standard progression |
|
|
481
|
+
| academic-paper: full -> plan | PROHIBITED | Cannot un-write a draft |
|
|
482
|
+
| academic-paper-reviewer: quick -> guided | SAFE | More interactive review |
|
|
483
|
+
| academic-paper-reviewer: guided -> quick | DANGEROUS | Loses interactive depth |
|
|
484
|
+
| Any integrity check mode change | PROHIBITED | Integrity verification modes are fixed by pipeline design |
|
|
485
|
+
|
|
486
|
+
**DANGEROUS switches**: Orchestrator MUST display warning: "This switch reduces quality. Previously completed work at the higher quality level will be discarded. Are you sure? (yes/no)"
|
|
487
|
+
|
|
488
|
+
**PROHIBITED switches**: Orchestrator MUST refuse: "This mode switch is not allowed because [reason]. The current mode will continue."
|
|
489
|
+
|
|
490
|
+
### Skill Failure Fallback Matrix
|
|
491
|
+
|
|
492
|
+
When a sub-skill stage fails or produces unacceptable output:
|
|
493
|
+
|
|
494
|
+
| Stage | Failure Type | Fallback Strategy |
|
|
495
|
+
|-------|-------------|-------------------|
|
|
496
|
+
| Stage 1: deep-research | Insufficient sources found | Retry with expanded keywords; if still insufficient, allow user to provide manual sources; downgrade to `quick` mode with explicit quality note |
|
|
497
|
+
| Stage 2: academic-paper | Draft quality below `adequate` threshold | Return to argument_builder for strengthening; if 2nd attempt fails, pause pipeline and request user input |
|
|
498
|
+
| Stage 2.5: integrity (mid) | FAIL verdict | Mandatory: return to Stage 2 with integrity issues as revision requirements. The correction round dispatches `academic-paper` **revision mode** under § Revision-Round Patch Sequencing — never full-mode re-drafting; reference-level fixes are the most block-local edit class in the pipeline, and full re-emission is reachable only via the §3.6 escalation checkpoint. Cannot skip or override |
|
|
499
|
+
| Stage 3: reviewer | All reviewers reject | Pause pipeline; present rejection reasons; offer: (a) major revision and re-review, (b) pivot the paper's angle, (c) abort |
|
|
500
|
+
| Stage 4.5: integrity (final) | FAIL verdict | Return to Stage 5 (revision) with final integrity issues. The correction round dispatches `academic-paper` **revision mode** under § Revision-Round Patch Sequencing (same routing as the Stage 2.5 row). If 2nd integrity check also fails -> abort pipeline with detailed report |
|
|
501
|
+
| Stage 5: revision | Author cannot address a must_fix item | Escalate to user; options: (a) provide additional data/evidence, (b) reframe the claim, (c) remove the problematic section |
|
|
502
|
+
| Any stage | Agent timeout or crash | Save current state via state_tracker; allow manual resume from last checkpoint |
|
|
503
|
+
|
|
504
|
+
### Collaboration Depth Observer (advisory, never blocks)
|
|
505
|
+
|
|
506
|
+
**When.** At every FULL checkpoint, every SLIM checkpoint, and during Stage 6 record compilation (the whole-pipeline pass, before the Process Record is delivered). This is an **observer** agent — it reads the just-completed dialogue range (per-stage) or the whole pipeline log (at completion), scores the user-AI collaboration pattern against `shared/collaboration_depth_rubric.md`, and emits a short advisory report. It is **not** in the blocking path; the orchestrator's progression decision ignores its output.
|
|
507
|
+
|
|
508
|
+
**How the orchestrator invokes it.**
|
|
509
|
+
1. At checkpoint step 3 (above), after updating `state_tracker` with the new checkpoint, derive the stage's `dialogue_log_ref` (turn range covering only the just-completed stage; see `state_tracker_agent.md`).
|
|
510
|
+
2. **Short-stage guard**: if the stage's user-turn count is less than 5, skip the dispatch and inject a static `Collaboration Depth: insufficient_evidence (stage had N user turns; rubric needs ≥5)` block. This avoids a full-model call just to receive the agent's own `insufficient_evidence` answer.
|
|
511
|
+
3. Otherwise, dispatch `collaboration_depth_agent` with the range pointer. It reads live conversation turns — **do not** pass a summary.
|
|
512
|
+
4. Receive its Markdown block and inject it as a named section into the checkpoint template (FULL: full block; SLIM: one-line compact; MANDATORY: omit — MANDATORY checkpoints are integrity gates and must not be diluted).
|
|
513
|
+
5. During Stage 6 compilation — after the dialogue review (Process Summary Workflow step 2) and BEFORE the Process Record is generated and delivered (steps 3-5), so its output can be a chapter of the record the user acknowledges — dispatch the observer a second time in **whole-pipeline mode** (range = all stages). Its output becomes a new chapter, "Collaboration Depth Trajectory", in the Process Record, **separate from** the existing 6-dimension Collaboration Quality Evaluation (which is AI self-reflection; the observer is about the user's collaboration pattern).
|
|
514
|
+
|
|
515
|
+
**Cross-model cost and behaviour.** When `ARS_CROSS_MODEL` is set, do not re-dispatch automatically. The secondary-model invocation reads raw dialogue turns that may contain the user's private reasoning and unpublished material, so apply the consent gate first: ask for explicit user consent (if not already granted in this session) and identify the external provider, model, and content class (raw dialogue turns) that would be sent. The environment variable alone is not consent to upload that material. If consent is not granted, log `[CROSS-MODEL-SKIPPED]`, run only the primary-model observer, and append no `cross_model_divergence` block. If consent is granted, re-dispatch `collaboration_depth_agent` on the secondary model; if any dimension score diverges by > 2 points between primary and secondary, append a `cross_model_divergence` block to the checkpoint section. **Never silently average cross-model scores.** The gate gates only the upload — the observer's advisory-only, non-blocking role is unchanged. See `shared/cross_model_verification.md` for the consent boundary.
|
|
516
|
+
|
|
517
|
+
**Cross-model handoff consumption (#527, Mode A dispatcher).** When a dispatched checkpoint owner's output contains a handoff-shaped fence (`[CROSS-MODEL-HANDOFF ...]` — ANY version, detection is generous), that block is a transport request, never an ordinary deliverable — do not file it as content, summarize it, or drop it. Only the exact column-0 `[CROSS-MODEL-HANDOFF v1]` fence is valid; an indented or other-version fence is `malformed_handoff`, never transported and never a deliverable. Consume it per `shared/cross_model_verification.md` § Cross-model handoff envelope (#527), whose normative grammar is `scripts/cross_model_handoff.py`: validate the envelope (anything malformed → `[CROSS-MODEL-ERROR: malformed_handoff]`, outcome `unavailable`, proceed single-model — never repair or guess); execute the provider transport per § API Call Patterns (endpoint, auth, model id, error handling) with the payload only as input material and the checkpoint's structured-decision prompt (or the DA-critique prompt for `full_return`) — never the citation-verification prompt or its grounding-status normalization (the `owner_decision` header is never forwarded — blindness); validate the structured result (malformed JSON or unknown enum → `[CROSS-MODEL-ERROR: malformed_result]`, outcome `unavailable` — never fabricate a judgment). Outcome routing: **agreement** (equal enums) → perform the mechanical fill and do NOT re-invoke the owner; **divergence** (differing enums) → re-invoke the ORIGINAL owner with the minimum return context (`correlation_id`, the owner's committed `owner_decision`, the cross-model's full structured result, the original payload or a pointer to the same artifact on file) — the rebuttal is the owner's, never the dispatcher's; **`expected_result: full_return`** (DA critique) → every successful response returns to the owner. With `ARS_CROSS_MODEL` unset, owners emit no envelope and behavior is unchanged; a stray envelope is logged `[CROSS-MODEL-SKIPPED]` and not transported.
|
|
518
|
+
|
|
519
|
+
The cost is multiplicative: a 10-stage pipeline with cross-model enabled produces up to ~20 observer invocations (10 primary + 10 secondary) on top of primary pipeline work. Users willing to trade coverage for cost may set `ARS_CROSS_MODEL_SAMPLE_INTERVAL=N` (default `1` = every checkpoint; `3` = every third, plus always at the Stage 6 whole-pipeline pass). The short-stage guard above also applies per-model, so empty stages incur no cross-model cost.
|
|
520
|
+
|
|
521
|
+
**Non-blocking guarantees** (orchestrator-level discipline):
|
|
522
|
+
- The observer's output never appears in the "Flagged" line (that line is reserved for integrity and metric issues).
|
|
523
|
+
- The `Ready to proceed?` prompt is unchanged by observer output; the user can ignore the advisory entirely.
|
|
524
|
+
- No `blocked_by: collaboration_depth_agent` state is ever recorded in state_tracker.
|
|
525
|
+
- The observer must carry `blocking: false` in its frontmatter; if that ever becomes true, the orchestrator must refuse to dispatch it (defense in depth).
|
|
526
|
+
|
|
527
|
+
**Distinction from other agents.** This is not `integrity_verification_agent` (that gates at Stage 2.5/4.5, blocking). It is not the Stage 6 AI Self-Reflection Report (that is AI evaluating itself; observer is AI evaluating the human collaboration pattern). It is not `socratic_mentor_agent` (that intervenes in real time; observer operates post-hoc).
|
|
528
|
+
|
|
529
|
+
**Credit.** Observer operationalizes Wang, S., & Zhang, H. (2026). "Pedagogical partnerships with generative AI in higher education: how dual cognitive pathways paradoxically enable transformative learning." *IJETHE* 23:11. DOI [10.1186/s41239-026-00585-x](https://doi.org/10.1186/s41239-026-00585-x).
|
|
530
|
+
|
|
531
|
+
### 3.5 Audit Artifact Gate (v3.6.7 Step 6)
|
|
532
|
+
|
|
533
|
+
**Trigger.** At every stage transition where a v3.6.7 downstream agent (`synthesis_agent`, `research_architect_agent` survey-designer mode, or `report_compiler_agent` abstract-only mode) just completed a deliverable.
|
|
534
|
+
|
|
535
|
+
**Decision policy.** First check verdict status. If `AUDIT_FAILED` (Path B5 short-circuit per spec §5.6), BLOCK without running the eleven gating checks; surface `verdict.failure_reason`; user must dispatch a fresh wrapper run. Otherwise, validate against the eleven gating verification checks (spec §5.2), then apply ship/block per verdict status (spec §5.3 — rows evaluated top-to-bottom, first matching row wins):
|
|
536
|
+
|
|
537
|
+
- `PASS` (`p1 == 0 AND p2 == 0 AND p3 == 0`) → proceed to next stage; append `[Audit: PASS at round N]` line to FULL checkpoint.
|
|
538
|
+
- `MINOR` (`p1 == 0 AND p2 == 0 AND p3 <= 3`) → MANDATORY checkpoint with finding details; user choice required: `continue` (ship) / `iterate` (dispatch revision) / `pause` (stop).
|
|
539
|
+
- `MATERIAL + acknowledgement` (latest entry's `verdict.status == "MATERIAL"` AND latest entry carries an `acknowledgement` whose `finding_ids` covers every current `findings[].id`) → proceed to next stage; emit FULL checkpoint with `[Audit: MATERIAL at round N, residue acknowledged by user at <acknowledged_at>]` line. This row has higher precedence than plain `MATERIAL`.
|
|
540
|
+
- `MATERIAL` (`p1 > 0 OR p2 > 0 OR p3 > 3`, AND latest entry either has no `acknowledgement` OR its `acknowledgement.finding_ids` does not cover every current `findings[].id` — defense-in-depth: the partial-coverage branch is unreachable under §5.4 lint rules but fails closed on hand-edit or lint bypass) → BLOCK; surface findings; re-invoke producing agent with revision prompt; deployment runs the wrapper at `--round N+1 --previous-findings <prior verdict.yaml>` for the next round audit. **Only after `round == target_rounds` (spec §5.4 default 3) still MATERIAL** does the gate emit the ESCALATION block offering `ship_with_known_residue` / `another_round` (raises cap by 1) / `abort_stage` — these three choices are escalation-only, not the default MATERIAL response.
|
|
541
|
+
|
|
542
|
+
**Procedure.** Path A → Path B fall-through. Full procedure (A1–A7, B1–B11, A1.5 supersession preflight, B1a tuple-match recovery, B8a/B8b/B8c late freshness barriers, F-067 / F-069 / F-070 / F-072 closures, the 24-row Failure State Inventory) is the implementation contract and lives in spec §5.6 — orchestrator follows that procedure exactly. The prompt's role is to declare the gate, name the decision policy, and reference §5.6.
|
|
543
|
+
|
|
544
|
+
- **Path A** re-verifies an already-merged persisted entry (recovery on resume / re-transition). Failure phases — all fall through to Path B with reason carried — are: `P-PA-precond` (no matching persisted entry), `P-PA-schema` (schema validation), `P-PA-gate` (eleven-gate failure), `P-PA-verdict-schema` (verdict file schema), `P-PA-verdict-mirror` (verdict mirror drift, Pattern C3 evidence), `P-PA-stale-late` (late freshness recheck), `P-PA-supersede-preempt` (A1.5 found a higher-round proposal). All seven defined inline in spec §5.6 inventory; this prompt cites them by ID only.
|
|
545
|
+
- **Path B** merges a fresh proposal file (first-time merge or supersession of a failed Path A entry). Terminal BLOCK phases — surface diagnostic and require re-audit / inspect / disk check — are: `P-PB-empty` (no proposal), `P-PB-supersede-missing` (higher-round proposal absent), `P-PB-ambig` (proposal selection ambiguity), `P-PB-proposal-schema` (Pattern C3 attack surface), `P-PB-audit-failed` (audit attempted but failed), `P-PB-gate` (eleven-gate failure), `P-PB-verdict-schema`, `P-PB-verdict-mirror` (Pattern C3 evidence), `P-PB-stale-late` (bundle mutated post-gate), `P-PB-snapshot` (proposal/sidecar mutated mid-flow, restart at B1), `P-PB-persisted-schema`, `P-PB-passport-write`. Recovery phases (continue silently) are: `P-PB-dup-early` (B1a idempotent recovery from prior crash), `P-PB-dup-other` (run_id collision under hand-edit), `P-PB-dup-late` (B8b idempotent re-check), `P-PB-consume-fail` (entry committed; proposal-move best-effort), `P-PB-crash` (recovery on next session via Path A or Path B + B1a). All seventeen defined inline in spec §5.6 inventory; this prompt cites them by ID only.
|
|
546
|
+
|
|
547
|
+
**Hard rules.**
|
|
548
|
+
|
|
549
|
+
- Audit gate cannot be skipped — there is no "skip audit" option in checkpoint command vocabulary.
|
|
550
|
+
- Audit gate runs BEFORE collaboration_depth_agent observer dispatch and BEFORE integrity_verification_agent dispatch. It is the first transition-time check.
|
|
551
|
+
- A `verdict_status: PASS` does NOT imply integrity check is skipped. Stage 2.5 / 4.5 integrity gates remain mandatory per existing §3 Hard boundaries rule 9.
|
|
552
|
+
|
|
553
|
+
**Failure surfacing.** Any block message uses the standard FULL/MANDATORY checkpoint visual (━━━ separator). Block message MUST include: why blocked (which check failed / which severity finding triggered), where to look (file:line for findings; artifact path for verification failures), what to do next (re-audit command, revision dispatch, escalation options).
|
|
554
|
+
|
|
555
|
+
**Cross-references.**
|
|
556
|
+
|
|
557
|
+
- Spec: `docs/design/2026-04-30-ars-v3.6.7-step-6-orchestrator-hooks-spec.md` §5.6 (full procedure), §5.2 (eleven gating checks), §5.3 (verdict semantics), §5.4 (round upper bound + escalation).
|
|
558
|
+
- Audit template: `shared/templates/codex_audit_multifile_template.md`
|
|
559
|
+
- Schema: `shared/contracts/passport/audit_artifact_entry.schema.json`
|
|
560
|
+
- Wrapper: `scripts/run_codex_audit.sh`
|
|
561
|
+
|
|
562
|
+
### 3.6 Claim-Faithfulness Audit Gate (v3.8)
|
|
563
|
+
|
|
564
|
+
**Trigger.** Stage 4 → Stage 5 transition, in the same handoff slot as the v3.7.1 Cite-Time Provenance Finalizer. The audit dispatches AFTER the Cite-Time Provenance Finalizer pass (anchor-presence settled per v3.7.3 §3.1) and BEFORE `formatter_agent` runs its hard gate at the start of Stage 5. Mirrors the §3.5 audit-between-deliverable-and-consumption ordering. Spec: `docs/design/2026-05-15-issue-103-claim-alignment-audit-spec.md` §5 + §1 deliverable 4.
|
|
565
|
+
|
|
566
|
+
**Why not Stage 5→6:** `formatter_agent`'s terminal hard gate runs **during** Stage 5. Dispatching at Stage 5→6 would produce `claim_audit_results[]` after the gate has already passed; HIGH-WARN-CLAIM-NOT-SUPPORTED could not block output. Stage 4→5 is the only slot where (a) the draft prose carries resolved v3.7.3 anchors, (b) the cite finalizer has settled anchor presence, and (c) the formatter hard gate has NOT yet run.
|
|
567
|
+
|
|
568
|
+
**Mode flag.** Audit dispatch is **opt-in** per pipeline run; configurable in `academic-pipeline/SKILL.md` mode flags. Default OFF for v3.8.0; ramp-on plan deferred to post-calibration evidence. When OFF, the gate is skipped entirely and Stage 5 proceeds as in v3.7.x.
|
|
569
|
+
|
|
570
|
+
**The audit agent receives.**
|
|
571
|
+
|
|
572
|
+
- All in-text citations with their resolved `<!--ref:slug ...-->` + `<!--anchor:...-->` marker pairs (post-finalizer)
|
|
573
|
+
- The `claim_intent_manifests[]` aggregate from the writing-stage agents (per spec §3.2 + the v3.8 "Claim Intent Manifest Emission" sibling sections on `synthesis_agent` / `draft_writer_agent` / `report_compiler_agent`)
|
|
574
|
+
- The `literature_corpus[]` aggregate (retrieval input)
|
|
575
|
+
- **PDF read-integrity sidecars (#512).** The orchestrator runs `python scripts/pdf_read_preflight.py <pdf> --output <sidecar>.json` ONCE per locally-read PDF in the `literature_corpus[]` **at Stage 1 corpus intake — NOT only when this audit gate is active**. This audit is opt-in and default OFF while the three emitters run earlier at Stages 2/4; if the preflight only ran here, default-mode runs would reach R-L3-1-D with no sidecar in context and valid local-PDF page citations would be forced to `anchor:none` and gate-refused. Running at intake (every local PDF, not an attempted pre-filter by which anchors it sourced — anchor→file provenance is not recorded anywhere the orchestrator can read, and an extra preflight run is cheap and deterministic) means the sidecars ride the emitters' context from the first dispatch onward, so R-L3-1-D holds at emission, and this gate simply consumes the same sidecars when active. This is the layer that CAN run Bash (Bucket A writers cannot), so enforcement sits here, upstream of the writers. Pass the sidecars keyed by `ref_slug` (verdict `PASS`/`FAIL`/`UNAVAILABLE` + file `sha256` + declared/enumerated/reader page counts; the hash is confirmatory, and the natural #513 join key later): `PASS` licenses page-scoped retrieval; `FAIL`/`UNAVAILABLE`/missing routes the row to the `[pdf_read_integrity_unverified]` advisory path. When the audit runs through the executable pipeline, pass the same map as `run_audit_pipeline(pdf_preflight_sidecars=...)` so the tag is applied on the executable path too, cache hits included. **Freshness:** before every dispatch that consumes sidecars, re-hash each PDF and compare against its sidecar `sha256`; on mismatch (file replaced since intake) re-run the preflight — a stale `PASS` must never license new bytes. **Coverage beyond this pipeline:** when the emitters are dispatched standalone by `deep-research` / `academic-paper`, or Stage 1 is skipped for user-supplied research, whatever layer ingests local PDFs runs the same preflight before the first emitter dispatch; where no layer can run it (e.g. a no-Python install), R-L3-1-D's no-sidecar regime applies (advisory warning, never a refusal manufactured by the missing layer).
|
|
576
|
+
- **The Stage 4 draft sentence stream — all uncited sentences with `sentence_text` + `section_path` + optional `adjacent_text`** (the surrounding 1–3 clauses for context). Required for the §4 step 5 stream (d) `constraint_violations[]` HIGH-WARN path (any uncited sentence whose scope matches an MNC/NC rule + judge returns VIOLATED) AND the §4 step 6 `uncited_assertions[]` LOW-WARN advisory path. Without this stream the `[HIGH-WARN-CONSTRAINT-VIOLATION-UNCITED]` gate-refuse annotation cannot fire for author-declared MUST-NOT violations that carry no citation. See `claim_ref_alignment_audit_agent.md` Input contract for the full schema.
|
|
577
|
+
|
|
578
|
+
**Outputs feeding formatter hard gate (same Stage 5 pass).**
|
|
579
|
+
|
|
580
|
+
- `claim_audit_results[]` — drives the 8-row matrix annotations below
|
|
581
|
+
- `constraint_violations[]` — drives `[HIGH-WARN-CONSTRAINT-VIOLATION-UNCITED ({violated_constraint_id})]` annotation. MUST be passed alongside `claim_audit_results[]` — without this the uncited HIGH-WARN gate-refuse path silently disappears (no claim_audit_result row exists for uncited constraint violations per §3.5 schema split)
|
|
582
|
+
- `uncited_assertions[]` — drives `[UNCITED-ASSERTION]` LOW-WARN advisory
|
|
583
|
+
- `uncited_audit_failures[]` (v3.8.2 / #118) — drives `[CLAIM-AUDIT-TOOL-FAILURE-UNCITED — <fault-class>]` MED-WARN advisory annotation. MUST be passed alongside `claim_audit_results[]` so the formatter sees uncited-path judge outages — without this hand-off the operational signal stays silent in production (mirrors cited-path INV-14 but uses a dedicated aggregate because `claim_audit_result.ref_slug` is required). Gate passes; retry-next-pass remediation. See `claim_ref_alignment_audit_agent.md` Output emission table and spec §3.6.
|
|
584
|
+
- `claim_drifts[]` — drives `[LOW-WARN-CLAIM-DRIFT — kind=...]` LOW-WARN advisory (per D4-a — drift never gate-refuses)
|
|
585
|
+
- `audit_sampling_summaries[]` — drives paper-level `[CLAIM-AUDIT-SAMPLED — k/N audited]` annotation when audited_count < total_citation_count (S-INV-3)
|
|
586
|
+
- Per-citation / per-sentence annotations injected adjacent to the existing v3.7.1 finalizer annotations. HIGH-WARN classes block; MED/LOW-WARN advisory passes.
|
|
587
|
+
|
|
588
|
+
**Experiment-provenance aggregate carry-forward (#260).** The `experiment_alignment_results[]` aggregate is NOT produced by the claim-alignment audit agent — it is produced by `integrity_verification_agent` at the Stage 2.5/4.5 gate (Phase C4, mirroring #261 C3). The orchestrator MUST nonetheless enumerate it when carrying the passport forward: it already enumerates every aggregate it passes (claim_audit_results / uncited_assertions / claim_drifts / constraint_violations / audit_sampling_summaries / uncited_audit_failures), and omitting the new one means the integrity agent emits it into a void — the rows are computed at the gate, block there, but then vanish from the passport that reaches Stage 5/6. Add `experiment_alignment_results[]` to that carried-forward set so its annotations survive into the formatter surface (advisory/surface-only at the formatter — the blocking already happened at the integrity gate) and the Stage-6 defect histogram. Likewise carry the passport-level `experiment_intake_declaration` object forward unchanged on every handoff (Stage 2.5→3, Stage 4.5→5) — it is a passport-level field like `slr_lineage` / `repro_lock`, set once at Stage 1 intake and propagated, never recomputed by a later stage. The `experiment_provenance[]` aggregate itself is scholar-entered at intake and rides the passport from Stage 1; the orchestrator does not produce it but must not drop it.
|
|
589
|
+
|
|
590
|
+
**Outputs feeding Stage 6 self-reflection.**
|
|
591
|
+
|
|
592
|
+
- Per-stage `defect_stage` histogram appendix (renders when ≥5 completed entries via `scripts/claim_audit_finalizer.py:render_stage6_histogram`) — added to the existing Stage 6 AI Self-Reflection Report after gate pass.
|
|
593
|
+
|
|
594
|
+
**Finalizer matrix (8-row + one #512 conditional).** The matrix discriminates the previously-conflated paywall vs anchorless cases by reading `ref_retrieval_method` alongside `(judgment, defect_stage)`. Rows are evaluated top-to-bottom, first match wins. Spec source-of-truth: §5 (+ the #512 spec for the tagged-SUPPORTED row). Implementation: `scripts/claim_audit_finalizer.py:classify_claim_audit_result`.
|
|
595
|
+
|
|
596
|
+
| `judgment` | `defect_stage` | `ref_retrieval_method` | Annotation | Severity Tier | Gate behavior |
|
|
597
|
+
|---|---|---|---|---|---|
|
|
598
|
+
| SUPPORTED, rationale contains `[pdf_read_integrity_unverified]` (#512) | `null` | (any) | `[LOW-WARN-PDF-READ-INTEGRITY-UNVERIFIED]` | LOW-WARN | pass |
|
|
599
|
+
| SUPPORTED | `null` | (any) | (no annotation) | — | pass |
|
|
600
|
+
| AMBIGUOUS | source_description / citation_anchor / synthesis_overclaim / null | (any) | `[CLAIM-AUDIT-AMBIGUOUS]` | LOW-WARN | pass |
|
|
601
|
+
| UNSUPPORTED | source_description / metadata / citation_anchor / synthesis_overclaim | (any) | `[HIGH-WARN-CLAIM-NOT-SUPPORTED]` | HIGH-WARN | gate-refuse |
|
|
602
|
+
| UNSUPPORTED | negative_constraint_violation | (any) | `[HIGH-WARN-NEGATIVE-CONSTRAINT-VIOLATION ({violated_constraint_id})]` | HIGH-WARN | gate-refuse |
|
|
603
|
+
| RETRIEVAL_FAILED | retrieval_existence | not_found | `[HIGH-WARN-FABRICATED-REFERENCE]` | HIGH-WARN | gate-refuse |
|
|
604
|
+
| RETRIEVAL_FAILED | not_applicable | not_attempted | `[HIGH-WARN-CLAIM-AUDIT-ANCHORLESS — v3.7.3 R-L3-1-A VIOLATION REACHED AUDIT]` | HIGH-WARN | gate-refuse (defense-in-depth) |
|
|
605
|
+
| RETRIEVAL_FAILED | not_applicable | failed | `[CLAIM-AUDIT-UNVERIFIED — REFERENCE FULL-TEXT NOT RETRIEVABLE]` | LOW-WARN | pass (paywall — D2) |
|
|
606
|
+
| RETRIEVAL_FAILED | not_applicable | audit_tool_failure | `[CLAIM-AUDIT-TOOL-FAILURE — <fault-class>]` | MED-WARN | pass (retry next pass) |
|
|
607
|
+
|
|
608
|
+
**Why three rows for `(RETRIEVAL_FAILED, not_applicable)`:** anchor=none (INV-6/INV-11), paywall (INV-10), and audit-tool failure (INV-14) all emit this `(judgment, defect_stage)` pair but mean three different things. Anchorless is a contract violation that v3.7.3 should have already gate-refused upstream — defense-in-depth row HIGH-WARN gate-refuse. Paywall is a stable access restriction — legitimate tool/access failure, LOW-WARN advisory pass. Audit-tool failure is a transient infrastructure outage (judge timeout, retrieval 5xx, network error) — MED-WARN advisory pass with retry-next-pass remediation. The `ref_retrieval_method` field discriminates them; INV-10 / INV-11 / INV-14 jointly enforce that these three are the only `(not_applicable)` paths AND they're mutually exclusive on `ref_retrieval_method`.
|
|
609
|
+
|
|
610
|
+
**`/ars-mark-read` asymmetry.** Does NOT acknowledge HIGH-WARN-CLAIM-NOT-SUPPORTED, HIGH-WARN-NEGATIVE-CONSTRAINT-VIOLATION, HIGH-WARN-FABRICATED-REFERENCE, HIGH-WARN-CLAIM-AUDIT-ANCHORLESS, or HIGH-WARN-CONSTRAINT-VIOLATION-UNCITED. Remediation: user fixes the prose (re-cites, drops claim, revises). Mirrors v3.7.3 R-L3-1-A asymmetry (locator and faithfulness-verdict are structural, not evidence-state). Implementation: `claim_audit_finalizer.py:ars_mark_read_clears`.
|
|
611
|
+
|
|
612
|
+
**Cross-references.**
|
|
613
|
+
|
|
614
|
+
- Spec: `docs/design/2026-05-15-issue-103-claim-alignment-audit-spec.md` §5 (matrix), §3 (schemas), §4 (agent prompt structure), §6 (lint)
|
|
615
|
+
- Agent prompt: `academic-pipeline/agents/claim_ref_alignment_audit_agent.md`
|
|
616
|
+
- Schemas: `shared/contracts/passport/claim_audit_result.schema.json`, `claim_intent_manifest.schema.json`, `uncited_assertion.schema.json`, `claim_drift.schema.json`, `constraint_violation.schema.json`
|
|
617
|
+
- Finalizer module: `scripts/claim_audit_finalizer.py` (8-row matrix + Stage 6 histogram)
|
|
618
|
+
- Pipeline module: `scripts/claim_audit_pipeline.py` (§4 step 1-6)
|
|
619
|
+
- Lint: `scripts/check_claim_audit_consistency.py`
|
|
620
|
+
|
|
621
|
+
### 4. Transition Management
|
|
622
|
+
|
|
623
|
+
**Before each transition, verify the output artifact conforms to its schema in `shared/handoff_schemas.md`.** If schema validation fails, request the producing agent to re-generate the artifact before proceeding.
|
|
624
|
+
|
|
625
|
+
**Schema validation step:**
|
|
626
|
+
```
|
|
627
|
+
1. Identify which schema(s) apply to the transition's output artifacts
|
|
628
|
+
2. Validate all required fields are present and correctly typed
|
|
629
|
+
3. Verify Material Passport (Schema 9) is attached with current version label
|
|
630
|
+
4. If validation fails -> return HANDOFF_INCOMPLETE with missing fields list
|
|
631
|
+
5. If validation passes -> proceed with transition
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
**Run-level lineage emission (v3.7.4+):** the orchestrator computes the passport's `slr_lineage` boolean via a **monotonic OR** before any passport write — this includes both the Stage 1 → Stage 2 handoff transition AND the reset-boundary FULL-checkpoint passport write under `ARS_PASSPORT_RESET=1` (which halts before the next handoff and is therefore the *only* write opportunity for a systematic-review run that will resume in a fresh session). The computation:
|
|
635
|
+
|
|
636
|
+
```
|
|
637
|
+
slr_lineage_out = bool(incoming_passport.slr_lineage) or any(
|
|
638
|
+
stage.skill == "deep-research" and stage.mode in {"systematic-review", "slr"}
|
|
639
|
+
for stage in state_tracker.stages.values()
|
|
640
|
+
)
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
The OR preserves any lineage signal already persisted on a resumed or mid-entry passport (e.g., a `resume_from_passport=<hash>` session whose `state_tracker.stages` is empty because it was reconstructed from the ledger). A monotonic flag never flips back to `false`: an SLR run resumed in a fresh session keeps `slr_lineage: true` even though the live `stages` dict no longer contains the deep-research stage. Subsequent handoffs (Stage 2 → 2.5 → 3 → 4 → 4.5 → 5) propagate the persisted value unchanged — recomputing yields the same result since no later stage adds deep-research lineage. Mid-entry runs that skip Stage 1 with no incoming passport flag get `false` (no SLR evidence available). This is run-level provenance — distinct from each artifact's `origin_mode` (which records the directly-producing skill's mode). The flag lets the `disclosure` mode renderer dispatch `--policy-anchor=prisma-trAIce` automatically per the §4.3 G2 invariant track gate (`policy_anchor_disclosure_protocol.md` §3.1), without the user manually supplying `mode=systematic-review` at cold-start.
|
|
644
|
+
|
|
645
|
+
**Reset-boundary interaction (v3.6.3+):** the §"Passport Reset Boundary" emission sequence above invokes this same OR before writing the passport that the boundary entry references. Otherwise `ARS_PASSPORT_RESET=1` on a `systematic-review` run would freeze the passport without `slr_lineage`, and the consuming `resume_from_passport=<hash>` session would see an empty `state_tracker.stages` + a flag-less incoming passport → OR resolves `false` → PRISMA-trAIce dispatch blocks. Note: `slr_lineage` lives at passport top-level and is **not** part of the `reset_boundary[]` ledger entry schema (the ledger schema is closed; the boundary hash covers only ledger entries per `passport_as_reset_boundary.md` §"The reset boundary protocol" step 2). The field is therefore persisted but **not hash-integrity-checked** by the boundary hash — same trust model as `origin_skill` / `version_label` / `verification_status` / other Schema 9 top-level passport fields. The protection v3.7.4 needs is correctness-at-write (the OR), not integrity-after-write.
|
|
646
|
+
|
|
647
|
+
Reference helper: `scripts/slr_lineage.py` `emit(stages, incoming_slr_lineage)`. Pre-v3.7.4 passports lack the field and the renderer treats absence as `false` (cold-start fallback identical to pre-v3.7.4 behavior). See `shared/handoff_schemas.md` §"Run-level lineage signal (v3.7.4)" for the field contract, and `docs/design/2026-05-15-issue-111-slr-lineage-emission-design.md` for the design.
|
|
648
|
+
|
|
649
|
+
## Review-target criteria binding lifecycle (#684)
|
|
650
|
+
|
|
651
|
+
When the author confirms a review target, use the #683 resolver and then
|
|
652
|
+
`scripts/review_criteria_binding.py init` with explicit context, registry,
|
|
653
|
+
portable refs, caller-supplied `target_review_id`, and prior manifest when one
|
|
654
|
+
exists. Store only the manifest pointer index through `state_tracker`; the
|
|
655
|
+
manifest is the sole authority. Do not scan for a context, infer target
|
|
656
|
+
metadata from manuscript quality, copy registry prose into prompts, or accept
|
|
657
|
+
caller-reported artifact hashes.
|
|
658
|
+
|
|
659
|
+
Consumer sequencing:
|
|
660
|
+
|
|
661
|
+
1. During Stage 2 `academic-paper` full/plan work, render the `FORMATIVE`
|
|
662
|
+
marker for `structure_architect_agent`, record its completed outline, and
|
|
663
|
+
pass that same receipt/context pointer through argument and drafting. In a
|
|
664
|
+
full run, Phase 6a remains paper-blind under the same authority and its
|
|
665
|
+
pre-commitment artifact is recorded as `INTERNAL` before Phase 6b receives
|
|
666
|
+
the draft. Phase 6b repeats the continuity marker and the orchestrator
|
|
667
|
+
validates any Critical/Major constructive sidecar.
|
|
668
|
+
2. At Stage 3, render five markers from the same manifest for EIC/R1/R2/R3/DA.
|
|
669
|
+
Inject the manifest pointer and Target Criteria Brief into each paper-blind
|
|
670
|
+
Phase 1 call. After all five artifacts exist, record the single
|
|
671
|
+
`external_panel` receipt. Phase 2 receives each unchanged Phase 1 artifact
|
|
672
|
+
plus the manuscript and may then assess applicability.
|
|
673
|
+
3. Before criteria-aware synthesis, validate the manifest against the explicit
|
|
674
|
+
context and registry. A full-pipeline run uses `--require-complete`; a
|
|
675
|
+
mid-entry run validates only consumers actually dispatched and clearly
|
|
676
|
+
reports that its coverage is not the all-three-consumer claim. Never create
|
|
677
|
+
retrospective formative/internal receipts for skipped stages.
|
|
678
|
+
4. Validate every Critical/Major companion with `validate-findings` before it
|
|
679
|
+
is described as contract-conforming. Re-review carries the same manifest by
|
|
680
|
+
pointer. A substantive target change requires a new, non-comparable target
|
|
681
|
+
review id.
|
|
682
|
+
|
|
683
|
+
If no resolved context is available, every relevant dispatch carries
|
|
684
|
+
`criteria_binding_unavailable` and makes no venue-alignment claim. Binding
|
|
685
|
+
failure stops only the criteria-aware handoff; it is not a manuscript gate,
|
|
686
|
+
score, severity, verdict, checkpoint input, or author choice. The CLI is local,
|
|
687
|
+
deterministic, explicit-path-only, and is never a model/judge/network/clock
|
|
688
|
+
consumer.
|
|
689
|
+
|
|
690
|
+
## Handoff material transfer rules
|
|
691
|
+
|
|
692
|
+
| Transition | Transferred Materials | Schema Reference | Transfer Method |
|
|
693
|
+
|-----------|----------------------|-----------------|----------------|
|
|
694
|
+
| Stage 1 -> 2 | RQ Brief, Methodology Blueprint, Annotated Bibliography, Synthesis Report | Schema 1 (RQ Brief), Schema 2 (Bibliography), Schema 3 (Synthesis) | deep-research handoff protocol; when active, separately carry the #683 context/#684 binding pointer named by the preceding lifecycle |
|
|
695
|
+
| Stage 2 -> 2.5 | Complete Paper Draft + #547 scope context for Phase E4 (RQ Brief `scope` — the required E4 input; `sub_question_bindings` + outline section→sub-question map when present) + the Schema 2 Annotated Bibliography (#548 — `search_strategy` is the E5 comparison basis; `sources[].relevance` + `relevance_score` ground the nearest-prior-work check), when one exists + unchanged #684 binding pointer/receipts when active | Schema 4 (Paper Draft) + Schema 1 scope fields + Schema 2 (search_strategy + source relevance metadata) + review-target contracts | Pass to integrity_verification_agent; integrity does not consume criteria as a verdict input |
|
|
696
|
+
| Stage 2.5 -> 3 | Stage 2.5 Paper Draft (verified, or carrying the recorded Integrity Check FAIL Loop partially-unverified warning) + Integrity Report + E6 finding-set companion and, when findings exist, `authorized_to_continue` disposition sidecar + unchanged #684 manifest/context/brief when active | Schema 4 + Schema 5 + `claim-strength-drift-findings/1.0` + conditional `claim-strength-drift-disposition/1.0` + review-target contracts | Pass only after E6 has no findings or every reported row has explicit authorization; restoration/pause does not transfer the current draft. Carry forward `experiment_provenance[]` + `experiment_alignment_results[]` + `experiment_intake_declaration` (#260); the integrity verdict never consumes criteria binding |
|
|
697
|
+
| Stage 3 -> **coaching** -> 4 | Editorial Decision, immutable Revision Roadmap, exact claim surfaces, 5 Review Reports, and the Schema 6 closed `review_panel_provenance` carrier; coaching adds the complete explicit author sidecar without mutating the Roadmap | Schema 6 + `revision-roadmap/1.0` + `claim-surface-manifest/1.0` + `author-adjudication/1.0` | For `reviewer_full`, verify the provenance artifact raw digest and deterministic replay before transfer; preserve its valid/invalid carrier byte-for-byte. Source-ordered dialogue records one explicit author choice per item, exact targets, and any exact claim/collateral authority -> revision mode |
|
|
698
|
+
| Stage 4 -> 3' | Revised Draft, hard-required Original (pre-revision) Draft (the #576 1.1 §3.1 Phase 2A input; the required bundle already carries the exact matched round's pre draft, so declaring it absent is `manifest_incomplete`, never a `first_link_not_run` degradation), Response to Reviewers + Editorial Decision Letter (display only) + the Round-1 Schema 6 `review_panel_provenance` carrier and exact artifact bytes + the Round-1 review findings (the Schema 6 review reports the roadmap items trace to — the #576 §4 level-3 criterion layer; absent → transported Schema 7 fields alone, `[ROUND1-FINDINGS-ABSENT]`) + the Round-1 Revision Roadmap being verified + every ordered apply report and paired revision patch/diff file (`<output>.apply-report.json`, the sidecar beside each revised draft, #390; the manifest pair list must exactly equal the fully replayed bundle's ordered write-round projection, the FIRST report's `base_draft_hash` must equal the Original Draft hash prefix, every inner link must join, and only the LAST output hash may equal the Revised Draft hash prefix; any omission, substitution, reorder, or broken link → `manifest_hash_mismatch`) + the Round-1 Reviewer Configuration Cards (yardstick continuity — field_analyst is NOT re-run at Stage 3'; `re_review_mode_protocol.md` § Yardstick Continuity) + unchanged #684 target-review authority when active | Schema 4 (revised + original) + Schema 8 (Response to Reviewers) + Schema 6 (letter + Round-1 review reports + provenance carrier) + raw provenance artifact + Schema 7 (Roadmap, machine-form JSON — § Stage 3' Re-Review Contract Dispatch producer obligations) + apply-report sidecar JSON + revision patch JSON + configuration cards (no numbered schema) + review-target contracts | Before re-review, verify the carrier's raw artifact digest and deterministic replay; on any absent/unreachable/digest/schema/replay failure use the closed invalid state with six unknown axes, never letter reconstruction. Pass to reviewer (marked as verification round) under § Stage 3' Re-Review Contract Dispatch. This row is the re-review-mode transfer — the default Stage 3'. When the user explicitly requests a fresh full review at 3' instead (mid-entry quick→full path: no Schema 7 Roadmap or Round-1 cards exist), transfer the Revised Draft + available context only, dispatch full mode (field_analyst runs by definition), and do NOT mark it a verification round. A changed target requires a new non-comparable target review id |
|
|
699
|
+
| Stage 3' -> **coaching** -> 4' | New Revision Roadmap (if Major) | #670 authority family + `shared/contracts/re_review/traceability.schema.json` | Pass the immutable roadmap, exact claim surfaces, traceability sidecar, and new complete author sidecar to revision mode; coaching uses a source-ordered explicit author checkpoint, and prior-round choices are never inferred or carried forward |
|
|
700
|
+
| Stage 3' -> 4.5 | (Accept/Minor direct path — no Stage 4' between) Verified Revised Draft + the traceability sidecar with its frozen `previously_missed`/`indeterminate` new-issue records (#576 §8 — Material Passport cargo consumed by the Stage 4.5 gate) | Schema 4 (revised) + traceability sidecar | Pass to integrity_verification_agent (final verification); the frozen records are gate INPUT, not just cargo |
|
|
701
|
+
| Stage 4/4' -> 4.5 | Revised/Re-Revised Draft + #547/#548 context + complete validated `revision-evidence-bundle/1.0` from exact integrity PASS through every review write/no-op/integrity round + (Major-via-4' path) the Stage 3' traceability sidecar with its frozen `previously_missed`/`indeterminate` new-issue records | Schema 4 + #670 bundle + traceability sidecar | Pass to integrity_verification_agent; registered surfaces are replayed, while the explicit unregistered-claim boundary remains mandatory E6 review input |
|
|
702
|
+
| Stage 4.5 -> 5 | Final Accepted Draft (verified, or carrying the recorded Integrity Check FAIL Loop partially-unverified warning) + Final Integrity Report + E6 finding-set companion and, when findings exist, `authorized_to_continue` disposition sidecar + exact preregistration sidecar/companion + independent #660/#672 results | Schema 4 + Schema 5 + E6 finding/disposition contracts + `preregistration-artifact/1.0`; independent advisory schemas | Refuse transfer while E6 derives `restore_required` or `paused`. After E6 closure, at the one mandatory entry checkpoint run #660 then #672 on identical accepted-draft ID/SHA and surface both without changing routing. On confirmation: Produce MD -> DOCX via Pandoc when available (otherwise instructions) -> ask about LaTeX -> confirm -> PDF. Carry forward `experiment_alignment_results[]` + `experiment_intake_declaration` (#260) to formatter surface + Stage 6 histogram |
|
|
703
|
+
| Stage 5 -> 6 | Final deliverables list + Process-Summary projection of pipeline state history and agent logs, explicitly omitting the #673 activity projection of terminal root `run_id`, pending/sealed activity fields, selected-store data, renderer output, and diagnostics | — (Process Record; no numbered schema) | Dispatched only after the user confirms the Stage 5 completion checkpoint (FULL). User may decline Stage 6 there: mark it `skipped`, set pipeline state `completed`. Protocol: `../references/process_summary_protocol.md`; terminal semantics: `../references/pipeline_state_machine.md` § Stage 6 terminal semantics |
|
|
704
|
+
|
|
705
|
+
**#672 sidecar continuity:** At Stage 1, this shell-capable orchestrator alone
|
|
706
|
+
invokes `scripts/build_cross_document_consistency_advisory.py
|
|
707
|
+
build-preregistration-artifact` using the research architect's explicit caller
|
|
708
|
+
declaration, named companion handle, and caller-held RFC3339 `declared_at`. It
|
|
709
|
+
must create exactly one receipt, including an unavailable receipt. Strict-parse,
|
|
710
|
+
digest-check, and replay that exact sidecar and provided companion at every
|
|
711
|
+
transition, then carry both byte-for-byte. Never infer status, repair/rebuild the
|
|
712
|
+
record, follow its display path, or use the repository template as evidence. A
|
|
713
|
+
later explicit user supply requires a new builder-produced sidecar.
|
|
714
|
+
|
|
715
|
+
**All artifacts must carry a Material Passport (Schema 9)** with `origin_skill`, `origin_mode`, `origin_date`, `verification_status`, and `version_label`. From v3.7.4+, the passport also carries the run-level `slr_lineage` boolean computed per the emission step above.
|
|
716
|
+
|
|
717
|
+
**Style Profile carry-through**: If a Style Profile (Schema 10) was produced during `academic-paper` intake (Step 10), carry it through all stages in the Material Passport. The Style Profile is consumed by `draft_writer_agent` (Stage 2) and optionally by `report_compiler_agent` (Stage 1, if applicable). The Style Profile does not affect integrity verification or review stages.
|
|
718
|
+
|
|
719
|
+
### 5. Exception Handling
|
|
720
|
+
|
|
721
|
+
| Exception Scenario | Handling |
|
|
722
|
+
|-------------------|---------|
|
|
723
|
+
| User abandons midway | Save current pipeline state; inform user they can resume anytime |
|
|
724
|
+
| User wants to skip a stage | Assess risk: integrity stages and failure-mode blocks cannot be skipped; only explicitly skippable stages may be skipped with warning |
|
|
725
|
+
| Review result is Reject | Provide two options: (a) return to Stage 2 for major restructuring (b) abandon this paper |
|
|
726
|
+
| Stage 3' gives Major | Enter Stage 4' (last revision opportunity); after revision, proceed directly to Stage 4.5 |
|
|
727
|
+
| Integrity check FAIL for 3 rounds | List unverifiable items; user decides how to proceed |
|
|
728
|
+
| User requests jumping directly to Stage 5 | Check if Stage 4.5 has been passed; if not, must do final integrity verification first |
|
|
729
|
+
| Stage 5 output process | Step 1: Produce MD -> Step 2: Generate DOCX via Pandoc when available (otherwise provide instructions) -> Step 3: Ask "Need LaTeX?" -> Step 4: User confirms content is correct -> Step 5: Produce PDF (final version) |
|
|
730
|
+
| Error during skill execution | Do not self-repair; report error and suggest: retry / switch mode / pause. Do not skip mandatory integrity or failure-mode gates |
|
|
731
|
+
|
|
732
|
+
---
|
|
733
|
+
|
|
734
|
+
## Scope (delegate, don't perform)
|
|
735
|
+
|
|
736
|
+
1. **Paper writing** — delegate to `academic-paper`
|
|
737
|
+
2. **Research** — delegate to `deep-research`
|
|
738
|
+
3. **Review** — delegate to `academic-paper-reviewer`
|
|
739
|
+
4. **Citation verification** — delegate to `integrity_verification_agent`
|
|
740
|
+
5. **Decisions** — offer suggestions and options; final decisions are the user's
|
|
741
|
+
6. **Skill outputs** — treat as authoritative; quality is owned by each skill
|
|
742
|
+
|
|
743
|
+
## Hard boundaries (never violate)
|
|
744
|
+
|
|
745
|
+
7. **Do not fabricate materials** — if a stage's output does not exist, surface the gap; do not invent
|
|
746
|
+
8. **Do not skip checkpoints** — explicit user confirmation is required after each stage
|
|
747
|
+
9. **Do not skip integrity checks** — Stage 2.5 and 4.5 are mandatory, no override
|
|
748
|
+
|
|
749
|
+
---
|
|
750
|
+
|
|
751
|
+
## Context Hygiene at dispatch (#89/#388)
|
|
752
|
+
|
|
753
|
+
Documents in an agent's context that are not its working target measurably worsen its output — the distractor result from DELEGATE-52 (arXiv:2604.15597). The orchestrator is the single point where stage materials are assembled into a dispatch, so the trim discipline lives here:
|
|
754
|
+
|
|
755
|
+
- **Dispatch the stage's declared inputs, not the accumulated pipeline.** Each handoff carries what the receiving agent's input contract names, plus the Material Passport (the designed cross-stage ledger) — never "everything produced so far" as a convenience bundle.
|
|
756
|
+
- **Scratch output does not ride forward.** Intermediate tool output, superseded draft fragments, and resolved checkpoint dialogues stay in the originating stage; a later stage that needs a fact from them reads the passport entry, not the raw transcript.
|
|
757
|
+
- **Supersession means removal.** When a revision round replaces a draft, dispatch the current version only; prior versions stay retrievable through the versioned-artifact trail (see Reproducibility) without occupying the next agent's context.
|
|
758
|
+
- The aggregate carry-forward obligations stay intact: everything the passport-enumeration rules require (claim/audit aggregates, `experiment_intake_declaration`, `slr_lineage`) is part of the passport, not a distractor — trimming applies to loose materials outside the passport, never to passport fields.
|
|
759
|
+
|
|
760
|
+
*Epistemic status: this is a dispatch-assembly discipline, not a runtime guarantee — the orchestrator controls what it assembles into each dispatch and must not assemble distractors; it cannot strip context the platform itself injects.*
|
|
761
|
+
|
|
762
|
+
---
|
|
763
|
+
|
|
764
|
+
## Collaboration with state_tracker_agent
|
|
765
|
+
|
|
766
|
+
Notify state_tracker_agent to update state whenever a stage begins or completes:
|
|
767
|
+
|
|
768
|
+
- Stage begins: `update_stage(stage_id, "in_progress", mode)`
|
|
769
|
+
- Stage completes: `update_stage(stage_id, "completed", outputs)`
|
|
770
|
+
- Checkpoint waiting: `update_pipeline_state("awaiting_confirmation")`
|
|
771
|
+
- Checkpoint passed: `update_pipeline_state("running")`
|
|
772
|
+
- Material produced: `update_material(material_name, true)`
|
|
773
|
+
- Integrity check result: `update_integrity(stage_id, verdict, details)`
|
|
774
|
+
- Pipeline terminal transition: on the Stage 6 terminal acknowledgement (`finish` / `end` / `done` / `confirm`, or an unambiguous natural-language equivalent) — `update_stage("6", "completed", outputs)` + `update_pipeline_state("completed")`; if the user declined Stage 6 at the Stage 5 completion checkpoint — `update_stage("6", "skipped", {reason: "user declined Stage 6"})` + `update_pipeline_state("completed")`. Persist this transition first, without consulting activity metadata.
|
|
775
|
+
|
|
776
|
+
Request state_tracker_agent to produce the Progress Dashboard when needed.
|
|
777
|
+
|
|
778
|
+
### Post-terminal adjudication-activity sequence (#673)
|
|
779
|
+
|
|
780
|
+
After the existing terminal transition above is durable, and only when the user
|
|
781
|
+
selected an explicit local activity store, perform this best-effort sequence:
|
|
782
|
+
|
|
783
|
+
1. pass the explicit state path, artifact-root path, and the state tracker's
|
|
784
|
+
explicit five-row `pending_adjudication_activity_bindings[]` value to
|
|
785
|
+
`seal_terminal_inventory(state_path, artifact_root, pending_bindings)`;
|
|
786
|
+
2. let that deterministic helper calculate raw artifact hashes and atomically
|
|
787
|
+
seal the root `adjudication_activity_sources` inventory without changing the
|
|
788
|
+
already-terminal state/stage/status;
|
|
789
|
+
3. run `build-input` using only that sealed inventory, then idempotent
|
|
790
|
+
`append-run`, and optionally `render`.
|
|
791
|
+
|
|
792
|
+
The helper may not discover the pending field itself, accept caller-reported
|
|
793
|
+
hashes, infer paths, scan/glob a directory, or use a clock/network/model. Any
|
|
794
|
+
seal/build/append/render failure is surfaced only as an advisory diagnostic and
|
|
795
|
+
does not roll back, delay, or rewrite the terminal outcome. The terminal state
|
|
796
|
+
file's root `run_id` plus sealed root `adjudication_activity_sources` are exact
|
|
797
|
+
source/run authority; the pending rows are not.
|
|
798
|
+
|
|
799
|
+
---
|
|
800
|
+
|
|
801
|
+
## Post-Review Socratic Revision Coaching
|
|
802
|
+
|
|
803
|
+
**Trigger condition**: After Stage 3 completion with Decision = Minor/Major Revision (both route to Stage 4), OR after Stage 3' completion with Decision = Major Revision (routes to Stage 4'). A Stage 3' Minor decision does NOT trigger coaching — it routes directly to Stage 4.5 per the state machine (`Accept|Minor -> 4.5`), so there is no coaching step on that path.
|
|
804
|
+
**Executor**: academic-paper-reviewer's eic_agent (Phase 2.5)
|
|
805
|
+
**Purpose**: Help users understand review comments and plan revision strategy, rather than passively receiving a change list
|
|
806
|
+
|
|
807
|
+
### Stage 3 -> 4 Transition Coaching Process
|
|
808
|
+
|
|
809
|
+
```
|
|
810
|
+
1. Present Editorial Decision and Revision Roadmap
|
|
811
|
+
2. Launch Revision Coaching — the Journal-Fit Reviewer follows the authoritative six-step Phase 2.5 list in academic-paper-reviewer/SKILL.md (incl. the #393 contribution framing probe); illustrative sketch only, not a separate question list:
|
|
812
|
+
- "After reading the review comments, what surprised you the most?"
|
|
813
|
+
- "What are the consensus issues among the five reviewers? What do you think?"
|
|
814
|
+
- "The Devil's Advocate's strongest counter-argument is [X], how do you plan to respond?"
|
|
815
|
+
- "If you could only change three things, which three would you pick?"
|
|
816
|
+
- Guide the user to prioritize revisions themselves
|
|
817
|
+
3. Output: User-formulated revision strategy + reprioritized Roadmap
|
|
818
|
+
4. Enter Stage 4 (REVISE)
|
|
819
|
+
```
|
|
820
|
+
|
|
821
|
+
### Stage 3' -> 4' Transition Coaching Process
|
|
822
|
+
|
|
823
|
+
```
|
|
824
|
+
1. Present Re-Review results and residual issues
|
|
825
|
+
2. Launch Residual Coaching (the Journal-Fit Reviewer guides via Socratic dialogue):
|
|
826
|
+
- "What problems did the first round of revisions solve? Why are the remaining ones harder?"
|
|
827
|
+
- "Is it insufficient evidence, unclear argumentation, or a structural problem?"
|
|
828
|
+
- "This is the last revision opportunity — which items can be marked as study limitations?"
|
|
829
|
+
- Plan a revision approach for each residual issue
|
|
830
|
+
3. Output: Focused revision plan + trade-off decisions
|
|
831
|
+
4. Enter Stage 4' (RE-REVISE)
|
|
832
|
+
```
|
|
833
|
+
|
|
834
|
+
### Coaching Rules
|
|
835
|
+
|
|
836
|
+
- Each round response 200-400 words, ask more than answer
|
|
837
|
+
- First acknowledge what was done well in the revision
|
|
838
|
+
- User says "just fix it" "no guidance needed" -> respect the choice, skip coaching
|
|
839
|
+
- Stage 3->4 max 8 rounds, Stage 3'->4' max 5 rounds
|
|
840
|
+
- Decision = Accept does not trigger coaching (any stage); a Stage 3' Minor decision also does not trigger coaching (routes directly to Stage 4.5)
|
|
841
|
+
|
|
842
|
+
---
|
|
843
|
+
|
|
844
|
+
## Collaboration with integrity_verification_agent
|
|
845
|
+
|
|
846
|
+
| Timing | Action |
|
|
847
|
+
|--------|--------|
|
|
848
|
+
| After Stage 2 completion | Invoke integrity_verification_agent (Mode 1: pre-review) |
|
|
849
|
+
| Integrity check FAIL | Fix paper based on correction list, invoke verification again |
|
|
850
|
+
| After Stage 4/4' completion | Invoke integrity_verification_agent (Mode 2: final-check) |
|
|
851
|
+
| Final verification FAIL | Fix and re-verify (max 3 rounds) |
|
|
852
|
+
|
|
853
|
+
---
|
|
854
|
+
|
|
855
|
+
## Mid-Entry Material Passport Check
|
|
856
|
+
|
|
857
|
+
When a user enters the pipeline mid-way (e.g., bringing an existing paper), the orchestrator MUST check for a Material Passport before deciding whether to require full Stage 2.5 verification.
|
|
858
|
+
|
|
859
|
+
### Decision Tree
|
|
860
|
+
|
|
861
|
+
```
|
|
862
|
+
Mid-Entry Material Passport Check:
|
|
863
|
+
|
|
864
|
+
1. Does the material have a Material Passport (Schema 9)?
|
|
865
|
+
NO -> Require full verification from appropriate stage
|
|
866
|
+
(paper draft -> Stage 2.5; revised draft -> Stage 4.5)
|
|
867
|
+
YES -> Continue to step 2
|
|
868
|
+
|
|
869
|
+
2. Is verification_status = "VERIFIED"?
|
|
870
|
+
NO -> Require full verification
|
|
871
|
+
(UNVERIFIED or STALE both require re-verification)
|
|
872
|
+
YES -> Continue to step 3
|
|
873
|
+
|
|
874
|
+
3. Is integrity_pass_date within current session or < 24 hours?
|
|
875
|
+
NO -> Mark passport as STALE, require re-verification
|
|
876
|
+
"Your integrity verification from [date] is more than 24 hours old.
|
|
877
|
+
Re-verification is required."
|
|
878
|
+
YES -> Continue to step 4
|
|
879
|
+
|
|
880
|
+
4. Has content been modified since verification? (compare version_label)
|
|
881
|
+
YES -> Require re-verification
|
|
882
|
+
"The paper has been modified since the last integrity check
|
|
883
|
+
(version [old] -> [new]). Re-verification is required."
|
|
884
|
+
NO -> Require Stage 2.5 verification:
|
|
885
|
+
"Your paper passed integrity check on [date] (version [label]),
|
|
886
|
+
but Stage 2.5 remains mandatory for this pipeline run.
|
|
887
|
+
Re-run Stage 2.5 and attach the prior report as context."
|
|
888
|
+
```
|
|
889
|
+
|
|
890
|
+
### Rules
|
|
891
|
+
|
|
892
|
+
- **Stage 2.5 can NEVER be skipped** via Material Passport. Prior reports can inform the rerun, but Stage 2.5 still executes in every pipeline run
|
|
893
|
+
- **Stage 4.5 can NEVER be skipped** via Material Passport, regardless of passport status. Final integrity check always requires full Mode 2 verification
|
|
894
|
+
- **Passport freshness threshold**: 24 hours. Sessions that span multiple days should trigger re-verification
|
|
895
|
+
- **Content hash comparison**: If `content_hash` is available in the passport, use it for reliable change detection. If not available, fall back to `version_label` comparison
|
|
896
|
+
- **Audit trail**: Log the passport check decision (rerun required / stale / changed) in state_tracker for the pipeline audit trail
|
|
897
|
+
|
|
898
|
+
---
|
|
899
|
+
|
|
900
|
+
## Tortured-Phrase Advisory Dispatch (#660)
|
|
901
|
+
|
|
902
|
+
After Stage 4.5 passes, and immediately before Stage 5 converts the exact
|
|
903
|
+
accepted working draft, dispatch `scripts/tortured_phrase_screening.py` on that
|
|
904
|
+
draft. The input draft and output advisory paths must differ. Supply only an
|
|
905
|
+
explicitly named local canonical snapshot and detached manifest; the manifest
|
|
906
|
+
must bind the exact raw snapshot bytes by SHA-256 and declare
|
|
907
|
+
`user_supplied` or `synthetic_fixture`. If the pair is intentionally absent,
|
|
908
|
+
retain the runtime's explicit `not_checked` result rather than skipping the
|
|
909
|
+
record or calling the draft clean. A partial, invalid, mismatched, unsupported,
|
|
910
|
+
or nonzero-unsupported-rule pair is degraded/unresolved and never becomes a
|
|
911
|
+
zero-match result.
|
|
912
|
+
|
|
913
|
+
A scan may atomically write a schema-valid degraded advisory and then exit 1.
|
|
914
|
+
Preserve and validate that exact artifact, surface its reason, and never delete it,
|
|
915
|
+
skip its handoff, or reinterpret the nonzero status as a new Stage 4.5 or terminal
|
|
916
|
+
gate.
|
|
917
|
+
|
|
918
|
+
Pass `checked_at` and `recorded_at` as explicit RFC 3339 inputs. This path must
|
|
919
|
+
not read the system clock, file times, Git time, timezone, or network time. It
|
|
920
|
+
has no native PPS parser/importer, URL fetch path, or redistributed PPS list
|
|
921
|
+
content and invokes no model, external API, human/model judge, contextual
|
|
922
|
+
classifier, or expensive evaluation. Do not attempt to manufacture or repair a
|
|
923
|
+
snapshot from remembered phrases or fetched content.
|
|
924
|
+
|
|
925
|
+
Validate the complete `tortured-phrase-advisory/1.0` before handoff to the
|
|
926
|
+
formatter. It is always `layer: HEURISTIC-ADVISORY` and
|
|
927
|
+
`evaluation_status: UNMEASURED`. The fixed positive meaning is **phrase-list
|
|
928
|
+
match requiring review**; a zero match means only no match was observed on the
|
|
929
|
+
exact checked bytes and is not a clean certification. It never establishes
|
|
930
|
+
AI/author origin, paper-mill production, misconduct, contextual validity,
|
|
931
|
+
precision/recall, false-positive/false-negative rate, list coverage, or
|
|
932
|
+
publisher acceptance.
|
|
933
|
+
|
|
934
|
+
This advisory does not alter the Stage 4.5 verdict, the mandatory Stage-5 checkpoint,
|
|
935
|
+
or any terminal-policy state. It never edits the draft or suggests replacement
|
|
936
|
+
text. Surface the validated report and let the user preserve, revise, or
|
|
937
|
+
proceed. A revision changes the input bytes, invalidates the current advisory,
|
|
938
|
+
and must return through the existing integrity/final-screen sequence; the
|
|
939
|
+
checker itself never rewrites. The formatter only renders the already validated
|
|
940
|
+
artifact and does not rerun matching or change counts.
|
|
941
|
+
|
|
942
|
+
Carry schema-valid `bibliographic-integrity-signal/1.2` cited-source rows
|
|
943
|
+
forward unchanged. They are independently bound to `cited_title` and
|
|
944
|
+
`cited_abstract`; a missing abstract stays `not_checked` / `unresolved` with
|
|
945
|
+
`ABSTRACT_MISSING`. These rows compose lexically in the one existing
|
|
946
|
+
`Bibliographic Integrity Advisories` section. They have
|
|
947
|
+
`display.marker_token: null` and `terminal_policy.eligible: false`; the
|
|
948
|
+
Cite-Time Provenance Finalizer must not promote them, and neither finalizer nor
|
|
949
|
+
formatter may create a marker, gate, terminal token, rewrite, or replacement
|
|
950
|
+
from them. Corpus enrichment is producer-owned, returns a new passport copy,
|
|
951
|
+
and never authorizes this read-only orchestrator to mutate a passport in place.
|
|
952
|
+
|
|
953
|
+
---
|
|
954
|
+
|
|
955
|
+
## Cross-Document Consistency Advisory Dispatch (#672)
|
|
956
|
+
|
|
957
|
+
At the same single mandatory Stage-5 entry checkpoint, after the same exact
|
|
958
|
+
Stage 4.5 terminal resolution (PASS, or a recorded Integrity Check FAIL Loop
|
|
959
|
+
continuation), run #660 first and #672 second. Both use the identical designated
|
|
960
|
+
accepted draft. Enforce this exact machine join before either carrier is shown:
|
|
961
|
+
|
|
962
|
+
```text
|
|
963
|
+
#660 input_binding.artifact.artifact_id
|
|
964
|
+
== #672 input_binding.accepted_draft_artifact_id
|
|
965
|
+
#660 input_binding.artifact.artifact_sha256
|
|
966
|
+
== #672 input_binding.accepted_draft_sha256
|
|
967
|
+
```
|
|
968
|
+
|
|
969
|
+
Build the #672 source manifest with exactly two entries: the designated accepted
|
|
970
|
+
draft and the exact current `preregistration-artifact/1.0` projection. Every
|
|
971
|
+
manuscript/disclosure evidence slot binds that accepted-draft ID; only the
|
|
972
|
+
preregistration slot binds the sidecar artifact. For `provided`, replay the
|
|
973
|
+
named companion and project the same path, provenance, hashes, and sizes as
|
|
974
|
+
`present`. Project `not_provided` to `source_missing`; preserve
|
|
975
|
+
`access_failed`/`retrieval_failed`; all unavailable projections keep the sidecar
|
|
976
|
+
ID with null path/bindings and `not_provided` provenance. A provided companion
|
|
977
|
+
that no longer replays is `SOURCE_BINDING_INVALID`, never not checked.
|
|
978
|
+
|
|
979
|
+
Invoke the finalizer only with the explicitly named draft, source manifest,
|
|
980
|
+
sidecar, accepted manuscript, and provided companion. It must replay the full
|
|
981
|
+
sidecar/source bundle before observations and bind the accepted-draft ID/SHA,
|
|
982
|
+
sidecar raw SHA/record digest, manifest SHA, draft SHA, and bundle SHA. Methods
|
|
983
|
+
absence requires an exact named counterpart scope. A performed preregistration
|
|
984
|
+
finding requires its third exact manuscript disclosure-scope witness.
|
|
985
|
+
|
|
986
|
+
Surface #672 only as a separate `LLM-ADVISORY` / `UNMEASURED` `ADV-XDOC-*`
|
|
987
|
+
carrier. It has no PASS/FAIL, score, confidence, severity, gate, readiness,
|
|
988
|
+
authorization, acceptance, ClaimIntent, rewrite, consent/protocol duplicate, or
|
|
989
|
+
clean/agreement meaning. It cannot change Integrity Report issue counts or
|
|
990
|
+
verdict, Stage 4.5, formatter/terminal policy, the checkpoint, or Stage-5 routing.
|
|
991
|
+
|
|
992
|
+
Keep the failure models independent. If #660 exits 1 after writing a schema-valid
|
|
993
|
+
degraded artifact, preserve and validate it. If #672 fails contract/runtime
|
|
994
|
+
validation, write or replace no advisory and retain only its closed, bounded,
|
|
995
|
+
redacted `ADVISORY_UNAVAILABLE:<CODE>` diagnostic. Neither result blocks or
|
|
996
|
+
delays the checkpoint or requires remediation before Stage 5.
|
|
997
|
+
|
|
998
|
+
Any manuscript revision stales both carriers. Return through existing integrity
|
|
999
|
+
review to a fresh exact Stage 4.5 terminal resolution (PASS, or a recorded
|
|
1000
|
+
FAIL-loop continuation), then rerun #660 followed by #672 on the new accepted
|
|
1001
|
+
bytes. Reusing either old carrier or rerunning only one is invalid
|
|
1002
|
+
handoff cargo. Rendering is replay-first, one explicit page of at most 25, with
|
|
1003
|
+
no `--all`. See
|
|
1004
|
+
`shared/references/cross_document_consistency_advisory_protocol.md`.
|
|
1005
|
+
|
|
1006
|
+
---
|
|
1007
|
+
|
|
1008
|
+
## Cite-Time Provenance Finalizer (v3.7.1)
|
|
1009
|
+
|
|
1010
|
+
When `academic-pipeline` mode is active, the orchestrator runs the **Cite-Time Provenance Finalizer** at every Stage 4 → Stage 5 transition (and on every revision loop pass back through Stage 4) to resolve the two-layer citation markers emitted by `synthesis_agent`, `draft_writer_agent`, and `report_compiler_agent` per Step 3a.
|
|
1011
|
+
|
|
1012
|
+
**Trigger boundary:** Stage transition from drafting (Stage 4) to formatting (Stage 5), mirroring the v3.6.7 Step 6 audit_artifact gate. The finalizer runs BEFORE `formatter_agent`'s hard-gate check.
|
|
1013
|
+
|
|
1014
|
+
**Inputs (read-only):**
|
|
1015
|
+
|
|
1016
|
+
- The current draft markdown containing `<!--ref:slug-->` HTML-comment markers (one per emitted citation, per Step 3a's two-layer form).
|
|
1017
|
+
- The Material Passport `literature_corpus[]` entries (each carries `citation_key`, `source_acquired`, `source_verified_against_original`).
|
|
1018
|
+
- The peer-file `<session>_human_read_log.yaml` (path computed as `<passport-path-parent>/<passport-stem>_human_read_log.yaml` per §3.6 round-5 R5-003 amend) — records `USER_ATTESTED_READ` declarations. It is user attestation, not independent proof of reading or comprehension.
|
|
1019
|
+
|
|
1020
|
+
**Join semantics:** for each `<!--ref:slug-->` marker, apply the v3.7.3 anchor precedence before consulting reading state: a missing marker, `kind=none`, an out-of-enum kind, or an empty value routes to MED-WARN-NO-LOCATOR and never reaches the read matrix. For a valid `{quote,page,section,paragraph}` anchor, dereference `slug` against `literature_corpus[]` to obtain `(source_acquired, source_verified_against_original)`, then pass the read-log, `citation_key`, and that exact anchor to `scripts/human_read_attestation_resolver.py`. The resolver strictly validates the current closed ledger, `USER_ATTESTED_READ` type/scope pairing, RFC3339-UTC event order, and anchor enum before returning a closed state, `ok_eligible`, and `finalizer_disposition`; only `state=covered` is eligible for `ok`. Its JSON is a transient routing decision, not an audit receipt: never persist or replay it, and recompute it from the current ledger and anchor on every pass. The `literature_corpus[]` schema is NOT mutated (per §3.6 firm rule #1: derived keys are not stored).
|
|
1021
|
+
|
|
1022
|
+
**4-cell resolution matrix (from spec §3.3 lines 174-179):**
|
|
1023
|
+
|
|
1024
|
+
| `source_acquired` | `source_verified_against_original` | `user_attested_read_covered` | Resolution |
|
|
1025
|
+
|-------------------|-----------------------------------|---------------------|------------|
|
|
1026
|
+
| false | — | — | **HIGH WARN**: cite has no original source on file. Replace `<!--ref:slug-->` with `[UNVERIFIED CITATION — NO ORIGINAL]<!--ref:slug-->` |
|
|
1027
|
+
| true | false | — | **MED WARN**: PDF in repo but AI has not cross-checked (regardless of whether the user has read it; AI verification is the gating condition). Replace with `[UNVERIFIED CITATION — AI HAS NOT CROSS-CHECKED]<!--ref:slug-->` |
|
|
1028
|
+
| true | true | false | **LOW WARN**: AI cross-checked, user has not. Replace with `<!--ref:slug LOW-WARN-->`; also append the slug to a per-section pre-finalization checklist artifact for the user. |
|
|
1029
|
+
| true | true | true | **OK**: replace with `<!--ref:slug ok-->` |
|
|
1030
|
+
|
|
1031
|
+
**Idempotency:** the finalizer pass is idempotent on the join of `(literature_corpus[]` row, read-log row`)` for each slug — re-running on a resolved marker with byte-identical input evidence yields byte-identical output. The matrix is re-applied to every `<!--ref:slug ...-->` on every pass; resolution tracks the current evidence, not a sticky historical state. Concretely:
|
|
1032
|
+
|
|
1033
|
+
- When the joined evidence (`source_acquired`, `source_verified_against_original`, the deterministic `USER_ATTESTED_READ` resolution, and the citation's own `<!--anchor:<kind>:<value>-->`) is unchanged between passes, the marker's resolved form is byte-identical to the prior pass. A revision that moves an anchor from a covered to an uncovered locator re-resolves the marker even when corpus and ledger are unchanged.
|
|
1034
|
+
- When the joined evidence changes between passes (user acquires / verifies the source, runs `/ars-mark-read <refcode> --scope <level>`, or runs `/ars-unmark-read <refcode>` to rescind a prior mark), the next finalizer pass re-applies the matrix from the new triple and re-emits the resolved form. Promotion (e.g. `LOW-WARN` → `ok` after a deterministically covered `/ars-mark-read` declaration) and demotion (e.g. `ok` → `LOW-WARN` after `/ars-unmark-read`, since spec §3.6 line 325/340 makes the most recent timestamped event win) are both possible.
|
|
1035
|
+
|
|
1036
|
+
In other words: the resolved status is a pure function of the corpus row, exact anchor, and deterministic attestation resolution; user-facing remediation and rescind affordances both round-trip through the matrix.
|
|
1037
|
+
|
|
1038
|
+
**Revision loops:** on revision loops (Stage 4 → reviewer → Stage 4 revise; or `academic-paper` Phase 6 → Phase 4 loops), the finalizer re-runs against the current draft, resolves any newly-emitted bare `<!--ref:slug-->` comments introduced in the revision pass, and re-applies the matrix to existing resolved markers per the idempotency rule above. Resolved markers **do not invalidate** in the sense that nothing about the revision-loop mechanism itself perturbs them — only a change in the joined evidence (acquire / verify / `/ars-mark-read` / `/ars-unmark-read`, or — #513 — a revision editing the citation's anchor under a partial-coverage attestation) can move a marker. When evidence is unchanged across a revision pass, every marker is preserved byte-identical.
|
|
1039
|
+
|
|
1040
|
+
**LOW-WARN promotion:** when the user runs `/ars-mark-read <refcode> --scope ...` between finalizer passes, the next pass resolves the exact attestation/anchor pair. It reaches row 4 (`<!--ref:slug ok-->`) only when the resolver returns `state=covered` and `ok_eligible: true`. A declaration alone is not enough. The finalizer does not delete the LOW-WARN entry from the per-section checklist artifact; that artifact is informational and the user clears it manually (or it falls out at the next checklist regeneration).
|
|
1041
|
+
|
|
1042
|
+
**Read-scope-aware promotion (#513 as superseded by #738).** Every new mark carries explicit `read_scope` (`{level, locators[], note}`, schema `shared/contracts/passport/human_read_log.schema.json`) and `attestation_type: USER_ATTESTED_READ`; scope-less legacy rows remain parseable but do not gain inferred coverage. Run `scripts/human_read_attestation_resolver.py` rather than interpreting free text in the prompt. Its state mapping is closed: `covered` → `eligible_for_ok` (row 4 only when the source matrix also permits); `partial_coverage` or `coverage_unknown` on an active mark → `acknowledged_partial` and `<!--ref:slug LOW-WARN-PARTIAL-COVERAGE-->`; `not_attested` or `rescinded` → `unacknowledged_low_warn` and plain `<!--ref:slug LOW-WARN-->`, never the partial marker; `ledger_invalid` → `block_invalid_ledger`, emit `<!--ref:slug READ-LEDGER-INVALID-->` plus the bounded validation reason and stop the transition; `anchor_unresolved` → the precedence-zero MED-WARN-NO-LOCATOR route, never a read-state acknowledgment. `full_text` covers a valid resolved anchor; `sections` uses only explicit `page`/`p.`/`pp.` ranges or exact normalized `section`/`paragraph` locators—bare numbers and cross-kind strings never cover; `abstract_only`, `toc_only`, nonmatching sections, and quote-without-full-text remain partial; legacy missing or explicit `unknown` scope remains unknown. Any ledger, scope, event, or anchor change requires recomputation.
|
|
1043
|
+
|
|
1044
|
+
**Hard-gate handoff:** except for the closed `ledger_invalid` branch above—which stops the transition immediately—the finalizer mutates the draft in place, then the orchestrator advances to Stage 5 where `formatter_agent` carries the hard-gate refusal rule. Any `[UNVERIFIED CITATION ...]` literal or any unresolved `<!--ref:slug-->` whose status is neither `ok`, explicitly acknowledged plain `LOW-WARN`, nor `LOW-WARN-PARTIAL-COVERAGE` forces refusal; `READ-LEDGER-INVALID` is intentionally outside the allowed status set and therefore refuses as defense in depth.
|
|
1045
|
+
|
|
1046
|
+
**Audit trail:** the finalizer's per-pass resolution counts (HIGH WARN / MED WARN / LOW WARN / OK / unresolved) are logged via `state_tracker` for the pipeline audit trail and surface in the Stage 4.5 integrity-check report.
|
|
1047
|
+
|
|
1048
|
+
## Cite-Time Provenance Finalizer — v3.7.3 extension (5-cell + contamination annotation)
|
|
1049
|
+
|
|
1050
|
+
Extends the v3.7.1 4-cell matrix above with two additive checks. External motivation: Zhao et al. arXiv:2605.07723 (2026-05). Spec: `docs/design/2026-05-12-ars-v3.7.3-claim-faithfulness-and-contaminated-source-spec.md` §3.1 + §3.2.
|
|
1051
|
+
|
|
1052
|
+
### Precedence-zero check: locator presence (L3-1)
|
|
1053
|
+
|
|
1054
|
+
Before applying the 4-cell matrix on `(source_acquired, source_verified_against_original, user_attested_read_covered)`, the finalizer inspects the trailing `<!--anchor:<kind>:<value>-->` comment that follows each ref marker. **The ref marker matches all 0/1/2-token shapes** — the bare pre-resolution form `<!--ref:slug-->`, the v3.7.1 finalizer-resolved forms `<!--ref:slug ok-->` / `<!--ref:slug LOW-WARN-->`, AND the v3.7.3 contamination-annotated forms `<!--ref:slug ok CONTAMINATED-PREPRINT-->` / `<!--ref:slug LOW-WARN CONTAMINATED-PREPRINT+UNMATCHED-->`. The finalizer must NOT match only the bare pre-resolution shape, because revision-loop reruns re-apply the matrix to already-resolved markers (per the v3.7.1 idempotency clause above); a re-run that only recognizes the bare shape would miss the anchor pairing on previously-resolved citations and treat them as locator-less. v3.7.3 codex round-7 F16 closure.
|
|
1055
|
+
|
|
1056
|
+
**Optional whitespace and newlines between the ref marker and the anchor marker are allowed and consumed** — the finalizer regex matches `<!--ref:slug [0-2 status tokens]-->\s*<!--anchor:...-->` (where `\s` covers space, tab, and newline). An LLM that emits the two markers across lines must not be treated as having no anchor; the finalizer pairs them by adjacency-modulo-whitespace, not strict adjacency. v3.7.3 gemini review F2 closure.
|
|
1057
|
+
|
|
1058
|
+
- If the citation has no `<!--anchor:...-->` marker at all (legacy v3.7.1 Two-Layer prose, or contract violation), the finalizer treats it as `<!--anchor:none:-->`.
|
|
1059
|
+
- If `<kind>` = `none`, the finalizer resolves the citation to **MED-WARN-NO-LOCATOR** regardless of the underlying trust state. Replace the marker pair with `[UNVERIFIED CITATION — NO QUOTE OR PAGE LOCATOR]<!--ref:slug--><!--anchor:none:-->`.
|
|
1060
|
+
- If `<kind>` ∈ `{quote, page, section, paragraph}`, the finalizer proceeds to the 4-cell matrix above.
|
|
1061
|
+
|
|
1062
|
+
NO-LOCATOR is MED severity (not HIGH) because the citation may still point at a real verified source — only the claim-anchor is missing. Treating it as HIGH would conflate two distinct defects (no source vs no anchor). The fix is locator emission by re-running the upstream agent or manual editing, not source acquisition.
|
|
1063
|
+
|
|
1064
|
+
**`/ars-mark-read` does NOT clear NO-LOCATOR.** The precedence-zero rule stops BEFORE applying the trust-state matrix on `(source_acquired, source_verified_against_original, user_attested_read_covered)`. Acknowledgment can affect only the deterministic attestation state, which is part of the 4-cell matrix that NO-LOCATOR bypasses. The only remediation is re-emitting the citation with a valid (`<kind>` ≠ `none`) anchor. This asymmetry is intentional: a locator is a structural property of the prose, not an evidence-state property of the source. v3.7.3 codex review P2-2 closure.
|
|
1065
|
+
|
|
1066
|
+
### Contamination annotation (L3-2)
|
|
1067
|
+
|
|
1068
|
+
After the 4-cell matrix resolves a citation to `ok` or `LOW-WARN`, the finalizer reads the entry's `contamination_signals` object from `literature_corpus[]` (if present) and appends an annotation suffix. (#513: `LOW-WARN-PARTIAL-COVERAGE` behaves as `LOW-WARN` throughout this section's — and the v3.9.0/v3.10/v3.11 extensions' — `ok`/`LOW-WARN` base-status enumerations: suffixes attach the same way, `policy_hash` stamping applies the same way, and `scripts/check_v3_10_policy.py` recognizes it as a base status.)
|
|
1069
|
+
|
|
1070
|
+
| Base resolution | contamination_signals state | Annotated marker |
|
|
1071
|
+
|---|---|---|
|
|
1072
|
+
| `ok` or `LOW-WARN` | object absent OR both fields false / missing | unchanged (`<!--ref:slug ok-->` or `<!--ref:slug LOW-WARN-->`) |
|
|
1073
|
+
| `ok` or `LOW-WARN` | `preprint_post_llm_inflection: true` only | append `CONTAMINATED-PREPRINT` |
|
|
1074
|
+
| `ok` or `LOW-WARN` | `semantic_scholar_unmatched: true` only | append `CONTAMINATED-UNMATCHED` |
|
|
1075
|
+
| `ok` or `LOW-WARN` | both fields true | append `CONTAMINATED-PREPRINT+UNMATCHED` |
|
|
1076
|
+
|
|
1077
|
+
Example: `<!--ref:smith2024 LOW-WARN CONTAMINATED-PREPRINT-->` or `<!--ref:smith2024 ok CONTAMINATED-PREPRINT+UNMATCHED-->`.
|
|
1078
|
+
|
|
1079
|
+
**Advisory by default.** The contamination annotation SUFFIX does not change the gate decision: `ok CONTAMINATED-...` passes the formatter hard-gate and `LOW-WARN CONTAMINATED-...` is eligible for user attestation via `/ars-mark-read <slug> --scope <level>` exactly like plain LOW-WARN; promotion still requires deterministic anchor coverage. The suffix surfaces the signal so the user can verify the source or remove the citation. (v3.10 adds an OPT-IN terminal channel: when the passport's `terminal_policies.contamination_triangulation` is `strict` / `strict_articles_only`, a k=3 signal additionally co-emits a `TERMINAL-BLOCK` token that the formatter refuses on — see § Cite-Time Provenance Finalizer — v3.10 extension. The advisory suffix itself stays advisory; the terminal block is a separate, additional token.)
|
|
1080
|
+
|
|
1081
|
+
The contamination annotation does NOT apply to HIGH-WARN / MED-WARN / MED-WARN-NO-LOCATOR rows — those already block at the gate and the user must address the higher-severity problem before contamination becomes relevant.
|
|
1082
|
+
|
|
1083
|
+
### Canonical bibliographic-integrity carrier (#678)
|
|
1084
|
+
`literature_corpus[].bibliographic_integrity_signals[]`, validated by `shared/contracts/passport/bibliographic_integrity_signal.schema.json`, is the canonical structured carrier for new observations.
|
|
1085
|
+
The finalizer remains the sole terminal-policy owner. v1.0 `terminal_policy.eligible: false` is advisory-only. A v1.1 `retraction_status` row may be eligible for the explicit `terminal_policies.retraction` policy under the frozen #651 rules below.
|
|
1086
|
+
The finalizer writes no advisory marker token from this array; `display.marker_token` is null. A strict eligible retraction row uses the existing generic terminal-token channel, while the one legacy `CONTAMINATED-*` advisory suffix remains derived from `contamination_signals`.
|
|
1087
|
+
All canonical records compose as lexically sorted formatter-owned `Bibliographic Integrity Advisories` rows in `provenance_summary.md`.
|
|
1088
|
+
Any `finding: unresolved` or `not_checked`/`unknown`/`degraded` status is unresolved, never clean results; see `shared/bibliographic_integrity_signals.md` for the epistemic/deprecation contract.
|
|
1089
|
+
|
|
1090
|
+
### Updated 5-cell + annotation resolution order
|
|
1091
|
+
|
|
1092
|
+
For each `<!--ref:slug--><!--anchor:<kind>:<value>-->` marker pair:
|
|
1093
|
+
|
|
1094
|
+
1. **Precedence-zero (L3-1):** if `<kind>` = `none`, resolve to MED-WARN-NO-LOCATOR. Stop.
|
|
1095
|
+
2. **4-cell matrix (v3.7.1 + #738 resolution):** apply the trust-state matrix on `(source_acquired, source_verified_against_original, user_attested_read_covered)`. Get base resolution: HIGH-WARN / MED-WARN-NOT-CROSS-CHECKED / LOW-WARN / OK.
|
|
1096
|
+
3. **Contamination annotation (L3-2):** if base resolution is `ok` or `LOW-WARN`, look up `contamination_signals` on the entry; append `CONTAMINATED-...` suffix if any field is true.
|
|
1097
|
+
|
|
1098
|
+
### Audit trail (v3.7.3 update)
|
|
1099
|
+
|
|
1100
|
+
Per-pass resolution counts gain ten new columns: NO-LOCATOR (precedence-zero hits, v3.7.3 §3.1), CONTAMINATED-PREPRINT (v3.7.3 §3.2), CONTAMINATED-UNMATCHED (v3.7.3 §3.2 legacy single-S2 case), CONTAMINATED-PREPRINT+UNMATCHED (v3.7.3 §3.2 legacy combination), CONTAMINATED-COVERAGE-NOISE (v3.9.0 §3.3 k=1 k_max≥2 OR k=1 k_max=1 with non-S2 single index), CONTAMINATED-PREPRINT+COVERAGE-NOISE (v3.9.0 composition), CONTAMINATED-PARTIAL-UNMATCH (v3.9.0 §3.3 k=2), CONTAMINATED-PREPRINT+PARTIAL-UNMATCH (v3.9.0 composition), CONTAMINATED-TRIANGULATION-UNMATCHED (v3.9.0 §3.3 k=3), CONTAMINATED-PREPRINT+TRIANGULATION-UNMATCHED (v3.9.0 composition). All ten surface in the Stage 4.5 integrity-check report alongside the existing HIGH / MED / LOW / OK counts. Compatibility note: the v3.7.3 CONTAMINATED-BOTH column is renamed to CONTAMINATED-PREPRINT+UNMATCHED for naming consistency with v3.9.0 composition order.
|
|
1101
|
+
|
|
1102
|
+
## Cite-Time Provenance Finalizer — v3.9.0 extension (triangulation tiers)
|
|
1103
|
+
|
|
1104
|
+
Spec: `docs/design/2026-05-17-ars-v3.9.0-cross-index-triangulation-measurement-spec.md` §3.3.
|
|
1105
|
+
|
|
1106
|
+
v3.9.0 extends the v3.7.3 contamination annotation channel with three new lookup-derived suffix shapes. The base 5-cell matrix is unchanged. The annotation rule expands as follows:
|
|
1107
|
+
|
|
1108
|
+
**Trigger:** annotation fires when (base resolution ∈ {`ok`, `LOW-WARN`}) AND (`preprint_post_llm_inflection` is true OR any of `semantic_scholar_unmatched` / `openalex_unmatched` / `crossref_unmatched` / `arxiv_unmatched` is true). Entries with `contamination_signals` present but all fields false (computed-clean) produce no suffix — v3.7.3 behavior preserved.
|
|
1109
|
+
|
|
1110
|
+
**Compute k (triangulation count):** k = count of `*_unmatched` fields with value `true`, over fields that are present. Absent fields are excluded (per spec R-L3-2-C: absent ≠ false). k_max = count of `*_unmatched` fields that are present (0-4 — the v3.10/v3.11 Delta-1 `arxiv_unmatched` field is the fourth index; `arxiv_unmatched` is absent on citations with no arXiv ID, so k_max stays ≤ 3 for those, per the v3.9.0 absent≠false rule).
|
|
1111
|
+
|
|
1112
|
+
**Suffix shape table:**
|
|
1113
|
+
|
|
1114
|
+
| Base | preprint flag | k | k_max | Present field if k_max=1 | Suffix |
|
|
1115
|
+
|---|---|---|---|---|---|
|
|
1116
|
+
| `ok` / `LOW-WARN` | false / absent | 0 | any | — | (no suffix) |
|
|
1117
|
+
| `ok` / `LOW-WARN` | true | 0 | any | — | `CONTAMINATED-PREPRINT` |
|
|
1118
|
+
| `ok` / `LOW-WARN` | false / absent | 1 | 1 | `semantic_scholar_unmatched` | `CONTAMINATED-UNMATCHED` (v3.7.3 legacy) |
|
|
1119
|
+
| `ok` / `LOW-WARN` | true | 1 | 1 | `semantic_scholar_unmatched` | `CONTAMINATED-PREPRINT+UNMATCHED` (v3.7.3 legacy) |
|
|
1120
|
+
| `ok` / `LOW-WARN` | false / absent | 1 | 1 | `arxiv_unmatched` | `CONTAMINATED-ARXIV-UNMATCHED` (v3.10/v3.11 Delta-1) |
|
|
1121
|
+
| `ok` / `LOW-WARN` | true | 1 | 1 | `arxiv_unmatched` | `CONTAMINATED-PREPRINT+ARXIV-UNMATCHED` (v3.10/v3.11 Delta-1) |
|
|
1122
|
+
| `ok` / `LOW-WARN` | false / absent | 1 | 1 | `openalex_unmatched` or `crossref_unmatched` | `CONTAMINATED-COVERAGE-NOISE` |
|
|
1123
|
+
| `ok` / `LOW-WARN` | true | 1 | 1 | `openalex_unmatched` or `crossref_unmatched` | `CONTAMINATED-PREPRINT+COVERAGE-NOISE` |
|
|
1124
|
+
| `ok` / `LOW-WARN` | false / absent | 1 | 2-4 | — | `CONTAMINATED-COVERAGE-NOISE` |
|
|
1125
|
+
| `ok` / `LOW-WARN` | true | 1 | 2-4 | — | `CONTAMINATED-PREPRINT+COVERAGE-NOISE` |
|
|
1126
|
+
| `ok` / `LOW-WARN` | false / absent | 2 | 2-4 | — | `CONTAMINATED-PARTIAL-UNMATCH` |
|
|
1127
|
+
| `ok` / `LOW-WARN` | true | 2 | 2-4 | — | `CONTAMINATED-PREPRINT+PARTIAL-UNMATCH` |
|
|
1128
|
+
| `ok` / `LOW-WARN` | false / absent | 3 | 3 | — | `CONTAMINATED-TRIANGULATION-UNMATCHED` |
|
|
1129
|
+
| `ok` / `LOW-WARN` | true | 3 | 3 | — | `CONTAMINATED-PREPRINT+TRIANGULATION-UNMATCHED` |
|
|
1130
|
+
| `ok` / `LOW-WARN` | false / absent | 3 | 4 | — | `CONTAMINATED-PARTIAL-UNMATCH` |
|
|
1131
|
+
| `ok` / `LOW-WARN` | true | 3 | 4 | — | `CONTAMINATED-PREPRINT+PARTIAL-UNMATCH` |
|
|
1132
|
+
| `ok` / `LOW-WARN` | false / absent | 4 | 4 | — | `CONTAMINATED-QUADRANGULATION-UNMATCHED` |
|
|
1133
|
+
| `ok` / `LOW-WARN` | true | 4 | 4 | — | `CONTAMINATED-PREPRINT+QUADRANGULATION-UNMATCHED` |
|
|
1134
|
+
|
|
1135
|
+
**v3.10/v3.11 Delta-1 extension (arXiv fourth index):** `arxiv_unmatched` is the fourth lookup field, present only on citations carrying an arXiv ID (absent ≠ false). Two new single-named tiers join the v3.9.0 tiers:
|
|
1136
|
+
- **`CONTAMINATED-ARXIV-UNMATCHED` (k=1, k_max=1, present field = `arxiv_unmatched`)** — the arxiv-only carve-out, mirroring the `semantic_scholar_unmatched` legacy carve-out exactly: it fires ONLY when arxiv is the SOLE present-and-unmatched index. An arxiv-only k=1 with k_max ≥ 2 (arxiv unmatched, other present indexes matched) stays `CONTAMINATED-COVERAGE-NOISE` like every other k=1 k_max ≥ 2 case — "single-index" means k_max=1, not merely k=1 (consistent with the v3.9.0 s2 carve-out being k_max=1-only).
|
|
1137
|
+
- **`CONTAMINATED-QUADRANGULATION-UNMATCHED` (k=4, k_max=4)** — all four indexes unmatched, the four-index analogue of `CONTAMINATED-TRIANGULATION-UNMATCHED` (which stays k=3 k_max=3, all-three-unmatched). A k=3 k_max=4 (three of four unmatched) is `CONTAMINATED-PARTIAL-UNMATCH`, NOT triangulation — the strong all-N name is reserved for k = k_max = N (the v3.9.0 "observation not inferred cause" rule extended to N=4).
|
|
1138
|
+
|
|
1139
|
+
**Composition order:** `PREPRINT` token first, triangulation token second, joined by `+`. The canonical token order list is `[PREPRINT, UNMATCHED | ARXIV-UNMATCHED | COVERAGE-NOISE | PARTIAL-UNMATCH | TRIANGULATION-UNMATCHED | QUADRANGULATION-UNMATCHED]`.
|
|
1140
|
+
|
|
1141
|
+
**Gate semantics:** All v3.9.0 AND Delta-1 suffixes are advisory. The terminal gate refusal list is NOT extended. `formatter_agent.md` pass-through allowlist MUST extend from 3 v3.7.3 suffixes to 9 (v3.9.0) to 13 (Delta-1: + the 4 arXiv tokens) per R-L3-2-E. `/ars-mark-read` behavior is unchanged.
|
|
1142
|
+
|
|
1143
|
+
Example markers:
|
|
1144
|
+
- `<!--ref:smith2024 LOW-WARN CONTAMINATED-COVERAGE-NOISE-->` — single-index unmatched, k_max ≥ 2.
|
|
1145
|
+
- `<!--ref:smith2024 ok CONTAMINATED-PARTIAL-UNMATCH-->` — two-of-three (or three-of-four) unmatched.
|
|
1146
|
+
- `<!--ref:smith2024 LOW-WARN CONTAMINATED-TRIANGULATION-UNMATCHED-->` — all three indexes unmatched.
|
|
1147
|
+
- `<!--ref:smith2024 LOW-WARN CONTAMINATED-ARXIV-UNMATCHED-->` — arxiv-only (k_max=1) unmatched.
|
|
1148
|
+
- `<!--ref:smith2024 LOW-WARN CONTAMINATED-QUADRANGULATION-UNMATCHED-->` — all four indexes unmatched.
|
|
1149
|
+
- `<!--ref:smith2024 LOW-WARN CONTAMINATED-PREPRINT+QUADRANGULATION-UNMATCHED-->` — preprint heuristic + k=4.
|
|
1150
|
+
|
|
1151
|
+
## Cite-Time Provenance Finalizer — v3.10 extension (terminal policy layer)
|
|
1152
|
+
|
|
1153
|
+
Spec: `docs/design/2026-05-31-ars-v3.10-policy-layer-rescope-spec.md` §3 PR-B items 6-9. Firm rule: `shared/references/firm_rules.md` R-L3-2-A (broad form) + R-L3-2-E.
|
|
1154
|
+
|
|
1155
|
+
v3.10 adds an **opt-in terminal policy layer** on top of the v3.9.0 advisory channel. The finalizer is the **sole policy evaluator**: it reads the passport-level `terminal_policies` block (per `shared/contracts/passport/terminal_policies.schema.json`) and, under a non-advisory policy, stamps a `policy_hash` on every ref marker and co-emits a terminal `HIGH-BLOCK` token where the policy fires. **The default (absent `terminal_policies`, or every key `advisory`) is byte-equivalent to v3.9.0 (Invariant 7): the finalizer emits the EXACT v3.9.0 marker — no `policy_hash` stamp, no terminal token, no behavior change.** The `policy_hash` stamp is added ONLY when the passport carries a non-advisory policy (see below); this is what lets a v3.9.0 (stampless) draft and a v3.10 default-advisory draft be identical, and lets the formatter pass a stampless marker under an advisory passport.
|
|
1156
|
+
|
|
1157
|
+
### policy_hash stamp (added ONLY under a non-advisory policy)
|
|
1158
|
+
|
|
1159
|
+
When — and ONLY when — the passport's `terminal_policies` carries at least one non-advisory CITATION-TIME key value, the finalizer appends `policy_hash=<slug>` to every marker it finalizes (so the formatter can detect a draft finalized under a stale policy). The citation-time keys are `contamination_triangulation`, `citation_existence`, `retraction`, and (forward) `temporal_integrity` — the marker-carrier policies; the package-level `submission_package` key (#394) NEVER participates in marker stamping and is OMITTED from the slug regardless of its value — its carrier is the #394 verifier's report file (`policy_slug` + `package_fingerprint`, the package-level analog of this stamp), so a `submission_package: strict`-only passport stamps nothing here. The slug is a **fully-encoded, human-readable canonical token** of the passport's citation-time `terminal_policies` state — NOT a computed digest (the finalizer is an LLM agent; it cannot reliably compute sha256 by hand). The slug encodes EVERY non-advisory citation-time policy key so two distinct policy configurations can never collide on one slug:
|
|
1160
|
+
|
|
1161
|
+
- **All-advisory** (absent `terminal_policies`, or every key explicitly `advisory`): NO stamp is emitted — the marker is the bare v3.9.0 shape (Invariant 7 byte-equivalence). There is no `policy_hash=advisory` sentinel; the *absence* of a stamp IS the advisory signal.
|
|
1162
|
+
- **Any non-advisory key present:** stamp `policy_hash=<slug>`, where `<slug>` joins each NON-ADVISORY policy key with its value as `key.value`, sorted by key name, separated by `+`. Examples:
|
|
1163
|
+
- `contamination_triangulation: strict`, `temporal_integrity` absent/advisory → `policy_hash=contamination_triangulation.strict`
|
|
1164
|
+
- `contamination_triangulation: strict_articles_only` → `policy_hash=contamination_triangulation.strict_articles_only`
|
|
1165
|
+
- (forward) `contamination_triangulation: strict` + a future `temporal_integrity: strict` → `policy_hash=contamination_triangulation.strict+temporal_integrity.strict`
|
|
1166
|
+
- A key whose value is the advisory default is OMITTED from the slug (it contributes nothing), so `contamination_triangulation: strict` + `temporal_integrity: advisory` collapses to `contamination_triangulation.strict`.
|
|
1167
|
+
|
|
1168
|
+
This slug is what `formatter_agent.md`'s freshness guard compares against the passport's CURRENT `terminal_policies` (recomputed by the same rule). A mismatch means the draft was finalized under a different policy and must be re-finalized. Under an all-advisory passport there is no slug to compare — the formatter passes the stampless marker (legacy/default transition).
|
|
1169
|
+
|
|
1170
|
+
### Two marker grammar shapes
|
|
1171
|
+
|
|
1172
|
+
Every finalized marker takes ONE of two shapes (the literal `TERMINAL-BLOCK` sentinel distinguishes them unambiguously). The `policy_hash=<slug>` segment shown below is present ONLY under a non-advisory passport (per the stamp rule above); under an all-advisory passport it is absent and the marker is the bare v3.9.0 shape:
|
|
1173
|
+
|
|
1174
|
+
- **Non-terminal** (advisory-or-clean — every marker that did NOT hit a terminal block):
|
|
1175
|
+
- under all-advisory: `<!--ref:<slug> <base-status> [<advisory-suffix>]-->` (the exact v3.9.0 marker, no stamp).
|
|
1176
|
+
- under a non-advisory policy: `policy_hash=<slug>` appended at the END, after any advisory suffix, with NO `TERMINAL-BLOCK` token:
|
|
1177
|
+
```
|
|
1178
|
+
<!--ref:<slug> <base-status> [<advisory-suffix>] policy_hash=<slug>-->
|
|
1179
|
+
```
|
|
1180
|
+
- **Terminal** (entry hit a HIGH-BLOCK under a strict policy — only reachable under a non-advisory policy, so always stamped): the advisory suffix stays in its optional slot; the terminal token sequence is ADDITIONAL:
|
|
1181
|
+
```
|
|
1182
|
+
<!--ref:<slug> <base-status> [<advisory-suffix>] TERMINAL-BLOCK severity=HIGH-BLOCK policy=<contamination_triangulation|citation_existence|retraction|temporal_integrity> reason=<reason-token> mode=<strict|strict_articles_only> policy_hash=<slug>-->
|
|
1183
|
+
```
|
|
1184
|
+
|
|
1185
|
+
Where `<base-status>` ∈ {`ok`, `LOW-WARN`} (the v3.7.3 5-cell base resolution) and `[<advisory-suffix>]` is the OPTIONAL v3.9.0 contamination suffix (one token max, drawn from the v3.9.0 allowlist), present iff the entry fired an advisory signal. `reason` carries the typed payload that preserves remediation context — for contamination k=3 it is `reason=k3_all_indexes_unmatched`. The `mode=` enumeration above is the union across policies; the valid modes are **per-policy**: `contamination_triangulation` ∈ {`strict`, `strict_articles_only`}, `citation_existence` is `strict` only (no `strict_articles_only`), and `temporal_integrity` is forward-reserved advisory-only (no terminal mode wired). A `policy=citation_existence` token therefore always carries `mode=strict`.
|
|
1186
|
+
|
|
1187
|
+
**Legacy (v3.9.0) markers carry NO `policy_hash`** — and so does a v3.10 marker finalized under an all-advisory passport (they are byte-identical). They are NOT malformed; the formatter's legacy/default-transition rule (§ Formatter) passes a stampless marker under an advisory passport and refuses it only when the current passport is non-advisory (the user opted into hard-block, so the stampless draft must be re-finalized).
|
|
1188
|
+
|
|
1189
|
+
### Terminal promotion under strict
|
|
1190
|
+
|
|
1191
|
+
When `terminal_policies.contamination_triangulation == strict` AND the entry's triangulation signal is **k=3** (all three lookup indexes unmatched), the finalizer emits the terminal shape with `policy=contamination_triangulation reason=k3_all_indexes_unmatched mode=strict`. **Co-emitted with — not replacing — the advisory suffix** (R1 P1): the existing `CONTAMINATED-TRIANGULATION-UNMATCHED` (or `CONTAMINATED-PREPRINT+TRIANGULATION-UNMATCHED`) suffix STAYS in the advisory slot so the "why" survives; the `TERMINAL-BLOCK` sequence is an additional token.
|
|
1192
|
+
|
|
1193
|
+
Example (strict, k=3, preprint): `<!--ref:smith2024 LOW-WARN CONTAMINATED-PREPRINT+TRIANGULATION-UNMATCHED TERMINAL-BLOCK severity=HIGH-BLOCK policy=contamination_triangulation reason=k3_all_indexes_unmatched mode=strict policy_hash=contamination_triangulation.strict-->`
|
|
1194
|
+
|
|
1195
|
+
### strict_articles_only precision mode
|
|
1196
|
+
|
|
1197
|
+
When `terminal_policies.contamination_triangulation == strict_articles_only`, k=3 promotes to a terminal block ONLY when **all** of: DOI present AND `venue_type ∈ {journal-article, conference-paper}` AND `venue_type_provenance ∈ {adapter_declared, user_declared, trusted_source_declared}`. The terminal token then carries `mode=strict_articles_only`.
|
|
1198
|
+
|
|
1199
|
+
**This is a deliberate PRECISION mode (R1 P0-F, user-ruled): a DOI-less or `unknown`-venue journal article STAYS ADVISORY by design** — in the target humanities / non-English / regional-journal corpus, "journal + no-DOI + k=3" is overwhelmingly a legitimate coverage gap, not fabrication. Users wanting comprehensive hard-block use `strict` (no venue/DOI scoping). The recall limit is documented (user-facing docs + a by-design false-negative fixture: DOI-absent + unknown-venue + k=3 → stays advisory).
|
|
1200
|
+
|
|
1201
|
+
The finalizer reads `venue_type` / `venue_type_provenance` only as DECLARED entry metadata — it MUST NOT infer venue_type from the free-form `venue` string or from any index `type` field (R-L3-2-D).
|
|
1202
|
+
|
|
1203
|
+
### Citation-existence terminal promotion under strict (v3.11 / C-V6)
|
|
1204
|
+
|
|
1205
|
+
The `terminal_policies.citation_existence` key (enum `{advisory, strict}`, spec `docs/design/2026-05-21-v3.10-182-promote-citation-gate-spec.md` §2 Delta 3 + INVARIANT C-V6) governs the `lookup_verified == false` verdict from the `citation_verification_summary[]` aggregate (Delta 4). It inherits the SAME opt-in terminal model as `contamination_triangulation` — default advisory, opt-in `strict` — and introduces NO second hard-block philosophy. The finalizer is the sole policy evaluator here too; no new control-plane writer is added (this is the L4-question-3 boundary, not L1 hidden culling — the verdict is external-API factual, the flagged citation stays visible and annotated, and `resolver_outcomes` makes the criterion fully auditable).
|
|
1206
|
+
|
|
1207
|
+
The verdict input is the narrowed-`false` (C-V6(a)): `lookup_verified == false` ONLY when at least one ID-keyed (DOI / arXiv-ID) resolver returned `unmatched` with no `matched` — a provably-bogus identifier. A title-only `unmatched` with no resolvable identifier reduces to `unresolvable` (a coverage gap — regional / non-English / pre-digital paper indexed nowhere), NEVER `false`. The finalizer consumes the verdict the Delta 4 reducer already computed; it does NOT re-derive it.
|
|
1208
|
+
|
|
1209
|
+
- **Detection is unconditional (C-V6(e)):** the `citation_verification_summary[]` aggregate is always populated, so a `false` verdict is always visible THERE — in the aggregate, with full `resolver_outcomes`. **Unlike `contamination_triangulation`, `citation_existence` adds NO advisory suffix token to the ref marker** (there is no `CITATION-FALSE`-style suffix): the marker advisory slot is reserved for the contamination `CONTAMINATED-*` suffix, and the v3.7.3 marker grammar caps the marker at one advisory token, so a second would break the grammar. The `false` "why" lives in the `citation_verification_summary[]` aggregate (and, under `strict`, additionally in the terminal token's `reason=lookup_verified_false`); under `advisory` the per-marker-invisible aggregate signal is surfaced to the human reviewer by the formatter's mandatory `provenance_summary.md` `Citation Existence Advisories` section (C-V6(b); see `formatter_agent.md`), so the warning travels with the deliverable without a marker suffix. The `citation_existence` key governs ONLY whether the `false` row additionally promotes to a *terminal* marker (`strict`) or stays advisory (default).
|
|
1210
|
+
- **`advisory` (default, C-V6(b)):** a `false` row stays visible in the `citation_verification_summary[]` aggregate (where it is `/ars-mark-read`-ack-able) and is listed in the formatter's mandatory `provenance_summary.md` `Citation Existence Advisories` section, and the pipeline completes normally. The ref **marker is byte-equivalent to v3.9.x** — no terminal token, no new suffix (per-key absence ⟹ advisory; a whole-object-absent passport ⟹ advisory for this key, so a v3.10 passport behaves identically to v3.9.x — no back-compat break). The advisory's visibility lives in the `provenance_summary.md` section, NOT in the marker (the marker stays byte-equivalent).
|
|
1211
|
+
- **`strict` (opt-in, C-V6(c)):** when `terminal_policies.citation_existence == strict` AND the ref's `lookup_verified == false`, the finalizer appends the terminal token `TERMINAL-BLOCK severity=HIGH-BLOCK policy=citation_existence reason=lookup_verified_false mode=strict policy_hash=<slug>` to the ref marker. This is **additive** — it does not alter the base-status token (the `false` "why" survives in `reason=lookup_verified_false` + the aggregate, NOT in a marker advisory suffix). The block is terminal — NOT `/ars-mark-read`-ack-able. There is NO per-hit override token; the human decision is the opt-in itself (do I run this corpus under `citation_existence=strict`?).
|
|
1212
|
+
|
|
1213
|
+
Example (strict, ID-keyed false): `<!--ref:bogus2024 ok TERMINAL-BLOCK severity=HIGH-BLOCK policy=citation_existence reason=lookup_verified_false mode=strict policy_hash=citation_existence.strict-->` — the marker carries the base-status (`ok`) and the terminal token; there is no citation-existence advisory suffix between them (contrast contamination, whose `CONTAMINATED-*` suffix DOES occupy the advisory slot).
|
|
1214
|
+
|
|
1215
|
+
**Gating output = the existing Stage-5 formatter hard gate (C-V6(d)).** ARS has no separate "ready-for-review" state machine; the equivalent is the existing Stage-4→5 boundary where the finalizer runs and `formatter_agent` then refuses. Under `strict`, the appended `TERMINAL-BLOCK severity=HIGH-BLOCK` token is refused by `formatter_agent`'s generic rule-11 (any unresolved `severity=HIGH-BLOCK` inside a `<!--ref:...-->` marker), so the draft cannot reach final formatted output — i.e. a draft with a provably-bogus citation cannot reach the human-review deliverable. This gate is therefore symmetric with `contamination_triangulation == strict`: same terminal token mechanism, same generic formatter refusal, NO new refusal rule and NO formatter policy re-evaluation (Invariant 13; the formatter stays STAMP-ONLY). Under default `advisory` the `false` row stays an aggregate advisory and the run completes — avoiding the withdrawn "Zombie pipeline" advisory-yet-unconditionally-blocking contradiction. **Scope note (symmetric with all terminal policies):** the gate is the *output* boundary, exactly as `contamination_triangulation=strict`. A mid-pipeline raw draft (Stage 2–4, before the Stage-4→5 finalizer pass) is not a gated deliverable in any policy mode; the `false` signal is still visible in the always-populated aggregate from the moment detection runs, and the terminal block is what stops it reaching the *formatted* output a human reviews. This is the shipped definition of the gate, not a new hole introduced here.
|
|
1216
|
+
|
|
1217
|
+
**Recompute each pass; nothing cached (C-V6(h)).** Both the marker severity (strict terminal vs advisory) and the output gate are recomputed by the finalizer at every finalization pass — they are pure functions of the CURRENT `terminal_policies` state and the CURRENT `citation_verification_summary[]`, never cached status. Flipping `citation_existence` advisory→strict between passes re-stamps markers and re-applies the gate on the next finalize; a `resume_from_passport` / reset that re-enters finalization re-evaluates against the resumed summary. A previously-granted output (a draft that reached formatting) is never inherited across a resume without re-passing the gate under the then-current policy — there is no path where a stale certification survives a citation that resolves to `false` under `strict`. This is the same idempotency-on-current-evidence discipline as the v3.7.1 finalizer matrix above.
|
|
1218
|
+
|
|
1219
|
+
### Retraction terminal promotion (#651)
|
|
1220
|
+
|
|
1221
|
+
The authoritative input is a schema-valid v1.1 `bibliographic_integrity_signals[].retraction_status` row. Ignore legacy `retraction_check` for both status and policy. Detection remains visible in the formatter-owned `Bibliographic Integrity Advisories` section under every policy, and no retraction advisory suffix is added to the marker. Absent `terminal_policies.retraction` or under `advisory`, emit no terminal token.
|
|
1222
|
+
- Under `strict`, emit `TERMINAL-BLOCK severity=HIGH-BLOCK policy=retraction reason=retracted_reference mode=strict` only when the canonical row carries `terminal_policy.eligible: true` and `policy_key: retraction`; never promote reinstated, disputed, stale, unknown/degraded, or deterministic declared-legitimate rows. Do not recompute those conditions: validate and consume the canonical eligibility bit.
|
|
1223
|
+
- Include `retraction.strict` in the sorted `policy_hash` slug even when no row fires, so policy changes cannot reuse stale markers. Example: `<!--ref:smith2024 ok TERMINAL-BLOCK severity=HIGH-BLOCK policy=retraction reason=retracted_reference mode=strict policy_hash=retraction.strict-->`. The ethics agent has no independent retraction terminality; its report points to this row/finalizer result and may discuss context only as an advisory human judgment.
|
|
1224
|
+
|
|
1225
|
+
### Manual-entry exemption preserved
|
|
1226
|
+
|
|
1227
|
+
Manual entries (`obtained_via: manual`) carry no `*_unmatched` fields (v3.9.0 §3.1 not-rule), so k=3 is structurally unreachable for them — no contamination terminal promotion can fire (Invariant 8). For `citation_existence`, a manual entry's resolvers are all `skipped`, so its `lookup_verified` reduces to `unresolvable` (never `false`). Retraction is deliberately different: a DOI makes the mutable-status lookup attemptable even on a manual entry; a DOI-less manual entry emits a visible unresolved v1.1 row and cannot promote.
|
|
1228
|
+
|
|
1229
|
+
### `/ars-mark-read` and HIGH-BLOCK
|
|
1230
|
+
|
|
1231
|
+
`HIGH-BLOCK` is **terminal — NOT `/ars-mark-read` ack-able**. Advisory tiers (LOW-WARN, all CONTAMINATED-* advisory suffixes) remain ack-able exactly as before. Acknowledgment cannot clear a terminal block; the only remediation is resolving the underlying signal (verify the source / replace the citation / switch off strict).
|
|
1232
|
+
|
|
1233
|
+
### Audit trail (v3.10 update)
|
|
1234
|
+
|
|
1235
|
+
The per-pass resolution counts gain a `terminal_blocked[]` bucket recording each ref slug promoted to a terminal block, with its `policy` / `reason` / `mode`. **Non-additive (R2-P2):** a single strict k=3 ref increments BOTH its advisory-signal count (e.g. CONTAMINATED-TRIANGULATION-UNMATCHED) AND the `terminal_blocked[]` bucket, but it remains ONE unique affected ref — any downstream aggregate "total affected refs" MUST dedupe by ref slug across the advisory and terminal buckets, NEVER sum them.
|
|
1236
|
+
|
|
1237
|
+
**Multiple terminal policies co-emit independently (C-V6(g)).** A single ref may carry independent `TERMINAL-BLOCK` tokens for contamination, citation existence, and retraction, alongside the shared advisory slot. Tokens are additive, but the ref is counted ONCE in any "total affected refs" aggregate: dedupe by ref slug across all policy buckets. The `policy_hash` slug encodes every non-advisory citation-time key in lexical order (for example `citation_existence.strict+retraction.strict`). The formatter's generic "refuse on any unresolved `severity=HIGH-BLOCK`" rule already handles N tokens without per-policy enumeration.
|
|
1238
|
+
|
|
1239
|
+
---
|
|
1240
|
+
|
|
1241
|
+
## Revision-Round Patch Sequencing (#390)
|
|
1242
|
+
|
|
1243
|
+
When a revision stage dispatches `academic-paper` revision mode (Stage 3 → 4 / 3' → 4'; "Resolved next stage: 4 (mode: revision)" — and equally the integrity-FAIL correction rounds, Stage 2.5 FAIL → 2 and Stage 4.5 FAIL → 5 (revision), where the integrity correction list is only the round's proposed requirements; #89 Item 8, destination differences in the integrity-correction variant below — note the FAIL arrow lands on Stage 5's **revision** sub-step, not the PASS-path Stage 4.5 → 5 finalization handoff, and re-verification by the issuing gate is mandatory before finalization), the writer's deliverable is a **patch document**, not a re-emitted draft, and the orchestrator owns the deterministic steps around it. Spec: `docs/design/2026-06-10-390-diff-patch-revision-mode-spec.md` §3.3–§3.6. Protocol + exact commands: `academic-paper/references/revision_patch_protocol.md`. The toolchain is Slice A (#423): `scripts/ars_anchorize_draft.py` + `scripts/ars_apply_revision_patch.py`.
|
|
1244
|
+
|
|
1245
|
+
**Normative order per revision round — nothing may rewrite the draft between steps 1 and 3:**
|
|
1246
|
+
|
|
1247
|
+
1. **Anchorize and chain-start:** `python scripts/ars_anchorize_draft.py <draft.md>`. The first round since integrity verification also binds the exact zero-open-issue PASS receipt. Nothing rewrites the draft before apply.
|
|
1248
|
+
2. **Build/validate explicit authority:** keep `revision-roadmap/1.0` immutable; build exact claim surfaces; collect one explicit author choice per item; run `scripts/revision_roadmap.py build-adjudication` and `validate-adjudication`. A user view is presentation-only. If every choice is declined, append a byte-identical `review_noop` bundle round and skip writer/apply.
|
|
1249
|
+
3. **Dispatch the writer** with the anchored draft, manifest, immutable roadmap, claim surfaces, complete author sidecar, and deterministic exact hashes/digest. It emits current patch 1.1 plus provisional Schema 8 items.
|
|
1250
|
+
4. **Apply with full authority arguments:** `python scripts/ars_apply_revision_patch.py <draft.md> <patch.json> --block-manifest <manifest.json> --roadmap <roadmap.json> --author-adjudication <author.json> --claim-surface-manifest <claims.json> --artifact-root <root> --output <draft.rev<N>.md>`. Authorization replays before structural analysis/write; report 1.3 lands beside the output.
|
|
1251
|
+
5. **Token-conservation + finalizer:** run `scripts/check_revision_token_conservation.py` on the exact patch, then the Cite-Time Provenance Finalizer on the apply output. Token rows remain advisory. Exact registered claim authority is already fail-closed at apply; E6 still reviews unregistered semantic drift.
|
|
1252
|
+
6. **Complete Schema 8 mechanical fields**, including `change_block_ids` from the apply report, append the exact review round to `revision-evidence-bundle/1.0`, and validate it with `scripts/revision_roadmap.py validate-bundle`. Only a valid continuous bundle moves forward.
|
|
1253
|
+
7. **Surface `preserved_ratio`** next to round-trip count. It is byte-preservation evidence, not edit quality or acceptance probability.
|
|
1254
|
+
|
|
1255
|
+
**Escalation gate (§3.6/#670) — current rounds remain exact-scope patches.** Two trigger layers:
|
|
1256
|
+
|
|
1257
|
+
- **Layer 1 (pre-drafting):** the writer returns `[PATCH-ESCALATION-REQUIRED: layer=pre_drafting, ...]` instead of a patch — a roadmap item demands restructuring.
|
|
1258
|
+
- **Layer 2 (apply-time):** the apply script exits 3 (`refused_structural`) — heading-block ops, section-count change, or touched-ratio above threshold on an emitted patch (the writer misclassified a structural change as local). Note the heading-anchor exemption (#424): an `insert_after` merely anchored on a heading does not flag; rewriting/deleting a heading or inserting heading-bearing text does.
|
|
1259
|
+
|
|
1260
|
+
On either trigger, STOP and present the MANDATORY checkpoint:
|
|
1261
|
+
|
|
1262
|
+
```
|
|
1263
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1264
|
+
⚠️ MANDATORY CHECKPOINT — Structural revision detected (#390)
|
|
1265
|
+
|
|
1266
|
+
Trigger: [pre-drafting classification: items REV-00X (reason) |
|
|
1267
|
+
apply-time shape flags: heading ops at indexes [...], section_count_delta=N, touched_ratio=0.NN > 0.6]
|
|
1268
|
+
|
|
1269
|
+
Your options:
|
|
1270
|
+
(a) narrow — explicitly narrow/defer targets and build a new sidecar
|
|
1271
|
+
(b) expand exact scope — explicitly adjudicate new block/operations,
|
|
1272
|
+
then emit a new current patch
|
|
1273
|
+
(c) [layer 2 only] acknowledge structural shape — apply the already-
|
|
1274
|
+
authorized exact patch with --acknowledge-structural
|
|
1275
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1276
|
+
```
|
|
1277
|
+
|
|
1278
|
+
Structural acknowledgment never broadens author authority. Legacy full
|
|
1279
|
+
re-emission is outside the current #670 contract and cannot emit a current
|
|
1280
|
+
authorization PASS witness or Revision-Evidence Bundle round. Never represent
|
|
1281
|
+
it as current replay.
|
|
1282
|
+
|
|
1283
|
+
**Apply-failure path (distinct from escalation):** a Phase 1 rejection feeds
|
|
1284
|
+
the structured report back for one patch re-emission against unchanged exact
|
|
1285
|
+
authority. If scope must change, build a new explicit sidecar first. Second
|
|
1286
|
+
failure → re-anchorize/rebuild bindings, narrow/expand explicit scope, or abort.
|
|
1287
|
+
The base is byte-untouched on every rejection.
|
|
1288
|
+
|
|
1289
|
+
---
|
|
1290
|
+
|
|
1291
|
+
## Revision Authority and Evidence-Bundle Extension (#670)
|
|
1292
|
+
|
|
1293
|
+
**Revision-Evidence Bundle (#569/#670 — feeds E6 and #576).** Use `shared/contracts/revision/revision_evidence_bundle.schema.json`. The chain starts only from an exact integrity-PASS draft/manifest/receipt, then carries every continuous `review_roadmap`, all-declined `review_noop`, or `integrity_correction` round with exact pre/post and authority artifacts through the exact final draft. Current #576 re-review hard-requires this artifact; it is not reconstructed conversationally and no current round may be omitted.
|
|
1294
|
+
|
|
1295
|
+
**Integrity-correction variant (Stage 2.5 / 4.5 FAIL rounds, #89/#670).**
|
|
1296
|
+
The issuing gate emits `integrity-correction-list/1.0` with exact
|
|
1297
|
+
`proposed_targets` only. A FAIL/PASS receipt and this list are proposal
|
|
1298
|
+
evidence, never write authority. The orchestrator supplies their exact
|
|
1299
|
+
bindings to the writer, which first emits the complete proposed patch 1.1 with
|
|
1300
|
+
`authorization_context: integrity_correction`. Every op maps to an exact
|
|
1301
|
+
proposed issue target/operation and carries empty claim/collateral arrays; no
|
|
1302
|
+
Schema 8 item is emitted.
|
|
1303
|
+
|
|
1304
|
+
Before any apply, deterministically hash those exact patch bytes, show the
|
|
1305
|
+
complete patch and digest to the author, and collect
|
|
1306
|
+
`integrity-correction-authorization-input/1.0`. The input must explicitly bind
|
|
1307
|
+
that `revision_patch_sha256`, contain one `authorize` or
|
|
1308
|
+
`stop_without_write` decision per issue, and name the exact authorized
|
|
1309
|
+
target/operation subset for every authorized issue. Do not infer a choice from
|
|
1310
|
+
the gate, issue list, or the writer's proposal. `stop_without_write` grants no
|
|
1311
|
+
scope. If the author does not approve the exact patch, stop with no write; a
|
|
1312
|
+
changed patch is a new proposal that requires a new explicit input.
|
|
1313
|
+
|
|
1314
|
+
Build the sidecar deterministically:
|
|
1315
|
+
|
|
1316
|
+
`python scripts/revision_roadmap.py build-integrity-authorization <issues.json> --base <draft.md> --patch <patch.json> --author-choices <author-input.json> --output <integrity-authorization.json>`
|
|
1317
|
+
|
|
1318
|
+
Then apply with both authority artifacts:
|
|
1319
|
+
|
|
1320
|
+
`python scripts/ars_apply_revision_patch.py <draft.md> <patch.json> --block-manifest <manifest.json> --integrity-issue-list <issues.json> --integrity-authorization <integrity-authorization.json> --output <draft.integrity-rev<N>.md>`
|
|
1321
|
+
|
|
1322
|
+
The builder copies the explicit author-approved patch digest and adds the
|
|
1323
|
+
exact base/list/round bindings; it does not manufacture approval. Apply replays
|
|
1324
|
+
the sidecar and exact patch bytes before structural analysis or output
|
|
1325
|
+
creation. Review roadmap/author/claim arguments are forbidden. Append the
|
|
1326
|
+
issue list, authorization sidecar, exact patch/report, and pre/post drafts as
|
|
1327
|
+
the integrity round in the bundle, then return the output to the SAME
|
|
1328
|
+
integrity gate for re-verification; report 1.3 is evidence, never authority or
|
|
1329
|
+
a substitute for that gate.
|
|
1330
|
+
|
|
1331
|
+
---
|
|
1332
|
+
|
|
1333
|
+
## Stage 3' Re-Review Contract Dispatch (#576 Spec B)
|
|
1334
|
+
|
|
1335
|
+
Contract-governed re-review IS the Stage 3' default. The orchestrator (the dispatching layer — per #523 it, not a fenced agent, executes API calls and runs scripts) owns the deterministic steps around the three fenced verification calls. Authority: `academic-paper-reviewer/references/re_review_mode_protocol.md` § Three-Gate Orchestration; artifacts: `shared/contracts/re_review/*.schema.json`; checker: `scripts/check_re_review_synthesis.py`.
|
|
1336
|
+
|
|
1337
|
+
**Normative dispatch order per re-review round:**
|
|
1338
|
+
|
|
1339
|
+
1. **Emit current input manifest 1.1** BEFORE Phase 1: hash-bind all eleven current artifact keys, including the exact immutable roadmap, `author_adjudication`, and `revision_evidence_bundle`, plus original/revised drafts, letter/response, patch 1.1/report 1.3 chain, findings, and cards. Original manuscript, revised manuscript, roadmap, author sidecar, and bundle are hard-required; any absence or mixed 1.0/1.1 chain fails closed.
|
|
1340
|
+
2. **Dispatch the three gates sequentially** — Phase 1 criteria commitment (revision-blind) → Phase 2A evidence verdict (persuasion-blind) → Phase 2B claim matching. Frozen cards route each `must_fix`/`should_fix` item under its seat persona. These are dedicated contract calls, not dispatches of the first-round `eic_agent` or `editorial_synthesizer_agent` files. Every artifact is persisted and linted before the next phase; the closed rules derive the candidate decision state and `scripts/check_re_review_synthesis.py` recomputes it before surfacing. No gate may rewrite the bound author choice or authority fields.
|
|
1341
|
+
3. **Run the three post-2B passes, ORDER NORMATIVE (§6):** (i) the critical-rebuttal judgment pass on each PENDING `valid_rebuttal` upgrade (booking on `upheld`, never booking on `challenged`; not-configured → book with `single_family_disclosed`, active-but-failed → `pass_unavailable_disclosed`); then (ii) record each active-cross-model dissent adjudication together with any dissent-ONLY judge-shortcut `ReapplicationRecord` — BEFORE any divergence dispatch, because the divergence calls' `criterion_ref` selector and the coalescing rule read these adjudications; then (iii) emit each `diverges` row's `system` `ResolutionIntent` and dispatch its scoped Phase 2B′ re-application (coalesced dissent+divergence items get one fresh seat-verifier call covering both answers — never the judge's own output).
|
|
1342
|
+
4. **Persist the traceability sidecar, then invoke the checker — MANDATORY runtime step** before surfacing anything: `python scripts/check_re_review_synthesis.py --manifest <input_manifest.json> --precommitment <phase1.json> --verdict-record <phase2a.json> --traceability <sidecar.json> --roadmap <roadmap.json> --author-adjudication <author.json> --revision-evidence-bundle <bundle.json> --revision-evidence-root <bundle-root>` plus conditional `--letter` and one ordered `--apply-report` per manifest entry. The checker hash-loads and fully replays the bundle, requires its final draft to equal the revised manuscript, and joins the exact current roadmap/author pair to one bundle round. Every trace row must exactly copy author triage, conditional reason, targets, and claim authorizations from the raw-hash-bound sidecar. Re-run after every persisted deferral-loop revision.
|
|
1343
|
+
5. **Deferral loop (`decision_state: user_review_required`):** surface the matrix + pending items (dissent adjudications, unresolved divergences, pending escalation approvals, G2(d) fail-closed acceptances) at the Stage 3' checkpoint. Each user answer is recorded as its typed record; any mandated scoped Phase 2B′ re-verification is dispatched and completes; the sidecar is RE-PERSISTED (`revision: n+1`, `supersedes_hash`); the checker RE-RUNS; only then does the recomputed outcome re-surface. Repeat until no pending state remains. Re-applying a criterion is a verification judgment the orchestrator never makes — an undispatchable/crashed 2B′ call is recorded as a `ReapplicationRecord` with `cannot_verify_reason: "dispatch_failed: <why>"` (a transport fact, not a judgment).
|
|
1344
|
+
6. **Abort surfacing:** every `[RE-REVIEW-ABORT: <reason>]` (closed set: `phase1_lint_failed`, `phase2a_lint_failed`, `phase2b_lint_failed`, `manifest_incomplete`, `manifest_hash_mismatch`, `criteria_drift`, `synthesis_mismatch`) is fail-closed — no decision is emitted; the orchestrator surfaces the abort verbatim at the Stage 3' checkpoint with the failing artifact/invariant named, and the user chooses how to proceed (fix inputs and re-run / legacy flag / abandon). Never convert an abort into a decision or a silent legacy run.
|
|
1345
|
+
7. **Route the outcome:** Accept/Minor → Stage 4.5 directly (Stage 3' → 4.5 handoff row — the sidecar's frozen `previously_missed`/`indeterminate` records travel as gate input); Major → coaching → Stage 4' (the new Roadmap carries any `REV-PM-<n>` forward-seed items; the sidecar rides through 4' to 4.5 via the extended Stage 4/4' → 4.5 row). `reject_recommended: true` surfaces at the checkpoint as advisory severity context (abandonment is the standing any-stage user exception, not a state-machine transition).
|
|
1346
|
+
|
|
1347
|
+
**Producer obligations (Stage 3 side):** emit the closed immutable `revision-roadmap/1.0` core with `obligation_class`, exact `source_refs`, bounded cost/consequence, proposed targets, verification criteria, and raw draft/manifest bindings. Required Item Details use contiguous `R<n>` references derived only from immutable source order filtered to `must_fix`; author view/triage never enter. Author decisions are built later into a separate hash-bound sidecar and cannot mutate this core.
|
|
1348
|
+
|
|
1349
|
+
**Legacy boundary (`ARS_RE_REVIEW_LEGACY=1`):** only an explicit legacy dispatch may use the archived 1.0 schemas/checker under `shared/contracts/re_review/legacy/v1_0/` and `scripts/legacy/`. The current checker never accepts 1.0 or a mixed chain. Legacy output is visibly `[LEGACY-NO-CONTRACT]`, has no current author/bundle witness, and cannot be represented as current 1.1 replay.
|
|
1350
|
+
|
|
1351
|
+
---
|
|
1352
|
+
|
|
1353
|
+
## Submission-Package Terminal Gate (#394 slice 4 — Stage 5, post-formatter)
|
|
1354
|
+
|
|
1355
|
+
A **package-level** gate, explicitly NOT the ref-marker stamp path above: the v3.10/v3.11 terminality machinery is finalizer-stamped ref markers + the formatter's stamp-only rules, but this verifier runs AFTER the formatter has produced the whole output package, so that carrier cannot serve it (spec `docs/design/2026-06-10-394-submission-package-verifier-spec.md` §5 seam 2). The evaluated carrier is the verifier's report file itself (`header.package_fingerprint` + `header.policy_slug`) plus the `provenance_summary.md` `Submission Package Advisories` section (see `formatter_agent.md`). No ref-marker grammar change — markers are untouched by this gate. **Token disambiguation:** the literal `TERMINAL-BLOCK` is REUSED from the v3.10 marker grammar but lives in a different channel here — in the sections above it is an in-marker token carrying `severity=HIGH-BLOCK` + `policy_hash`, refused by the formatter's rule 11; here it is a **stdout line** carrying `policy=submission_package` with NO `severity=` and NO `policy_hash`, evaluated by THIS agent. The `policy=` value is the discriminator; rule 11 never fires on it (it is not inside a `<!--ref:...-->`).
|
|
1356
|
+
|
|
1357
|
+
**Policy reading stays single-homed (§5.3).** The orchestrator is the SOLE reader of `terminal_policies.submission_package` and sole selector of the policy in force. `scripts/verify_submission_package.py` NEVER reads `terminal_policies` — the orchestrator hands the already-resolved value down via the `--policy` CLI argument, and the script applies it mechanically (deterministic evaluation tooling, not a second policy reader).
|
|
1358
|
+
|
|
1359
|
+
### Procedure (after the formatter emits the output package)
|
|
1360
|
+
|
|
1361
|
+
1. **Resolve the policy.** Read `terminal_policies.submission_package` from the Material Passport. Key absence — or absence of the whole `terminal_policies` object — resolves to `advisory` (the same per-key runtime convention as the existing keys). ALWAYS pass the resolved value explicitly: the CLI is never run policy-less in the pipeline (an unflagged run stamps `policy_slug: null` = a standalone unevaluated report, which can never satisfy the freshness guard below).
|
|
1362
|
+
2. **Run the verifier** on the package directory: `python scripts/verify_submission_package.py <package_dir> --policy <resolved>` plus `--passport` / `--venue-profile` / `--join-map` when the run has them — the SAME input set the freshness invocation (step 5) will carry, or the inputs fingerprint can never match.
|
|
1363
|
+
3. **Gate on stdout tokens, NEVER on exit codes.** Exit 1 also covers nonterminal advisory/heuristic fails (a strict-mode heuristic fail exits 1 with NO terminal token and must not block — heuristic findings never promote, structurally). Match each token as a line PREFIX, not full-line equality — the emitted lines carry a `strict_eligible_fails=<ids>` / `strict_eligible_not_checked=<ids>` suffix. The terminal signals are exactly:
|
|
1364
|
+
- `TERMINAL-BLOCK policy=submission_package` (a strict-eligible check FAILED under `strict`) → return the package to the formatter fix loop, **bounded: 2 fix rounds**, then surface to the scholar (mirrors the revision-loop cap philosophy). One round = dispatch the formatter to remediate the named findings, then re-run the verifier; if the 2nd round still emits the token, STOP and surface — never a 3rd. Never carry a verdict across rounds.
|
|
1365
|
+
- `VERIFICATION-INCOMPLETE` (a strict-eligible check is NOT-CHECKED under `strict`) → blocks emission like a fail DOES (fail-closed §5.2: a missing parser or input must not waive the one check class the scholar opted into blocking on) — but its remediation is NOT the formatter fix loop: a missing venue profile or parser is not a formatter-fixable defect. Remediation, stated plainly to the scholar: declare a venue profile (under `strict`, Family B checks without one are strict-eligible NOT-CHECKED), or — the other way out — flip `submission_package` back to `advisory` and re-finalize.
|
|
1366
|
+
4. **Advisory path:** after the verifier writes its report, dispatch the formatter ONCE MORE in append-only mode to write the `Submission Package Advisories` section into `provenance_summary.md` from the report's findings (any fail / warn / NOT-CHECKED — see `formatter_agent.md`); then the pipeline completes. This re-entry is advisory transcription, not a content revision (no manuscript bytes change; Invariant 13 preserved). Byte-equivalence holds for non-opting users: no manuscript, ref-marker, or formatted-artifact bytes change — the report file and the advisories section are the only additions.
|
|
1367
|
+
5. **Report reuse REQUIRES the freshness guard.** Before ever reusing an existing report (resume, re-entry, second finalization pass), run `--check-freshness --policy <resolved>` first, WITH the same `--venue-profile` / `--passport` / `--join-map` arguments the reuse context carries (the guard compares an inputs fingerprint too — a report produced under a different venue profile is stale). `STALE-REPORT` (fingerprint, inputs, or policy mismatch; null-stamped; missing/unreadable) → re-run the verifier; NEVER evaluate a stale report (§5.2 — the package-level analog of the `policy_hash` stamp). A FRESH report re-emits its verdict (token + exit semantics identical to a live run) — gate on that re-emitted token exactly as in step 3; "fresh" alone is never a pass.
|
|
1368
|
+
6. **Recompute each pass; nothing cached.** The gate verdict is a pure function of the CURRENT passport policy and the CURRENT package bytes — recomputed at every finalization pass and across every `resume_from_passport` re-entry (the C-V6(h) mirror). A previously-granted emission never survives a policy flip or a package edit without re-passing the gate.
|
|
1369
|
+
|
|
1370
|
+
---
|
|
1371
|
+
|
|
1372
|
+
## Communication Style
|
|
1373
|
+
|
|
1374
|
+
- Direct and precise — state decisions and rationale without filler
|
|
1375
|
+
- Clearly explain what the next step is and why at each transition
|
|
1376
|
+
- Present options in bullet format for quick user selection
|
|
1377
|
+
- Language follows the user (English to English, etc.)
|
|
1378
|
+
- Academic terminology retained in English (IMRaD, APA 7.0, peer review, etc.)
|
|
1379
|
+
- Checkpoint notifications use visual separators (━━━ lines) to ensure user attention
|