redhat-developer / redhat-developer/rhdh-plugins

Add backstage-cli repo fix --publish to code agent definition for new packages

Open Beginner friendly
#4,328 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ready-for-triage triaged
Dominant language
TypeScript
Stars
48
Forks
120
Avg merge
2d 6h
Merged PRs (30d)
337

Description

What happened

The code agent created a new Backstage package (boost-entity-provider-sdk) on PR #4212 via run 31327606763. The .fullsend/AGENTS.md instructions state: "When creating a new package under workspaces/, run yarn backstage-cli repo fix --publish at repo root after setup." The code agent did not run this step, producing inconsistent pluginPackages arrays — the new package listed itself among 7 sibling entries, but the 7 existing sibling packages still had 6-entry arrays that excluded the new package. The review agent caught the mismatch as an architectural-conflict finding, and the human fixed it in commit c98a25f by running backstage-cli repo fix --publish.

What could go better

The instruction exists in .fullsend/AGENTS.md but the code agent did not follow it. The most likely cause is a context-prominence gap: the instruction is in a shared instructions file loaded via redirect from AGENTS.md, while the code agent's primary definition (.fullsend/rhdh/agents/code.md) does not mention this step. When the code agent has a large context (reading issue specs, design docs, existing packages), a critical post-creation step buried in a general instructions file is easy to miss. Confidence: moderate — the code agent may have read the instruction but deprioritized it, or the redirect chain (AGENTS.md.fullsend/AGENTS.md) may not have been followed. Either way, placing the instruction closer to the code agent's core context would help.

Proposed change

Add a "New package creation" section to .fullsend/rhdh/agents/code.md that includes the backstage-cli repo fix --publish step explicitly:

## New package creation

When creating a new package under `workspaces/`:
1. After initial package setup, run `yarn backstage-cli repo fix --publish` at the repo root to synchronize `pluginPackages` arrays across all sibling packages.
2. Run `yarn install` and `yarn dedupe` in the workspace directory.
3. Include the updated `yarn.lock` in your commit.
4. Verify that all sibling `package.json` files list the new package in their `pluginPackages` array.

This duplicates the instruction from .fullsend/AGENTS.md but places it in the code agent's primary definition where it's more likely to be in the agent's active context during package creation.

Validation criteria

The next code agent run that creates a new Backstage package under workspaces/ should include a backstage-cli repo fix --publish step. The resulting PR should have consistent pluginPackages arrays across all sibling packages, with no review finding for pluginPackages mismatch.


Generated by retro agent from https://github.com/redhat-developer/rhdh-plugins/pull/4212

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Update .fullsend/rhdh/agents/code.md and compare its new-package guidance with .fullsend/AGENTS.md. Confirm the section explicitly includes the backstage-cli repo fix --publish workflow and the listed package setup checks. Done means the code agent definition clearly surfaces these steps for new packages under workspaces/.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.