Skip to content

feat(agentic-engineering)!: merge spend stewardship into the engineer - #90

Merged
devantler merged 2 commits into
mainfrom
claude/finops-merge-into-engineer
Jul 25, 2026
Merged

feat(agentic-engineering)!: merge spend stewardship into the engineer#90
devantler merged 2 commits into
mainfrom
claude/finops-merge-into-engineer

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Agentic Engineer

Why

We ran two agents over one portfolio. The FinOps engineer owned the money and the primary engineer
owned the code — but the money is spent by that code, so both were selecting work from the same
repositories, claiming the same issues, and carrying their own copy of the same review-and-merge
discipline. The consumer contract had already conceded the point by recording that both roles share
one provider instance. A cost pass on its own schedule also can't see what the engineer is about to
change, and the engineer can't see what it costs.

What

Spend stewardship becomes a dimension of the automated-ai-engineer entrypoint rather than a separate
role, so one agent measures the spend, decides the change, and ships it in one loop.

The generic money boundaries move into the reviewed definition — value per unit cost rather than cost
reduction, the protected-outcomes floor as a veto, never move money, no personalised investment
advice, no private financial data in a public artifact. The deployment's own money facts (price
sources, its floor, the private channel) stay consumer-owned behind a new conditionally-required
Spend contract section; without it the engineer runs normally and simply does no spend work.

CI now enforces the merged boundary: it pins those limits to the entrypoint and rejects a resurrected
FinOps role or schedule, so the old two-writer shape can't quietly come back alongside the new one.

Breaking for consumers — the finops-engineer schedule must be retired and the desired-state copy
updated. Version 3.0.0, with the migration steps in the plugin README. Land this before the
devantler-tech/monorepo consumer PR that retires its local FinOps agent.

Decision record: ADR 0005, superseding
ADR 0004 points 5 and 8. Maintainer-directed in session, so there is no originating issue.

Spend stewardship becomes a dimension of the automated-ai-engineer entrypoint
instead of a separate FinOps role with its own schedule. Running cost is
incurred by the code the engineer already owns, so a second writer over the same
repositories produced overlapping claim lanes and a duplicate copy of the
delivery/review/merge discipline — while the consumer contract already had to
declare that both roles share one provider instance.

The generic money boundaries now live in the reviewed definition: value per unit
cost over cost reduction, the protected-outcomes floor as a veto, never move
money, no personalised investment advice, no private financial data in a public
artifact, read-only against production. The deployment's own money facts stay
consumer-owned behind a new conditionally-required "Spend contract" section;
absent it, the engineer fails closed on the cost dimension only.

validate-manifests.sh now pins those boundaries to the entrypoint and rejects a
resurrected finops-engineer role or schedule, so the old two-writer shape fails
closed rather than being redeployed alongside the merged one. Self-test covers
each new guard: 108 passed, 0 failed.

BREAKING CHANGE: removes spec.roles["finops-engineer"] and its schedule, and
renames spec.consumer.requiredWhenFinOpsEnabled to
requiredWhenSpendStewardshipEnabled (["Spend contract"]). Consumers must retire
the finops-engineer schedule and update their desired-state copy.
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

@devantler I’ll review the changes in #90.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@devantler, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ff738a92-434c-4f01-bccb-faed89d286fb

📥 Commits

Reviewing files that changed from the base of the PR and between fdc8d27 and 71731a9.

📒 Files selected for processing (2)
  • README.md
  • plugins/agentic-engineering/README.md
📝 Walkthrough

Walkthrough

