Skip to content

Project Intelligence

Project Intelligence is a small, repository-scoped memory of your project. VdevAI keeps it in three capped Markdown files inside .project-ai/ at the workspace root, so every new task starts already knowing your stack, conventions and current progress.

.project-ai/overview.md stack, folder map, commands, entry points (<= 2,000 chars)
.project-ai/patterns.md architecture, conventions, gotchas (<= 2,500 chars)
.project-ai/progress.md rolling milestones + next steps (<= 1,500 chars)

It is included on every plan (Free and Pro) and behaves identically. There is no feature gate.

An agent normally re-discovers a repository on every task: list folders, open manifests, read the README, open entry points. Those discovery turns are a full request each, and the facts end up in the conversation instead of in your repository. Project Intelligence moves them into a tiny snapshot and injects it once, which means:

  • fewer discovery turns per task (lower cost, more turns before any limit),
  • a prompt prefix that stays identical between turns, so prompt caching keeps working,
  • knowledge that survives across tasks, restarts and teammates.
File Contents Hard cap
.project-ai/overview.md Stack, framework versions, folder map, build/lint/test commands, entry points 2,000 chars
.project-ai/patterns.md Architecture, state/API/database conventions, error handling, gotchas 2,500 chars
.project-ai/progress.md Active work, recently completed milestones, next steps 1,500 chars, max 20 bullets

The injected block is capped at 6,000 characters (~1.5k tokens). When a pooled free key with a tight per-minute budget is active (for example Groq’s free tier), the budget drops to 2,000 characters automatically, and the indexing task itself gets a 1,200-character snapshot so it fits alongside its own instructions.

progress.md is a rolling log: new entries are prepended, duplicates are removed, and older entries are trimmed when the file exceeds its cap.

Three entry points:

  1. The PI badge in the chat input bar → Initialize (or Refresh index once it exists).
  2. The inline banner shown above the input when a project is open and no .project-ai/ folder exists. Nothing runs on folder open; indexing starts only when you click Initialize.
  3. /init-pi typed into the chat input.

Initialization is cheap:

  • A deterministic local skeleton is written first from package.json, pyproject.toml, Cargo.toml, go.mod, the top-level folders, detected commands and entry points. This costs zero tokens and makes the repository usable immediately.
  • Then a single read-only indexing task reads the manifests, README and a few representative files, and returns all three files in one structured response. The extension caps and writes them atomically — no file-approval prompts and no half-written folder. Shell commands are refused during this task, so a recursive listing cannot blow a free-tier token budget.

The one-click button starts that task as /init-pi, so the chat shows a short line instead of the full instruction block. If every provider key is rate-limited or unavailable while the task runs, the skeleton stays in place, the badge shows PI: Active, and you can retry later with Refresh index.

  • On the first request of a task, the extension reads .project-ai/ locally and prepends one <project_intelligence> block to the user content.
  • On the first request after compaction, the refreshed snapshot is injected once more, because the previous copy was in the truncated history.
  • It is never added to the static system prompt and never re-read mid-task, so the prompt prefix stays byte-identical from the second turn onward.
  • Resumed tasks are not re-injected: their history already contains the snapshot.

VdevAI never starts a standalone “update the memory” request. Updates are merged locally at boundaries that already exist:

Boundary What is merged
Task completion An optional <pi_update> block in the attempt_completion result: milestones, decisions, patterns, next. Stripped from the result before it is shown.
Task completion (fallback) The task_progress checklist, touched files and the task title, used when the model did not emit the block.
Before context compaction (summarize, /compact, automatic truncation) Milestones and next steps parsed from the summary that was already produced.

Decisions and patterns go to patterns.md; milestones and next steps go to progress.md with an ISO date. Duplicates are ignored and caps are enforced on every write.

  • .project-ai/ lives in your repository. Commit it to share it with your team, or add it to .gitignore to keep it local.
  • Chat transcripts are not written into .project-ai/; they stay in workspace-scoped extension storage.
  • Global user rules stay in the global VdevAI configuration.
  • Nothing is uploaded: the snapshot is read and written on your machine, and only travels as part of the model request you already make with your own keys or Cloud plan.
  • Toggle Settings → Features → Project Intelligence, or use Turn off in the PI badge menu.
  • Deleting .project-ai/ fully reverts behaviour; the extension never recreates it implicitly.

Does it cost extra AI calls? No. Reads happen when a task starts and merges happen when tasks finish or before compaction.

Will it bloat my prompts? No. The block is capped at 6,000 characters (2,000 on tight free-tier budgets) and is only used on the first turn and after compaction.

What if the model produces a malformed update block? The parser tolerates partial and malformed output and falls back to the task checklist and touched files. A bad block can never block task completion.

Does it work with a free BYOK key? Yes. Behaviour is identical; only the injected budget shrinks so it fits tight per-minute caps.

Can I edit the files by hand? Yes — they are plain Markdown. Keep them under their caps, or let the extension trim them on the next write.

Does it work in multi-root workspaces? The primary workspace root is used.