agent-zero/plugins/_promptinclude
frdel e138e33ca9 Add file-level DOX docs & update AGENTS indexes
Add comprehensive file-level DOX documentation across the repo and update directory AGENTS.md indexes. Many new `*.py.dox.md` files were added under api, helpers, tools, plugins, extensions, webui, and other dirs to document endpoint purpose, ownership, runtime contracts, work guidance, and verification. Several AGENTS.md files were created or updated (agents profiles, api, docker, extensions, helpers, plugins, skills, webui components, etc.) to list child DOX files and clarify documentation/work guidance. Also add example and bundled profile DOX files (agent0, default, developer, hacker, researcher) and minor updates to helpers/dirty_json.py and its tests. These changes improve on-disk documentation coverage and establish the convention that each direct runtime file should have a matching `*.dox.md` describing its contracts and verification steps.
2026-06-08 12:41:53 +02:00
..
extensions/python/system_prompt refactor: Extract promptinclude format to fw prompt template 2026-03-13 23:17:29 +08:00
helpers refactor: replace PathSpec "gitignore" pattern type with "gitwildmatch" 2026-03-22 21:50:13 +01:00
prompts fix: tighten tool guidance and editor workflows 2026-05-11 11:51:58 +02:00
webui generated logos for builtin plugins 2026-03-19 17:35:03 +01:00
AGENTS.md Add file-level DOX docs & update AGENTS indexes 2026-06-08 12:41:53 +02:00
default_config.yaml feat(plugins): Add _promptinclude plugin for persistent system prompt files 2026-03-13 22:49:36 +08:00
plugin.yaml Update plugin.yaml 2026-03-13 23:25:12 +08:00
README.md refactor: normalize plugin paths, add README viewer to plugin info modal, and update plugin hub filters 2026-03-22 08:05:32 +01:00

Prompt Include

Automatically inject persistent behavioral rules and preferences into the system prompt from project files.

What It Does

This plugin scans a workspace for *.promptinclude.md files, applies gitignore-aware filtering and token budgets, and makes the collected content available for prompt injection.

Main Behavior

  • Workspace scanning
    • Recursively searches for files matching *.promptinclude.md.
  • Ignore support
    • Respects ignore patterns derived from gitignore-style content.
  • Budgeted inclusion
    • Applies per-file and total token limits.
    • Crops oversized files when they partially fit within the remaining token budget.
  • Structured scan result
    • Returns included file content together with path, token count, status, and skipped count.

Key Files

  • Scanner
    • helpers/scanner.py implements file discovery, ignore handling, token budgeting, and trimming.
  • Configuration
    • default_config.yaml contains prompt-include scanning defaults.
  • Prompts and UI
    • prompts/ and webui/ provide integration with the broader app.

Configuration Scope

  • Settings section: agent
  • Per-project config: true
  • Per-agent config: true

Plugin Metadata

  • Name: _promptinclude
  • Title: Prompt Include
  • Description: Persistent behavioral rules and preferences auto-injected into system prompt.