← Back to Skills Marketplace
willoscar

Argument Selfloop

by WILLOSCAR · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
146
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install argument-selfloop
Description
Argument self-loop: maintain an argument ledger + premise consistency report for drafted sections. **Trigger**: argument self-loop, argument chain, premise c...
README (SKILL.md)

Argument Self-loop (write -> self-check -> ledger -> revise)

Purpose: upgrade C5 from “generate text” to “execute argument actions under explicit constraints”.

This skill operationalizes the mechanism you described as a reusable, pipeline-native component:

  • write section-by-section
  • self-check paragraph-by-paragraph
  • maintain a small argument ledger that makes dependencies explicit
  • revise only what fails until the chain is continuous

It complements (not replaces) the other self-loops:

  • evidence-selfloop: blocks writing when packs are not writeable (do not pad)
  • writer-selfloop: blocks template voice, missing sections/leads, scope/citation violations
  • argument-selfloop (this skill): blocks argument discontinuity and premise drift (even when prose is fluent)

Core idea: two intermediate artifacts (never in the paper)

This skill treats “argument structure” as a first-class intermediate artifact, like evidence packs.

Outputs:

  • output/SECTION_ARGUMENT_SUMMARIES.jsonl (structured; per-section/per-paragraph argument moves)
  • output/ARGUMENT_SKELETON.md (compact narrative + dependency map; not a prose restatement)
  • output/ARGUMENT_SELFLOOP_TODO.md (PASS/FAIL + actionable edits)

These files are not reader-facing and must never be merged into output/DRAFT.md.

Downstream:

  • paragraph-curator uses output/SECTION_ARGUMENT_SUMMARIES.jsonl (moves/outputs) + the ## Consistency Contract to run a controlled select->evaluate->subset->fuse pass without changing citation keys.

What this self-loop enforces (your 3 invariants)

After you complete a section (H3 or key front matter), the section must satisfy:

  1. Correct narrative linkage (paragraph-to-paragraph)
  • the relation between adjacent paragraphs is explicit (cause/contrast/refinement/boundary)
  • no silent topic-switch; no “jump cut”
  1. Closed argument loop (section-level) The section answers, in its own text (not in a hidden outline):
  • what question is it resolving?
  • what argument path does it take?
  • what is the conclusion?
  • what premises does the conclusion rely on?
  1. Premises + definitions are explicit and stable
  • new terms / protocol assumptions are defined at first use
  • the definition matches global usage (no drift)
  • task/metric/constraint assumptions do not silently change across sections

The self-check must result in concrete edits: add a missing definition, add a bridge sentence, add an explicit contrast, add a scope boundary, delete/reorder a paragraph, or strengthen the local conclusion.

Paragraph contract (argument actions)

Every paragraph must execute at least one argument action and be locally self-consistent. Use this action set (can be combined, but never empty):

  • Claim: a testable judgement/conclusion (avoid generic background)
  • Definition/Setup: introduce a concept, assumption, task definition, protocol, comparison set
  • Justification: reasoning chain or evidence support (including citations)
  • Contrast/Differentiation: clarify differences, remove ambiguity
  • Boundary/Failure: applicability limits, failure modes, threats to validity
  • Local Conclusion: a reusable takeaway / constraint that downstream paragraphs can rely on

One-sentence self-check (per paragraph):

  • "This paragraph’s action(s) are: \x3C…>. Its output is: \x3C…>."

If you cannot answer, the paragraph must be rewritten/merged/split until the action and output are clear.

