--- name: cobol-lookup description: Look up PAISY COBOL domain knowledge — PAI programs, DAI ISAM files, API interfaces, batch framework, ISAM tools (PDDI/Quidam), COKZ system, and COBOL architecture. Use when asked about a PAI program, DAI file, COBOL data flow, batch processing, or PAISY backend internals. --- # Skill: cobol-lookup Look up PAISY COBOL domain knowledge from the paisy-ai analysis repository. ## When to use - User asks about a specific PAI program (e.g., "What does PAI022 do?") - User asks about a DAI ISAM data file (e.g., "What fields are in DAI28?") - User asks about a PAI API interface (e.g., "How does Java call PAI022?") - User asks about COBOL architecture, COKZ system, batch framework, or ISAM tools - User needs to understand data flow between COBOL programs - User asks about wiki cross-check findings for specific Sachgebiete ## When NOT to use - For Java module questions → use `domain-lookup` skill instead - For Jira/Git operations → use `jira-lifecycle` or `create-worktree` - For code changes → switch to Code mode - For bulk indexing of all COBOL docs → use `cobol-index` skill instead ## Required Inputs | Input | Source | Example | |-------|--------|---------| | `QUERY` | User question or topic | `"PAI022"`, `"DAI28 fields"`, `"batch framework"`, `"COKZ system"` | | `CONTEXT` | Additional context (optional) | `"for ESIDEPAISY-12081"`, `"related to EAU"` | ## Output - Structured answer with source file paths cited - Key findings stored in BigMind (`category: "paisy-cobol"`) ## Steps ### 1. Parse query → determine lookup type | Query pattern | Lookup type | Target path | |--------------|-------------|-------------| | `PAI` or program name | PAI program | `analysis/PAI.md` | | `DAI` or ISAM file | DAI datamodel | `analysis/datamodel/DAI.md` | | `api-PAI` or "API for PAI..." | API interface | `analysis/api/api-PAI.md` | | Architecture, COKZ, structure | Architecture | `analysis/cobol-architecture.md`, `analysis/cokz-system.md` | | Batch, payroll scripts, AWK | Batch framework | `analysis/batch-client/*.md` | | PDDI, Quidam, ISAM tools | ISAM tools | `analysis/isam-tools/*.md` | | Sachgebiet, wiki cross-check | Wiki cross-check | `analysis/wiki-crosscheck-*.md` | | General overview | Overview | `CLAUDE.md` (repo root) | ### 2. Search BigMind first ```python memory_search_facts("") memory_search_facts(" paisy-cobol") ``` If BigMind has a recent, complete answer → present it directly and skip to step 6. ### 3. Read the target doc from paisy-ai ```bash cat /Users/pplate/git/paisy-ai/analysis/.md ``` If the exact file doesn't exist, search for related content: ```bash ls /Users/pplate/git/paisy-ai/analysis/ | grep -i "" grep -rl "" /Users/pplate/git/paisy-ai/analysis/ --include="*.md" | head -10 ``` ### 4. Cross-reference related docs After reading the primary doc: - If it's a PAI program → check if an API doc exists: `analysis/api/api-PAI.md` - If it's a PAI program → check which DAI files it references (mentioned in the doc) - If it's a DAI file → check which PAI programs use it (grep across program docs) - If it's an API → read the corresponding PAI program doc for full context ### 5. Present findings structured Format the response as: ``` **** — **Source:** `analysis/.md` **Related:** **See also:** ``` ### 6. Store key findings in BigMind ```python memory_store_fact( category="paisy-cobol", fact=": " ) ``` Only store if the fact is new or significantly more detailed than what BigMind already has. ### 7. Fall back to ADP Docs Wiki If paisy-ai docs don't cover the topic: ```python # Check BigMind index for known Wiki pages memory_search_facts(" adpdocs") # Search Wiki directly set-wiki(uri="mcp://wikis/adpdocs.de.adp.com") search-page(query="") ``` Relevant Wiki pages for COBOL topics: - Programmabläufe → Page ID 15201 - Einzelaufrufe BATCH → Page ID 15250 - Fehlermeldungen → Page ID 15196 - Umgebungsvariablen → Page ID 22767 ## Error Handling | Error | Resolution | |-------|------------| | Doc file not found | Search with `grep -rl` across analysis/; the program may have a variant name | | BigMind returns nothing | Proceed to read from paisy-ai docs directly | | paisy-ai repo not cloned | Run `git clone` or inform user the repo is needed at `/Users/pplate/git/paisy-ai` | | Multiple matches | Present all matches, let user pick the most relevant | | Doc is empty or stub | Note the gap, fall back to ADP Wiki, suggest running `cobol-index` to refresh | ## Language - Answers: match the user's language (German or English) - COBOL program names, field names, Sachgebiet codes: preserve as-is - German payroll terms: use as-is (Lohnkonto, Fehlzeiten, Sachgebiet, etc.)