{"type":"fact","id":"project-identity","text":"EveGlyph Editor is a local-first, agent-native Markdown editor and workspace by EVEMISS TECHNOLOGY CO., LTD. (一言諾科技有限公司), authored by Neo.K (許筌崴), Taipei, Taiwan. Part of EveMissLab. Current version is v0.4.0, a local prototype, pre-1.0. Licensed MIT. Canonical domain eveglypheditor.com; repository https://github.com/kakon77777-commits/eveglyph-editor; business/licensing contact kakon77777@evemisslab.com."}
{"type":"principle","id":"four-stage-loop","text":"EveGlyph Editor is built around one loop: workspace ↔ agent ↔ diff-review ↔ human. A human writes clean Markdown; a local CLI agent (Claude Code, Codex, or Gemini) edits files on disk with auto-approve; the workspace is git-snapshotted so every change surfaces as a reviewable diff; the human accepts or rejects it. Nothing is applied silently. Front-stage stays minimal, back-stage carries the capability."}
{"type":"concept","id":"eveglyph-md-format","text":"EveGlyph-MD (product code EG-MD-2026) is a lightweight semantic classification layer for Markdown documents, adding type/status/tags frontmatter fields on top of otherwise plain Markdown. EveGlyph Editor is the editor half of this format."}
{"type":"definition","id":"eveglyph-md-frontmatter-fields","text":"EveGlyph-MD frontmatter (src/frontmatter.js) defines three classification fields: type, status, and tags. A round-trip-safe YAML-subset parser edits the raw frontmatter block line-by-line so a human's block scalars, nested maps, and comments survive a rewrite untouched. New .md files are stamped with this schema at creation. The active document's class is injected into the agent's prompt context as fenced, enum-clamped, sanitized metadata, treated strictly as data for the agent to read, never as instructions for it to follow."}
{"type":"concept","id":"patchmd-diff-review","text":"PatchMD is EveGlyph Editor's diff-first agent review mechanism. Before any local agent runs, the workspace is git-snapshotted (a git repo is initialized if one doesn't exist yet). Afterward, a real git diff is shown to the human for Accept or Reject."}
{"type":"fact","id":"patchmd-diff-renderer","text":"PatchMD's diff view (src/diffview.js) is one shared renderer used by both the agent review panel and workspace-wide replace-all: a unified diff grouped into collapsible per-file cards with +/− counts, fully escaped because it renders untrusted agent/git output."}
{"type":"fact","id":"patchmd-accept","text":"Accepting a PatchMD diff review commits the agent's changes to git with the commit message 'agent: <message>'."}
{"type":"fact","id":"patchmd-reject","text":"Rejecting a PatchMD diff review runs 'git reset --hard HEAD' followed by 'git clean -fd', discarding all of the agent's edits and any untracked files. This is destructive to uncommitted work in the workspace."}
{"type":"fact","id":"permission-tiers-real-enforcement-v04","text":"As of v0.4.0 (shipped 2026-06-27), EveGlyph Editor's three permission tiers (Cautious/Standard/Trusted) flow from the frontend to the local bridge and map to actual CLI flags: Claude Code --permission-mode plus a tool allow-list, Codex --sandbox levels or bypass, and Gemini --approval-mode. This replaced the v0.3 behavior where the same three tier names only varied a prompt capability clause and were advisory, not sandboxed."}
{"type":"fact","id":"ai-providers","text":"EveGlyph Editor supports three AI provider paths: Anthropic (Claude), any OpenAI-compatible endpoint, and a local CLI agent (Claude Code, Codex, or Gemini). The cloud providers (Anthropic, OpenAI-compatible) never touch the local filesystem; only the local-agent path edits files, and only on the machine where EveGlyph Editor is running."}
{"type":"concept","id":"eveglyph-workspace-memory","text":"EveGlyph Editor supports a gitignored, per-workspace .eveglyph/ directory holding rules.md, glossary.md, and memory/pitfalls.md plus memory/recent.md. A context compiler (src/context.js) assembles these files into the prompt sent to the local agent on every run. If .eveglyph/rules.md is present, it is injected verbatim with elevated authority ('follow these before anything else'); these files are trusted-but-attacker-controllable configuration in an unfamiliar workspace."}
{"type":"fact","id":"license","text":"EveGlyph Editor's source code is licensed under the MIT License. Copyright (c) 2026 EVEMISS TECHNOLOGY CO., LTD. (一言諾科技有限公司), author Neo.K (許筌崴), Taipei, Taiwan. It is not Apache-2.0."}
{"type":"fact","id":"version","text":"The current shipped version of EveGlyph Editor is v0.4.0, shipped 2026-06-27, described in its own README and package.json as a local prototype, pre-1.0."}
{"type":"route","id":"repo-url","path":"https://github.com/kakon77777-commits/eveglyph-editor","text":"The public source repository for EveGlyph Editor."}
{"type":"route","id":"canonical-domain","path":"https://eveglypheditor.com","text":"The canonical domain for the EveGlyph Editor project website."}
{"type":"component","id":"bridge-dev-only","text":"vite-agent-bridge.js is a Vite plugin declared apply: 'serve', exposing /api/* endpoints for filesystem I/O, encoding detection, git diff-review, and agent spawning. It exists only while running 'npm run dev' on a user's own machine, is never included in a production build, and is never publicly hosted or network-reachable. There is no public HTTP/REST API for eveglypheditor.com or the product."}
{"type":"component","id":"bridge-isLocalRequest","text":"Every /api request in EveGlyph Editor's local bridge is gated by isLocalRequest: the Host header must be localhost, 127.0.0.1, or ::1, and if an Origin header is present its hostname must also be local; otherwise the request is rejected with HTTP 403. This blocks CSRF and DNS-rebinding attacks from a malicious web page."}
{"type":"component","id":"bridge-resolveInside","text":"resolveInside confines all file-read and file-write target paths in EveGlyph Editor's local bridge to the workspace root; any path that would resolve outside the workspace root is rejected."}
{"type":"component","id":"bridge-confirmedWorkspace","text":"EveGlyph Editor's local bridge pins every workspace-scoped operation (file I/O, the four /api/git/* endpoints, and /api/agent spawning) to the single folder recorded as confirmedWorkspace when the user opened it. assertWorkspace(cwd) rejects any request whose working directory is not that folder or a descendant, before any operation runs."}
{"type":"fact","id":"api-key-storage","text":"EveGlyph Editor stores cloud-provider API keys in the browser's localStorage under the key eveglyph_cfg, in plaintext. This is not secure storage and should not be used on a shared or untrusted machine. A future desktop build is intended to move keys to the OS keychain, but that is not current."}
{"type":"fact","id":"agent-spawn-safety","text":"EveGlyph Editor delivers the agent's prompt to the spawned local CLI over stdin, never as a command-line argument, so prompt text is never interpreted as shell syntax or command-line flags. It also enforces a hard 180-second timeout on the spawned agent process; the child process is killed on timeout, on the user pressing Stop, or on the connection closing."}
{"type":"rights","id":"rights-scope-distinction","text":"EveGlyph Editor's rights-spectrum.json (AIRS/AILP) governs how AI systems may learn from eveglypheditor.com's written content (marketing prose, corpus docs, governance docs) — it does not restrict the separately MIT-licensed source code, which is already broadly reusable, including for AI training, under MIT's own terms."}
{"type":"rights","id":"rights-non-commercial","text":"Under EveGlyph Editor's AI rights spectrum, non-commercial AI training, embedding storage, and summarization of the website's written content are highly permitted (0.8 by default site-wide, raised to 1.0 for content under /ai/ and /ai/corpus/), with attribution and citation required."}
{"type":"rights","id":"rights-commercial-license-required","text":"Under EveGlyph Editor's AI rights spectrum, commercial AI training, fine-tuning, and distillation on the website's written content are marked license_required, needing a paid license agreement, compensation, and attribution. Licensing contact: kakon77777@evemisslab.com."}
{"type":"rights","id":"rights-prohibited","text":"Under EveGlyph Editor's AI rights spectrum, verbatim memorization, style imitation, and long-quote/substitutive generation of the website's written content are set to 0.0 (not allowed)."}