How to run it (LLM-first workflow)

  1. Pick the scope of this pass
  • default: run it after writer-selfloop PASS, before merge
  • incremental: run it after finishing 1-2 H3s, so you catch drift early
  1. For each target section file (start with H3 bodies)
  • read the section
  • do a paragraph-by-paragraph action labeling in the ledger, not in the prose
  • identify failures (missing definition, missing bridge, missing conclusion, implicit premise)
  • apply the fix to the section file (sections/S\x3Csub_id>.md) without changing citation keys
  1. Update the two-level ledger
  • write/update the record for that section in output/SECTION_ARGUMENT_SUMMARIES.jsonl
  • update output/ARGUMENT_SKELETON.md so it reflects:
    • the section’s functional role in the paper
    • what premises it consumes
    • what conclusions/definitions it produces for downstream sections
  1. Write output/ARGUMENT_SELFLOOP_TODO.md
  • - Status: FAIL + a list of concrete edits when any section fails
  • - Status: PASS only when all required sections are coherent and premises are stable
  1. Rerun until PASS

Output contract

output/ARGUMENT_SELFLOOP_TODO.md

Must exist and start with:

  • - Status: PASS|FAIL

Recommended structure (keep it short and debuggable):

  • ## Failures (blocking)
  • ## Fix plan (actionable edits) (per file)
  • ## Premise drift watchlist (non-blocking)

output/SECTION_ARGUMENT_SUMMARIES.jsonl

JSONL (one record per section/subsection).

Required fields per record:

  • kind: h3 | front_matter | discussion | conclusion (minimal set)
  • id: for H3 use the subsection id (e.g., "3.2")
  • title
  • section_id, section_title (for H3)
  • section_role: what this unit does in the paper (e.g., mechanism, evaluation_lens, risk_lens, synthesis)
  • depends_on: list of premises/definitions it assumes
  • adds: list of premises/definitions/conclusions it introduces
  • paragraphs: list of objects, each with:
    • i (1-based paragraph index)
    • moves (non-empty list; pick from: claim, definition_setup, justification, contrast, boundary_failure, local_conclusion)
    • output (one sentence: what this paragraph produces)

Notes:

  • This is an intermediate ledger: short, structural, no prose restatement.
  • Do not paste long sentences from the draft. Use short summaries.

output/ARGUMENT_SKELETON.md

A compact narrative/dependency map (not a retelling of the paper).

It should include:

  • each H2/H3's necessity (what gap it fills)
  • explicit dependencies (premises consumed, outputs produced)
  • a global Consistency Contract section (single source of truth) that must not drift across edits:
    • canonical terminology + synonym policy (what to call the same thing)
    • task/environment/threat-model boundary (what counts as in-scope)
    • evaluation protocol fields that make numbers interpretable (task + metric + constraint/budget/tool access)
    • comparison set naming policy (baseline families; avoid drifting labels)

Minimum format requirement:

  • output/ARGUMENT_SKELETON.md must contain a heading line: ## Consistency Contract

