feat(memory): /init generates standard AGENTS.md with exploration-first prompt - #2768
Merged
Merged
Conversation
…st prompt - DefaultProjectMemoryFilename GGCODE.md -> AGENTS.md; /init and the startup prompt now target AGENTS.md (cross-CLI standard). Loader still reads GGCODE.md/CLAUDE.md/COPILOT.md as before. - /init prompt rewritten: the agent must explore the repository (README, manifests, entrypoints, CI/Makefile, representative sources) and write AGENTS.md from what it actually found; the heuristic snapshot is now a verify-first hint block instead of verbatim content. - Repo's own memory file converted: GGCODE.md -> AGENTS.md (renamed, content unchanged), with a thin GGCODE.md compat stub to avoid duplicate injection. - i18n (11 languages), completion, and related comments updated; enumeration strings listing all four memory filenames untouched. Co-Authored-By: ggcode <noreply@ggcode.dev>
Owner
Author
|
合并说明:techwriter_techwriter222_agent 代裁 approve(reviewer 作者回避;四复核:GGCODE.md→AGENTS.md 逐字迁移零丢失+stub 指向/四文件名枚举保留 GGCODE.md 仍优先/exploration-first prompt 全只读匹配含 plan 模式/i18n 11 语言 en fallback)。CI 9/9。执行合并。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
User-directed change (3 parts):
Repo's own memory file → standard AGENTS.md:
GGCODE.mdrenamed toAGENTS.md(content unchanged, history preserved);GGCODE.mdkept as a thin compat stub (one-liner pointer) so legacy lookups still work without duplicate context injection./initnow generates AGENTS.md:DefaultProjectMemoryFilename→"AGENTS.md"; startup "create memory?" prompt and/inittarget AGENTS.md. The loader still reads all four filenames (GGCODE.md / AGENTS.md / CLAUDE.md / COPILOT.md) — full backward compatibility; startup prompt only triggers when NONE exist.Exploration-first
/initprompt (fixes the "template dump" problem): the old prompt handed the agent a pre-baked heuristic document to write verbatim. The new prompt instructs the agent to FIRST understand the repository (README, build manifests, entrypoints, Makefile/CI, representative sources) and THEN write AGENTS.md from what it actually found; the heuristic snapshot (detected paths/validation/conventions) is demoted to a verify-first hint block.Files
GGCODE.md→AGENTS.md(rename) + compat stubinternal/memory/project.go— default filename constinternal/memory/init.go— template header# AGENTS.md, commentsinternal/tui/commands.go— exploration-first promptinternal/tui/— i18n (11 languages), completion, comments; four-filename enumeration strings untouchedinternal/memory/project_test.go— target assertion updatedValidation
go build -tags goolm ./...OKgo test -tags goolm ./internal/memory/OK (incl. TestResolveProjectMemoryInitTarget with new default)go test -tags goolm ./internal/tui/OK (full package, i18n catalogs)gofmt -lcleanNote: opened while PR throttle window shows 6 open PRs — this is a direct user request, not an issue-round fix.