Version 3 consolidates spend stewardship into the automated-ai-engineer entrypoint. Consumer repositories now provide a conditional Spend contract; missing or malformed spend facts disable only cost analysis. The standalone finops-engineer role and schedule are removed, while manifests add spend guardrails and updated bootstrap behavior. Validators and self-tests enforce the new roles, schedules, contract key, entrypoint markers, and never-move-money boundary. Documentation and plugin metadata describe the migration.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: merging spend stewardship into the engineer.
Description check ✅ Passed The description is directly about the spend-stewardship merge and its migration details.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/agentic-engineering/README.md`:
- Around line 23-32: Update the v3 installation sequence in the README so the
existing finops-engineer schedule is quiesced or atomically replaced before
enabling or reconciling the v3 engineer schedule. Use the runtime’s native
scheduler control to retire finops-engineer first, preventing any overlap
between the old schedule and the new engineer loop.

In `@README.md`:
- Around line 93-95: Update README.md lines 93-95 to direct existing
automated-ai-engineer installations through the v2 migration and then the v3
migration, or a combined migration path, before their next scheduled run. Update
plugins/agentic-engineering/README.md lines 56-57 to require installed version
3.0.0 or later before unattended writes are re-enabled.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bffec300-1499-464b-98d1-83d030de9de9

📥 Commits

Reviewing files that changed from the base of the PR and between 04cc475 and fdc8d27.

📒 Files selected for processing (12)
  • .claude-plugin/marketplace.json
  • .github/plugin/marketplace.json
  • README.md
  • docs/adr/0004-consolidate-agentic-engineering.md
  • docs/adr/0005-merge-spend-stewardship-into-the-engineer.md
  • plugins/agentic-engineering/.claude-plugin/plugin.json
  • plugins/agentic-engineering/README.md
  • plugins/agentic-engineering/agents/automated-ai-engineer.agent.md
  • plugins/agentic-engineering/plugin.json
  • plugins/agentic-engineering/resources/provider-neutral.desired-state.json
  • scripts/validate-manifests.sh
  • scripts/validate-manifests.test.sh
📜 Review details
🧰 Additional context used
📓 Path-based instructions (5)
plugins/**/plugin.json

📄 CodeRabbit inference engine (AGENTS.md)

Each plugin.json must use a kebab-case name matching ^[a-z0-9-]+$, include description and version, and omit component-path fields such as skills and agents; resources are auto-discovered.

Files:

  • plugins/agentic-engineering/plugin.json
README.md

📄 CodeRabbit inference engine (AGENTS.md)

Keep the README plugin table in lockstep with the manifests and filesystem: every plugin must have one row, every row must represent a plugin, and the Resources column must match bundled skills, MCP server keys, and custom agents.

Files:

  • README.md
plugins/**/agents/*.agent.md

📄 CodeRabbit inference engine (AGENTS.md)

Custom agents must use the .agent.md suffix and YAML frontmatter containing non-empty name and description fields.

Files:

  • plugins/agentic-engineering/agents/automated-ai-engineer.agent.md
plugins/**/resources/*.desired-state.json

📄 CodeRabbit inference engine (AGENTS.md)

Desired-state resource documents must use the provider-neutral schema, contain the required consumer contract and no placeholders, and be explicitly linked from the owning plugin README; they do not count as auto-discovered resources.

Files:

  • plugins/agentic-engineering/resources/provider-neutral.desired-state.json
scripts/*.sh

📄 CodeRabbit inference engine (AGENTS.md)

Keep scripts/validate-manifests.sh as the single source of truth for manifest, plugin, README, desired-state, and skill-provenance validation; do not weaken checks to pass.

Files:

  • scripts/validate-manifests.test.sh
  • scripts/validate-manifests.sh
🪛 LanguageTool
docs/adr/0005-merge-spend-stewardship-into-the-engineer.md

[style] ~55-~55: Consider an alternative for the overused word “exactly”.
Context: ...g a mandate into a larger definition is exactly where a boundary gets quietly droppe...

(EXACTLY_PRECISELY)


[style] ~98-~98: Consider using “who” when you are referring to a person instead of an object.
Context: ...cted because it would stop a consumer that does not want cost work from using the ...

(THAT_WHO)

plugins/agentic-engineering/README.md

[style] ~34-~34: Consider using “who” when you are referring to a person instead of an object.
Context: ...o writers over one concern. A consumer that keeps its FinOps definition as a separa...

(THAT_WHO)

🔇 Additional comments (12)
docs/adr/0005-merge-spend-stewardship-into-the-engineer.md (1)

1-102: LGTM!

docs/adr/0004-consolidate-agentic-engineering.md (1)

7-10: LGTM!

plugins/agentic-engineering/README.md (1)

14-21: LGTM!

Also applies to: 34-37, 70-71, 96-112, 139-143, 153-160

README.md (1)

17-17: LGTM!

Also applies to: 89-92, 172-177

.claude-plugin/marketplace.json (1)

29-30: LGTM!

.github/plugin/marketplace.json (1)

29-30: LGTM!

plugins/agentic-engineering/.claude-plugin/plugin.json (1)

3-4: LGTM!

plugins/agentic-engineering/plugin.json (1)

3-4: LGTM!

plugins/agentic-engineering/agents/automated-ai-engineer.agent.md (1)

5-16: LGTM!

Also applies to: 49-61, 70-72, 117-190

plugins/agentic-engineering/resources/provider-neutral.desired-state.json (1)

33-34: LGTM!

Also applies to: 61-61, 94-94, 118-118

scripts/validate-manifests.sh (1)

437-437: LGTM!

Also applies to: 570-595, 654-670, 722-723, 738-761, 788-795

scripts/validate-manifests.test.sh (1)

566-571: LGTM!

Also applies to: 625-626, 640-642, 656-659, 694-698, 899-946

Comment thread plugins/agentic-engineering/README.md Outdated
Comment thread README.md Outdated
…ng v3

Both fixes address CodeRabbit findings on #90.

The migration had the ordering backwards. Installing v3 while the old
finops-engineer schedule is still armed opens exactly the concurrent-stewardship
window the merge closes — two writers proposing against the same spend. Retiring
the schedule first risks at most one missed cost pass, which is cadence-gated and
far cheaper. Quiesce or atomically replace it ahead of the v3 engineer schedule.

The root onboarding route also sent existing installations only through the v2
checklist, whose pre-write verification accepted 2.0.0 — permitting writes to
resume with the retired schedule live. It now requires both migrations, and the
verification requires 3.0.0 or later.
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

@devantler I’ll review the changes in #90.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Readiness record — promoting

Programmatically tested.

  • ./scripts/validate-manifests.sh → exit 0.
  • scripts/validate-manifests.test.sh108 passed, 0 failed, including 10 new drift scenarios added here.
  • shellcheck clean on both changed scripts.
  • CI at 71731a9: 38 pass, 1 skipping, 0 fail.

Negative controls — every new guard proven to fire. RED evidence, not assumed: removing each of ## Spend stewardship, **Spend contract**, **You never move money.**, and Private financial data never reaches a public artifact from the entrypoint each fails the validator; so do a resurrected finops-engineer role, a resurrected schedule, a missing or wrongly-named requiredWhenSpendStewardshipEnabled, and a dropped never-move-money guardrail.

Two of my first probes reported "not caught" and both were broken probes, not missing guards — a perl substitution that silently matched nothing because the target phrase wrapped across two lines, and a jq del(...[1]) that removed the wrong array element. Re-ran both correctly (asserting the mutation actually applied first) and both guards fire.

Tried and evaluated as a user. This change is a reviewed agent definition plus manifest/validator code, so I exercised the surfaces it actually has: ran the validator and its self-test as CI does; confirmed the merged entrypoint still parses as frontmatter + body with non-empty name/description and its declared skills intact; confirmed #migrating-to-version-3 resolves to a real heading; and walked the migration as a consumer would — the shape it prescribes is exactly what monorepo#2455 implements, whose own delivery-contract test passes against it. I did not install the built plugin from this branch: the runtime resolves agentic-engineering from the marketplace default branch, so a real install check only becomes possible after merge. I will verify the installed plugin reports 3.0.0 and exposes the three agents once it lands.

Reviewed. CodeRabbit at 71731a9 — newest review carries no finding sections, and both earlier 🟠 Major findings are fixed and their threads resolved. Its ordering finding was right and changed the migration: retire the finops-engineer schedule before installing v3, not after.

Pentad at 71731a9: checks green · 0 unresolved threads · 0 non-thread findings · CLEAN · current-head green review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant