agentsmd

package
v2.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agentsmd maintains aitk's block in AGENTS.md (docs/spec/workflow.md §2).

Index

Constants

View Source
const (
	Begin = "<!-- aitk:begin v=2 -->"
	End   = "<!-- aitk:end -->"
)
View Source
const Block = Begin + `
<!-- aitk:block-revision 2 -->
## Working in this repository (aitk)

1. Run ` + "`aitk brief`" + ` and read its output. Do not read other files under docs/ai/ unless the brief points to them.
2. Run ` + "`aitk task next --start`" + ` (or ` + "`aitk task start <id>`" + `) to take a task, or ` + "`aitk task new \"<title>\"`" + ` to create one.
3. Do the work. Run ` + "`aitk check`" + ` until it passes, and ` + "`aitk impact`" + ` to see what your change can break.
4. Run ` + "`aitk close --summary \"<what changed>\" --knowledge \"<lasting finding, or none>\"`" + `.
5. If unsure, blocked, the change is risky, or the check fails twice: stop and ask the user.

If ` + "`aitk`" + ` is not installed, read docs/ai/project-context.md and the newest file in docs/ai/handoff/.
` + End

Block is the canonical protocol block.

View Source
const Revision = 2

Revision of Block. Later releases raise it, so an older aitk recognizes their block as newer rather than hand-edited, and never replaces it with its own.

Variables

This section is empty.

Functions

func Apply

func Apply(content string) string

Apply returns content with the block installed: replacing a v2 block, else a v1 block, else appending. Text outside the block is preserved byte for byte.

func Sync

func Sync(path string) (bool, error)

Sync applies the block to the file at path. It reports whether the file changed.

Types

type State

type State int

State of the block in a file.

const (
	Missing State = iota
	Current
	Outdated
	V1Only
	Edited // a v2 block that matches no aitk release: changed by hand
	Newer  // the block of a later aitk release (higher block revision)
)

func Inspect

func Inspect(content string) State

Inspect reports the block state of content.

Jump to

Keyboard shortcuts

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