agentleFS
sanzhardanybayevsanzhardanybayev/synergy/skills/address-feedback/SKILL.md

address-feedback

Skill2 starsChanged 4 months agoMITView on GitHub

Use when the user runs /synergy-feedback or asks Claude to address browser-collected feedback comments from a Synergy preview session. Resolves the active session (via .synergy/active-session, ≤10-min staleness window), processes each open comment, edits the spec via line/col anchors, and PATCHes each comment to resolved or rejected.

  • Sends data out

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-pr, security and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    create-pr

    Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.

    Also in 4 projects that use this

  • 0xSeroSkill

    security

    Also in 3 projects that use this

  • Microsoft AzureSkill

    git-workflow

    Squad branching model: dev-first workflow with insiders preview channel

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 4 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. 0 are common, 11 are distinctive, and 11 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the user passed an argument (e.g.

    line 19
  2. Very specific:

    If lastSeen is within the last 10 minutes (compare to Date.now()), use that session.

    line 22
  3. Very specific:

    If lastSeen is older than 10 minutes, confirm with the user before continuing:

    line 23
  4. Distinctive:

    Wait for a response before proceeding.

    line 25
  5. Very specific:

    If .synergy/active-session does not exist, scan .synergy/feedback/ for session directories that contain at least one .md file with …

    line 26
  6. Distinctive:

    Wait for a selection.

    line 29
  7. Very specific:

    Read every file matching .synergy/feedback/<session>/*.md.

    line 33
  8. Distinctive:

    If the queue is empty, print "No open feedback.

    line 41
  9. Distinctive:

    After all edits are applied, flush every decision in one batch call (prefer the daemon.

    line 71
  10. Very specific:

    Every comment must end as resolved or rejected — never silently skipped.

    line 86
  11. Distinctive:

    If validate is failing, list the errors and fix them before declaring done.

    line 105
  12. Very specific:

    When the user says they are about to review (e.g.

    line 111
  13. Distinctive:

    Run it in the foreground and leave it running.

    line 122
  14. Very specific:

    Never wrap it in nohup, shell &, or a detached process just to keep it alive: if the process's completion cannot resume you, nobody reads …

    line 124
  15. Distinctive:

    If it gets killed or times out anyway, re-running it is always safe — comments persist on disk and queued ones return immediately.

    line 126
  16. Distinctive:

    Empty queue: If step 2 finds zero open comments, print "No open feedback.

    line 142
  17. Very specific:

    Line/col drift: Always try the exact span first.

    line 152
  18. Distinctive:

    Don't silently skip a comment without either resolving or rejecting it.

    line 160
  19. Distinctive:

    Don't delete comment files — resolved and rejected ones stay as audit trail.

    line 161
  20. Very specific:

    Don't use raw markdown links when editing a spec.

    line 162
  21. Very specific:

    Don't run synergy validate before finishing all edits — one pass at the end is enough.

    line 163
  22. Distinctive:

    Don't mark a comment resolved if the edit could not be applied (stale anchor).

    line 164

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

address-feedback

Processes the open-comment queue for a Synergy session. For the rules of editing existing specs (component usage, CrossRef discipline, phase folder layout), see synergy:spec-authoring.

Resolved and rejected comments remain on disk as an audit trail — never delete them.


Steps

1. Resolve the session

  • If the user passed an argument (e.g. /synergy-feedback 2026-05-25-foo), use it as the session slug. Skip the remaining sub-steps.
  • Otherwise, read .synergy/active-session. The file is JSON: { "session": "...", "lastSeen": "..." }.
    • If lastSeen is within the last 10 minutes (compare to Date.now()), use that session.
    • If lastSeen is older than 10 minutes, confirm with the user before continuing:

      "The preview was last active N min ago — use <session> or pick another?" Wait for a response before proceeding.

  • If .synergy/active-session does not exist, scan .synergy/feedback/ for session directories that contain at least one .md file with frontmatter status: open. Present the list:

    "Which session has the feedback you want to address? 1) … 2) …" Wait for a selection.

2. List open comments

  • Read every file matching .synergy/feedback/<session>/*.md.
  • Parse each file's YAML frontmatter. Keep only files where status: open.
  • For each open comment, display:
    • The comment file path (e.g. .synergy/feedback/<session>/2026-05-25T093045-abc123.md).
    • The source anchor: (lineStart:colStart .. lineEnd:colEnd) — coordinates inside .synergy/sessions/<session>/<file>.
    • The context snippet: "<before>**<selected>**<after>" (use bold in Markdown output).
    • The comment body.
  • If the queue is empty, print "No open feedback. Exiting." and stop.

3. Address or reject each comment

For each open comment in order:

Addressing (editing the spec):

a. Determine the target file: .synergy/sessions/<session>/<comment.file>. b. Try line/col first — open the file, navigate to (lineStart:colStart), confirm the text at that span equals anchor.selected. If it matches, apply the edit there. c. If the span text does not match (line/col drift), search the file for the string anchor.before + anchor.selected + anchor.after. If it resolves to a unique match, apply the edit at the matched position. d. If both checks fail, mark the comment as STALE in the final summary and skip it — do not guess. e. Apply the edit using the Edit tool (never write the full file). Follow the synergy:spec-authoring rules for the specific change (prose edit, status flip, etc.). Record the decision (resolved or rejected) in-memory; you will flush all decisions in step 4 as a single batch call.

Rejecting:

a. Decide to reject when the request is out of scope for the current spec, contradicts a hard design decision, or is not actionable. b. Record the rejection decision in-memory (reason required). It will be flushed in step 4. The rejection_reason must be explicit — never silently ignore a comment.

4. After the loop

After all edits are applied, flush every decision in one batch call (prefer the daemon; fall back to per-comment on-disk frontmatter edits when the server is down):

First run node "$CLAUDE_PLUGIN_ROOT/packages/cli/dist/cli.js" preview status --json. If it reports running: true, assign its non-null origin to PREVIEW_ORIGIN below.

curl -sS -X POST "${PREVIEW_ORIGIN}/api/feedback/resolve-batch" \
  -H 'content-type: application/json' \
  -d '{"items":[
        {"id":"<id1>","status":"resolved","resolution":"<what changed>"},
        {"id":"<id2>","status":"rejected","rejection_reason":"<why>"}
      ]}'

Every comment must end as resolved or rejected — never silently skipped. Check the returned results array: any item with ok: false must be retried or its error surfaced.

Then validate to catch any cross-ref breakage introduced by edits (prefer the daemon endpoint; fall back to the CLI when the preview is not running):

# Fast path (daemon running):
curl -sS "${PREVIEW_ORIGIN}/api/validate?session=<session>"

# Fallback (preview not running):
node "$CLAUDE_PLUGIN_ROOT/packages/cli/dist/cli.js" validate <session>

Parse the JSON issues array from the daemon response: any item with severity: "error" must be fixed before declaring done.

Print a concise summary:

Addressed N, rejected M, skipped K (stale anchor). Validate: clean / failing. If validate is failing, list the errors and fix them before declaring done.


Live wait mode

When the user says they are about to review (e.g. /synergy-feedback --wait, "wait for my feedback", "I'll review the spec now"), don't exit on an empty queue — block on the wait command and let the browser wake you:

# Bounded wait (recommended default; keeps a forgotten wait from blocking forever):
node "$CLAUDE_PLUGIN_ROOT/packages/cli/dist/cli.js" feedback wait <session> --for 15m

Execution rules (the wake path is the completion of this command — protect it):

  • Run it in the foreground and leave it running. It streams a heartbeat to stderr and stays silent on stdout until the final JSON; that silence is normal — never kill it.
  • Never wrap it in nohup, shell &, or a detached process just to keep it alive: if the process's completion cannot resume you, nobody reads the feedback.
  • If it gets killed or times out anyway, re-running it is always safe — comments persist on disk and queued ones return immediately.

The final JSON has status, comments, and next_step. Follow next_step:

  • status: "feedback" — process comments through steps 3–4 above (edit specs, flush one resolve-batch, validate), then re-run the wait command to keep listening. The user sees your resolutions live in the preview.
  • status: "ended" — the user clicked Done reviewing. Process any comments in this final batch the same way, print the summary, and do not re-run the wait — the review round is over.
  • status: "timeout" — return to the conversation and say no feedback arrived; re-enter the wait only when the user says they are reviewing again.

Special cases

Empty queue. If step 2 finds zero open comments, print "No open feedback. Exiting." and stop.

Preview server not running. The POST /api/feedback/resolve-batch call will fail with ECONNREFUSED. When this happens, update each comment file's frontmatter directly on disk (they are plain markdown files). Set status: resolved (or rejected), add resolved_at / rejected_at (ISO 8601), and resolution / rejection_reason. This is equivalent to the batch call but bypasses the live server. Note in the summary which method was used. Also use node "$CLAUDE_PLUGIN_ROOT/packages/cli/dist/cli.js" validate <session> instead of the daemon endpoint for the final validation step.

Line/col drift. Always try the exact span first; fall back to the before+selected+after context string. If neither locates a unique, unambiguous match, mark as STALE and skip — do not guess at the intended location.


Don'ts

  • Don't silently skip a comment without either resolving or rejecting it.
  • Don't delete comment files — resolved and rejected ones stay as audit trail.
  • Don't use raw markdown links when editing a spec. Follow synergy:spec-authoring component rules.
  • Don't run synergy validate before finishing all edits — one pass at the end is enough.
  • Don't mark a comment resolved if the edit could not be applied (stale anchor). Mark it STALE.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.