Change rule (regression trigger):

  • If you change any definition/protocol assumption/term naming, update the Consistency Contract first, then revise the affected sections/*.md to match, and rerun this self-loop until PASS.

Keep it "writer-facing": no reader signposting, no “in this section we…”.

Routing rules (avoid polishing around missing substance)

  • If a section cannot produce a justified claim without new evidence: STOP and route to evidence-selfloop.
  • If a section fails due to template voice / missing citations / out-of-scope keys: route to writer-selfloop / citation-* first.
  • This skill is for argument continuity and premise hygiene, not for adding new facts.

Script (generator + validator)

This skill includes a validator script so the pipeline can block on missing ledgers. It does not write paper prose, but it does generate the required ledger artifacts from existing sections/*.md files and then validates coverage/consistency.

Quick Start

  • python scripts/run.py --workspace workspaces/\x3Cws>

All Options

  • --workspace \x3Cdir>
  • --unit-id \x3CU###>
  • --inputs \x3Csemicolon-separated>
  • --outputs \x3Csemicolon-separated>
  • --checkpoint \x3CC#>

Examples

  • Validate the ledgers exist + are PASS + cover all H3:
    • python scripts/run.py --workspace workspaces/\x3Cws>
Usage Guidance
This skill is coherent with its stated purpose: it reads the repo outline and section Markdown and writes internal ledger files summarizing paragraph-level argument moves. Before installing or running it, confirm you intend an agent to read and write files inside the workspace (sections/* and output/*). Make a repository backup or enable version control so you can review any automated edits; the run.py currently only reads and writes derived output files, but the SKILL.md describes human/agent edits to section files, which an automated agent could perform. There is no network activity or secret access requested, so the main risk is accidental modification of your draft files—review outputs and diffs before merging into your canonical draft.
Capability Analysis
Type: OpenClaw Skill Name: argument-selfloop Version: 1.0.0 The 'argument-selfloop' skill bundle is a legitimate tool designed to help an AI agent maintain logical consistency and argument structure during the drafting phase of a research paper. The Python script `scripts/run.py` performs paragraph-level analysis of drafted sections to identify 'argument moves' (e.g., claims, evidence, limitations) and generates structured ledgers for tracking dependencies. The `tooling/` directory contains standard utility functions for file management and quality gate enforcement. No evidence of malicious intent, data exfiltration, or prompt injection was found; all file operations are restricted to the workspace's `sections/`, `outline/`, and `output/` directories.
Capability Assessment
Purpose & Capability
Name/description describe an argument self-loop and the repository contains Python scripts and pipeline docs that read sections/outline and produce the stated intermediate artifacts (SECTION_ARGUMENT_SUMMARIES.jsonl, ARGUMENT_SKELETON.md, ARGUMENT_SELFLOOP_TODO.md). Required binaries (python3 or python) match the implementation; no unrelated credentials, network, or tools are requested.
Instruction Scope
SKILL.md instructs a workflow that reads 'outline/outline.yml' and 'sections/S*.md', performs paragraph-level labeling and produces ledger files. The runtime script (scripts/run.py) implements this read-and-report behavior and writes to workspace/output/*. The SKILL.md also describes applying fixes to section files; the provided run.py does not appear to auto-edit section prose, but an agent following the prose instructions could modify section files. Users should expect the skill to read and write files within the provided workspace.
Install Mechanism
No install spec or network downloads; all code is local Python and there are no external installers or remote artifacts. This is low-risk given the requested runtime (python).
Credentials
The skill declares no environment variables or credentials. It only requires a Python runtime; it does not request unrelated secrets or access to system configuration.
Persistence & Privilege
Flags show always=false and normal model invocation settings. The skill writes only to files inside the provided workspace paths and does not modify other skills or global agent configuration.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install argument-selfloop
  3. After installation, invoke the skill by name or use /argument-selfloop
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
argument-selfloop v1.0.0: Initial release introducing argument structure checking and premise consistency enforcement for draft sections. - Maintains an argument ledger and premise consistency report to ensure strong, coherent argumentation in each section. - Introduces three key invariants: explicit narrative linkage, closed argument loop at the section level, and stable, explicit premises/definitions. - Adds intermediate outputs: `SECTION_ARGUMENT_SUMMARIES.jsonl`, `ARGUMENT_SKELETON.md`, and `ARGUMENT_SELFLOOP_TODO.md` (never merged into the draft). - Enforces a clear contract for paragraph actions (claim, definition, justification, contrast, boundary, local conclusion). - Provides routing guidance to prevent writing when evidence or structure is missing, ensuring substance over fluency.
Metadata
Slug argument-selfloop
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Argument Selfloop?

Argument self-loop: maintain an argument ledger + premise consistency report for drafted sections. **Trigger**: argument self-loop, argument chain, premise c... It is an AI Agent Skill for Claude Code / OpenClaw, with 146 downloads so far.

How do I install Argument Selfloop?

Run "/install argument-selfloop" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Argument Selfloop free?

Yes, Argument Selfloop is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Argument Selfloop support?

Argument Selfloop is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Argument Selfloop?

It is built and maintained by WILLOSCAR (@willoscar); the current version is v1.0.0.

💬 Comments