From research-papers
Extracts intra-paper justification structures from notes.md and claims.yaml into justifications.yaml, mapping premise sets to conclusions via typed rules like empirical_support and causal_explanation. Use after claims extraction for argument analysis.
npx claudepluginhub ctoth/research-papers-plugin --plugin research-papersThis skill uses the workspace's default tool permissions.
Extract the intra-paper argumentative structure: which claims serve as premises for which conclusions, via what type of reasoning. Produces a `justifications.yaml` file that propstore can compile into structured arguments.
Extracts argumentative stances between claims across research papers by reading notes.md and claims.yaml files, generating standalone stances.yaml. Requires prior claims extraction.
Extracts atomic claims from citations in academic papers or PDFs, groups by sub-topic, summarizes groups for literature reviews and note-taking.
Deeply analyzes specific research papers: dissects experimental setups, extracts key numbers, evaluates claims against hypotheses. For arXiv IDs and deep-dive requests.
Share bugs, ideas, or general feedback.
Extract the intra-paper argumentative structure: which claims serve as premises for which conclusions, via what type of reasoning. Produces a justifications.yaml file that propstore can compile into structured arguments.
A justification is a directed hyperedge: a set of premise claims that together support or attack a conclusion claim, via a typed inference rule. Unlike stances (binary claim-to-claim edges), justifications capture the "these premises together entail this conclusion by this kind of reasoning" structure.
Stances say "claim A relates to claim B." Justifications say "claims A, B, and C jointly support claim D via causal explanation." They are complementary: stances are the inter-paper argumentation graph; justifications are the intra-paper reasoning graph.
Every justification has a rule_kind that types the inference step:
empirical_support — Experimental data directly supports the conclusion. "We observed X, therefore Y." The premises are result claims; the conclusion is a finding or generalization.
causal_explanation — A mechanism explains why a result holds. "X happens because Y inhibits Z." The premises include mechanism claims; the conclusion is the explained result.
methodological_inference — A methodological choice leads to a conclusion. "Because we used randomized assignment, confounding is controlled." Premises are methodology claims; conclusion is a validity claim.
statistical_inference — A statistical test or model produces a conclusion. "p < 0.05 with HR 0.88, therefore the effect is significant." Premises are measurement/parameter claims; conclusion is a finding.
definition_application — Applying a formal definition to classify or derive. "X meets criteria A, B, C, therefore X is a Y." Premises are observations matching definitional criteria; conclusion is the classification.
scope_limitation — Evidence narrows the applicability of a claim. "Effect observed only in subgroup Z, therefore the general claim requires qualification." Premises are limitation/observation claims; conclusion is a qualified version of a broader claim.
comparison_based_inference — Comparative reasoning across methods, systems, or findings. "A outperforms B on metric M under conditions C, therefore A is preferable for context C." Premises are comparison claims; conclusion is a recommendation or ranking.
When a justification represents a critique rather than support, it includes an attack_target that specifies what is being attacked:
This distinction is critical: propstore's defeat calculus treats undercuts as preference-independent (always defeat), while rebuts and undermines are preference-dependent.
paper_dir="$ARGUMENTS"
ls "$paper_dir"/notes.md 2>/dev/null || echo "MISSING: notes.md"
ls "$paper_dir"/claims.yaml 2>/dev/null || echo "MISSING: claims.yaml"
ls "$paper_dir"/justifications.yaml 2>/dev/null && echo "EXISTS: justifications.yaml — will overwrite"
notes.md missing -> STOP. Run paper-reader first.claims.yaml missing -> STOP. Run extract-claims first.justifications.yaml already exists -> report and ask whether to overwrite.Read:
<paper_dir>/notes.md — primary source for identifying reasoning structure<paper_dir>/claims.yaml — the claim IDs you will reference as premises and conclusions<paper_dir>/paper.pdf or page images in <paper_dir>/pngs/ — for page numbers and verificationRead all of notes.md. Identify where the paper connects its own claims through reasoning — where one or more claims serve as evidence or justification for another claim. Do not limit your search to specific sections or linguistic patterns; reasoning structure can appear anywhere and take any form.
For each identified inferential step:
source:
paper: <paper_dir_name>
justifications:
- id: just1
conclusion: claim12
premises:
- claim3
- claim8
rule_kind: causal_explanation
provenance:
page: 14
section: Discussion
quote_fragment: "Because X inhibits Y, the observed reduction..."
- id: just2
conclusion: claim20
premises:
- claim5
rule_kind: methodological_inference
attack_target:
kind: inference_rule
target_claim: claim9
provenance:
page: 22
section: Discussion
quote_fragment: "This approach fails to account for..."
Required fields:
id — Unique within file. Format: just + sequential integer (just1, just2, ...).conclusion — Claim ID from this paper's claims.yaml. The claim being supported or derived.premises — List of claim IDs from this paper's claims.yaml. The claims that together support the conclusion. Must have at least one.rule_kind — One of: empirical_support, causal_explanation, methodological_inference, statistical_inference, definition_application, scope_limitation, comparison_based_inference.provenance — Where in the paper this inferential move is stated.
page — Integer page number. Use 0 only as last resort.section — Section name where the reasoning appears.quote_fragment — Brief quote (1-2 sentences max) showing the inferential move.Optional fields:
attack_target — Only present when the justification represents a critique.
kind — One of: conclusion, premise, inference_rule.target_claim — The claim ID being attacked.Write to <paper_dir>/justifications.yaml.
Check:
conclusion and every entry in premises references a valid claim ID in <paper_dir>/claims.yamlrule_kind is one of the seven valid valuesattack_target.kind (if present) is one of: conclusion, premise, inference_ruleattack_target.target_claim (if present) references a valid claim IDIf validation fails, fix and re-validate.
If a propstore source branch exists for this paper, ingest the justifications:
source_name=$(basename "$paper_dir")
pks source add-justification "$source_name" --batch "$paper_dir/justifications.yaml"
If this fails with claim reference errors, the referenced claim IDs don't match the source branch's claims. Fix and retry.
uv run plugins/research-papers/scripts/stamp_provenance.py \
"<paper_dir>/justifications.yaml" \
--agent "<your model name>" --skill extract-justifications
This records which model extracted justifications, when, and which plugin version was used.
Justifications extracted: papers/[dirname]/justifications.yaml
Justifications: N total
empirical_support: X
causal_explanation: X
methodological_inference: X
statistical_inference: X
definition_application: X
scope_limitation: X
comparison_based_inference: X
Attack justifications: X (conclusion: A, premise: B, inference_rule: C)
Claims participating: X of Y total claims
As conclusion: X
As premise: X
Intermediate (both): X
Isolated: X