π 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/devScaffold 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 --monorepoCDK 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 microserviceFor 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 versionsWhat 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-kiroAt 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-guardianThen 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.
BePower/.github/
βββ .github/
β βββ ISSUE_TEMPLATE/ # Org-wide issue templates (bug, feature)
β βββ PULL_REQUEST_TEMPLATE.md # Org-wide PR template
β βββ workflows/ # CI for this repo
βββ 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 lintMIT