agentsmd

package
v0.629.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package agentsmd builds the prompt used by the /improve-agents-md slash command.

The command launches a normal agent turn (with the session's currently selected model) whose job is to create, restructure, or reinforce an AGENTS.md file in the working project so it carries a canonical set of MANDATORY operating rules for AI agents (how to gather context, research, plan, implement, and document — using the project's KB, code-index, web-search, Context7 and browser tools).

The canonical rules live in template.md and are embedded here. They are NOT pasted verbatim: the agent is instructed to evaluate each canonical MANDATORY clause against the current AGENTS.md and merge them intelligently, preserving the project's own wording and structure while guaranteeing every clause is represented. The package works uniformly across the TUI, Web UI and ACP surfaces without reading from disk at runtime.

Index

Constants

View Source
const (
	BeginMarker = "<!-- pando:agents-md:begin -->"
	EndMarker   = "<!-- pando:agents-md:end -->"
)

Sentinel markers delimiting the canonical reference inside template.md. They are stripped before the clauses are shown to the agent (see canonicalClauses) so the agent never copies the markers into a target file.

Variables

View Source
var CanonicalTemplate string

CanonicalTemplate is the project-agnostic set of MANDATORY clauses that /improve-agents-md ensures a target AGENTS.md covers. It is delimited by the `pando:agents-md:begin` / `pando:agents-md:end` sentinel comments so the reference content can be isolated from the surrounding file.

Functions

func Prompt

func Prompt(extra string) string

Prompt returns the full instruction the agent runs for /improve-agents-md.

The agent is told to perform an EVALUATIVE MERGE (clause by clause), not a verbatim insertion: it reviews both the canonical clauses below and the current AGENTS.md, and reconciles them so every MANDATORY clause is satisfied while the project's existing content, wording and structure are preserved.

extra carries any free-text argument the user passed after the command (for example a specific target path or emphasis); it is appended as additional guidance and may be empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL