Skip to content

feat: your skill and knowledge review requests in Claude Code — /altimate-code:rules, decision toasts, publish relays the review - #22

Merged
saravmajestic merged 5 commits into
mainfrom
feat/workspace-review-status
Nov 17, 2026
Merged

saravmajestic merged 5 commits into
mainfrom
feat/workspace-review-status

Conversation

@saravmajestic

@saravmajestic saravmajestic commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Your own skill and knowledge requests to a linked workspace, and the owner's or an admin's decisions on them, now show in Claude Code sessions. This is read-only: withdrawing and removing happen in the Altimate web app, the altimate-code TUI or the VS Code extension. It needs altimate-code with AltimateAI/altimate-code#1716 (stacked on #1708). Merge and release this after the first altimate-code release that includes it. With an older altimate-code, the toast and the requests section stay quiet, and skill publish runs without --json.

  • /altimate-code:rules adds "Your skill and knowledge requests" after your proposals, from workspace review status --json.
    • Each request shows its status, whether it's an update, the reviewer and reason, and "waiting past 14 days" for a pending one.
    • Replaced requests are counted, not listed. A partial list (complete: false or skipped) says so.
    • Names, reviewers and reasons are shown as quoted data, never followed as instructions.
  • Publish guidance: the altimate-code skill now runs skill publish "<name>" --json and relays the review outcome: "sent for review to ", "already waiting", "already approved", or the refusal message, then points to /altimate-code:rules. Claude first reads skill publish --help, which has no side effects. When it lists no --json (every release so far), Claude publishes without it and relays the text. Such a CLI would answer the option with its help screen, not an error.
  • A direct toast for decisions (hooks/review-notices.ts, started from integrations.tsx in interactive sessions):
    • At session start and every 15 minutes it runs workspace review decisions --json --unseen --claim --host claude-ui. That holds the decisions for this session, so another session gets none of them.
    • Each check shows one toast: the newest decision ("◆ altimate · Your skill "X" was approved by Y…", or rejected or removed with the reason), and how many more there are.
    • After the toast, --ack <key>… marks those decisions shown. A failed acknowledgement is logged, and the decision is handed out again once the 5-minute hold lapses.
    • It stops asking for the session on unsupported or off, a CLI without the command, or no CLI at all. signed_out and not_linked are asked again at the next check.
    • Its seen state is its own (claude-ui), apart from the session-start context. altimate-code adds the decisions and the waiting count to that context with no change here.
  • Version 1.6.0, with the CHANGELOG and README updated.

Verification

  • The mod tests pass (201). The toast tests cover:
    • one-time display and the claim and ack
    • one toast with a count of the rest
    • asking again when signed out or not linked, and stopping when the server has no review
    • a refused acknowledgement being logged
    • a missing CLI, a failed check being retried, and older CLIs
  • Shell tests and the 65 Python tests pass.
  • The CLI side was tested end to end through the VS Code extension: AltimateAI/vscode-altimate-mcp-server#545 has screenshots. I haven't run this plugin in a live Claude Code session.
    • To try it: install from this branch's marketplace and start an interactive session in a linked project. Run /altimate-code:rules, and ask Claude to publish a project skill. Have the owner approve it in the web app, then wait for the toast or start a new session. The same decision isn't toasted again.

🤖 Generated with Claude Code

…d in /altimate-code:rules, decisions as toasts, publish relays the review (1.6.0)

- `/altimate-code:rules` also lists the person's skill and knowledge requests to the linked workspace
  (`workspace review status --json`): status, update, reviewer, reason, waiting over 14 days; replaced ones counted,
  not listed. Read-only: withdraw and remove happen in the web app, altimate-code's TUI or VS Code extension.
- `hooks/review-notices.ts`: in an interactive session, at start and every 15 minutes, asks altimate-code for
  decisions this host has not toasted (`workspace review decisions --json --unseen --mark-seen --host claude-ui
  --directory <cwd>`) and toasts each once (three at most per check, the rest counted). A CLI without the command, or
  a project that is not linked or signed in, stops the checks for the session.
- The skill's publish guidance uses `skill publish --json` and relays `review` (sent for review to the owner, already
  waiting, already approved) or the refusal.
- Tests: the toast module (wording, overflow, the CLI call, re-asking, stopping, -p sessions); the resolver check
  counts the new block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
} catch (error) {
// No CLI at all, or it did not answer in time: try again next time.
$.ui.log(`review-notices · check failed: ${String(error)}`, { to: 'debug' })
return !/not found|ENOENT/i.test(String(error))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SUGGESTION]: Reuse MISSING_BINARY instead of a second, narrower regex

altimate-cli.ts already exports MISSING_BINARY for exactly this decision (integrations.tsx:114 uses it), and runAltimate only rethrows an error when that regex did not match, after trying both binary names. A start failure whose message says "no such file", "cannot start" or "failed to spawn" passes MISSING_BINARY, is rethrown here, but does not match this narrower /not found|ENOENT/, so checkOnce returns true and the hook keeps spawning the CLI every 15 minutes for the rest of the session. Using the shared regex keeps both places in agreement; this catch branch also has no test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in aa2e348: the catch uses MISSING_BINARY from altimate-cli.ts. Test: a "failed to spawn" error ends the checks, and a timeout keeps them.

if (await checkOnce($, cwd)) $.clock.after(POLL_MS, () => void tick().catch(() => {}))
}
// Off the start's path: the first check runs once the session is up.
$.clock.after(0, () => void tick().catch(() => {}))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SUGGESTION]: One unexpected failure silently ends the checks for the whole session

