MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / compact_writing_contract

Function compact_writing_contract

scripts/build_synthesis_bundle.py:268–339  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

266
267
268def compact_writing_contract() -> dict:
269 depth_requirements = dict(WRITING_CONTRACT_RULES["note_plan_depth_requirements"])
270 depth_requirements["required_section_focus_fields"] = list(
271 depth_requirements["required_section_focus_fields"]
272 )
273 depth_requirements["generic_focus_phrases"] = list(
274 depth_requirements["generic_focus_phrases"]
275 )
276 usable_insert_candidate = dict(WRITING_CONTRACT_RULES["usable_insert_candidate"])
277 usable_insert_candidate["kinds"] = list(usable_insert_candidate["kinds"])
278 analysis_coverage = dict(WRITING_CONTRACT_RULES["analysis_coverage_contract"])
279 analysis_coverage["central_claim_fields"] = list(
280 analysis_coverage["central_claim_fields"]
281 )
282 analysis_coverage["required_plan_fields"] = list(
283 analysis_coverage["required_plan_fields"]
284 )
285 analysis_coverage["final_quality_review_checks"] = list(
286 analysis_coverage["final_quality_review_checks"]
287 )
288 return {
289 "language": "zh-CN",
290 "contract_role": "manifest_quality_contract",
291 "canonical_source": (
292 "SKILL.md defines the workflow; scripts/contracts.py defines "
293 "machine-checkable contract data."
294 ),
295 "must_include_sections": list(NOTE_REQUIRED_SECTIONS),
296 "note_plan_contract": {
297 "required_fields": list(NOTE_PLAN_REQUIRED_FIELDS),
298 "artifact_preference": "short_json_planning_file",
299 "grounding_field": "section_plan[*].evidence_sources",
300 "analysis_coverage_field": "central_claims[*]",
301 },
302 "paper_type_selection": {
303 "source_of_truth": "note_plan.paper_type",
304 "suggested_paper_type_role": "none",
305 "allowed_paper_types": list(PAPER_TYPE_VALUES),
306 },
307 "contracts_by_paper_type": PAPER_TYPE_CONTRACTS,
308 "grounding_contract": {
309 "source_of_truth": "source_manifest",
310 "accepted_reference_forms": list(
311 WRITING_CONTRACT_RULES["allowed_grounding_reference_forms"]
312 ),
313 "required_sections": list(WRITING_CONTRACT_RULES["grounding_required_sections"]),
314 "note_plan_depth_requirements": depth_requirements,
315 "reject_old_references": list(WRITING_CONTRACT_RULES["old_bundle_reference_prefixes"]),
316 "lint_command": (
317 "scripts/lint_grounding.py --note-plan ... "
318 "--source-manifest ... --bundle-json ..."
319 ),
320 },
321 "figure_table_contract": {
322 "placeholder_first": True,
323 "visual_quality_gate": "fail_closed",
324 "decision_table_required": True,
325 "decision_values": list(WRITING_CONTRACT_RULES["figure_decision_values"]),

Callers 1

bundleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected