Docs Reference Troubleshooting

Troubleshooting

Stable v0.1.0
Schema.md v2
Updated APR 2026

11.1 Lint Exit States

Read last line. Know action.

ExitStateFiles Changed?Action
0CLEANNoContinue. Skip commit.
0FIXEDYesonde git commit. Done.
1ERRORNoFix listed lines. Re-run onde lint.
3WARNINGSNoCommit safe. Fix later.

Rule: Exit 1 = atomic. Zero writes. Fix all errors first.


11.2 Error & Warning Matrix

Find message. Apply fix. Re-run.

MessageCauseFix
unknown type "X"Type not in schemaAdd to schema or change type::
invalid value "X" for statusEnum mismatchUse valid value or extend schema enum
required property "X" missingSchema demands itAdd property or set @default in schema
broken link [[X]]Target missing or deletedCreate node or remove link
partial link [[X]] — N matchesTitle ambiguousUse ID [[task-882]] or full title
wrong edge targetType mismatchLink to correct node type
expected "key:: value"Malformed lineFix spacing. Exact :: required.
column mismatchDense row ≠ header colsMatch pipe count exactly
unclosed edge propertiesMissing }Close brace
file/dir over budgetToken limit exceededTrim body, split file, or raise budget
block over row limitDense block exceeds @max-rowsSplit file or enable @auto-split
file over node limitFile exceeds @max-nodesSplit file or enable @auto-split
dir over node limitDir total exceeds @max-dir-nodesArchive, merge, or raise limit
dir violationFile in wrong folderRun onde organize --dirs or move manually
naming violationFilename breaks @namingRun onde organize --rename
rejected extensionWrong file type in dirMove/delete file or remove @reject-ext
@ext conflicts with @namingExtension mismatchAlign @ext with @naming template
duplicate id "X"Two nodes share IDChange one ID or remove id:: (auto-gen replaces)

Rule: Errors block writes. Warnings do not. Fix errors → exit 0.


11.3 CLI Cheat Sheet

Pick by workflow. Flags stack.

Sync & Heal

CommandPurpose
onde lintFull sync + validate + auto-fix
onde lint --dry-runPreview changes. Zero writes.
onde lint --softErrors → warnings. Exit 0.
onde lint --watchAuto-sync on file save.
onde lint --continue-on-errorWrite valid files. Skip broken ones.

Query & Traverse

CommandPurpose
onde find <type> [flags]Filter, sort, group, output
onde q '<dsl>'Pipes, multi-hop, negation, variables
onde deps <id>Follow depends edges only
onde ancestors <id>Follow ALL edges upstream
onde impact <id>Full downstream fan-out
onde find --as-of TQuery graph at past moment

Organize & Recover

CommandPurpose
onde organizeFormat, sort, group, normalize
onde organize --splitOne file → many
onde organize --split --batch-size NBatch paginate: N per file
onde organize --mergeMany files → one
onde organize --dirsMove files to match schema
onde relink --to idStabilize all links
onde materializeRebuild markdown from truth

Git & Output

CommandPurpose
onde git commitAuto-message. Stage changed files only.
--format mdFull nodes. Round-trip safe.
--format md-denseCompact rows. Agent-friendly.
--format jsonScripts, APIs, LLM input.
--format tableTerminal scan.
--format mermaidDiagrams.

11.4 Query DSL Grammar

Wrap complex queries in single quotes. Start simple. Graduate when needed.

ElementSyntaxExample
Node filtertype[key=value]task[status=BLOCKED]
Date filtertoday, -7d, +3d, YYYY-MM-DDdeadline < today
Forward edge>edge>task >depends> task
Backward edge<edge<person <owns< task
Wildcard>*{max:N}issue >*{max:5}
Pipe|| group by status | count
Aggregationcount, avg X, sum X| count, avg priority
Havinghaving agg op N| having count > 3
Sortsort field asc/desc| sort deadline asc
NegationNOT >edge> nodetask NOT >depends> task
Variable$var = expr$p = person <owns< task
Set opsUNION, INTERSECT, EXCEPT(A) INTERSECT (B)

Rule: Pipes chain left→right. Variables bind once. Negation subtracts matches.


11.5 Schema Directive Reference

Directives stack. Schema controls validation. Remove schema = opt-out.

DirectiveEffectExample
@requiredFails lint if missingstatus: enum(...) @required
@default(X)Auto-fills when emptypriority: enum(...) @default(C)
@auto(now)Sets timestamp on creationcreated_at: datetime @auto(now)
@on-updateOverwrites timestamp every lintupdated_at: datetime @on-update
@check("A > B")Compares two fields@check("deadline > created_at")
@pattern("regex")Validates string formatcode: string @pattern("^[A-Z]{3}-\\d{3}$")
@max-length(N)Caps string lengthtitle: string @max-length(200)
@uniqueValue must be distinct per typeslug: string @unique
@deprecated("msg")Warns on use. Still works.old: string @deprecated("use slug")
@many(min:N, max:M)Edge cardinality boundsassignees: edge(person) @many(min:1, max:5)
@softDowngrades errors to warningstasks/**: type(task) @soft
@naming("{id}.md")Enforces filename patterntasks/**: type(task) @naming("{id}.md")
@max-file-tokens(N)Per-file token limittasks/**: @max-file-tokens(500)
@max-dir-tokens(N)Per-directory token limitmemory/**: @max-dir-tokens(10000)
@max-rows(N)Max pipe rows per dense blocktasks/**: @max-rows(50)
@max-nodes(N)Max nodes per filedecisions/**: @max-nodes(10)
@max-dir-nodes(N)Max nodes per directorytasks/**: @max-dir-nodes(500)
@auto-splitAuto batch-split on violationtasks/**: @max-rows(30) @auto-split
@ext(ext1 ext2)Set file extensions to parsetasks/**: @ext(task.md)
@reject-ext(ext1)Block specific extensions in dirtasks/**: @reject-ext(txt csv json)

Rule: Directives live on fields or directory rules. Schemaful = enforced. Schemaless = ignored.


11.6 Terminal Fallback

Binary unavailable? Bulk edit needed? Use raw tools. onde lint heals after.

GoalCommand
Find nodes by typerg 'type:: task' tasks/ -l
Find broken linksrg '\[\[task-999\]\]' tasks/ -l
Replace propertysed -i 's/^status:: BLOCKED$/status:: TODO/' tasks/*.md
Add missing fieldsed -i '/^deadline::/a points:: 0' tasks/*.md
Extract all IDsrg '^id:: ' . --type md -o | sort -u
Count by typerg '^type:: ' . --type md -o | sort | uniq -c | sort -rn

Rule: Backup first. Test on one file. Run onde lint after bulk changes.


11.7 Recovery Checklist

Disaster → step-by-step fix.

ScenarioFix Path
Output looks wrongonde lintonde organize
Links broken after moveonde relink --to idonde lint
Schema too strictonde lint --soft or mv .onde/schema.md .onde/schema.md.bak
Accidentally deleted filesonde materialize
Git merge conflicts in markdowngit pullonde lint (auto-heals)
Lint blocks on one bad fileonde lint --continue-on-error
Context window fullonde tree --over-budget → trim or split fat files
Query returns stale dataonde lint → re-run query
Edits vanish in query resultAdd --fields to query line
Workspace feels chaoticonde schema extract > .onde/schema.md → review → onde lint --soft

Rule: Truth lives in journal. Markdown disposable. Sync heals chaos. One command fixes most drift.


Next Step:Appendices: Migration, Performance, Glossary, Templates