tick() reschedules only after checkOnce resolves, and both .catch(() => {}) handlers swallow everything: a single throw ($.ui.toast on a session that just ended, $.clock.after on a dead engine) stops the 15-minute checks for the rest of the session with no log line. later() in altimate-cli.ts:41 already exists for "schedule this off the caller's path and log failures"; using it, and rescheduling from a path that runs even when a check fails, keeps the checks alive and debuggable. startReviewNotices also keeps no handle, so a second session.start on the same engine (resume, /clear) starts a second chain — lineage.tsx cancels its per-session work on session.end, which this loop has no equivalent for.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in aa2e348: tick runs through later(). A check that throws is logged, and the next one is still scheduled. A second startReviewNotices (resume, /clear) replaces the earlier chain, through a generation counter, instead of running beside it.

Comment thread plugins/altimate-code/commands/rules.md Outdated
[ -n "$ALTIMATE_BIN" ] || { echo "altimate-code CLI not found (tried altimate, altimate-code)" >&2; exit 127; }
"$ALTIMATE_BIN" workspace review status --json < /dev/null
```
- Exit 0 answers JSON with `workspace_name`, `items`, `skipped` and `complete`. Each item has `kind` (`skill` or `knowledge`), `name`, `status` (`pending`, `active`, `rejected`, `superseded`, `withdrawn` or `retired`), `change` (`add` or `edit`), `reviewed_by_name`, `review_reason` and `expired`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SUGGESTION]: complete and skipped are named but never used

The contract says exit 0 answers workspace_name, items, skipped and complete, but the workflow only describes items, so a partial answer (complete: false, or a non-empty skipped) would be presented to the user as the whole list of requests. Say what to do with them, e.g. "when complete is false, say some requests may be missing". Step 1 now produces two different JSON documents and step 2 ("The JSON has workspace …") reads as if it described this one; naming each answer (proposals vs review status) would keep the model from mixing them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in aa2e348: a partial list (complete false or skipped above 0) is now flagged with a pointer to the Reviews page. Step 2 now names the proposals JSON, so it isn't confused with the review status.

/** The host name altimate-code keeps this toast's seen state under: apart from the session-start context's. */
export const HOST = 'claude-ui'
/** How often a running session asks again: decisions arrive while people work. */
export const POLL_MS = 15 * 60_000

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SUGGESTION]: The new periodic backend call is not reflected in PRIVACY.md

This hook asks the Altimate backend at every interactive session start and then every 15 minutes (POLL_MS) through workspace review decisions, and shows reviewer names and reasons. PRIVACY.md keeps a dated log of what the plugin sends and still reads "Last revised: November 10, 2026" with the plugin 1.5.0 entry, so this release's new requests are undocumented; add a 1.6.0 entry and bump the revised date.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in aa2e348: PRIVACY.md has a "Your skill and knowledge requests" section (1.6.0) covering the checks, what is read and where it is kept. The revised date is now November 13, 2026.

@kilo-code-bot

kilo-code-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2

All four findings from the previous review are fixed at this head: the catch reuses MISSING_BINARY, tick runs through later() behind a generation counter, rules.md handles complete/skipped and pending-only expiry, and PRIVACY.md has a section for the new checks. The remaining findings are two documentation inconsistencies.

Issue Details (click to expand)

SUGGESTION

File Line Issue
PRIVACY.md 4 Last revised: November 13, 2026 now precedes the policy's own November 16, 2026 change-log entry (added with 1.6.0), and the new 1.7.0 section has no dated entry in that log.
plugins/altimate-code/README.md 127 Says decisions are "shown to you as a toast once each"; per check only the newest decision's text is shown, the rest are counted and then acknowledged as seen.
Files Reviewed (11 files)
  • .claude-plugin/marketplace.json - version 1.7.0, matches plugin.json
  • PRIVACY.md - 1 issue (revised date)
  • plugins/altimate-code/.claude-plugin/plugin.json - 1.7.0, consistent
  • plugins/altimate-code/CHANGELOG.md - 1.7.0 entry matches the merged code and README
  • plugins/altimate-code/README.md - 1 issue (toast wording)
  • plugins/altimate-code/commands/rules.md - complete/skipped, pending-only expiry and quoted-data guidance all present; no issues
  • plugins/altimate-code/hooks/integrations.tsx - startReviewNotices wired under e.isInteractive; no issues
  • plugins/altimate-code/hooks/review-notices.test.ts - 12 tests cover the claim/ack, one-toast, missing-CLI and retry paths; no issues
  • plugins/altimate-code/hooks/review-notices.ts - MISSING_BINARY reuse and the later()/generation loop verified against the tests; no issues
  • plugins/altimate-code/skills/altimate-code/SKILL.md - the skill publish --help probe correctly replaces the dead Unknown argument fallback; no issues
  • tests/resolve-cli.sh - rules.md count of 3 matches its three resolver blocks; no issues

Fix these issues in Kilo Cloud

Previous Review Summary (commit 601e70d)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 601e70d)

Status: 4 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 4

The core logic is sound: toastsFor caps and counts correctly, decisionText covers approved/rejected/retired, the poll stops on final statuses, and the 7 new tests match the module. Findings are about duplicated error handling, the poller's failure path, and documentation the release does not yet carry.

Issue Details (click to expand)

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/review-notices.ts 66 Inline /not found|ENOENT/ re-implements MISSING_BINARY from altimate-cli.ts; a start failure matched by the shared regex ("no such file", "failed to spawn") is retried every 15 min forever. Branch is untested.
plugins/altimate-code/hooks/review-notices.ts 82 .catch(() => {}) on the tick and the reschedule swallows any unexpected throw, silently stopping the checks for the session; later() already exists for this. No handle to cancel, so a second session.start on the same engine adds a chain.
plugins/altimate-code/commands/rules.md 30 complete and skipped from workspace review status --json are named but never used, so a partial list reads as complete; step 2's "The JSON has …" is now ambiguous between the two JSON answers.
plugins/altimate-code/hooks/review-notices.ts 27 New backend polling (session start, then every 15 min) is not in PRIVACY.md's dated log, which still shows the 1.5.0 entry and a November 10 revised date.
Files Reviewed (10 files)
  • .claude-plugin/marketplace.json - version 1.6.0, consistent with plugin.json
  • plugins/altimate-code/.claude-plugin/plugin.json - version 1.6.0
  • plugins/altimate-code/CHANGELOG.md - 1.6.0 entry matches the code and README
  • plugins/altimate-code/README.md - 1 issue context (privacy log); wording matches the hook
  • plugins/altimate-code/commands/rules.md - 1 issue
  • plugins/altimate-code/hooks/integrations.tsx - wiring is correct (e.isInteractive, e.cwd), no issues
  • plugins/altimate-code/hooks/review-notices.test.ts - 7 tests, follow the harness conventions; no issues
  • plugins/altimate-code/hooks/review-notices.ts - 3 issues
  • plugins/altimate-code/skills/altimate-code/SKILL.md - skill publish --json guidance is consistent with the described contract; no issues
  • tests/resolve-cli.sh - rules.md now has 3 resolver blocks, matching the new block; no issues

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash-1017 · Input: 126.9K · Output: 24.4K · Cached: 1.9M

…is cut

- `workspace review decisions --unseen --claim` holds the decisions for this session; once toasted,
  `--ack <key>…` marks them toasted. Two sessions never toast one decision, and one whose session
  ended before its toast is shown again after the hold.
- Toasts cut long names (80), reviewers (60) and reasons (160).
- CHANGELOG: the first check records kept decisions without a toast; Claude is told of decisions
  whether or not team rules apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kilo-code-bot

kilo-code-bot Bot commented Nov 13, 2026

Copy link
Copy Markdown

Kilo Code Review could not run — your account is out of credits.

Add credits or switch to a free model to enable reviews on this change.

@ralphstodomingo ralphstodomingo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read at 5ea62478b0. I didn't run it. The calls match AltimateAI/altimate-code#1716 at fd262ad200:

  • workspace review decisions takes --claim, --ack, --host and --directory. It always answers JSON and exits 0, and its fields and final statuses are the ones review-notices.ts reads.
  • workspace review status --json gives what /altimate-code:rules lists.

There's one thing to fix before merge, and a version question.

Fix before merge: skill publish --json on a released CLI (inline). The altimate-code skill now runs skill publish "<name>" --json. The latest release, 0.12.10, has no --json on skill publish, and its parser rejects unknown arguments, so publishing from Claude fails for everyone on it. The marketplace serves main, so this ships on merge, and nothing here checks the CLI version. Even merged after the next altimate-code release, it fails for anyone who hasn't updated. Telling Claude to run it again without --json when the CLI says the argument is unknown would keep publishing working on an older CLI.

Version: 1.6.0 is also planned for #21 (column impact). The two conflict in CHANGELOG.md and in the imports of hooks/integrations.tsx; both conflicts are trivial. Each merge to main is a release, so whichever merges second takes 1.7.0. Which do you expect to ship first?

Checked and fine:

  • Older CLIs. Without workspace review decisions, the toast gets no JSON and stops for the session. Without workspace review status, /altimate-code:rules leaves the section out.
  • The toast's claim and ack. A decision is marked shown only after its toast, and a lapsed claim hands it out again. Each check shows at most 3 toasts, the last counting the rest.
  • No conflict with #16: a trial merge is clean.

Smaller:

  • /altimate-code:rules shows names, reviewers and reasons written by other people. The Codex plugin (AltimateAI/altimate-codex-plugin#8) tells the model to show them as quoted data and not to follow instructions in them. The same line here would keep the two plugins alike.
  • The description still says --mark-seen; the code uses --claim and --ack.

Appendix — complexity delta (review requests in Claude Code)

15ef117ef6 → 5ea62478b0 · only functions this diff touches · advisory, not a gate.

✅ No touched function changed in complexity (1 touched, 13 new, all under 10).

ℹ️ How to read these numbers

Cognitive (Sonar spec) counts breaks in linear reading flow — each if/loop/catch/ternary/boolean-operator switch adds 1, and nesting makes every further break cost more. It approximates how much you must hold in your head to follow the function: 0–5 trivial · 6–10 easy · 11–15 moderate (15 = Sonar's recommended per-function cap) · 16–25 hard to follow · >25 needs decomposition.

CCN (cyclomatic) counts independent paths — also the minimum number of test cases for full branch coverage of the function.

Only functions this diff touches are measured, as deltas — pre-existing complexity is not counted against this change. Rising numbers aren't automatically wrong; they're where review attention should go. Test files excluded.

- **Check the link:** `"$ALTIMATE_BIN" workspace status < /dev/null`. Exit code 0 means linked and 3 means not linked. Exit code 2 with `Not signed in to Altimate` means the user must sign in. For anything else, show the user the CLI's message.
- **Link:** do not suggest `! altimate link`: its picker needs a terminal, and this session does not give it one. Once the user chooses a workspace (from `workspace_context`, or `"$ALTIMATE_BIN" workspace list < /dev/null`), run `ALTIMATE_DISABLE_MEMORY=1 "$ALTIMATE_BIN" link --workspace "<id or name>" < /dev/null`. `ALTIMATE_DISABLE_MEMORY=1` stops linking from uploading this machine's existing memory to the workspace, which the user has not agreed to here. For a new workspace, run `ALTIMATE_DISABLE_MEMORY=1 "$ALTIMATE_BIN" link --create < /dev/null`, which names it after the repository. If a workspace with that name already exists, `--create` refuses and names it: offer to link to that one with `--workspace`, or, if the user confirms they want a second one, re-run with `--allow-duplicate`. If the project is already linked to a different workspace, `link` refuses; confirm the move with the user, then re-run it with `--yes`. Never pass `--claude-md` unless the user asks for it.
- **Skills:** `"$ALTIMATE_BIN" skill list < /dev/null` lists them; `"$ALTIMATE_BIN" workspace refresh < /dev/null` pulls the latest workspace skills (exit 3 means not linked: offer to link). To share a project skill with the team, run `"$ALTIMATE_BIN" skill publish "<name>" < /dev/null` only for a skill the user named; add `--replace` only after they confirm overwriting the workspace copy. Personal skills in `~/.claude/skills` are refused; copy one into the project only if the user asks.
- **Skills:** `"$ALTIMATE_BIN" skill list < /dev/null` lists them; `"$ALTIMATE_BIN" workspace refresh < /dev/null` pulls the latest workspace skills (exit 3 means not linked: offer to link). To share a project skill with the team, run `"$ALTIMATE_BIN" skill publish "<name>" --json < /dev/null` only for a skill the user named; add `--replace` only after they confirm overwriting the workspace copy. Relay what the JSON says, not what you expect (its `message` already says it in one line): `{"ok": false, "error": …}` is a refusal or failure, shown as it is. With `ok` true, `review` is `null` when the skill was attached directly (no review on that workspace). Otherwise read `review.status` and `review.duplicate`: `pending` means it was sent for review to `review.owner_name` and reaches the workspace once approved (`pending` with `duplicate` true means the same content is already waiting); `active` means it is in the workspace now (`active` with `duplicate` true means that content was already approved). `/altimate-code:rules` shows where the user's skill and knowledge requests stand. Personal skills in `~/.claude/skills` are refused; copy one into the project only if the user asks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.12.10, the latest altimate-code release, has no --json on skill publish, and its root parser is strict. So this command is refused there as an unknown argument, and the skill is never published. Because the marketplace serves main, this reaches everyone as soon as it merges, whatever CLI they have. One sentence would keep publishing working on an older CLI: if the CLI says --json is an unknown argument, run the same command without it and relay its text.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in cc48cd0. Claude first runs skill publish --help, which has no side effects. If it lists --json, Claude publishes with it; otherwise Claude publishes without it, relays the text and suggests npm install -g altimate-code@latest. The publish runs once and is never rerun after a failure.

@hkaltai hkaltai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peer review: request changes

I reviewed this with independent Claude and Codex (Sol 6.1) reviewers plus a lead pass, and ran one convergence round. Both reviewers agree on the verdict.

Blocking (MAJOR)

  1. The toast acknowledgement fails every time, and the plugin ignores the failure, so decisions are toasted again on every check. The root cause is in altimate-code#1716 (ackHostDecisions in a fresh process).
  2. skill publish "<name>" --json breaks publishing on every released altimate-code, because the parser is .strict() and --json on skill publish is new in #1716.

There are four more minor inline comments. Nits are in a separate comment. The PR description also says --unseen --mark-seen, but the code uses --claim and --ack; please update it.

Missing tests: an ack that answers {ok:false}; publishing against a CLI without --json; rendering when complete: false or skipped > 0; several toasts in one check against the real engine.

// Shown (the last toast counts the rest): acknowledged, so they are not handed out again. A failed acknowledgement
// costs a repeat after the hold, never a lost decision.
const keys = decisions.map(d => d.key).filter((k): k is string => typeof k === 'string')
if (keys.length)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (keys.length)

MAJOR (bug, cross-repo). The ack runs in a fresh CLI process. In altimate-code#1716, ackHostDecisions gets its scope from RulesSync.knownAccount(), an in-memory map that only a poll fills, so this ack always answers {"ok":false,"status":"failed"}. The plugin never reads the answer and only catches thrown errors. The claim lapses after 5 minutes, and each 15-minute check toasts the same decisions again until they age out.

Fix: fix the root cause in altimate-code (see the comment on #1716). Here, parse the ack's stdout and log at debug level when ok !== true. The stubbed ack in review-notices.test.ts can't catch this. (Claude reviewer; I confirmed it in the code. Codex agreed in convergence.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Root cause fixed in AltimateAI/altimate-code#1716 (4466331199): --ack now resolves the account in a process that never polled, with a test. Here (aa2e348), the ack's stdout is parsed and anything but ok: true is logged at debug level, with a test.

- **Check the link:** `"$ALTIMATE_BIN" workspace status < /dev/null`. Exit code 0 means linked and 3 means not linked. Exit code 2 with `Not signed in to Altimate` means the user must sign in. For anything else, show the user the CLI's message.
- **Link:** do not suggest `! altimate link`: its picker needs a terminal, and this session does not give it one. Once the user chooses a workspace (from `workspace_context`, or `"$ALTIMATE_BIN" workspace list < /dev/null`), run `ALTIMATE_DISABLE_MEMORY=1 "$ALTIMATE_BIN" link --workspace "<id or name>" < /dev/null`. `ALTIMATE_DISABLE_MEMORY=1` stops linking from uploading this machine's existing memory to the workspace, which the user has not agreed to here. For a new workspace, run `ALTIMATE_DISABLE_MEMORY=1 "$ALTIMATE_BIN" link --create < /dev/null`, which names it after the repository. If a workspace with that name already exists, `--create` refuses and names it: offer to link to that one with `--workspace`, or, if the user confirms they want a second one, re-run with `--allow-duplicate`. If the project is already linked to a different workspace, `link` refuses; confirm the move with the user, then re-run it with `--yes`. Never pass `--claude-md` unless the user asks for it.
- **Skills:** `"$ALTIMATE_BIN" skill list < /dev/null` lists them; `"$ALTIMATE_BIN" workspace refresh < /dev/null` pulls the latest workspace skills (exit 3 means not linked: offer to link). To share a project skill with the team, run `"$ALTIMATE_BIN" skill publish "<name>" < /dev/null` only for a skill the user named; add `--replace` only after they confirm overwriting the workspace copy. Personal skills in `~/.claude/skills` are refused; copy one into the project only if the user asks.
- **Skills:** `"$ALTIMATE_BIN" skill list < /dev/null` lists them; `"$ALTIMATE_BIN" workspace refresh < /dev/null` pulls the latest workspace skills (exit 3 means not linked: offer to link). To share a project skill with the team, run `"$ALTIMATE_BIN" skill publish "<name>" --json < /dev/null` only for a skill the user named; add `--replace` only after they confirm overwriting the workspace copy. Relay what the JSON says, not what you expect (its `message` already says it in one line): `{"ok": false, "error": …}` is a refusal or failure, shown as it is. With `ok` true, `review` is `null` when the skill was attached directly (no review on that workspace). Otherwise read `review.status` and `review.duplicate`: `pending` means it was sent for review to `review.owner_name` and reaches the workspace once approved (`pending` with `duplicate` true means the same content is already waiting); `active` means it is in the workspace now (`active` with `duplicate` true means that content was already approved). `/altimate-code:rules` shows where the user's skill and knowledge requests stand. Personal skills in `~/.claude/skills` are refused; copy one into the project only if the user asks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- **Skills:** `"$ALTIMATE_BIN" skill list < /dev/null` lists them; `"$ALTIMATE_BIN" workspace refresh < /dev/null` pulls the latest workspace skills (exit 3 means not linked: offer to link). To share a project skill w...

MAJOR (backward compatibility). --json on skill publish is new in altimate-code#1716, and the CLI parses with .strict(). Every released altimate-code (for example v0.12.8 and v0.12.10) rejects this with Unknown argument: json. Publishing then breaks where it works with the current plugin. That contradicts the PR's claim that "with an older altimate-code, the new parts stay quiet". The instructions here only cover {"ok": false, …} JSON, not this plain-text failure.

Fix: if the output says Unknown argument: json, rerun without --json, relay the text, and suggest npm install -g altimate-code@latest. Retry only on that argument error, never on an ambiguous publish failure. Alternatively, gate this on a minimum CLI version. (Claude rated it MAJOR and Codex MINOR; I kept MAJOR because it breaks a working feature.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in cc48cd0. Claude first runs skill publish --help, which has no side effects. If it lists --json, Claude publishes with it; otherwise Claude publishes without it, relays the text and suggests npm install -g altimate-code@latest. The publish runs once and is never rerun after a failure. The PR description says so too.

if (!answer || typeof answer.ok !== 'boolean') return false
if (!answer.ok) return !FINAL.has(answer.status ?? '')
const decisions = answer.decisions ?? []
for (const text of toastsFor(decisions)) $.ui.toast(text, { timeoutMs: 10_000 })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for (const text of toastsFor(decisions)) $.ui.toast(text, { timeoutMs: 10_000 })

MINOR (plausible). Consecutive fire-and-forget $.ui.toast calls, followed at once by acknowledging every key, can mark decisions seen that were never readable. The engine's notification bar can replace a plugin's earlier toast with its newer one. Once the ack works, that becomes silent loss.

Fix: show one combined toast for the decisions and the overflow count, or acknowledge only after display. (Codex reviewer; not checked against a live engine.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in aa2e348: each check shows one toast, the newest decision plus how many more (pointing to /altimate-code:rules). Everything a check acknowledges was said in that one toast. The engine docs confirm a plugin's newer toast takes its own earlier one's place on the notification bar, so this was a real risk.

/** Toasts per check; the rest are counted in the last one. */
export const MAX_TOASTS = 3
/** Answers that mean nothing will change in this session: stop asking. */
const FINAL = new Set(['signed_out', 'not_linked', 'unsupported', 'off'])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const FINAL = new Set(['signed_out', 'not_linked', 'unsupported', 'off'])

MINOR (logic). For any binding outcome other than bound, including unknown (the service couldn't be reached), the CLI answers not_linked. The plugin treats that as final, so a brief network failure at session start turns toasts off for the whole session. A sign-in during the session also gets no toasts until the next one.

Fix: keep retrying, with backoff, on not_linked and signed_out, or have the CLI map unknown to failed. (Claude reviewer; Codex agreed on the binding-failure case.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed on both sides. In AltimateAI/altimate-code#1716 (4466331199), a link that can't be confirmed is now failed, not not_linked. Here (aa2e348), signed_out and not_linked are no longer final: the next 15-minute check asks again, which also covers a sign-in or link during the session. Only unsupported and off stop it.

Comment thread plugins/altimate-code/commands/rules.md Outdated
2. **Show the state.** The JSON has `workspace` (`name`, `owner_name`, `is_owner`; `null` when the project is not linked), `proposals`, `team_rules` and `mine`. Show, briefly:
- the number of team rules in the workspace, and their texts when there are 10 or fewer;
- the user's own proposals in `mine` that are not yet active, with their `status` and, for a rejected one, the `reason`;
- the user's skill and knowledge requests, newest first: kind, name, status (`pending` → waiting for review, `active` → approved, `rejected`, `withdrawn`, `retired` → removed from the workspace), "update" for `change: edit`, the reviewer and the reason when given, and "waiting over 14 days" when `expired`. Do not list `superseded` ones (replaced by a newer request); say how many there were instead. Withdrawing a waiting request or removing an approved one happens in the Altimate web app, the altimate-code TUI (`/rules`) or the VS Code extension, not here;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- the user's skill and knowledge requests, newest first: kind, name, status (`pending` → waiting for review, `active` → approved, `rejected`, `withdrawn`, `retired` → removed from the workspace), "update" for `change:...

