
ailss-prometheus-agent
Retrieval-first AILSS vault workflow for Codex CLI (MCP read tools first; explicit gated writes)
提供方 maehwasoo|开源
Prometheus Agent (AILSS Codex skill)
Use this skill when you want to work retrieval-first against an AILSS Obsidian vault.
Core workflow
- Start with
get_contextfor the user’s query (avoid guessing and avoid duplicates). - Use
expand_typed_links_outgoingto navigate the semantic graph from a specific note (DB-backed).- Typed links are directional: link from the current note to what it uses/depends_on/part_of/implements; do not add reciprocal links unless explicitly requested.
- Use
resolve_notewhen you only haveid/title/a wikilink target and need a vault-relative path forread_note/edit_note. - Use
read_noteto confirm exact wording and frontmatter before making claims. - Use
search_notesfor metadata filtering (entity/layer/status/tags/keywords/source/date ranges) without embeddings calls. - Keep relationships in frontmatter only:
- Record semantic relations as typed-link keys in YAML frontmatter (not a
## Linkssection at the end of the note). - Avoid adding wikilinks to tool names or input keys unless there is an actual vault note with that title (examples below).
- Record semantic relations as typed-link keys in YAML frontmatter (not a
[[sequentialthinking]]
[[session_note_id]]
Extended workflow (AGENTS.md-level detail)
Treat the Obsidian vault as the Single Source of Truth (SSOT): always ground claims in get_context/read_note, and do not invent facts not present in notes.
Retrieval-first
- Always call
get_contextfirst for any task that might depend on vault knowledge. - Use returned note previews/snippets as the primary grounding source.
- If you need exact wording/fields, fetch the full note via
read_note(do not assume).read_noteis path-based. If you only haveid/title/a wikilink target, callresolve_notefirst.
- For metadata filtering (entity/layer/status/tags/keywords/source/date ranges), use
search_notes(DB-only; no embeddings). - Before adding new tags/keywords, prefer reusing existing vocabulary via
list_tags/list_keywords. - If you need typed-link navigation starting from a specific note path, call
expand_typed_links_outgoing(outgoing only; bounded graph). - Typed links are directional: link from the current note to what it uses/depends_on/part_of/implements; do not add reciprocal links unless explicitly requested.
- If you are unsure what tools exist or what arguments they require, call
tools/listand follow the returned schemas exactly.
Structure + validation
- Use
get_vault_treewhen you need a filesystem folder tree for the vault. - Use
frontmatter_validatewhen you need to audit frontmatter health (required keys +id/createdconsistency), or to inspect typed-link ontology diagnostics (typed_link_constraint_mode:off/warn/error).path_prefixlimits only the source-note scan set; typed-link target resolution for diagnostics is vault-wide.
- Use
find_broken_linkswhen you need to detect unresolved wikilinks/typed links after moves/renames. - Use
find_typed_links_incomingwhen you need incoming edges/backrefs for a target. - Use
list_typed_link_relswhen you need relation-level diagnostics (for example, legacy/non-canonical rels such aslinks_to).
Safe edits (explicit apply only)
- Prefer
apply=falsefirst to preview changes. - For new notes, prefer
capture_noteso required frontmatter keys exist andidmatchescreated.- When capturing, set non-default frontmatter via
frontmatteroverrides (at leastentity/layer/status/summarywhen known). - Prefer reusing existing
tags/keywordsby checkinglist_tags/list_keywordsfirst (avoid near-duplicates).
- When capturing, set non-default frontmatter via
- Default policy for
capture_note/canonicalize_typed_links/edit_note/improve_frontmatter: doapply=falsepreview, then proceed withapply=trueautomatically (auto-apply).- Only pause when the user explicitly requests “preview only” or the preview indicates a suspicious target.
- Do not override identity fields (
id,created) unless the user explicitly asks. - For line-based edits, fetch the note via
read_note, then compute exact anchors + line numbers (do not guess). - Use
expected_sha256to avoid overwriting concurrent edits. - Only set
apply=trueafter confirming the target path + patch ops are correct. - Update frontmatter
updatedas part of the same edit operation (avoid “content changed but updated not bumped” drift). - After
apply=true, confirmreindex_summaryso the DB stays consistent.
Frontmatter quick reference (avoid inventing new enum values)
- Required keys (minimum):
id,created,title,summary,aliases,entity,layer,tags,keywords,status,updated,source - Formats:
idmust be 14 digits (YYYYMMDDHHmmss) and match the first 14 digits ofcreated(YYYY-MM-DDTHH:mm:ss)sourceis always an array (example:source: [])
layer:strategic|conceptual|logical|physical|operationalstatus:draft|in-review|active|archived- Typed-link keys (only include when non-empty; omit key when you have no values):
instance_of,part_of,depends_on,uses,implements,cites,summarizes,derived_from,explains,supports,contradicts,verifies,blocks,mitigates,measures,produces,authored_by,owned_by,supersedes,same_as - Canonical relation key order (for tooling/tests):
instance_of,part_of,depends_on,uses,implements,cites,summarizes,derived_from,explains,supports,contradicts,verifies,blocks,mitigates,measures,produces,authored_by,owned_by,supersedes,same_as entitycandidates (use one of these; do not invent new values):concept|document|project|artifact|person|organization|place|event|task|method|tool|idea|principle|heuristic|pattern|definition|question|software|dataset|pipeline|procedure|dashboard|checklist|workflow|decide|review|plan|implement|approve|reject|observe|measure|test|verify|learn|research|summarize|publish|meet|audit|deploy|rollback|refactor|design|delete|update|create|schedule|migrate|reference|hub|interface|guide|log|structure|architecture|analyze
- External vs internal sources:
- Use
source: ['https://…']for external URLs/docs/tickets - Use
citesonly for strict citations to other vault notes (example below) - Use
summarizes/derived_from/explains/supports/contradicts/verifies/blocks/mitigates/measures/produces/owned_byfor non-citation note-to-note relations - Use
authored_byfor content authorship andowned_byfor operational ownership
- Use
cites: ["[[Some Note]]"]
Tool availability (important)
- Read tools are always registered.
- Write tools are not registered by default. They require
AILSS_ENABLE_WRITE_TOOLS=1. - If a write tool is missing, do not “simulate” a write. Ask the user to enable write tools or proceed read-only.
Obsidian grammar (titles + links)
- Titles are filenames: keep them cross-device safe (especially for Sync).
- Avoid:
\\/:*?"<>|#^and%%/ Obsidian wikilink brackets. - Prefer using only letters/numbers/spaces plus
-and_when in doubt.
- Avoid:
- Default to English titles. Avoid translation parentheses (e.g.
Korean(English)); use frontmatteraliasesfor translations/alternate titles instead. - If you need the full path in a wikilink (disambiguation), hide it with display text:
- Example below
[[20. Areas/50. AILSS/20. Operations/20. Operations|20. Operations]]
Safe writes (when enabled)
- Default policy for
capture_note/canonicalize_typed_links/edit_note/improve_frontmatter: doapply=falsepreview, then proceed withapply=trueautomatically (auto-apply).- Only pause when the user explicitly requests “preview only” or the preview indicates a suspicious target.
- For edits, use
expected_sha256to avoid overwriting concurrent changes. - Keep identity fields safe: do not override
id/createdunless the user explicitly requests it.
Common recipes
Create a new note (capture_note)
- Run
get_contextwith the intended topic/title to avoid duplicates and reuse existing naming. - Draft a new note (title + frontmatter overrides that match the content).
- Prefer reusing existing tags/keywords: call
list_tags/list_keywordsfirst.
- Prefer reusing existing tags/keywords: call
- Call
capture_notewithapply=falseto preview the resulting path + sha256. - Confirm with the user.
- Call
capture_noteagain withapply=true.
Notes:
- Let
capture_notegenerateid/created/updatedunless the user explicitly wants overrides. capture_notetimestamps follow system local time (no fixed timezone) and are stored as ISO to seconds without a timezone suffix (YYYY-MM-DDTHH:mm:ss).- Prefer setting non-default fields via
frontmatteroverrides when known:entity,layer,status,summary, and optionallytags,keywords,source. - Typed links are optional; if you include typed links, only include keys that have values.
- Typed links are one-way; link from the current note outward based on how it relates to other notes.
Improve frontmatter (improve_frontmatter)
- Read the note with
read_note. - Call
improve_frontmatterwithapply=falsefirst. - Confirm the proposed changes, then
apply=true.
Move/rename a note (relocate_note)
- Call
relocate_notewithapply=falseto preview the move. - Confirm, then call again with
apply=true.
Preflight
If you are unsure what tools exist or what arguments they require, call tools/list and follow the returned schemas exactly.