Skip to content

feat(skills): default to creating new files, confirm before editing existing#12

Merged
mandarnilange merged 1 commit intomainfrom
feat/skills-modification-policy
May 2, 2026
Merged

feat(skills): default to creating new files, confirm before editing existing#12
mandarnilange merged 1 commit intomainfrom
feat/skills-modification-policy

Conversation

@mandarnilange
Copy link
Copy Markdown
Owner

Summary

All three skills (`agentforge-workflow`, `agentforge-template-author`, `agentforge-debug`) bump to 0.2.0 with a unified Modification policy:

  • Default behaviour: create new files alongside existing ones.
  • Edits require explicit intent. Words like update, edit, modify, extend, rewrite, or naming the specific file. Without those, the skill creates a new file rather than touching the user's prior work.
  • Per-file confirmation via `AskUserQuestion` (Claude Code) or the host agent's interactive-prompt tool. Skills propose the change in chat and wait for a yes/no — they never silently overwrite.

Per-skill specifics

  • `agentforge-workflow` (the most invasive) — the policy applies to every file under `.agentforge/` (agents, pipelines, nodes, prompts, schemas). Greenfield runs are unaffected; the policy kicks in only when prior `.agentforge/` files exist.
  • `agentforge-template-author` — applies to shipped templates, the registry, existing tests, and `docs/templates.md`. Editing a shipped template is flagged as a breaking change because end users `agentforge init --template ` against it. When the user's request overlaps with an existing template but they haven't asked to edit it, the skill now defaults to forking (`-secure`, `-v2`) instead of in-place modification.
  • `agentforge-debug` — splits confirmation into two categories: state mutation (gate decisions, cancel / continue, claim clear) and file edits (prompts, schemas). Existing state-mutation rule preserved; new rule covers file edits in fix-path proposals. Substantive rewrites default to creating a new file alongside the existing one; one-line tweaks may edit in place after explicit confirmation.

Version bump rationale

Minor (0.1.0 → 0.2.0) per `skills/CHANGELOG.md` policy: additive behavioural guidance, new prose in `SKILL.md` and the Hard rules list. Trigger conditions unchanged — existing prompts still fire each skill.

Test plan

  • `npm run skills:validate` — all three skills at 0.2.0, frontmatter valid.
  • `npx biome check .` clean.
  • CI `Publish Skills` workflow turns green.
  • Manual validation: open a project with an existing `.agentforge/` directory, fire `agentforge-workflow` with a prompt that doesn't include "edit" / "update" — confirm the skill adds new files rather than overwriting.
  • Manual validation: fire `agentforge-workflow` with "update the analyst agent to use claude-haiku-4-5" — confirm the skill asks per-file confirmation before editing `agents/analyst.agent.yaml`.

…xisting

All three skills bump to 0.2.0 with a unified Modification policy:

- Default behaviour is "create new files alongside existing ones".
- Editing an existing agent / pipeline / node / prompt / schema (or, for
  template-author, an existing shipped template / registry / doc / test)
  requires explicit user intent — words like "update", "edit", "modify",
  "extend", "rewrite", or naming the specific file.
- Per-file confirmation via AskUserQuestion (Claude Code) or the host
  agent's interactive-prompt tool. Never silently overwrite.
- agentforge-debug splits confirmation into two categories: state
  mutation (gate / cancel / continue) and file edits (prompts, schemas).
- agentforge-template-author flags in-place edits to a shipped template
  as a breaking change and defaults to forking when intent is unclear.

Top-level skills/CHANGELOG.md gains a "modification policy sweep" entry
explaining the bump rationale (minor — additive guidance, no trigger
changes).
@mandarnilange mandarnilange merged commit 4c0d751 into main May 2, 2026
5 checks passed
@mandarnilange mandarnilange deleted the feat/skills-modification-policy branch May 2, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant