Skip to content

chore(update-stack): rework skill as 2-phase ISO merge, remove stack-maintainer agent#3177

Merged
PierreBrisorgueil merged 6 commits intomasterfrom
chore/rework-update-stack-skill
Mar 2, 2026
Merged

chore(update-stack): rework skill as 2-phase ISO merge, remove stack-maintainer agent#3177
PierreBrisorgueil merged 6 commits intomasterfrom
chore/rework-update-stack-skill

Conversation

@PierreBrisorgueil
Copy link
Contributor

@PierreBrisorgueil PierreBrisorgueil commented Mar 2, 2026

Summary

Scope

  • Modules impacted: .claude/skills/update-stack, .claude/agents (deleted), CLAUDE.md
  • Cross-module impact: none
  • Risk level: low

Validation

  • npm run lint
  • npm test
  • Manual checks done (if applicable)

Guardrails check

  • No secrets or credentials introduced
  • No risky rename/move of core stack paths
  • Changes remain merge-friendly for downstream projects
  • Tests added or updated when behavior changed

Notes for reviewers

  • Documentation/skill files only — no source code touched
  • Agent deletion is intentional: CLAUDE.md always-on guardrails already enforce mergeability, security, and modularity

Summary by CodeRabbit

  • Documentation
    • Reworked the stack update workflow into a two-phase process: ISO-style merge then project alignment.
    • Added explicit conflict-resolution guidance with per-file handling and staged merge/verify steps.
    • Updated verification docs to include a pre-check scan and a final summary with clear pass/fail outcomes.
    • Removed the Stack Maintainer agent documentation and embedded-agent references.

…-maintainer agent

- Phase 1: ISO merge with explicit --theirs rules for stack modules and lib
- Phase 2: project alignment via MIGRATION.md + tasks reference module
- Remove stack-maintainer agent (guardrails covered by CLAUDE.md + skill)
- Update CLAUDE.md: remove agent reference
@PierreBrisorgueil PierreBrisorgueil added the Chore release label Mar 2, 2026
@PierreBrisorgueil PierreBrisorgueil self-assigned this Mar 2, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

Warning

Rate limit exceeded

@PierreBrisorgueil has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between de99687 and c829306.

📒 Files selected for processing (1)
  • .claude/skills/update-stack/SKILL.md
📝 Walkthrough

Walkthrough

Removes the Stack Maintainer Agent docs and refactors the update-stack skill into a two‑phase ISO-merge + project-alignment workflow, updating CLAUDE.md to drop the embedded agent reference and reflect only embedded settings and skills. (45 words)

Changes

Cohort / File(s) Summary
Agent documentation removal
​.claude/agents/stack-maintainer.md
Deleted agent documentation that described responsibilities, invocation workflow, and review guidelines.
Update-stack skill restructuring
​.claude/skills/update-stack/SKILL.md
Reworked single-phase workflow into two phases: Phase 1 (ISO merge with explicit per-file conflict rules, guarded remote setup, and conflict-resolution rules) and Phase 2 (project alignment using MIGRATION.md, drift-fix rules, and a /verify validation step).
Verify skill adjustment
​.claude/skills/verify/SKILL.md
Inserted a pre-check scanning step for ERRORS.md patterns and added a final summary step with explicit pass/fail outcomes.
Agent reference cleanup
CLAUDE.md
Removed the Embedded agent section and stack-maintainer entry; updated .claude/ folder description to mention only embedded settings and skills.

Sequence Diagram(s)

sequenceDiagram
  participant Maintainer
  participant LocalRepo as "Local Repo"
  participant Upstream
  participant Verifier

  rect rgba(200,230,255,0.5)
    Maintainer->>LocalRepo: start Phase 1 (ISO merge)
    LocalRepo->>Upstream: fetch guarded remote + merge (--theirs rules)
    Upstream-->>LocalRepo: upstream files
    LocalRepo->>LocalRepo: apply per-file conflict rules (stack files vs downstream)
    LocalRepo-->>Maintainer: merge result (zero-downstream logic)
  end

  rect rgba(200,255,200,0.5)
    Maintainer->>LocalRepo: start Phase 2 (project alignment)
    LocalRepo->>LocalRepo: apply MIGRATION.md and drift fixes
    LocalRepo->>Verifier: run /verify (pre-checks, lint, tests, final summary)
    Verifier-->>Maintainer: verification report
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 I hopped through docs to tidy the lair,
Shelved the old agent with meticulous care.
Two-phase merge now hums, neat and bright,
Drift chased away, migrations set right.
A crunchy carrot for every cleared fight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main changes: rewriting the update-stack skill as a 2-phase ISO merge workflow and removing the stack-maintainer agent.
Description check ✅ Passed The description covers all required sections: summary of changes and rationale, scope with modules impacted and risk level, validation with completed checks, and guardrails confirmation. Notes for reviewers clarify the documentation-only nature.
Linked Issues check ✅ Passed The PR fully implements the objectives from #3176: rewrites update-stack skill as a 2-phase workflow (ISO merge and project alignment) and removes the redundant stack-maintainer agent.
Out of Scope Changes check ✅ Passed All changes are in-scope: modifications to update-stack SKILL.md and verify SKILL.md directly address the 2-phase workflow restructuring, and deletion of stack-maintainer agent aligns with #3176 requirements. CLAUDE.md updates remove redundant agent references.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/rework-update-stack-skill

Comment @coderabbitai help to get the list of available commands and usage tips.

@PierreBrisorgueil PierreBrisorgueil marked this pull request as ready for review March 2, 2026 16:06
Copilot AI review requested due to automatic review settings March 2, 2026 16:06
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.claude/skills/update-stack/SKILL.md (1)

28-28: Use an unambiguous module path pattern in the conflict rule.

Line 28’s modules/home\|auth\|users\|tasks\|uploads is easy to misread and may match unintended paths when applied manually. Prefer explicit paths or grouped form like modules/(home|auth|users|tasks|uploads).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/update-stack/SKILL.md at line 28, The conflict-rule path
pattern `modules/home\|auth\|users\|tasks\|uploads` is ambiguous; update the
SKILL.md entry replacing that string with an explicit grouped form like
`modules/(home|auth|users|tasks|uploads)` (or list each full path) so the rule
is unambiguous when applied manually—locate the exact pattern text in the table
row and replace it with the grouped or explicit paths.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/skills/update-stack/SKILL.md:
- Line 14: The doc claims `config/defaults/` is stack core but also requires
`config/defaults/<project>.js` to be kept `--ours`, creating a contradiction
that can break Phase 1 merges; update SKILL.md to clearly state ownership: mark
the directory `config/defaults/` as stack core except for per-downstream
override files `config/defaults/<project>.js` which should be treated as
downstream-owned and resolved `--ours` during merges; specifically edit the line
referencing `Stack core: config/defaults/` and the line about
`config/defaults/<project>.js` so they consistently declare that the directory
is core while individual `<project>.js` files are downstream overrides and must
be preserved `--ours` to avoid merge conflicts.

---

Nitpick comments:
In @.claude/skills/update-stack/SKILL.md:
- Line 28: The conflict-rule path pattern
`modules/home\|auth\|users\|tasks\|uploads` is ambiguous; update the SKILL.md
entry replacing that string with an explicit grouped form like
`modules/(home|auth|users|tasks|uploads)` (or list each full path) so the rule
is unambiguous when applied manually—locate the exact pattern text in the table
row and replace it with the grouped or explicit paths.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a44e2eb and 8e5d897.

📒 Files selected for processing (3)
  • .claude/agents/stack-maintainer.md
  • .claude/skills/update-stack/SKILL.md
  • CLAUDE.md
💤 Files with no reviewable changes (1)
  • .claude/agents/stack-maintainer.md

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Reworks the Claude Code /update-stack skill documentation into an explicit two-phase workflow (ISO merge → project alignment) and removes the now-redundant embedded stack-maintainer agent documentation/file.

Changes:

  • Updates update-stack skill to a two-phase process with explicit conflict-resolution rules and /verify checkpoints.
  • Removes the stack-maintainer embedded agent (and its mention in CLAUDE.md).
  • Adjusts CLAUDE.md wording to reflect the updated .claude/ contents.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
CLAUDE.md Removes references to embedded agents and updates .claude/ description accordingly.
.claude/skills/update-stack/SKILL.md Replaces the flat merge checklist with a two-phase “ISO merge” + “project alignment” workflow and adds a conflict rules table.
.claude/agents/stack-maintainer.md Deletes the embedded agent definition (agent removed from the repo).

- Clarify config/defaults ownership (stack-owned files ISO, project.js downstream-only)
- Add git add + merge --continue step after conflict resolution
- Full commands in all table rows (no --ours shorthand)
- Fix MIGRATION.md row to include file path
- Remove backslash escaping in table pipe pattern
@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.87%. Comparing base (a44e2eb) to head (c829306).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3177   +/-   ##
=======================================
  Coverage   89.87%   89.87%           
=======================================
  Files          52       52           
  Lines        1166     1166           
  Branches      235      235           
=======================================
  Hits         1048     1048           
  Misses        107      107           
  Partials       11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/skills/update-stack/SKILL.md:
- Line 47: Replace the documented pre-merge command "git add ." with "git add
-A" in the SKILL.md content so conflict-resolution steps stage deletions as well
as additions/modifications before calling "git merge --continue"; locate the
line that currently shows the "git add ." command and update it to use the "-A"
flag to ensure all tracked changes (including removals) are staged.
- Line 35: The doc has a contradiction between the Phase 1 rule that “lib” must
exist in ISO and be identical to upstream and the table row that treats “lib
additions” as downstream-only kept with --ours; resolve by editing the table
cell text “Downstream-only new files (new modules, helpers, lib additions,
scripts)” to remove “lib additions” (or explicitly mark “lib” as
upstream-owned/exception), and update the Phase 1 wording to clearly state that
“lib” is upstream-owned and must be identical to upstream; ensure the keywords
“lib”, “Phase 1”, and the table row “Downstream-only new files” are updated so
the two rules no longer conflict.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8e5d897 and 85d238e.

📒 Files selected for processing (1)
  • .claude/skills/update-stack/SKILL.md

- Replace git add . with git add -u (no untracked staging)
- Clarify lib ownership: existing files ISO, new additions downstream
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
.claude/skills/update-stack/SKILL.md (1)

12-12: ⚠️ Potential issue | 🟠 Major

Resolve conflicting lib ownership rules between Phase 1 goal and conflict table.

Line 12 requires lib to end Phase 1 identical to upstream, but Line 35 still treats lib additions as downstream-owned (--ours). This can leave downstream logic in lib and break ISO guarantees.

Suggested doc adjustment
-| Downstream-only new files (new modules, helpers, lib additions, scripts) | Never delete — these do not exist in the stack, `git checkout --ours <file>` if flagged |
+| Downstream-only new files (new modules, helpers, scripts) | Never delete — these do not exist in the stack, `git checkout --ours <file>` if flagged |
+| Downstream-only `lib/` additions | Not allowed in Phase 1 ISO. Move/refactor outside `lib/` in Phase 2 if still needed. |

Based on learnings: Keep the stack mergeable for downstream projects.

Also applies to: 35-35

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/update-stack/SKILL.md at line 12, Update the SKILL.md to make
`lib` ownership consistent: change the conflict-table rule that currently marks
`lib additions` as downstream-owned (`--ours`) so it matches the Phase 1 goal
that `lib` must exit identical to upstream; locate the entries referencing `lib`
and the `--ours` conflict strategy and replace them with an upstream-preferred
strategy (or remove downstream-only ownership), and add a short clarifying
sentence tying the `lib` rule to the Phase 1 goal to prevent downstream logic in
`lib` and preserve ISO/merge guarantees.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.claude/skills/update-stack/SKILL.md:
- Line 12: Update the SKILL.md to make `lib` ownership consistent: change the
conflict-table rule that currently marks `lib additions` as downstream-owned
(`--ours`) so it matches the Phase 1 goal that `lib` must exit identical to
upstream; locate the entries referencing `lib` and the `--ours` conflict
strategy and replace them with an upstream-preferred strategy (or remove
downstream-only ownership), and add a short clarifying sentence tying the `lib`
rule to the Phase 1 goal to prevent downstream logic in `lib` and preserve
ISO/merge guarantees.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85d238e and f44f0b2.

