@alivnavc/dev-lifecycle
v0.2.1
Published
Claude Code plugin: full SDLC co-pilot for Kubernetes-based mixed-language microservices monorepo on GitLab. Includes workflow guardrails, subagent orchestration, codebase analysis, and post-push AI code review iteration.
Maintainers
Readme
dev-lifecycle
A Claude Code plugin that turns Claude into a full SDLC co-pilot for a Kubernetes-based, mixed-language microservices monorepo on GitLab, including post-push code review automation.
What it does
When you ask Claude to "fix this bug" or "build feature X," the plugin:
- Analyzes the codebase (cached, refreshed on demand)
- Plans the work — classifies the task, decides which specialist agents to dispatch, parallel vs. sequential
- Enforces workflow rules — branches always come from latest
origin/main, pushes always rebase first - Dispatches specialist subagents — architect, developer, AI/ML, tester, debugger, infra
- After push, automatically watches the MR pipeline, fetches AI code review feedback, and iterates on fixes until approved or the iteration budget is exhausted
Setup (first time)
When the plugin is enabled, Claude Code prompts for:
| Setting | What it is |
|---|---|
| gitlab_token | Personal access token with api scope. Stored securely in the OS keychain. |
| gitlab_host | e.g. gitlab.sonic-dev.net |
| gitlab_project_path | URL-encoded path, e.g. sonicjobs%2Fsonicjobs |
| gitlab_project_id | Numeric project ID (find in GitLab project settings) |
| max_review_iterations | Default fix-and-repush cycles before giving up (default 3) |
At every session start, Claude asks you to confirm or override max_review_iterations.
Components
Skills (auto-triggered)
| Skill | When it fires |
|---|---|
| task-planner | Any "fix/build/implement/debug/deploy/investigate" — runs FIRST, orchestrates the rest |
| codebase-conventions | Code-editing tasks — matches existing style |
| monorepo-navigation | Cross-service work, "where is X" |
| k8s-context | Deployment/infra/"how do I run this" |
| mr-feedback-loop | After any git push, or "check the MR" / "wait for review" |
Subagents
| Agent | Owns |
|---|---|
| architect | System design, cross-service changes, API contracts |
| developer | Application code following conventions |
| ai-ml-engineer | GenAI/LLM and classical ML |
| tester | Unit / integration / e2e tests |
| debugger | Root-cause investigation |
| infra-engineer | K8s, helm, Docker, CI/CD |
Hooks
| Hook | What it does |
|---|---|
| SessionStart | Builds/refreshes codebase map; writes session config; prompts for iteration count |
| PreToolUse: git checkout -b / switch -c / branch X | Blocks unless on latest origin/main |
| PreToolUse: git push | Blocks unless rebased on origin/<default> |
| PostToolUse: git push | Captures MR link from output, triggers mr-feedback-loop skill |
Slash commands
| Command | Use |
|---|---|
| /dev-lifecycle:analyze-codebase | Force-refresh the codebase map |
| /dev-lifecycle:plan <task> | Plan without executing |
| /dev-lifecycle:run-locally <service> | Get commands to run a service locally |
| /dev-lifecycle:deploy-check | Pre-deployment validation |
| /dev-lifecycle:watch-mr [iid] | Manually watch an MR (uses last push if no IID) |
The MR feedback loop in detail
After git push:
PostToolUse hook parses output → writes .claude/dev-lifecycle/last-push.json
↓
mr-feedback-loop skill triggers
↓
poll-mr.sh starts:
wait 5 min → check pipeline
wait 5 min → check pipeline (10 min total)
every 2 min → check pipeline (up to ~1 hour cap)
↓
during wait, Claude asks: "anything else to work on?"
↓
AI code review job done → gitlab-mr-review.py --review-only fetches feedback
↓
┌───────────────┴───────────────┐
↓ ↓
approved / LGTM change requests
↓ ↓
✅ "all set" dispatch developer to fix
↓
commit, push (rebase enforced)
↓
loop back (iteration counter ++)
↓
stop when approved OR budget exhaustedInstallation
Local test
claude --plugin-dir ./dev-lifecycleYou'll be prompted for the GitLab settings on first run.
Distribute via marketplace
Create a marketplace repo with .claude-plugin/marketplace.json:
{
"name": "your-team",
"owner": { "name": "Platform Team" },
"plugins": [
{ "name": "dev-lifecycle", "source": "./dev-lifecycle" }
]
}Teammates install:
/plugin marketplace add https://gitlab.sonic-dev.net/your-org/your-marketplace.git
/plugin install dev-lifecycle@your-teamCustomization
- GitLab API specifics live in
scripts/gitlab-mr-review.py. Adapt the URL paths if your GitLab is older. - AI code review job name detection is in
scripts/gitlab-mr-review.pyandscripts/poll-mr.sh. They both look for"ai code review"in the job name (case-insensitive). Update the substring if your job is named differently. - Polling schedule is in
scripts/poll-mr.sh. AdjustWAITSandLATER_WAIT. - Subagent prompts in
agents/*.md— bake in your team's preferences.
Validation
claude plugin validate ./dev-lifecycleTroubleshooting
- "GITLAB_TOKEN not found" → re-run plugin enable; the userConfig prompt should appear. Or set
GITLAB_TOKENenv var as fallback. - MR link not captured → check the push output had the GitLab
remote:lines. Some CI configs suppress them. - Hooks not firing → ensure scripts are executable (
chmod +x scripts/*.sh scripts/*.py). - AI review job not found → confirm the job name contains "ai code review" (case-insensitive); update the substring in
scripts/gitlab-mr-review.pyif not. - Polling never completes → check
~/.claude/logs/for stderr from the poller. IncreaseMAX_LATER_CHECKSinscripts/poll-mr.shif your pipelines are slower than 1 hour.
