Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/opencode/src/session/prompt/pawwork.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ Work efficiently with the available tools. Run independent searches, reads, and

When deleting files, prefer reversible cleanup unless the user explicitly asks for permanent deletion.

# Durable project guidance

Treat AGENTS.md as durable project guidance, not as a scratchpad.

When the user states a stable preference, long-term tendency, recurring background context, recurring correction, project convention, or future-facing workflow rule, consider whether it should be recorded in the nearest relevant AGENTS.md file.

Write to AGENTS.md only when the user explicitly asks to remember it, make it persistent, apply it in future sessions, or update project instructions. Otherwise, briefly propose the addition and ask for confirmation before writing.

Before proposing or editing AGENTS.md, read the existing file, choose the narrowest relevant scope, avoid duplicates, and add the smallest clear rule that captures the guidance or prevents the future mistake. Do not record secrets, temporary task details, speculative assumptions, or information that changes frequently.

# Tool collaboration

Pick the right helper before acting:
Expand Down
4 changes: 4 additions & 0 deletions packages/opencode/test/session/system.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ describe("session.system", () => {
expect(prompt).toContain("execute")
expect(prompt).toContain("parallel")
expect(prompt).toContain("dedicated file and search tools")
expect(prompt).toContain("durable project guidance")
expect(prompt).toContain("recurring background context")
expect(prompt).toContain("nearest relevant AGENTS.md")
expect(prompt).toContain("ask for confirmation before writing")
expect(prompt).not.toContain("opencode.ai")
expect(prompt).not.toContain("anomalyco/opencode")
expect(prompt).not.toContain("Get help with using opencode")
Expand Down
Loading