📒 Files selected for processing (1)
  • .claude/skills/update-stack/SKILL.md

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
.claude/skills/update-stack/SKILL.md (1)

35-35: ⚠️ Potential issue | 🟠 Major

lib additions rule still conflicts with Phase 1 ISO goal.

Keeping downstream lib additions with --ours contradicts the Phase 1 requirement that lib exits identical to upstream (Line 12). This can leave downstream logic in lib immediately after ISO merge.

Suggested doc fix
-| Downstream-only new files (new modules, helpers, lib additions, scripts) | Never delete — these do not exist in the stack, `git checkout --ours <file>` if flagged |
+| Downstream-only new files (new modules, helpers, scripts) | Never delete — these do not exist in the stack, `git checkout --ours <file>` if flagged |
+| Downstream-only new files under `lib/` | Do not preserve in Phase 1 ISO; relocate/refactor during Phase 2 if still needed |

Based on learnings: Keep the stack mergeable for downstream projects; Flag security or mergeability risks explicitly in reviews.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/update-stack/SKILL.md at line 35, Update the table rule that
currently allows keeping "lib additions" downstream with `--ours`: change the
"Downstream-only new files (new modules, helpers, lib additions, scripts)" entry
so it no longer permits retaining `lib` changes that conflict with the Phase 1
ISO requirement of identical `lib` to upstream; instead instruct reviewers to
flag downstream `lib` additions as merge risks and require either upstreaming, a
security/mergeability review, or explicit approval before using `git checkout
--ours`. Reference the "lib additions" rule and the "Phase 1 ISO goal" text so
reviewers see the conflict and the new requirement to escalate downstream `lib`
diffs.
🧹 Nitpick comments (1)
.claude/skills/update-stack/SKILL.md (1)

19-21: Harden remote setup to avoid merging from a stale devkit-node URL.

If devkit-node already exists but points elsewhere, this flow still proceeds. Consider setting/verifying URL explicitly before fetch/merge.

Based on learnings: Keep changes minimal and merge-friendly for downstream projects.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/update-stack/SKILL.md around lines 19 - 21, Ensure the local
remote named "devkit-node" points to the expected repo before fetching/merging:
check the current URL with git remote get-url devkit-node, and if it exists but
differs from "https://github.com/pierreb-devkit/Node.git" update it via git
remote set-url devkit-node <expected-url>; if it does not exist add it with git
remote add devkit-node <expected-url>; then run git fetch devkit-node and git
merge devkit-node/master. This keeps the existing flow (git fetch/devkit-node
and git merge devkit-node/master) but guarantees the remote URL is correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.claude/skills/update-stack/SKILL.md:
- Line 35: Update the table rule that currently allows keeping "lib additions"
downstream with `--ours`: change the "Downstream-only new files (new modules,
helpers, lib additions, scripts)" entry so it no longer permits retaining `lib`
changes that conflict with the Phase 1 ISO requirement of identical `lib` to
upstream; instead instruct reviewers to flag downstream `lib` additions as merge
risks and require either upstreaming, a security/mergeability review, or
explicit approval before using `git checkout --ours`. Reference the "lib
additions" rule and the "Phase 1 ISO goal" text so reviewers see the conflict
and the new requirement to escalate downstream `lib` diffs.

---

Nitpick comments:
In @.claude/skills/update-stack/SKILL.md:
- Around line 19-21: Ensure the local remote named "devkit-node" points to the
expected repo before fetching/merging: check the current URL with git remote
get-url devkit-node, and if it exists but differs from
"https://github.com/pierreb-devkit/Node.git" update it via git remote set-url
devkit-node <expected-url>; if it does not exist add it with git remote add
devkit-node <expected-url>; then run git fetch devkit-node and git merge
devkit-node/master. This keeps the existing flow (git fetch/devkit-node and git
merge devkit-node/master) but guarantees the remote URL is correct.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f44f0b2 and de99687.

📒 Files selected for processing (2)
  • .claude/skills/update-stack/SKILL.md
  • .claude/skills/verify/SKILL.md

@PierreBrisorgueil PierreBrisorgueil merged commit 8b7141e into master Mar 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Chore release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(update-stack): rework skill as 2-phase ISO merge, remove stack-maintainer agent

2 participants