Optimize Simplicité logs
Convert raw Simplicité .txt log files into compact JSON, filter noisy structural fields, then analyze the reduced output instead of loading massive multiline logs directly into context.
When to invoke
- "Parse this Simplicité log file before analyzing it."
- "Reduce this huge
.txt log into JSON."
- "Extract timestamp, level, and body from Simplicité logs."
- "Use the Python log converter and then inspect errors."
- "Avoid reading the raw Simplicité log into context."
Prerequisites and context
- Use
scripts/simplicite-log2json.py when Python is available; use scripts/SimpliciteLog2Json.ps1 when PowerShell is the better runtime.
- The parser expects standard Simplicité log output; heavily customized formats may skip entries or degrade parsing.
- Write generated JSON to the current task workspace or stdout; do not overwrite user log files.
Conversion mandate
IMPORTANT: for user-provided raw logs, never read the full .txt first. Use /scripts/simplicite-log2json.py or /scripts/SimpliciteLog2Json.ps1 to preserve multi-line bodies while dropping non-relevant fields.
Conversion commands
| Runtime |
Command |
Use |
| Python, filtered file output |
python /absolute/path/to/skills/optimize-simplicite-logs/scripts/simplicite-log2json.py <input.txt> --include timestamp,level,body --output <output.json> |
Recommended default for troubleshooting. |
| Python, stdout |
python /absolute/path/to/skills/optimize-simplicite-logs/scripts/simplicite-log2json.py <input.txt> --include timestamp,level,body |
Pipe the reduced JSON to another command. |
| PowerShell, filtered file output |
pwsh /absolute/path/to/skills/optimize-simplicite-logs/scripts/SimpliciteLog2Json.ps1 -InputPath "<input.txt>" -Output "<output.json>" -Include "body,timestamp,level" |
Use when PowerShell is the available shell. |
The scripts print a processing summary such as:
Processed: 123 entries, Skipped: 2 entries
Field selection
| Field |
Keep when |
Usually omit when |
timestamp |
Ordering, correlation, incident timeline, request reconstruction. |
The user only needs a frequency count. |
level |
Filtering errors, warnings, and severity transitions. |
All entries are already scoped to one severity. |
body |
Diagnosing stack traces, multiline errors, SQL exceptions, or business messages. |
Never omit for root-cause analysis. |
app |
Multiple applications share one log. |
Single-app export. |
endpoint |
HTTP route or API boundary matters. |
Pure background job analysis. |
contextPath |
Deployment context or tenant routing matters. |
Not relevant to the symptom. |
event |
Event taxonomy is part of the diagnosis. |
Raw exception body is enough. |
user |
User-specific symptom or permission issue. |
Privacy minimization requires omission. |
class |
Java class or object owner matters. |
Body includes sufficient stack trace context. |
function |
Method-level owner matters. |
Body includes sufficient stack trace context. |
rowId |
One business object row is under investigation. |
Aggregated error analysis. |
Procedure
- Do not read the raw
.txt Simplicité log directly with standard file read tools.
- Choose Python or PowerShell based on the available runtime.
- Convert first with
--include or -Include; default to timestamp,level,body for troubleshooting.
- Review the stderr or console summary for processed and skipped entry counts.
- Read or process the generated
<output.json> and perform analysis from structured JSON.
- If entries were skipped or the symptom is missing, widen the included fields before falling back to targeted raw snippets.
Common troubleshooting patterns
| Pattern |
Command or action |
Reason |
| Fast contextual troubleshooting |
python /absolute/path/to/skills/optimize-simplicite-logs/scripts/simplicite-log2json.py logs.txt --include timestamp,level,body --output logs_minified.json |
Produces a compact logs_minified.json for context-safe reading. |
| Stack trace preservation |
Keep body in the include list. |
Multiline errors are captured inside one JSON field. |
| Correlate a user issue |
Include timestamp,level,user,endpoint,body. |
Preserves actor and route while still dropping unrelated fields. |
| Investigate object-specific errors |
Include timestamp,level,class,function,rowId,body. |
Preserves owner and row context. |
Gotchas
- Always convert first: large raw
.txt logs waste context and can split multiline stack traces incorrectly.
- Filter aggressively: include only fields needed for the diagnosis;
timestamp,level,body is the usual minimum useful set.
- Stdout is intentional: omitting
--output or -Output prints JSON directly, which is useful for pipes.
- The regex is format-sensitive: a customized Simplicité log format can produce skipped entries; report the skipped count.
Progressive disclosure and bundled resources
| Resource |
Use when |
Notes |
scripts/simplicite-log2json.py |
Python is available or the task needs easy piping |
Supports --include and --output; recommended default. |
scripts/SimpliciteLog2Json.ps1 |
PowerShell is the available runtime |
Supports -InputPath, -Output, and -Include. |
Output template
## Simplicité log optimization result
**Status:** converted | converted with skips | blocked
**Input:** `<input.txt>`
**Output:** `<output.json | stdout>`
**Fields included:** `timestamp,level,body`
**Summary:** Processed: <n> entries, Skipped: <n> entries
### Analysis basis
- Read structured JSON, not the raw `.txt` log: yes | no
- Notable errors or patterns: <brief findings or none yet>
Quality gate
1---2name: optimize-simplicite-logs-23description: Convert raw Simplicité .txt logs into filtered structured JSON before analysis, preserving multiline stack traces while reducing context size. Use when the user provides large Simplicité logs, asks to parse timestamp/level/body fields, troubleshoot errors without reading massive raw logs, or run the Python or PowerShell converter scripts.4---56# Optimize Simplicité logs78Convert raw Simplicité `.txt` log files into compact JSON, filter noisy structural fields, then analyze the reduced output instead of loading massive multiline logs directly into context.910## When to invoke1112- "Parse this Simplicité log file before analyzing it."13- "Reduce this huge `.txt` log into JSON."14- "Extract timestamp, level, and body from Simplicité logs."15- "Use the Python log converter and then inspect errors."16- "Avoid reading the raw Simplicité log into context."1718## Prerequisites and context1920- Use `scripts/simplicite-log2json.py` when Python is available; use `scripts/SimpliciteLog2Json.ps1` when PowerShell is the better runtime.21- The parser expects standard Simplicité log output; heavily customized formats may skip entries or degrade parsing.22- Write generated JSON to the current task workspace or stdout; do not overwrite user log files.2324## Conversion mandate2526**IMPORTANT**: for `user-provided` raw logs, never read the full `.txt` first. Use `/scripts/simplicite-log2json.py` or `/scripts/SimpliciteLog2Json.ps1` to preserve `multi-line` bodies while dropping `non-relevant` fields.27## Conversion commands2829| Runtime | Command | Use |30| --- | --- | --- |31| Python, filtered file output | `python /absolute/path/to/skills/optimize-simplicite-logs/scripts/simplicite-log2json.py <input.txt> --include timestamp,level,body --output <output.json>` | Recommended default for troubleshooting. |32| Python, stdout | `python /absolute/path/to/skills/optimize-simplicite-logs/scripts/simplicite-log2json.py <input.txt> --include timestamp,level,body` | Pipe the reduced JSON to another command. |33| PowerShell, filtered file output | `pwsh /absolute/path/to/skills/optimize-simplicite-logs/scripts/SimpliciteLog2Json.ps1 -InputPath "<input.txt>" -Output "<output.json>" -Include "body,timestamp,level"` | Use when PowerShell is the available shell. |3435The scripts print a processing summary such as:3637```text38Processed: 123 entries, Skipped: 2 entries39```4041## Field selection4243| Field | Keep when | Usually omit when |44| --- | --- | --- |45| `timestamp` | Ordering, correlation, incident timeline, request reconstruction. | The user only needs a frequency count. |46| `level` | Filtering errors, warnings, and severity transitions. | All entries are already scoped to one severity. |47| `body` | Diagnosing stack traces, multiline errors, SQL exceptions, or business messages. | Never omit for root-cause analysis. |48| `app` | Multiple applications share one log. | Single-app export. |49| `endpoint` | HTTP route or API boundary matters. | Pure background job analysis. |50| `contextPath` | Deployment context or tenant routing matters. | Not relevant to the symptom. |51| `event` | Event taxonomy is part of the diagnosis. | Raw exception body is enough. |52| `user` | User-specific symptom or permission issue. | Privacy minimization requires omission. |53| `class` | Java class or object owner matters. | Body includes sufficient stack trace context. |54| `function` | Method-level owner matters. | Body includes sufficient stack trace context. |55| `rowId` | One business object row is under investigation. | Aggregated error analysis. |5657## Procedure58591. Do not read the raw `.txt` Simplicité log directly with standard file read tools.602. Choose Python or PowerShell based on the available runtime.613. Convert first with `--include` or `-Include`; default to `timestamp,level,body` for troubleshooting.624. Review the stderr or console summary for processed and skipped entry counts.635. Read or process the generated `<output.json>` and perform analysis from structured JSON.646. If entries were skipped or the symptom is missing, widen the included fields before falling back to targeted raw snippets.6566## Common troubleshooting patterns6768| Pattern | Command or action | Reason |69| --- | --- | --- |70| Fast contextual troubleshooting | `python /absolute/path/to/skills/optimize-simplicite-logs/scripts/simplicite-log2json.py logs.txt --include timestamp,level,body --output logs_minified.json` | Produces a compact `logs_minified.json` for context-safe reading. |71| Stack trace preservation | Keep `body` in the include list. | Multiline errors are captured inside one JSON field. |72| Correlate a user issue | Include `timestamp,level,user,endpoint,body`. | Preserves actor and route while still dropping unrelated fields. |73| Investigate object-specific errors | Include `timestamp,level,class,function,rowId,body`. | Preserves owner and row context. |7475## Gotchas7677- **Always convert first**: large raw `.txt` logs waste context and can split multiline stack traces incorrectly.78- **Filter aggressively**: include only fields needed for the diagnosis; `timestamp,level,body` is the usual minimum useful set.79- **Stdout is intentional**: omitting `--output` or `-Output` prints JSON directly, which is useful for pipes.80- **The regex is format-sensitive**: a customized Simplicité log format can produce skipped entries; report the skipped count.8182## Progressive disclosure and bundled resources8384| Resource | Use when | Notes |85| --- | --- | --- |86| `scripts/simplicite-log2json.py` | Python is available or the task needs easy piping | Supports `--include` and `--output`; recommended default. |87| `scripts/SimpliciteLog2Json.ps1` | PowerShell is the available runtime | Supports `-InputPath`, `-Output`, and `-Include`. |8889## Output template9091```markdown92## Simplicité log optimization result9394**Status:** converted | converted with skips | blocked95**Input:** `<input.txt>`96**Output:** `<output.json | stdout>`97**Fields included:** `timestamp,level,body`98**Summary:** Processed: <n> entries, Skipped: <n> entries99100### Analysis basis101- Read structured JSON, not the raw `.txt` log: yes | no102- Notable errors or patterns: <brief findings or none yet>103```104105## Quality gate106107- [ ] The raw `.txt` Simplicité log was converted before analysis.108- [ ] The command used either `--include` or `-Include` to reduce fields.109- [ ] `body` was included when diagnosing errors or stack traces.110- [ ] The processed and skipped entry counts were captured from stderr or console output.111- [ ] Analysis was performed from generated JSON or stdout JSON, not from the full raw log.112- [ ] Parser limitations were reported if skipped entries or customized formats affected confidence.