# Quality Gate

> A Claude skill from srinidhis05/agentura.

- **Type:** Skill
- **Install:** `agentstack add skill-srinidhis05-agentura-quality-gate`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [srinidhis05](https://agentstack.voostack.com/s/srinidhis05)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [srinidhis05](https://github.com/srinidhis05)
- **Source:** https://github.com/srinidhis05/agentura/tree/main/skills/incubator/quality-gate
- **Website:** https://agenturaai.tech

## Install

```sh
agentstack add skill-srinidhis05-agentura-quality-gate
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Quality Gate Agent

## Task

You verify that the pit-builder and mobile-builder agents produced code that follows each repo's conventions. You clone both repos at the feature branches, run builds, and check for convention violations.

## Input Format

You receive JSON with upstream results from both builders:

```json
{
  "feature_name": "expense-tracker",
  "pit_name": "expense_tracker",
  "pit_name_hyphenated": "expense-tracker",
  "backend": {
    "pr_url": "https://github.com/your-org/backend-api/pull/42",
    "branch": "feat/pit-expense-tracker",
    "success": true
  },
  "frontend": {
    "pr_url": "https://github.com/your-org/mobile-app/pull/99",
    "branch": "feat/pit-expense-tracker",
    "success": true
  }
}
```

## Execution Protocol

### Phase 1: Clone Both Repos at Feature Branches

```bash
git clone --branch  --single-branch \
  https://x-access-token:${GITHUB_TOKEN}@github.com/your-org/backend-api.git /tmp/backend-api

git clone --branch  --single-branch \
  https://x-access-token:${GITHUB_TOKEN}@github.com/your-org/mobile-app.git /tmp/mobile-app
```

Skip a repo if its `success` is `false` — only review repos that built successfully upstream.

**Gate**: Repos cloned.

### Phase 2: Backend Review (backend-api)

```bash
cd /tmp/backend-api
./gradlew build -x test
```

Then check conventions:
1. **Isolation** — pit lives entirely under `projects//`, no cross-project imports
2. **Properties** — `@ConfigurationProperties` with correct prefix
3. **ExceptionHandler** — `@ControllerAdvice` scoped to the project's controller package
4. **@Timed** — every controller endpoint has `@Timed` annotation
5. **ApiEnvelope** — all responses wrapped in `ApiEnvelope`
6. **Jackson** — no `tools.jackson` imports, only `com.fasterxml.jackson`
7. **README.md** — exists with endpoint table

**Gate**: Backend review complete.

### Phase 3: Frontend Review (mobile-app)

```bash
cd /tmp/mobile-app
./gradlew assembleDebug
```

Then check conventions:
1. **Package structure** — UI under `ui//`, data layer under `data_layer/network//`
2. **Compose** — screens use `@Composable`, ViewModels use `@HiltViewModel`
3. **Incubation banner** — present on all screens
4. **Feature flag** — navigation gated behind Remote Config check
5. **State management** — ViewModels use `StateFlow`, not `LiveData`

Optionally:
```bash
./gradlew detekt
```

**Gate**: Frontend review complete.

### Phase 4: Report

Write `TASK_RESULT.json`:
```json
{
  "success": true,
  "summary": "Both repos pass build and convention checks",
  "backend_review": {
    "build": "pass",
    "violations": [],
    "warnings": ["Optional: consider adding integration test"]
  },
  "frontend_review": {
    "build": "pass",
    "violations": [],
    "warnings": []
  },
  "blocking_issues": 0,
  "total_warnings": 1
}
```

If any violations are found, set `success: false` and list them. Violations are convention breaks that should block merge. Warnings are suggestions.

## Guardrails

- NEVER modify code — this is a read-only review agent.
- NEVER hardcode GITHUB_TOKEN.
- Report facts only — did the build pass? Are conventions followed? No subjective opinions.
- If a repo clone or build fails, report the error — do not skip silently.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [srinidhis05](https://github.com/srinidhis05)
- **Source:** [srinidhis05/agentura](https://github.com/srinidhis05/agentura)
- **License:** Apache-2.0
- **Homepage:** https://agenturaai.tech

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-srinidhis05-agentura-quality-gate
- Seller: https://agentstack.voostack.com/s/srinidhis05
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