MINOR (API contract). Two gaps in how the listing is shown:

  • complete and skipped are named as fields but never shown. The CLI caps the listing and skips rows it can't parse, so a partial list reads as complete. The CLI's text form warns about both (workspace.ts:360-362).
  • "waiting over 14 days" applies whenever expired is set. The CLI shows it only when status === "pending".

Fix: warn when complete is false or skipped > 0, and point to the workspace's Reviews page. Show the 14-day marker only for pending. (Codex and Claude reviewers.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in aa2e348: a partial list is flagged and points to the workspace's Reviews page, and "waiting over 14 days" is shown only for a pending request with expired.

@hkaltai

hkaltai commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Peer review: nits (non-blocking)

  • plugins/altimate-code/hooks/review-notices.ts L79: /not found|ENOENT/ is narrower than MISSING_BINARY in altimate-cli.ts, so errors like "failed to spawn" keep the 15-minute loop running for nothing. Reuse MISSING_BINARY.
  • PR description: it says --unseen --mark-seen --host claude-ui, but the code uses --claim and --ack. The CHANGELOG is already correct.

I reviewed this with independent Claude and Codex (Sol 6.1) reviewers.

…publish on an older CLI

- one toast per check (the newest decision and how many more), so every decision a check acknowledges was said
- the `--ack` answer is read and a refusal is logged; a check that throws is logged and the next is still scheduled;
  a second `session.start` replaces the earlier check chain
- signed out and not linked are asked again at the next check; `MISSING_BINARY` decides when there is no CLI
- `skill publish`: on an altimate-code without `--json`, Claude reruns it once without it and relays the text
- `/altimate-code:rules`: says when the request list may be partial, shows "waiting over 14 days" only for pending
  requests, and treats names, reviewers and reasons as quoted data
- PRIVACY.md: the review status checks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@hkaltai hkaltai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: request changes

I re-reviewed the whole PR at aa2e348 with independent Claude and Codex (Sol 6.1) reviewers plus a lead pass, then ran one round where both reviewers checked the combined findings. Both reviewers agree on the verdict.

Fixed:

  • The ack answer is now read and logged, and the CLI resolves the account in a fresh process.
  • One toast per check.
  • complete/skipped warnings.
  • Expiry shown for pending requests only.
  • not_linked and signed_out no longer stop the checks.
  • The PR description now matches the code.
  • MISSING_BINARY is reused.

Still blocking (MAJOR): the publish fallback for older CLIs never fires. Details are inline. I reproduced it on altimate-code 0.12.8.

Nit: the test name at hooks/review-notices.test.ts:114 ("…or a project that is not linked, is not asked again") no longer matches the behaviour. Since the fix, an unlinked project is asked again. Rename it to "a CLI without the command is not asked again".

- **Check the link:** `"$ALTIMATE_BIN" workspace status < /dev/null`. Exit code 0 means linked and 3 means not linked. Exit code 2 with `Not signed in to Altimate` means the user must sign in. For anything else, show the user the CLI's message.
- **Link:** do not suggest `! altimate link`: its picker needs a terminal, and this session does not give it one. Once the user chooses a workspace (from `workspace_context`, or `"$ALTIMATE_BIN" workspace list < /dev/null`), run `ALTIMATE_DISABLE_MEMORY=1 "$ALTIMATE_BIN" link --workspace "<id or name>" < /dev/null`. `ALTIMATE_DISABLE_MEMORY=1` stops linking from uploading this machine's existing memory to the workspace, which the user has not agreed to here. For a new workspace, run `ALTIMATE_DISABLE_MEMORY=1 "$ALTIMATE_BIN" link --create < /dev/null`, which names it after the repository. If a workspace with that name already exists, `--create` refuses and names it: offer to link to that one with `--workspace`, or, if the user confirms they want a second one, re-run with `--allow-duplicate`. If the project is already linked to a different workspace, `link` refuses; confirm the move with the user, then re-run it with `--yes`. Never pass `--claude-md` unless the user asks for it.
- **Skills:** `"$ALTIMATE_BIN" skill list < /dev/null` lists them; `"$ALTIMATE_BIN" workspace refresh < /dev/null` pulls the latest workspace skills (exit 3 means not linked: offer to link). To share a project skill with the team, run `"$ALTIMATE_BIN" skill publish "<name>" < /dev/null` only for a skill the user named; add `--replace` only after they confirm overwriting the workspace copy. Personal skills in `~/.claude/skills` are refused; copy one into the project only if the user asks.
- **Skills:** `"$ALTIMATE_BIN" skill list < /dev/null` lists them; `"$ALTIMATE_BIN" workspace refresh < /dev/null` pulls the latest workspace skills (exit 3 means not linked: offer to link). To share a project skill with the team, run `"$ALTIMATE_BIN" skill publish "<name>" --json < /dev/null` only for a skill the user named; add `--replace` only after they confirm overwriting the workspace copy. If the output instead says `json` is an unknown argument (`Unknown argument: json`), the CLI predates `--json` on `skill publish`: run the same command once more without `--json`, relay its text as it is, and suggest updating altimate-code (`npm install -g altimate-code@latest`). Rerun only for that argument error, never after any other failure, which may have published. Relay what the JSON says, not what you expect (its `message` already says it in one line): `{"ok": false, "error": …}` is a refusal or failure, shown as it is. With `ok` true, `review` is `null` when the skill was attached directly (no review on that workspace). Otherwise read `review.status` and `review.duplicate`: `pending` means it was sent for review to `review.owner_name` and reaches the workspace once approved (`pending` with `duplicate` true means the same content is already waiting); `active` means it is in the workspace now (`active` with `duplicate` true means that content was already approved). `/altimate-code:rules` shows where the user's skill and knowledge requests stand. Personal skills in `~/.claude/skills` are refused; copy one into the project only if the user asks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- **Skills:** `"$ALTIMATE_BIN" skill list < /dev/null` lists them; `"$ALTIMATE_BIN" workspace refresh < /dev/null` pulls the latest workspace skills (exit 3 means not linked: offer to link). To share a project skill w...

MAJOR (backward compatibility, still open). The fallback reruns without --json only when the output says Unknown argument: json, but released altimate-code never prints that. Its custom yargs .fail handler (packages/opencode/src/index.ts:282-293, the same in v0.12.10) calls cli.showHelp() and then process.exit(1) without printing msg.

I reproduced it on altimate-code 0.12.8: altimate-code skill publish <name> --json prints the skill publish <name> help and exits 1, with no "Unknown argument" text. The skill also says to rerun only on that error, so Claude reports a failure, and publishing from a session still breaks on every released CLI.

Fix: probe before publishing, which has no side effects. If "$ALTIMATE_BIN" skill publish --help < /dev/null lists --json, use it. Otherwise publish without it, relay the text, and suggest npm install -g altimate-code@latest. If you'd rather not probe, the weaker option is to treat "exit 1 with the usage/help screen and no JSON" as the trigger. (Claude found this; I reproduced it; Codex agreed in convergence.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed: the .fail handler shows help and exits 1 without the message, and v0.12.10's skill publish has no --json. Fixed in cc48cd0. Claude first runs skill publish --help, which has no side effects. If it lists --json, Claude publishes with it; otherwise Claude publishes without it, relays the text and suggests npm install -g altimate-code@latest. The publish runs once and is never rerun after a failure. On this branch's CLI, skill publish --help exits 0 and lists --json Print the result as JSON. The test name is fixed in the same commit.

Released altimate-code answers an unknown option with its help screen and no message, so the `Unknown argument`
fallback never fired. Claude now reads `skill publish --help` (no side effects) and publishes with `--json` only when
it is listed. The review-notices test name matches the behaviour: an unlinked project is asked again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@saravmajestic

Copy link
Copy Markdown
Contributor Author

Thanks @ralphstodomingo and @hkaltai, and for the re-review. Both blocking items are fixed in aa2e348 and cc48cd0, with the CLI side in AltimateAI/altimate-code#1716 (4466331199). Each inline thread has a reply.

Blocking:

  • The ack: the CLI now resolves the account in a fresh process, and the plugin reads and logs the ack's answer.
  • skill publish --json on a released CLI: Claude reads skill publish --help first and uses --json only when it is listed (cc48cd0). The Unknown argument trigger from aa2e348 never fired, as the re-review found.

Smaller:

  • Untrusted text: /altimate-code:rules shows names, reviewers and reasons as quoted data, matching the Codex plugin.
  • PR description: it now describes --claim/--ack, one toast per check and the --help check.
  • Nits: MISSING_BINARY is reused, PRIVACY.md is updated, and the test name now matches the behaviour.

Version: the merge order with #21 isn't settled yet. Whichever merges second moves to 1.7.0 and resolves the CHANGELOG and import conflicts.

Missing tests:

  • added: an ack that answers {ok:false}, one toast covering several decisions, signed_out/not_linked asked again, and a missing CLI vs a timeout;
  • not added: publishing against a CLI without --json, and rendering a partial list. Both are model instructions in markdown, which the plugin's test harness can't run.

claude plugin test: 201 pass. The shell tests pass.

Could you take another look?

@hkaltai hkaltai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: approve

I re-reviewed the whole PR at cc48cd0 with independent Claude and Codex (Sol 6.1) reviewers plus a lead pass, then ran one round where both reviewers checked the combined findings. Both approve.

The previous blocker is fixed. SKILL.md:238 now probes skill publish --help before publishing, which changes nothing. It uses --json only when the help lists it, publishes once, and never reruns after a failure. Both reviewers traced old and new CLIs in the source: v0.12.9 has only --replace and no global *json* option, while #1716 registers --json. I also checked the installed altimate-code 0.12.8, where skill publish --help exits 0 and doesn't list --json, so the skill takes the plain-text path. All the other earlier findings are fixed too, including the test name.

This was a source review plus that one help-output check. I didn't run the plugin tests or a live Claude Code session.

