From ai-writing-plugin
中文优先指导 AI coding tools 通过 deterministic Python engine 运行 AI professional document writing plugin,同时保留 artifact、source、provenance、HITL、final-status、profile 和 candidate-update 边界。
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-writing-plugin:writing-coreThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill when working with the AI professional document writing Claude Code plugin. The plugin provides an evidence-aware, reviewable, traceable writing workflow for professional documents with declared materials, templates, checklists, source support, verification, and human confirmation boundaries.
Use this skill when working with the AI professional document writing Claude Code plugin. The plugin provides an evidence-aware, reviewable, traceable writing workflow for professional documents with declared materials, templates, checklists, source support, verification, and human confirmation boundaries.
默认用中文和用户沟通,尤其是任务确认、材料分类说明、运行进度、风险提醒、最终结果和后续动作。保留命令、路径、artifact 文件名、schema 字段、task_type、source、sample、reference、HITL、NEEDS_USER_CONFIRMATION 等英文关键术语。
如果输入材料或引用片段是英文,可以保留原文;解释性文字优先中文。不要因为中文交互而弱化 Python deterministic engine、artifact contract、source index、provenance、review、verify、HITL trace 或 candidate update state control。
This is not a normal chat writing assistant. It is not an automatic compliance, safety, architecture, quality, or release approval tool. It must not generate unattended final professional approval conclusions.
This Skill.md is guideline material only. It must use plugin workflow and must call Python engine commands from the repository root. Do not create final documents directly from this Skill.md, and do not replace the Python deterministic engine with prompt-only writing.
The Python deterministic engine is the trusted execution skeleton for:
Skill.md must not replace artifact contract, schema validation, source index, evidence trace, review, verify, HITL trace, or candidate update state control.
Claude Code command:
/ai-writing-plugin:write "Run the writing workflow with examples/hara_demo_fixture/task.yaml"
/ai-writing-plugin:write "Run the writing workflow with examples/technical_solution_demo_fixture/task.yaml"
/ai-writing-plugin:write "Run the writing workflow with examples/test_report_demo_fixture/task.yaml"
/ai-writing-plugin:write "Run the writing workflow with examples/fsr_demo_fixture/task.yaml"
/ai-writing-plugin:write "Run the writing workflow with examples/generic_document_demo_fixture/task.yaml"
/ai-writing-plugin:write "Run the writing workflow with examples/custom_technical_note_profile_demo_fixture/task.yaml"
CLI smoke-test examples:
.venv/bin/python -m ai_writing_plugin write-run --task examples/hara_demo_fixture/task.yaml
.venv/bin/python -m ai_writing_plugin write-run --task examples/technical_solution_demo_fixture/task.yaml
.venv/bin/python -m ai_writing_plugin write-run --task examples/test_report_demo_fixture/task.yaml
.venv/bin/python -m ai_writing_plugin write-run --task examples/fsr_demo_fixture/task.yaml
.venv/bin/python -m ai_writing_plugin write-run --task examples/generic_document_demo_fixture/task.yaml
.venv/bin/python -m ai_writing_plugin write-run --task examples/custom_technical_note_profile_demo_fixture/task.yaml
Profile maintenance entry:
.venv/bin/python -m ai_writing_plugin profile-from-spec --spec docs/document_types/generic_document_SPEC.md --out /tmp/candidate-profile
profile-from-spec creates candidate profile material only. It must not overwrite an active profile.
The generic workflow is deterministic and artifact-first:
input materials
-> material inventory
-> source index
-> template outline
-> research questions
-> evidence map
-> citation plan
-> section tasks
-> conservative draft
-> review
-> verification
-> revision
-> final report
-> run summary
-> candidate profile update / candidate skill patch
Equivalent engine phase words include init run, ingest, source index, template outline, research questions, evidence map, citation plan, section tasks, draft, review, verify, finalize, trace, and learning.
The artifact contract is maintained in docs/CURRENT_ARTIFACT_CONTRACTS.md and enforced by the Python engine and tests. Skill.md can explain the contract but must not invent a parallel schema.
Core artifacts include:
manifest.jsontask_brief.jsoninputs/input_inventory.jsonknowledge/source_index.jsonknowledge/provenance_index.jsonknowledge/knowledge_gaps.mdplans/template_structure.jsonplans/outline_l1.mdplans/research_questions.jsonplans/evidence_map.jsonplans/unresolved_questions.mdplans/citation_plan.jsonplans/outline_final.mdplans/section_tasks.jsonplans/claim_support_matrix.jsonplans/writing_plan.mddraft/full_draft.mdreview/review_report.jsonreview/final_review.mdverify/verify_report.jsonverify/failures.mdrevision_plan.jsonrevised/full_draft.mdrevised/change_log.mdfinal/final_report.mdfinal/delivery_summary.mdtrace/session_trace.jsonltrace/hitl_decisions.jsonllearning/run_summary.mdlearning/reusable_patterns.mdlearning/candidate_profile_update.yamllearning/candidate_skill_patch.mdlearning/promotion_report.mdRuntime artifacts are written under runs/<run_id>/ and must not be committed to git.
Material roles are not interchangeable:
source: normal project fact source role.template: structure constraint; not automatic project fact support.checklist: review and verification requirement; not project fact support.reference: methodology, background, terminology, or review guidance only.sample: style, shape, table organization, section granularity, and wording style only.expected_output_shape: output shape guidance only.HITL: explicit human confirmation recorded through trace.Required boundaries:
N4 source tier rules:
T0: HITL / explicit human confirmation.T1: project source.T2: template / checklist.T3: reference methodology.T4: sample style only.T5: generated / unknown / unsupported inference.Interpretation:
knowledge/provenance_index.json and plans/claim_support_matrix.json are the main N4 provenance artifacts. Draft, review, verify, final report, and delivery summary should preserve source tier, claim status, evidence status, human confirmation status, and profile version where applicable.
A critical claim is a high-risk or key professional judgment. Each document type defines its own critical claims.
Rules:
NEEDS_USER_CONFIRMATION, pending, or an open item.requires_human_confirmation claims may still need HITL even when a source exists.trace/hitl_decisions.jsonl.Final boundary:
approved, validated, compliant, risk accepted, production ready, or similar final professional approval language.Official L3 document types are implemented through built-in DocumentTypeRules:
haratechnical_solutiontest_reportfsrgeneric_document is L1 generic mode. It helps run the shared workflow for documents that have source, template, checklist, sample, reference, or profile guidance, but it does not promise complete domain professional judgment.
External document_profile.yaml is an L2 / customer profile mechanism. It must pass validation before use. custom_technical_note is an external profile demo, not an official L3 document type.
TSC / Technical Safety Concept remains deferred and is not an official built-in document type.
Markdown Spec is a human-readable upstream explanation layer. It is not the runtime machine rule and must not be treated as the only execution rule. profile-from-spec may turn a Markdown Spec into a candidate profile, but that candidate profile stays inactive until separately reviewed and activated through a controlled process.
Learning artifacts are proposals:
learning/candidate_profile_update.yamllearning/candidate_skill_patch.mdlearning/promotion_report.mdcandidate update proposed/inactive.
candidate updates remain proposed/inactive.
candidate_profile_update.yaml and candidate_skill_patch.md remain proposed / inactive by default.
They must not automatically overwrite stable Skill files, must not automatically activate profiles, and must not be applied from runs/<run_id>/learning/candidate_skill_patch.md without explicit human review in a separate process.
Avoid these failures:
custom_technical_note an official L3 document type.technical_solution output.candidate_skill_patch.md.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub exquisite0828/ai_writer_plugin --plugin ai-writing-plugin