š Configurations and tools for developers (VERY opinionated)
This repo serves a dual purpose:
@bepower/devā CLI tool that bootstraps projects, distributes golden configs, and installs Kiro AI agents- Org-wide defaults ā GitHub community health files (CONTRIBUTING, SECURITY, issue/PR templates) inherited by all BePower repos
- Node.js >= 22
- npm (not pnpm or yarn)
- Access to GitHub Packages for
@bepowerscope
npm install -g @bepower/dev
Scaffold a new project with standard configuration.
# Single projects (--template required) dev bootstrap @bepower/my-lib -t lib # npm library dev bootstrap @bepower/my-service -t nestjs # NestJS ECS microservice # Monorepo (shell only, then use `dev add`) dev bootstrap @bepower/my-project --monorepo
CDK projects use
@bepower/bep-cdk-cliwhich provides an interactive wizard with account selection, pipeline setup, and version sync:npx @bepower/bep-cdk-cli init
What it does:
- Copies the root template (single or monorepo shell)
- For single projects: overlays the package template (lib/nestjs)
- Applies golden configs (biome, tsconfig, vitest, lefthook, etc.)
- Merges devDependencies and scripts into
package.json - Copies base GitHub Actions workflows
- Runs
npm install
Add a package to a monorepo.
dev add packages/shared -t lib # npm library package dev add packages/backend -t nestjs # NestJS microservice
For CDK infrastructure packages, use
npx @bepower/bep-cdk-cli initinside the monorepo.
What it does:
- Copies the package template into the specified path
- Updates root
package.jsonworkspaces if needed - Sets up package.json with correct name, repository, and directory
Add golden configs to an existing project.
cd existing-project dev setup # Copy configs (skip existing files) dev setup --force # Overwrite existing configs with latest golden versions
What it does:
- Detects monorepo (workspaces) and selects appropriate config variants
- Copies config files (only if they don't already exist, unless
--force) - Merges devDependencies and scripts into
package.json - Adds base GitHub Actions workflows
Note:
enginesis only set if the project doesn't already have one. If your project has an olderenginesvalue (e.g.,>= 18), update it manually.
Show differences between local configs and the golden versions distributed by @bepower/dev.
dev diff # List configs that differ or are missingUseful for detecting config drift without modifying anything. To apply updates, run dev setup --force.
Install the BePower Kiro agents globally (into ~/.kiro/) for AI-assisted work across every project: the four agents, their prompts, workflow skills, hooks and steering docs.
dev init-kiro
At the end it offers an interactive opt-in ā "Also initialize KiroCrew? (y/N)" ā which, if accepted, runs dev init-crew for you. The prompt is skipped in non-interactive shells (CI), so the command never blocks a pipeline.
What it installs:
~/.kiro/agents/*.jsonā the four agent specs (also valid KiroCrew templates)~/.kiro/prompts/*.mdā their system prompts~/.kiro/skills/ā workflow skills (incl. theupgrade-guardianskill)~/.kiro/hooks/ā safety-gate, barrel-export, etc.~/.kiro/steering/ā shared steering docs
Register the installed agents as KiroCrew members so they appear in the dashboard's agent picker. Run it after dev init-kiro, or let the init-kiro prompt call it.
dev init-crew
- Idempotent ā re-running skips members that already exist.
- Degrades gracefully ā if the
kirocrewbinary is not installed, it prints a note and exits cleanly instead of failing (so IDE-only users are unaffected).
Installing from GitHub Packages.
@bepower/devis published to GitHub Packages (not npmjs.org). To install the CLI you need the@bepowerscope mapped to the GitHub registry and a token withread:packages:npm config set @bepower:registry https://npm.pkg.github.com npm config set //npm.pkg.github.com/:_authToken='${GITHUB_PACKAGES_TOKEN}' export GITHUB_PACKAGES_TOKEN="$(gh auth token)" # reuses your gh login npm install -g @bepower/devUsing
${GITHUB_PACKAGES_TOKEN}keeps the token out of~/.npmrcon disk ā it is read from the environment at install time.
These files are copied (not extended) to target projects:
| Config | Description |
|---|---|
biome.json |
Biome linter + formatter (single quotes, 100 width, import sorting) |
tsconfig.json |
Extends @tsconfig/node22 |
vitest.config.ts |
Vitest + v8 coverage (workspace variant for monorepos) |
lefthook.yml |
Git hooks (pre-commit pipeline, commit-msg) |
commitlint.config.ts |
Conventional commits |
tsdown.config.ts |
Build with tsdown (workspace variant for monorepos) |
.editorconfig |
Editor settings |
.lockfile-lintrc.json |
Lockfile security |
.npmpackagejsonlintrc.json |
package.json validation |
.npmrc |
GitHub Packages registry for @bepower scope |
.kiro/settings/lsp.json |
Kiro LSP configuration (TypeScript, Python, Go, Rust, Java) |
Distributed via dev init-kiro, these configure the Kiro AI agent for BePower projects.
Trigger these in chat to switch the agent's cognitive mode:
| Trigger | Mode | Use when |
|---|---|---|
plan product |
Product Owner | Starting a feature, vague requirements |
plan eng |
Tech Lead | Architecture, failure modes, test matrix |
code review |
Paranoid Reviewer | After implementation, before committing |
qa |
QA Lead | Verify changes, health score |
ship prep |
Release Engineer | Build/lint/test checklist + commit message |
retro |
Engineering Manager | Analyze what happened (git history) |
new spec |
Spec Author | Create structured spec from template |
Typical flow: plan product ā plan eng ā implement ā code review ā qa ā ship prep
| Hook | Trigger | What it does |
|---|---|---|
safety-gate |
preToolUse |
Blocks git commit/push, npm publish, destructive ops |
barrel-export |
fileCreated |
Auto-updates barrel index.ts in monorepo packages |
context-injection |
fileEdited |
Loads relevant steering doc based on file type |
post-task-summary |
agentStop |
Summarizes changes + suggests commit message |
| Doc | Content |
|---|---|
code-style.md |
TypeScript conventions, naming, error handling |
build-tooling.md |
tsdown, biome, lefthook, npm |
testing.md |
Vitest, coverage, mocking |
interaction.md |
Agent behavior, workflow skills, no git commit |
commit-conventions.md |
Conventional commits + gitmoji |
architecture.md |
CDK patterns, NestJS structure, observability (CDK/ECS projects) |
These agents are distributed by dev init-kiro for use across all BePower projects. Each is read-only by default ā they analyze and propose, but never commit, push, publish, or open PRs (enforced by deniedCommands in the spec and the safety-gate hook):
| Agent | Description |
|---|---|
bepower-setup |
Analyzes a project and generates optimal .kiro/ configuration (steering, agent, prompt, skills) |
functional-analyst |
Interactive functional analysis ā collects requirements through conversation, produces approval docs and technical briefs (Italian-first) |
upgrade-guardian |
Assesses the safety of a dependency/framework upgrade in an isolated worktree and returns a reasoned LOW/MEDIUM/HIGH risk verdict with real breaking-change analysis, project impact and verification |
rev-eng |
Reverse-engineers a target web app's internal API via Playwright and documents it for a TypeScript client |
Once installed, the agents live in ~/.kiro/agents/ and can be driven from two runtimes that share the same specs.
Pass the agent name to kiro-cli chat:
# in the repo you want it to work on cd ~/projects/bepower/bep-cdk kiro-cli chat --agent upgrade-guardian
Then start the conversation by telling it what to assess, e.g.:
"Assess the Dependabot branch that bumps
datadog-cdk-constructs-v2to 5.2.0 ā is it safe to merge?"
The agent reads the project context (README.md, AGENTS.md if present, package.json, steering docs), does its analysis, and reports back. It will not mutate the repo.
After dev init-crew the agents appear as members in the dashboard's agent picker. Open a new chat, pick upgrade-guardian (or rev-eng), and start the conversation the same way ā the result (e.g. an upgrade safety report) is rendered inline, with each member keeping its own dedicated memory.
These agents are task-driven, not chatty ā open with the concrete thing you want assessed:
| Agent | A good opening message |
|---|---|
upgrade-guardian |
"Assess upgrading <package> from <x> to <y> in this repo. Is it safe to merge?" |
rev-eng |
"Reverse-engineer the API of <url> and document the endpoints for a TypeScript client." |
bepower-setup |
"Analyze this project and generate the .kiro/ configuration for it." |
functional-analyst |
"Raccogliamo i requisiti per <feature>." (Italian-first) |
The agent does the rest ā reads context, analyzes, and returns a verdict or document. For upgrade-guardian the output is a safety report with a LOW/MEDIUM/HIGH verdict and a suggested (never executed) commit message; you decide whether to apply it.
.github/workflows/pr-checks.yml runs npm ci, lint, build and test (each only if the script exists) on pull requests. Every Node repo uses the same caller file, .github/workflows/pr-checks.yml:
name: PR checks on: pull_request permissions: contents: read packages: read jobs: checks: uses: BePower/.github/.github/workflows/pr-checks.yml@main
Optional inputs (with:). They are not secrets: they sit in the caller file and show in logs.
| Input | Default | Use |
|---|---|---|
node-version |
empty | Pin Node. Empty: volta.node, devEngines.runtime or engines.node from package.json, else lts/* |
working-directory |
. |
Monorepo: run every step in a subfolder |
extra-run |
empty | Multi-line shell commands run after the standard steps |
@bepower packages are read with the run's GITHUB_TOKEN: the package must allow the calling repo (package settings, "Manage Actions access"). Because callers use @main, a change here reaches every repo at once: review it with care.
BePower/.github/
āāā .github/
ā āāā ISSUE_TEMPLATE/ # Org-wide issue templates (bug, feature)
ā āāā PULL_REQUEST_TEMPLATE.md # Org-wide PR template
ā āāā workflows/ # CI for this repo + reusable pr-checks.yml
āāā profile/
ā āāā README.md # GitHub org profile
ā
āāā cli/ # CLI source
ā āāā commands/ # bootstrap, setup, add, init-kiro
ā āāā utils/ # Shared utilities (configs, paths, templates)
āāā configs/ # Golden config files (copied to target projects)
āāā kiro/ # Kiro AI templates (agent, prompt, steering, skills)
ā āāā steering/ # Single source of truth for steering docs
ā āāā skills/ # Workflow skills (plan, review, qa, ship, specs)
ā āāā hooks/ # Agent hooks (safety gate, barrel export, etc.)
āāā workflows/ # GitHub Actions templates (distributed by dev setup)
ā āāā base/ # CI, PR, security, dependabot
ā āāā library/ # npm publish
ā āāā docs/ # Documentation site
āāā templates/ # Scaffold templates
ā āāā root/ # Root templates (single, monorepo)
ā āāā package/ # Package templates (lib, cdk, nestjs)
āāā docs/ # Architecture Decision Records
ā
āāā CONTRIBUTING.md # Org-wide contribution guidelines
āāā SECURITY.md # Org-wide security policy
āāā CODE_OF_CONDUCT.md # Org-wide code of conduct
āāā README.md # This file
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā @bepower/dev CLI ā
āāāāāāāāāāāāāāāāā¬āāāāāāāāāāā¬āāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāā¤
ā bootstrap ā add ā setup ā init-kiro ā
ā ā ā ā ā
ā root/ ā package/ ā configs/ ā kiro/ ā
ā + package/ ā ā path ā + workflows ā ā ~/.kiro/ ā
ā + configs/ ā ā + pkg.json ā ā
ā + workflows ā ā ā ā
ā ā new dir ā ā ā existing ā ā
āāāāāāāāāāāāāāāāā“āāāāāāāāāāā“āāāāāāāāāāāāāāā“āāāāāāāāāāāāāāāāāāāāā
| Tool | Purpose | Replaces |
|---|---|---|
| Biome | Linting & formatting | ESLint + Prettier |
| Lefthook | Git hooks | Husky + lint-staged |
| tsdown | Building | tsc / esbuild / rollup |
| release-please | Releases | semantic-release / auto |
| Vitest | Testing | Jest |
| commitlint | Commit validation | ā |
| npm | Package manager | pnpm / yarn |
This repo provides default community health files for the entire BePower GitHub organization:
- Contributing Guide ā How to contribute to any BePower project
- Security Policy ā How to report vulnerabilities
- Code of Conduct ā Expected behavior
These files are automatically inherited by all repos in the org that don't have their own.
git clone https://github.com/BePower/.github.git cd .github npm install npm run build npm test npm run lint
MIT