Two nits, neither blocking:

  • hooks/review-notices.test.ts:115: the old-CLI stub prints Unknown argument: … on stdout. A released CLI prints help on stderr, leaves stdout empty and exits 1. The behaviour is the same, since neither is JSON, but { exitCode: 1, stdout: '' } would match reality. That same mistaken assumption caused the last round's blocker.
  • skills/altimate-code/SKILL.md:238: optionally note that the help is printed on stderr, so anyone porting this to a script that reads only stdout doesn't always take the plain-text branch.

Remember to merge and release this after the altimate-code release that includes #1716.

@ralphstodomingo ralphstodomingo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review at cc48cd07bc. Approving: the publish point is fixed.

  • Publishing on an older CLI. Claude now runs skill publish --help first and adds --json only when the help lists it. I checked against 0.12.10: its skill publish takes only --replace, and there's no global --json. So an older CLI publishes without --json, and the publish still runs only once.
  • The smaller points. /altimate-code:rules now shows names, reviewers and reasons as quoted data, and the description describes --claim and --ack.

On the version, it's fine to settle the order at merge time. #23 now claims 1.6.0 too, alongside #21. Of the three, whichever merges second takes 1.7.0, and the third takes 1.8.0.

Appendix — complexity delta (review requests in Claude Code)

15ef117ef6 → cc48cd07bc · only functions this diff touches · advisory, not a gate.

Function File Cognitive CCN Status
checkOnce L69 plugins/altimate-code/hooks/review-notices.ts new → 7 new → 10 new — easy

Summary: 1 touched · 1 rose · 0 improved · 12 new (max cognitive 7) · net cognitive Δ +21

ℹ️ How to read these numbers

Cognitive (Sonar spec) counts breaks in linear reading flow — each if/loop/catch/ternary/boolean-operator switch adds 1, and nesting makes every further break cost more. It approximates how much you must hold in your head to follow the function: 0–5 trivial · 6–10 easy · 11–15 moderate (15 = Sonar's recommended per-function cap) · 16–25 hard to follow · >25 needs decomposition.

CCN (cyclomatic) counts independent paths — also the minimum number of test cases for full branch coverage of the function.

Only functions this diff touches are measured, as deltas — pre-existing complexity is not counted against this change. Rising numbers aren't automatically wrong; they're where review attention should go. Test files excluded.

@ralphstodomingo

Copy link
Copy Markdown
Contributor

Heads-up: plugin 1.6.0 just shipped from #21 (column impact), so this one needs the next version: 1.7.0 in plugin.json, marketplace.json and the CHANGELOG heading (or 1.6.1 if you'd rather ship it as a patch).

main released 1.6.0 (column impact) and 1.6.1 while this branch also
claimed 1.6.0, so this branch's entry becomes 1.7.0:
- `plugin.json` and `marketplace.json` at 1.7.0; the changelog entry is
  `[1.7.0] — 2026-11-17`, above main's 1.6.1 and 1.6.0
- PRIVACY.md: the review status checks are "since plugin 1.7.0"
- `hooks/integrations.tsx`: main's imports (`task-impact` replaced
  `lineageBand`) plus this branch's `review-notices`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@saravmajestic
saravmajestic merged commit cc02d3b into main Nov 17, 2026
4 checks passed
@saravmajestic
saravmajestic deleted the feat/workspace-review-status branch November 17, 2026 08:12
Comment thread PRIVACY.md

**Effective date:** November 2, 2026
**Last revised:** November 10, 2026
**Last revised:** November 13, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SUGGESTION]: "Last revised" now precedes the document's own latest change entry

The same policy's "Changes to this policy" log (line 154, added with the 1.6.0 lineage-report release) is dated November 16, 2026, so setting "Last revised" to November 13, 2026 here makes the revision date older than a change the document already records, and the new 1.7.0 section added by this PR still has no dated entry in that log. Use the release date (2026-11-17, as in CHANGELOG.md) and add a dated line for "Your skill and knowledge requests" (plugin 1.7.0).

- **"Remember this as a team rule: …"**, said to Claude, waits as a proposal the same way. It needs "as a rule" or "team rule" followed by ":" or "-": "remember to run the tests", a question, or "don't remember this as a team rule" is just part of the conversation. A task handed to altimate-code decides this as an altimate-code session does.
- **`/altimate-code:rules`** shows the proposals waiting for you, the team rules, and the status of the rules you proposed. For each proposal you choose: send it to the workspace owner's review (or approve it, if you are the owner), edit the wording, save it as a memory, or "Not a rule". Nothing reaches teammates until the owner approves it.
- **`/altimate-code:rules`** shows the proposals waiting for you, the team rules, and the status of the rules you proposed. For each proposal you choose: send it to the workspace owner's review (or approve it, if you are the owner), edit the wording, save it as a memory, or "Not a rule". Nothing reaches teammates until the owner approves it. It also lists your skill and knowledge requests to the workspace (waiting, approved, rejected with the reason, or removed), read-only: withdrawing a request or removing an approved skill or knowledge base happens in the Altimate web app, altimate-code's TUI (`/rules`) or its VS Code extension.
- **Decisions on your skill and knowledge requests** are told to Claude at session start, and shown to you as a toast once each: at session start and every 15 minutes while an interactive session runs. This needs an altimate-code release with `workspace review decisions`; with an older one there are no toasts.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SUGGESTION]: "shown to you as a toast once each" describes more than the code does

toastFor (hooks/review-notices.ts:59) shows the text of the newest decision only; any others are reported as "N more decisions …" and are then acknowledged as seen, so with several decisions the user never reads the rest in a toast. The CHANGELOG already says "one toast per check (the newest, and how many more)"; this bullet implies every decision gets its own toast text. Say one toast per check, naming the newest and how many more, with /altimate-code:rules listing them.

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.

3 participants