feat: archive zoo_backup for home sync
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
---
|
||||
name: cobol-index
|
||||
description: Bulk-index PAISY COBOL analysis docs into BigMind. Pulls latest paisy-ai repo, scans all .md files in analysis/, extracts summaries, and stores them as BigMind facts (category paisy-cobol). Use when asked to index, refresh, or rebuild the COBOL knowledge base.
|
||||
---
|
||||
|
||||
# Skill: cobol-index
|
||||
|
||||
Bulk-index PAISY COBOL analysis docs from paisy-ai into BigMind.
|
||||
|
||||
## When to use
|
||||
|
||||
- User asks to "index COBOL docs", "refresh COBOL knowledge", or "rebuild COBOL index"
|
||||
- After new analysis docs are added to paisy-ai
|
||||
- When `cobol-lookup` reports missing or stale BigMind facts
|
||||
- Periodic maintenance to keep BigMind up to date
|
||||
|
||||
## When NOT to use
|
||||
|
||||
- For looking up a single program or file → use `cobol-lookup` instead
|
||||
- For Java domain questions → use `domain-lookup`
|
||||
- For non-COBOL documentation tasks → use other skills
|
||||
|
||||
## Required Inputs
|
||||
|
||||
| Input | Source | Example |
|
||||
|-------|--------|---------|
|
||||
| `SCOPE` | What to index (optional, default: all) | `"all"`, `"programs"`, `"datamodel"`, `"api"`, `"batch"`, `"isam-tools"` |
|
||||
|
||||
## Output
|
||||
|
||||
- BigMind facts created/updated (`category: "paisy-cobol"`)
|
||||
- Summary report: total files scanned, new facts stored, skipped (already indexed)
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Pull latest paisy-ai
|
||||
|
||||
```bash
|
||||
git -C /Users/pplate/git/paisy-ai pull
|
||||
```
|
||||
|
||||
If the repo doesn't exist, inform the user it needs to be cloned first.
|
||||
|
||||
### 2. List target files based on scope
|
||||
|
||||
| Scope | Path pattern |
|
||||
|-------|-------------|
|
||||
| `all` | `analysis/**/*.md` |
|
||||
| `programs` | `analysis/PAI*.md` |
|
||||
| `datamodel` | `analysis/datamodel/DAI*.md` |
|
||||
| `api` | `analysis/api/api-PAI*.md` |
|
||||
| `batch` | `analysis/batch-client/*.md` |
|
||||
| `isam-tools` | `analysis/isam-tools/*.md` |
|
||||
| `architecture` | `analysis/cobol-architecture.md`, `analysis/cokz-system.md`, `analysis/codebase-size.md` |
|
||||
| `wiki-crosscheck` | `analysis/wiki-crosscheck-*.md` |
|
||||
|
||||
```bash
|
||||
# Example for all:
|
||||
find /Users/pplate/git/paisy-ai/analysis -name "*.md" -type f | sort
|
||||
```
|
||||
|
||||
### 3. Check existing BigMind index
|
||||
|
||||
```python
|
||||
memory_search_facts("paisy-cobol")
|
||||
```
|
||||
|
||||
Note which files are already indexed to avoid duplicate storage.
|
||||
|
||||
### 4. For each file, extract summary
|
||||
|
||||
Read the first ~30 lines of each file to extract:
|
||||
- The title/heading (first `#` line)
|
||||
- A one-line purpose summary
|
||||
- Key identifiers (program name, file name, Sachgebiet codes)
|
||||
|
||||
```bash
|
||||
head -30 /Users/pplate/git/paisy-ai/analysis/<file>.md
|
||||
```
|
||||
|
||||
### 5. Store as BigMind fact
|
||||
|
||||
```python
|
||||
memory_store_fact(
|
||||
category="paisy-cobol",
|
||||
fact="<filename> (<type>): <summary>. Path: analysis/<path>.md"
|
||||
)
|
||||
```
|
||||
|
||||
Fact format by type:
|
||||
|
||||
| Type | Fact format |
|
||||
|------|------------|
|
||||
| PAI program | `"PAI<nnn> (program): <purpose>. Sachgebiete: <list>. Path: analysis/PAI<nnn>.md"` |
|
||||
| DAI file | `"DAI<nn> (datamodel): <description>. Key fields: <list>. Path: analysis/datamodel/DAI<nn>.md"` |
|
||||
| API interface | `"api-PAI<nnn> (api): <Java↔COBOL interface for ...>. Path: analysis/api/api-PAI<nnn>.md"` |
|
||||
| Batch doc | `"<name> (batch): <description>. Path: analysis/batch-client/<name>.md"` |
|
||||
| ISAM tool | `"<name> (isam-tool): <description>. Path: analysis/isam-tools/<name>.md"` |
|
||||
| Architecture | `"<name> (architecture): <description>. Path: analysis/<name>.md"` |
|
||||
| Wiki cross-check | `"<name> (wiki-crosscheck): <Sachgebiete covered>. Path: analysis/<name>.md"` |
|
||||
|
||||
### 6. Report results
|
||||
|
||||
Present a summary:
|
||||
|
||||
```
|
||||
## COBOL Index Results
|
||||
|
||||
| Category | Files scanned | New facts | Skipped (existing) |
|
||||
|----------|--------------|-----------|-------------------|
|
||||
| PAI programs | <n> | <n> | <n> |
|
||||
| DAI datamodel | <n> | <n> | <n> |
|
||||
| API interfaces | <n> | <n> | <n> |
|
||||
| Batch framework | <n> | <n> | <n> |
|
||||
| ISAM tools | <n> | <n> | <n> |
|
||||
| Architecture | <n> | <n> | <n> |
|
||||
| Wiki cross-checks | <n> | <n> | <n> |
|
||||
| **Total** | **<N>** | **<N>** | **<N>** |
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
|
||||
| Error | Resolution |
|
||||
|-------|------------|
|
||||
| paisy-ai repo not found | Inform user: `git clone <url> /Users/pplate/git/paisy-ai` needed |
|
||||
| `git pull` fails | Warn user, proceed with existing local files |
|
||||
| Empty/stub .md file | Skip, note in report as "empty" |
|
||||
| BigMind store fails | Retry once, then skip and note in report |
|
||||
| Too many files (>200) | Process in batches of 50, report progress between batches |
|
||||
|
||||
## Language
|
||||
|
||||
- BigMind facts: English (BigMind convention)
|
||||
- Report: match user's language
|
||||
- Program names, field names: preserve as-is
|
||||
Reference in New Issue
Block a user