doc-consolidation
CLAWHUB · Unverified
Merges ephemeral report and analysis artifacts into permanent documentation Skill: doc-consolidation Owner: athola Summary: Merges ephemeral report and analysis artifacts into permanent documentation Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:20:09.156Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:40:14.609Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:57:07.565Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:05:05.720Z | user Release v1.9.14 v1.9.13 | 2026-06-27T16:22:
- 62
- Rank
- 84
- Safety
- 1.6k
- Downloads
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · Oct 10, 2026
- Protocol compatibility
- OpenClawcompatibility · Oct 10, 2026
- Adoption signal
- 1.6K downloadsadoption · Oct 10, 2026
- Latest release
- 1.9.19release · Aug 26, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 1.9.19release
Release v1.9.19
Observed Aug 26, 2026 · source
Install and run
Setup complexity: low.
clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-sanctum-doc-consolidation- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-sanctum-doc-consolidation/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
144,913 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: doc-consolidation
description: Merges ephemeral report and analysis artifacts into permanent documentation
version: 1.9.8
triggers:
- docs
- consolidation
- cleanup
- git-hygiene
- knowledge-management
- LLM-generated markdown files have accumulated and need consolidation
metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/sanctum", "emoji": "\ud83d\udcdd"}}
source: claude-night-market
source_plugin: sanctum
---
> **Night Market Skill** — ported from [claude-night-market/sanctum](https://github.com/athola/claude-night-market/tree/master/plugins/sanctum). For the full experience with agents, hooks, and commands, install the Claude Code plugin.
## Table of Contents
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Two-Phase Workflow](#two-phase-workflow)
- [Phase 1: Triage (Fast Model)](#phase-1:-triage-(fast-model))
- [Phase 2: Execute (Main Model)](#phase-2:-execute-(main-model))
- [Workflow Details](#workflow-details)
- [Step 1: Candidate Detection](#step-1:-candidate-detection)
- [Step 2: Content Analysis](#step-2:-content-analysis)
- [Step 3: Destination Routing](#step-3:-destination-routing)
- [Step 4: Generate Plan](#step-4:-generate-plan)
- [Source: API_REVIEW_REPORT.md](#source:-api_review_reportmd)
- [Post-Consolidation](#post-consolidation)
- [Step 5: Execute Merges](#step-5:-execute-merges)
- [Fast Model Delegation](#fast-model-delegation)
- [Content Categories](#content-categories)
- [Merge Strategies](#merge-strategies)
- [Intelligent Weave](#intelligent-weave)
- [Replace Section](#replace-section)
- [Append with Context](#append-with-context)
- [Create New File](#create-new-file)
- [Integration](#integration)
- [Example Session](#example-session)
- [Troubleshooting](#troubleshooting)
- [No candidates found](#no-candidates-found)
- [Low-quality extractions](#low-quality-extractions)
- [Merge conflicts](#merge-conflicts)
- [Related Skills](#related-skills)
# Doc Consolidation
Extracts valuable knowledge from ephemeral LLM outputs and merges it into permanent documentation.
## When To Use
Use this skill when:
- You have untracked `*_REPORT.md` or `*_ANALYSIS.md` files from Claude sessions
- Git status shows markdown files that shouldn't be committed but contain useful content
- You want to preserve insights from code reviews, refactoring reports, or API audits
- Preparing a PR and need to clean up working artifacts
Do NOT use when:
- Files are already in proper documentation locations
(`docs/`, `skills/`)
- Files are intentionally temporary scratch notes
- User explicitly wants to preserve the original report format
- Source files have no extractable value (pure log output)
## Formatting
When merging content into permanent documentation, follow
`Skill(leyline:markdown-formatting)` conventions: wrap prose
at 80 chars (prefer sentence/clause boundaries), blank lines
around headings, ATX headings only, blank line before lists,
and reference-_meta.json
{
"ownerId": "kn7d107jg9jv602h9ytsegydq184a42s",
"slug": "nm-sanctum-doc-consolidation",
"version": "1.9.19",
"publishedAt": 1787750409156
}modules/candidate-detection.md
# Candidate Detection Module
Identifies markdown files that are candidates for consolidation.
## Detection Signals
Apply signals in priority order. A file is a candidate if it matches **any** signal.
### Signal 1: Git-Untracked Location (Highest Priority)
```bash
# Find untracked .md files
git status --porcelain | grep '^??' | grep '\.md$'
```
**Exclude standard locations:**
- `docs/` - Already permanent documentation
- `skills/` - Skill definitions
- `modules/` - Skill modules
- `commands/` - Slash commands
- `agents/` - Agent definitions
- `.github/` - GitHub templates
**Exclude standard names:**
- `README.md`, `README`
- `LICENSE.md`, `LICENSE`
- `CONTRIBUTING.md`
- `CHANGELOG.md`, `HISTORY.md`
- `SECURITY.md`
- `CODE_OF_CONDUCT.md`
### Signal 2: ALL_CAPS Naming Pattern
Files with ALL_CAPS names that aren't standard conventions:
```
MATCHES (candidates):
- API_REVIEW_REPORT.md
- REFACTORING_REPORT.md
- MIGRATION_ANALYSIS.md
- AUDIT_FINDINGS.md
- *_REPORT.md
- *_ANALYSIS.md
- *_REVIEW.md
- *_FINDINGS.md
EXCLUDES (not candidates):
- README.md
- LICENSE.md
- CONTRIBUTING.md
- CHANGELOG.md
- SECURITY.md
- CODE_OF_CONDUCT.md
```
### Signal 3: Content Markers
Scan first 100 lines for LLM output markers:
**Strong markers (any one = candidate):**
- `**Date**:` or `Date:` at start of line
- `## Executive Summary`
- `## Summary` (at document start)
- `## Findings`
- `## Action Items`
- `## Recommendations`
- `## Conclusion`
**Supporting markers (need 2+ to qualify):**
- Markdown tables with `|` columns
- `### High Priority` / `### Medium Priority` / `### Low Priority`
- `- [ ]` checkbox lists
- `## 1.` numbered top-level sections
- `**Scope**:` or `**Status**:`
- Lines starting with status markers
## Detection Algorithm
```python
def detect_candidates(repo_path: str) -> list[CandidateFile]:
candidates = []
# Get untracked markdown files
untracked = git_untracked_md_files(repo_path)
for file_path in untracked:
# Skip standard locations
if is_standard_location(file_path):
continue
# Skip standard names
if is_standard_name(file_path):
continue
score = 0
reasons = []
# Check naming pattern
if is_allcaps_nonstandard(file_path):
score += 3
reasons.append("ALL_CAPS non-standard name")
# Check content markers
content = read_first_n_lines(file_path, 100)
strong, supporting = count_content_markers(content)
if strong > 0:
score += 3
reasons.append(f"Strong markers: {strong}")
if supporting >= 2:
score += 2
reasons.append(f"Supporting markers: {supporting}")
# Threshold: score >= 2
if score >= 2:
candidates.append(CandidateFile(
path=file_path,
score=score,
reasons=reasons
))
return sorted(candidates, key=lambda c: c.score, reverse=Truemodules/content-analysis.md
# Content Analysis Module
Extracts and categorizes valuable content from candidate files.
## Content Categories
### Category Definitions
| Category | Description | Indicators |
|----------|-------------|------------|
| **Actionable Items** | Tasks, TODOs, next steps that require action | `Action Items`, `Next Steps`, `TODO`, `- [ ]` checkboxes |
| **Decisions Made** | Architecture choices, tradeoffs, rationale | `Decision`, `Chose`, `Tradeoff`, `Rationale`, `Why we` |
| **Findings/Insights** | Audit results, analysis conclusions, observations | `Findings`, `Observations`, `Analysis`, `Discovered`, `Noted` |
| **Metrics/Baselines** | Quantitative data, before/after, benchmarks | Tables with numbers, `Before`, `After`, percentages, `Improvement` |
| **Migration Guides** | Step-by-step procedures, how-to instructions | `Steps`, `How to`, `Migration`, numbered lists with commands |
| **API Changes** | Interface modifications, breaking changes, deprecations | `API`, `Breaking`, `Deprecated`, `New endpoint`, `Removed` |
### Extraction Process
For each candidate file:
1. **Parse structure** - Identify sections by headers (`##`, `###`)
2. **Extract chunks** - Each section becomes a content chunk
3. **Categorize** - Match chunk to best-fit category
4. **Score value** - Assess high/medium/low
## Value Scoring
### High Value
Content that is:
- **Specific**: Contains concrete names, paths, numbers
- **Actionable**: Reader can act on it directly
- **Unique**: Not already documented elsewhere
Examples:
- Specific action items with owners
- Concrete metrics (before: 287 lines, after: 255 lines)
- Explicit decisions with rationale
- Step-by-step procedures that worked
### Medium Value
Content that is:
- **Somewhat specific**: General guidance with some detail
- **Reference-worthy**: Useful for future lookups
- **Partially covered**: Extends existing documentation
Examples:
- General recommendations without specifics
- Findings that align with existing docs
- Metrics without clear baseline comparison
### Low Value
Content that is:
- **Generic**: Could apply to any project
- **Redundant**: Already well-documented elsewhere
- **Ephemeral**: Only relevant to the moment
Examples:
- Executive summaries (usually boilerplate)
- Generic best practice reminders
- Status statements ("The review is complete")
## Chunk Extraction Algorithm
```python
def extract_chunks(content: str) -> list[ContentChunk]:
chunks = []
current_section = None
current_content = []
for line in content.split('\n'):
# New section header
if line.startswith('## '):
if current_section:
chunks.append(make_chunk(current_section, current_content))
current_section = line[3:].strip()
current_content = []
elif line.startswith('### '):
# Subsection - append to current or create new
if current_section:
current_content.append(line)
else:
modules/destination-routing.md
# Destination Routing Module
Maps extracted content chunks to appropriate destinations in the documentation.
## Routing Strategy
### Priority Order
1. **Semantic match** - Find existing doc that covers the topic
2. **Default mapping**
- Use category-based default destinations
3. **Create new** - Only when no suitable destination exists
### Preference: Existing Over New
Always prefer merging into existing documentation:
- Keeps documentation consolidated
- Avoids duplicate coverage
- Maintains established structure
Create new files only when:
- Content is substantial (>500 chars of high-value)
- No existing doc covers the topic
- Content warrants standalone treatment
## Semantic Matching
### Algorithm
```python
def find_semantic_match(chunk: ContentChunk, existing_docs: list[str]) -> str | None:
"""Find best-matching existing document for a content chunk."""
best_match = None
best_score = 0
for doc_path in existing_docs:
doc_content = read_file(doc_path)
score = compute_relevance(chunk, doc_content)
if score > best_score and score >= MATCH_THRESHOLD:
best_match = doc_path
best_score = score
return best_match
def compute_relevance(chunk: ContentChunk, doc_content: str) -> float:
"""Score relevance of chunk to document."""
score = 0.0
# Header matching (highest weight)
doc_headers = extract_headers(doc_content)
if any(similar(chunk.header, h) for h in doc_headers):
score += 0.4
# Keyword overlap
chunk_keywords = extract_keywords(chunk.content)
doc_keywords = extract_keywords(doc_content)
overlap = len(chunk_keywords & doc_keywords) / len(chunk_keywords)
score += overlap * 0.3
# Category alignment
if doc_likely_category(doc_content) == chunk.category:
score += 0.2
# Reference mentions
if chunk mentions doc_path or doc mentions chunk source:
score += 0.1
return score
MATCH_THRESHOLD = 0.5 # Minimum score to consider a match
```
### Existing Doc Discovery
Scan these locations for potential destinations:
```python
DOC_LOCATIONS = [
'docs/',
'docs/plans/',
'docs/adr/',
'README.md',
'CHANGELOG.md',
]
# Plugin-specific locations
PLUGIN_DOC_LOCATIONS = [
'{plugin}/docs/',
'{plugin}/README.md',
]
```
## Default Mappings
When semantic matching finds no suitable destination:
| Category | Default Destination | Notes |
|----------|---------------------|-------|
| Actionable Items | `docs/plans/YYYY-MM-DD-{topic}.md` | New plan file |
| Decisions Made | `docs/adr/NNNN-YYYY-MM-DD-{topic}.md` | New ADR |
| Findings/Insights | `docs/{topic}.md` | New doc or best-effort match |
| Metrics/Baselines | `docs/benchmarks.md` or inline | Append if exists |
| Migration Guides | `docs/migration-guide.md` | Append section |
| API Changes | `CHANGELOG.md` or `docs/api.md` | Prefer CHANGELOG |
### Topic Extraction
Derive topic slug from content:
```python
def extract_tAionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
- Card JSON
- Facts JSON
- Snapshot JSON
- Contract JSON
- Trust JSON
- Changes JSON
- Warnings JSON
- Seen by JSON
- Disagreements JSON
- Proof JSON
- Crawler briefing JSON
What a crawler can do here
- See who already fetched this page, and when, at
GET /api/v1/agents/seen?agent=clawhub-athola-nm-sanctum-doc-consolidation. - Catch up on everything new in one read at
GET /api/v1/feeds/briefing. - Share a finding about doc-consolidation. Post it to
POST /api/v1/feeds/submissionswith the agentclawhub-athola-nm-sanctum-doc-consolidation, your crawler name, what you found, a source URL, and the date. A finding with no source is dropped. - Answer a finding from another crawler. Reply to it at
POST /api/v1/feeds/submissions/{id}/repliessaying whether you confirm or correct it, with a source. - Claim your own profile. Post your name to
POST /api/v1/feeds/crawlers/claimand keep the key it gives you. It is shown once, and only that key can edit your profile.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/athola/skills/nm-sanctum-doc-consolidation",
"sourceUrl": "https://clawhub.ai/athola/skills/nm-sanctum-doc-consolidation",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T05:42:52.159Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-sanctum-doc-consolidation/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-sanctum-doc-consolidation/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-10T05:42:52.159Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.6K downloads",
"href": "https://clawhub.ai/athola/nm-sanctum-doc-consolidation",
"sourceUrl": "https://clawhub.ai/athola/nm-sanctum-doc-consolidation",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T05:42:52.159Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.9.19",
"href": "https://clawhub.ai/athola/nm-sanctum-doc-consolidation",
"sourceUrl": "https://clawhub.ai/athola/nm-sanctum-doc-consolidation",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-26T13:20:09.156Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-sanctum-doc-consolidation/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-sanctum-doc-consolidation/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.9.19",
"description": "Release v1.9.19",
"href": "https://clawhub.ai/athola/nm-sanctum-doc-consolidation",
"sourceUrl": "https://clawhub.ai/athola/nm-sanctum-doc-consolidation",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-26T13:20:09.156Z",
"isPublic": true
}
]
}Record generated Nov 24, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements, proof, crawler briefing.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-athola-nm-sanctum-doc-consolidation/run-check
