Batch ingest documents into the symbolic knowledge base with automatic incremental updates.
Scanned 2/12/2026
Install via CLI
openskills install NewJerseyStyle/plugin-logic-llm# /logic-ingest
Batch ingest documents into the symbolic knowledge base with automatic incremental updates.
## Description
This skill processes entire directories of documents, converting them to logic programs and maintaining a coherent, non-redundant knowledge base. It handles incremental updates when new documents are added.
## Usage
```
/logic-ingest [options] <source-directory>
```
### Options
- `--format <prolog|clingo>` - Target format (default: prolog)
- `--output <directory>` - Output directory for generated logic programs
- `--domain <name>` - Domain name for organizing the knowledge base
- `--watch` - Watch for new files and auto-ingest
- `--incremental` - Only process new or modified files
- `--merge` - Merge all outputs into a single knowledge base file
### Examples
```
/logic-ingest --format prolog --domain legal ./contracts/
/logic-ingest --incremental --watch ./regulations/
/logic-ingest --merge --output ./kb/ ./policies/
```
## Behavior
1. **Directory Scan**: Identify all processable documents
2. **Change Detection**: Compare with previous ingestion state
3. **Dependency Analysis**: Determine processing order based on references
4. **Batch Conversion**: Convert documents using `/logic-convert`
5. **Deduplication**: Remove redundant predicates and rules
6. **Consistency Check**: Validate the combined knowledge base
7. **Registry Update**: Update registry with all new entries
## Document Types Supported
- Plain text (.txt)
- Markdown (.md)
- PDF (requires external tool)
- Legal documents (contracts, regulations, policies)
- Structured data (JSON, YAML) with schema inference
## Incremental Updates
When `--incremental` is used:
- Only new or modified files are processed
- Existing predicates are preserved
- Conflicts are detected and reported
- Registry is updated atomically
## Output Structure
```
output/
├── predicates.pl # All predicate definitions
├── facts/
│ ├── document1.pl # Facts from each document
│ └── document2.pl
├── rules/
│ ├── inferred.pl # Derived rules
│ └── explicit.pl # Explicit rules from documents
├── registry.json # Local registry snapshot
└── manifest.json # Ingestion metadata
```
## Integration
This skill orchestrates:
- `/logic-convert` for individual document conversion
- `/logic-register` for predicate registration
- `prolog-mcp` or `clingo-mcp` for validation
## Notes
- Large document sets are processed in parallel where possible
- The manifest tracks file hashes for efficient incremental updates
- Use `--merge` for smaller knowledge bases that benefit from single-file loading
- The skill handles cross-document references through the registry
No comments yet. Be the first to comment!