enterprise-deep-debug — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited enterprise-deep-debug (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
OpenCode SSOT: sourced from theDelqhi/opencode-enterprise-deep-debug-skillrepository and symlinked into~/.config/opencode/skills/for CLI usage.
Use this skill when a bug is complex, cross-cutting, flaky, or enterprise-scale (distributed systems, async flows, microservices, cloud-native, event streams).
Triggers (examples)
Hard rules (anti-hallucination)
Budgets + Termination (enforced)
opencode debug rg search: max 8 totalopencode debug lsp diagnostics: max 4 files totalopencode debug lsp symbols / document-symbols: max 6 totalswarm_max: max 1 run, tries <= 5OpenCode-native fast-path (default) Run these first unless the user forbids command execution:
Precondition
opencode debug rg * commands from the project/repo root (NOT from $HOME).--limit and tighten with --glob when the tree is large.Telemetry note
1) Snapshot baseline (always)
opencode debug snapshot trackgit status + git diff (read-only)2) Fast repository map (no heavy scans)
opencode debug rg tree --limit 200opencode debug rg files --limit 3003) Targeted discovery (3-query rule)
opencode debug rg search "<exact error or log token>" --limit 50opencode debug lsp symbols "<core symbol/module/service name>"opencode debug rg search "<function/class name from Query 2>" --limit 504) Diagnostics (only when you have a candidate file)
opencode debug lsp diagnostics <file>opencode debug lsp document-symbols <uri> (when you already know the file)Fallbacks (only if OpenCode-native tools are unavailable):
grep, lsp_*bash with rg (narrow path + narrow pattern)Avoid broad glob/filesystem scanning unless scoped; prefer opencode debug file search / opencode debug rg search instead.
Fast Lane (10 minutes, hard stop)
Use when the user explicitly wants the fastest possible path (triage + minimal fix), and accepts that deeper RCA may be incomplete.
Constraints
Procedure 1) Repro Card (mandatory)
2) 3-query rule (mandatory)
3) Pick 1 hypothesis (mandatory)
4) Run exactly 1 experiment
5) Minimal fix (only if experiment is conclusive)
6) Validate (hard fail)
Fast Lane exit output
Phase -1 - Deep Telemetry (optional, consent-gated) Goal: shortcut discovery with local agent logs and OpenCode event history.
Consent gate (mandatory)
~/.config/opencode/antigravity-logs/, ~/.config/opencode/opencode.db, ~/.config/opencode/opencode-local.db, and project-linked runtime logs.Procedure (if approved) 1) Resolve OPENCODE_HOME (opencode debug paths or ~/.config/opencode). 2) Logs: scan only the last 10 minutes for error tokens, stacktraces, and failing tool calls. 3) DB: use sqlite3 to query the last 200 events and extract tool errors/timeouts. 4) Emit a Telemetry Digest (max 5 facts) and map any clue to 1-3 candidate entry points.
Telemetry Digest format
Phase 0 - Snapshot + Repro (must pass) 1) Capture baseline facts:
git status and git diff (or equivalent).2) Reduce to a minimal repro if possible (smallest command that still fails). 3) Create an "expected vs actual" statement.
Phase 0 gate (artifact) Produce a 6-line Repro Card before continuing:
<exact repro command>If you cannot fill all 6 lines, stop and request the missing line(s).
Phase 0.5 - Fast triage (2-5 minutes)
opencode debug snapshot track.opencode debug rg treeopencode debug rg filesopencode debug lsp symbols <core terms> (service/module/class/error name)opencode debug lsp diagnostics <file>.Phase 0.5 gate (artifact)
path:line + why it is implicated (one sentence) + the next discriminating experiment.If you have >3 candidates, you did not narrow enough; rerun the 3-query rule with a more specific signature.
Phase 0.6 - Failure classifier (pick one primary)
Record: primary_class + top 2 alternates. Use this to focus searches and experiments.
Phase I - Project SSOT Source Discovery (recommended) Goal: recover developer intent and gather broad evidence from all project-linked sources without drifting into unrelated machine-wide data.
Project SSOT Source Map (build this first)
SOURCE_MAP before any broad scan.README, config, docs, scripts, URLs, doc IDs, repo slugs)repair-docs.md, docs/**, project Google Docs tab, tracked dashboards)cwd, repo slug, doc ID, branch, task transcript)Allowed source categories 1) Primary repo and current worktree 2) Project docs and repair docs 3) Project-linked runtime logs and telemetry 4) Project-linked local sessions/history 5) Project-linked Google Docs / Drive assets 6) Project-linked GitHub repos / submodules / sibling repos
Excluded by default
node_modules, dist, random Drive folders, random GitHub repos, and any source with no project linkage.Discovery order 1) Repo-local evidence (README, docs, config, scripts, URLs, doc IDs, repo slugs) 2) Project docs / repair docs 3) Runtime telemetry and logs 4) Same-project sessions/history 5) Linked Google Docs / Drive 6) Linked GitHub repos / sibling repos
Extraction playbook
opencode debug file search <query>opencode debug rg search <pattern>grep, lsp_*, ast_grep_*, and bash/rg only on paths already present in SOURCE_MAP.Output a structured source summary:
{
"source_map": [
{"id":"repo","kind":"repo","path":"...","why_linked":"..."},
{"id":"docs","kind":"repair-docs","path":"...","why_linked":"..."}
],
"current_goals": ["..."],
"failed_attempts": ["..."],
"reliability_notes": ["doc/file X is stale because ..."],
"constraints": ["security", "backwards compatibility", "no schema change"]
}Phase II - Evidence Gathering (mandatory, orchestrated) Goal: collect enough evidence to choose 1 leading hypothesis with a single discriminating experiment.
Orchestration
task() with fixed role prompts, strict contracts, and timeboxes./plan first to split the work into source lanes.repo, docs, runtime, sessions, google, github.task() / swarm tools for evidence collection. Use sin-terminal only when visible multi-terminal local orchestration is explicitly requested or clearly beneficial for the same project.SOURCE_MAP.Predictive branching (tie-breaker)
Hard rule: subagents gather evidence only (no edits). Merge protocol: normalize all outputs into the Evidence Ledger and deduplicate by path:line / command-output identity.
Subagent contracts (strict)
path:line, git:<cmd excerpt>, cmd:<verbatim output excerpt>, or url:<verified via webfetch>.Recommended subagents 1) AST Tracer (explore): codebase search + dataflow hints
opencode debug rg search for fast discovery; then use ast_grep_search and lsp_find_references for structure/precision.2) Log/Runtime Analyst (general or explore): log correlation + timeline
3) Repo Historian (general): regression + ownership
4) Web Validator (librarian): best practices + known issues
webfetch (URLs).Subagent output schema
{
"role": "ast_tracer|log_analyst|repo_historian|web_validator",
"top_hypotheses": [
{"id":"H1","claim":"...","evidence":["path:line","cmd: ... -> ...","url: ..."],"falsify":"one quick test"}
],
"high_risk_areas": ["..."],
"missing_info": ["..."],
"recommended_next_experiments": ["..."],
"confidence": 0.0
}Maintain an append-only EVIDENCE_LEDGER in-chat. Every non-trivial claim must cite one of:
file:path:linecmd: + key output linesurl: (only if externally fetched and verified with webfetch)source:<id> (must exist in SOURCE_MAP)Ledger schema (terse)
{
"env": {"os":"", "arch":"", "runtime_versions":{}, "cwd":"", "branch":""},
"source_map": [{"id":"repo","kind":"repo","path":"","why_linked":""}],
"repro": {"command":"", "inputs":"", "expected":"", "actual":"", "flakiness":"unknown|stable|flaky"},
"facts": [{"id":"F1","text":"verbatim observation","evidence":["cmd: ...","file:path:line"]}],
"hypotheses": [{"id":"H1","claim":"","support":["F1"],"disconfirm":[],"falsify":"one test"}],
"experiments": [{"id":"E1","hypothesis":"H1","change_one_thing":"","command":"","result":"","evidence":["cmd: ..."]}],
"decisions": [{"id":"D1","picked":"H1","why":"","evidence":["F..","E.."]}]
}Track last 6 steps as tuples: (hypothesis_id, experiment_kind, touched_area). Define no_progress as: no new Fact (F*) AND no hypothesis falsified in 2 consecutive experiments.
Rules:
no_progress:1) pivot vantage point (logs -> code, code -> runtime, runtime -> git/regression) 2) switch classifier secondary (e.g. from contract to configuration) 3) force a minimal reproduction shrink attempt (remove variables)
no_progress: STOP and ask ONE targeted question, including the default assumption you will proceed with.Anti-thrashing patch rule:
Require: new fact + new falsifying test before patch iteration #2.
Phase III - Synthesis (single source of truth) Build one evidence table and pick the leading hypothesis.
Hypothesis scoring rubric (fast + deterministic)
Phase III termination rule
Phase IV - Fix (minimal, cascading, safe)
Phase IVb - Shadow Testing (swarm_max, optional) Use when: high-risk fixes, flaky tests, or you want fastest safe convergence. Gates
Procedure 1) Build a compact prompt: repro, hypothesis, constraints, touched files, and testCmd. 2) Run swarm_max with tries 3-5 and the chosen testCmd. 3) Select the best result by test pass + minimal diff. 4) Re-run repro in the main tree, then continue to validation gates.
If swarm_max is unavailable or gates fail, skip Phase IVb and proceed with the normal fix flow.
Validation gates (hard fail, ordered cheapest -> most expensive) 1) Re-run the minimal repro (must pass). 2) Run the smallest targeted test(s) that cover the changed surface (must pass). 3) Run one broader safety check only if risk warrants it (pick one):
4) For web/UI bugs: capture one artifact that would catch regressions:
If any gate fails: stop, update the Evidence Ledger, and spend exactly 1 experiment to explain the failure before changing the fix.
Phase V - Persistent Knowledge Flush Before ending the session, persist what was learned so it survives context compaction.
Rules
AGENTS.md, CLAUDE.md) unless the user explicitly asks.If persistence is approved and files exist, write/append to repo root:
AGENTS.md (procedural rules / do-don't)CLAUDE.md (compat mirror for other assistants)Flush format (append as a new section)
## Debug Memory - <YYYY-MM-DD> - <short bug title>
Root cause: <one sentence>
Scope: <services/modules/files>
Repro: `<command>`
Fix: <what changed and why>
Validation: <commands + results>
Do not: <failed approaches / traps>
New guardrail: <rule to prevent recurrence>Phase VI - Compliance Sync (repair-docs, optional but recommended) Goal: persist the bug in repair-docs with dedupe and status update.
Consent gate (mandatory)
~/dev/docs/<project>/repair-docs.md (or known project path).Procedure (if approved) 1) Locate the repair-docs path (use known project mapping). 2) Read file and check for an existing BUG id or matching short title. 3) If found, update status and fix text. If not, append a new entry.
Phase VIb - GitHub Issue Execution Lane (mandatory for git repos) Goal: make the bug publicly traceable and hand the repo execution lane to SIN-GitHub-Issues when available.
Procedure 1) Search for an existing matching issue in the project repo before creating anything. 2) If no match exists, create a new issue with: symptom, cause hypothesis, affected files/surfaces, and current repro. 3) If SIN-GitHub-Issues is available, hand off the issue lifecycle + branch workflow to it:
4) If SIN-GitHub-Issues is not yet available, use gh directly but keep the same issue lifecycle and evidence requirements. 5) After validation passes, update the issue with root cause, fix, verification, and close it only when the verified fix is actually integrated.
Required handoff bundle
Bug format (match the existing file's exact status markers)
## BUG-YYYYMMDD-XX: Short title
**Aufgetreten:** YYYY-MM-DD **Status:** OPEN/FIXED
**Symptom:** What happens
**Ursache:** Why it happens
**Fix:** Code/command/solution
**Datei:** Affected file or surfaceFinal deliverable to user (always)
facts (what is observed)source_map (which project-linked sources were scanned)issue_tracking (existing/new issue, url, status, handoff state)root_cause (why it happens)fix (what changed)validation_commands (how to verify)telemetry_digest (if Phase -1 ran)confidence (0..1 + breakdown + falsifiers)evidence_bundle (ledger pointers + key cmd/file excerpts)compliance_sync (path + written/declined)risks (what could still break)followups (optional next steps)Confidence scoring (mandatory)
{
"confidence": 0.0,
"breakdown": {
"root_cause_correctness": 0.0,
"fix_correctness": 0.0,
"regression_risk_low": 0.0,
"repro_stability": 0.0
},
"why": ["one line each, evidence-backed"],
"what_would_change_my_mind": ["specific falsifier(s)"]
}Goal: achieve university-grade, professor-level logging saturation across any codebase under debug. This phase runs BEFORE evidence gathering to ensure every function, every branch, every exception is observable.
Hard rules
auto_log_injector.py (Python) or ts_log_injector.mjs (JS/TS) on every source file in the debug surface BEFORE starting Phase II evidence gathering.log_coverage_scanner.py on the target codebase and require grade B+ or higher on all files in the debug surface. If any file scores below B+, re-run the injector or manually add missing log points.Procedure 1) Auto-inject logging (mandatory first step):
# Python codebases
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/auto_log_injector.py \
--source-dir <project_src> --output-dir <project_src> --min-lines 1
# TypeScript/JavaScript codebases
node ~/.config/opencode/skills/enterprise-deep-debug/scripts/ts_log_injector.mjs \
--source-dir <project_src> --output-dir <project_src>2) Grade logging coverage (mandatory gate):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/log_coverage_scanner.py \
--source-dir <project_src> --min-grade B+3) Configure structured logging (recommended):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/structlog_configurator.py \
--project-dir <project_root> --output-dir <project_root>4) Bootstrap OpenTelemetry (recommended for distributed systems):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/otel_bootstrapper.py \
--project-dir <project_root> --output-dir <project_root>5) Generate HTTP middleware logging (recommended for web services):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/network_request_logger.py \
generate --framework <fastapi|flask|express> --output-dir <project_root>Phase II-EXT gate: log_coverage_scanner.py reports all debug-surface files at grade B+ or higher. If not met, do NOT proceed to Phase II evidence gathering.
Goal: when the bug involves performance, memory leaks, crashes, or timing issues, deploy runtime instrumentation to capture deep execution data.
Procedure (use as needed based on Phase 0.6 failure class)
1) Runtime call tracing (for call-chain bugs, timing issues):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/runtime_call_tracer.py \
--script <target_script.py> --output /tmp/call_trace.json --format tree2) Memory profiling (for leaks, OOM, growing allocations):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/memory_profiler_runner.py \
--script <target_script.py> --output-dir /tmp/memory_profile/ --interval 1.0 --top 303) Flamegraph generation (for CPU hotspots, slow paths):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/flamegraph_runner.py \
--script <target_script.py> --output /tmp/flamegraph.svg --top 304) Crash analysis (for recurring crashes, exception patterns):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/crash_analyzer.py \
--log-files /tmp/*.log /var/log/app/*.log --output /tmp/crash_report.json5) Log correlation (for distributed/multi-service bugs):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/log_correlator.py \
--log-files /tmp/service_a.log /tmp/service_b.log --output /tmp/correlation.json6) Git blame correlation (for regression hunting):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/git_blame_correlator.py \
--repo-dir <project_root> --error-lines "file.py:42,file.py:87" --output /tmp/blame.json7) Access log analysis (for HTTP/API issues):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/network_request_logger.py \
analyze --log-file /var/log/access.log --output /tmp/http_analysis.jsonGoal: eliminate local disk bloat by storing ALL logs, screenshots, videos, reports, and debug artifacts in auto-rotating private GitLab repos. Each project gets its own <project>-logcenter-001 repo. When it fills up (9GB), a new -002 is created automatically. Infinite storage, zero local clutter.
Hard rules
/tmp/ files are allowed as transient staging only — they must be uploaded to LogCenter immediately after creation.GITLAB_LOGCENTER_TOKEN available (via env or ~/.config/opencode/gitlab_logcenter.env).video/ category.Setup (one-time)
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/gitlab_logcenter.py \
init --project <project-name>Procedure (integrated into every debug phase) 1) Initialize the logcenter at the start of any debug session:
from gitlab_logcenter import get_logcenter
lc = get_logcenter("sin-solver")
lc.ensure_active()2) Upload logs instead of writing to local disk:
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/gitlab_logcenter.py \
upload --project sin-solver --file /tmp/crash_report.json --category reports --tags "rca,crash"
# Upload from stdin (pipe-friendly)
some_command 2>&1 | python3 gitlab_logcenter.py upload --project sin-solver --stdin --name "runner.log" --category logs3) Upload screenshots and videos:
# Screenshot
gitlab_logcenter.py upload --project sin-solver --file /tmp/m06_screenshot.png --category screenshots
# Video recording
gitlab_logcenter.py upload --project sin-solver --file /tmp/screencast.mp4 --category video --tags "browser,automation"4) Search across all logcenter volumes:
gitlab_logcenter.py search --project sin-solver --query "ConnectionError"5) Check status (storage usage, active repo, rotation state):
gitlab_logcenter.py status --project sin-solver6) Auto-rotation happens transparently — when the active repo approaches 9GB, the next upload automatically creates <project>-logcenter-XXX and continues there.
Categories: logs, video, screenshots, browser, reports, misc
Directory structure in each logcenter repo:
logs/2026-03-24/20260324-141500_runner9.log
video/2026-03-24/20260324-141530_screencast.mp4
screenshots/2026-03-24/20260324-141600_m06_login.png
browser/2026-03-24/20260324-141700_cdp_session.json
reports/2026-03-24/20260324-141800_crash_report.jsonEvery upload gets a .meta.json sidecar with: timestamp, category, original path, SHA-256, tags, agent name, project, logcenter volume number.
Goal: capture EVERYTHING from Chrome browser sessions via Chrome DevTools Protocol. Console, network, JS exceptions, performance metrics, security events, screenshots, screencast video, JS/CSS coverage — all uploaded to GitLab LogCenter automatically.
Hard rules
browser/.video/.--remote-debugging-port=9334.Captured CDP domains and events:
| CDP Domain | Events/Methods | What it captures |
|---|---|---|
| Runtime | consoleAPICalled, exceptionThrown | All console.log/warn/error/info/debug + uncaught JS exceptions |
| Log | entryAdded | Browser-level log entries (deprecation warnings, interventions, violations) |
| Network | requestWillBeSent, responseReceived, loadingFailed | Full HTTP request/response lifecycle with headers, body, timing |
| Page | screencastFrame, captureScreenshot | Screencast video frames (JPEG) + on-demand PNG screenshots |
| Performance | getMetrics | CPU time, JS heap, layout count, DOM nodes, frames, task duration |
| Memory | getDOMCounters | DOM node counts, document counts, JS event listeners |
| Security | securityStateChanged | TLS/cert state changes, mixed content warnings |
| Profiler | startPreciseCoverage, takePreciseCoverage | JS code coverage (which functions executed, call counts) |
| CSS | startRuleUsageTracking, stopRuleUsageTracking | CSS rule coverage (which rules are used vs unused) |
| DOM | enable | DOM tree state for correlation |
Procedure 1) Start continuous capture (runs in background, uploads on stop):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/cdp_browser_logger.py \
start --project sin-solver --port 9334 --fps 2 --quality 602) Stop and upload (Ctrl+C or signal):
python3 ~/.config/opencode/skills/enterprise-deep-debug/scripts/cdp_browser_logger.py stop3) One-shot commands:
# Single screenshot -> LogCenter
cdp_browser_logger.py capture-screenshot --project sin-solver --name "login_modal"
# Capture 30s of network traffic
cdp_browser_logger.py capture-har --project sin-solver --duration 30
# Dump 30s of console output
cdp_browser_logger.py dump-console --project sin-solver --duration 30
# Capture JS/CSS coverage for 10s
cdp_browser_logger.py dump-coverage --project sin-solver --duration 10
# Sample performance metrics (10 samples, 2s apart)
cdp_browser_logger.py dump-perf --project sin-solver --samples 10 --interval 24) Integration with Phase 0 (Repro):
Uploaded artifacts per session:
browser/YYYY-MM-DD/cdp_session_<ts>.json — full session report (summary + console + network + exceptions + perf)browser/YYYY-MM-DD/console_<ts>.json — raw console logbrowser/YYYY-MM-DD/network_<ts>.json — raw network logbrowser/YYYY-MM-DD/exceptions_<ts>.json — JS exceptions (if any)video/YYYY-MM-DD/screencast_<ts>_frameNNNNN.jpg — screencast frames (sampled)All scripts live in ~/.config/opencode/skills/enterprise-deep-debug/scripts/.
| # | Script | Language | Purpose | Key Inputs | Key Outputs |
|---|---|---|---|---|---|
| 1 | auto_log_injector.py | Python | AST-based automatic log injection for Python source files | --source-dir, --output-dir, --min-lines, --skip-private, --dry-run, --diff | Modified Python files with structured logging at every function entry/exit/exception |
| 2 | ts_log_injector.mjs | Node.js | Regex-based automatic log injection for TypeScript/JavaScript | --source-dir, --output-dir, --dry-run, --diff | Modified JS/TS files with console.log entry/exit/error wrapping |
| 3 | log_coverage_scanner.py | Python | Grades logging coverage per-function (F through A+) | --source-dir, --min-grade, --output | Per-file grade card with missing log categories |
| 4 | crash_analyzer.py | Python | Parses tracebacks, extracts crash patterns and taxonomy | --log-files, --output | Crash report with exception taxonomy, recurring patterns, timeline |
| 5 | log_correlator.py | Python | Multi-file log correlation and timeline builder | --log-files, --output | Correlation timeline, error cascades, first-failure identification |
| 6 | git_blame_correlator.py | Python | Correlates error lines with git blame for regression hunting | --repo-dir, --error-lines, --output | Blame report with author hotspots, regression detection |
| 7 | runtime_call_tracer.py | Python | Records every function call with args/timing via sys.settrace | --script, --output, --format | Call tree, stats, or flamegraph-compatible collapsed stacks |
| 8 | memory_profiler_runner.py | Python | Wraps tracemalloc for periodic snapshots and leak detection | --script, --output-dir, --interval, --top | Memory diff report with leak candidates and severity ratings |
| 9 | flamegraph_runner.py | Python | cProfile-based profiling with flamegraph output | --script, --output, --top | SVG flamegraph + hotspot analysis with timing breakdown |
| 10 | structlog_configurator.py | Python | Auto-detects project type, generates structlog/pino config | --project-dir, --output-dir | Ready-to-use structured logging configuration |
| 11 | otel_bootstrapper.py | Python | Generates OpenTelemetry auto-instrumentation setup | --project-dir, --output-dir | OTel bootstrap code with detected instrumentation libraries |
| 12 | network_request_logger.py | Python | Generates HTTP middleware + analyzes access logs | generate --framework, analyze --log-file | Middleware code or HTTP analysis report |
| 13 | gitlab_logcenter.py | Python | GitLab LogCenter: auto-rotating private repos for infinite log storage | init/upload/status/search/list/rotate/download --project | GitLab repos with categorized logs, videos, screenshots, reports |
| 14 | cdp_browser_logger.py | Python | Chrome CDP full-session capture: console, network, screenshots, screencast, perf, coverage | start/stop/capture-screenshot/capture-har/dump-console/dump-coverage/dump-perf --project | Session reports, network HAR, console dumps, coverage data, screencast frames |
When this skill is invoked, the following logging standards are MANDATORY:
This is not optional. This is professor-grade, doctoral-thesis-level observability. Every nanosecond of execution must be accountable.
Goal: prove this skill is (1) discoverable by OpenCode, and (2) safe by default (no external reads/writes without consent).
Discovery (OpenCode self-reporting)
opencode debug paths
opencode debug skill | /usr/bin/grep -n "enterprise-deep-debug"
opencode debug config | /usr/bin/grep -n "enterprise-deep-debug"Expected
opencode debug paths prints config ~/.config/opencodeopencode debug skill contains an entry with:name: enterprise-deep-debuglocation: ~/.config/opencode/skills/enterprise-deep-debug/SKILL.mdopencode debug config contains a command key "enterprise-deep-debug"Safety checks (static)
ls -la "$HOME/.config/opencode/skills/enterprise-deep-debug/"
stat "$HOME/.config/opencode/skills/enterprise-deep-debug/SKILL.md"Negative tests (revert after each)
1) Not discoverable
mv "$HOME/.config/opencode/skills/enterprise-deep-debug/SKILL.md" \
"$HOME/.config/opencode/skills/enterprise-deep-debug/SKILL.mdx"
opencode debug skill | /usr/bin/grep -n "enterprise-deep-debug" || true
mv "$HOME/.config/opencode/skills/enterprise-deep-debug/SKILL.mdx" \
"$HOME/.config/opencode/skills/enterprise-deep-debug/SKILL.md"2) Unreadable file
chmod 000 "$HOME/.config/opencode/skills/enterprise-deep-debug/SKILL.md"
opencode debug skill | /usr/bin/grep -n "enterprise-deep-debug" || true
chmod 644 "$HOME/.config/opencode/skills/enterprise-deep-debug/SKILL.md"3) Name mismatch
perl -0777 -i -pe 's/^name: enterprise-deep-debug$/name: enterprise-deep-debug-mismatch/m' \
"$HOME/.config/opencode/skills/enterprise-deep-debug/SKILL.md"
opencode debug skill | /usr/bin/grep -n "enterprise-deep-debug" || true
opencode debug skill | /usr/bin/grep -n "enterprise-deep-debug-mismatch" || true
git --no-pager diff -- "$HOME/.config/opencode/skills/enterprise-deep-debug/SKILL.md" || true
# Manually revert the change (or restore from backup) after this test.Note
opencode debug config / opencode debug skill output is too large to parse as JSON, prefer grep-based checks or use the ~/.local/share/opencode/tool-output/* files written by OpenCode when output truncates.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.