Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 153 additions & 0 deletions .atl/delta-approval-gate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Approval Gate Module - Specification

## Overview

| Property | Value |
|----------|-------|
| **Module ID** | approval-gate |
| **Version** | 0.1.0 |
| **category** | security |
| **Description** | Requires human approval before executing changes in the repository |

## Problem

Currently:
- AI agents can make autonomous changes without user confirmation
- No safety net for production systems
- Learning environments need oversight
- Safety-critical code requires human review

## Solution

An approval gate that:
- Intercepts proposed changes
- Shows proposal details
- Waits for user decision
- Logs all decisions

## API Commands

```bash
# Approval workflow
sz approval list # List pending proposals
sz approval approve 1 # Approve proposal #1
sz approval reject 2 # Reject proposal #2
sz approval request 3 # Request more info

# Configuration
sz config set approval.mode approve
```

## Configuration Modes

| Mode | Behavior |
|------|----------|
| manual | No automatic execution |
| approve | Propose and wait for approval |
| auto-low | Auto-apply low-risk changes |
| auto-all | All automatic (dangerous) |

## Proposal Format

```markdown
# Proposal #N

## What
[Description of changes]

## Why
[Reason for changes]

## Files Affected
- src/app.ts
- src/utils.ts

## Risk Level
- LOW / MEDIUM / HIGH

## Diff Summary
+10 lines -5 lines
```

## Module Structure

```
modules/approval-gate/
├── module.yaml
├── entry.py # Main approval logic
├── approve.sh
├── templates/
│ └── proposal.md
├── reconcile.sh
└── doctor.sh
```

## Features

1. **Change Interception**
- Before any modification
- Present proposal to user
- Show what, why, files, risk

2. **Decision Tracking**
- Approve / Reject / Request Info
- Log all decisions
- History maintained

3. **Risk Assessment**
- LOW: Documentation, tests
- MEDIUM: Refactoring, small fixes
- HIGH: Production changes, migrations

4. **Notification**
- Before changes applied
- Configurable channels
- Integration with bus

## Setpoints

| Setpoint | Default | Range | Description |
|----------|---------|-------|-------------|
| mode | approve | [manual, approve, auto-low, auto-all] | Approval mode |
| notify_before | true | [true, false] | Notify before changes |
| auto_low_threshold | low | [low, medium] | Auto-apply threshold |
| max_pending | 10 | [1, 50] | Max pending proposals |

## Integration Points

- **Requires**: bus interface
- **Provides**: approval.required, approval.decision
- **Hooks**: reconcile.sh, doctor.sh
- **Bus events**: approval.requested, approval.decided

## Decision Log

```json
{
"id": 1,
"proposal": {...},
"decision": "approved",
"decided_by": "user@example.com",
"decided_at": "2026-04-17T10:30:00Z",
"comment": "LGTM!"
}
```

## Acceptance Criteria

1. ✅ Intercepts proposed changes
2. ✅ Shows proposal details
3. ✅ Approve/Reject/Request Info works
4. ✅ Decision history maintained
5. ✅ Risk assessment works
6. ✅ Integration with bus
7. ✅ Mode configuration works

## Use Cases

| Use Case | Mode |
|---------|------|
| Production e-commerce | approve |
| Learning/experimentation | auto-low |
| Safety-critical systems | manual |
| Development | auto-all |
152 changes: 152 additions & 0 deletions .atl/delta-claude-skills-sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Claude Skills Sync Module - Specification

## Overview

| Property | Value |
|----------|-------|
| **Module ID** | claude-skills-sync |
| **Version** | 0.1.0 |
| **Category** | skills |
| **Description** | Installs and manages AI agent skills in repository, bringing modern development patterns |

## Problem

Currently:
- Skills live in AI agent config, not in repository
- Each developer/AI learns framework quirks separately
- No shared conventions across team
- Inconsistent code patterns

## Solution

A skills sync module that:
- Installs skill patterns into `docs/skills/`
- Updates on schedule
- Integrates with existing conventions
- Documents what's installed

## Skills Installed

| Category | Skills |
|---------|--------|
| **React** | react-19, react |
| **Next.js** | nextjs-15, nextjs |
| **Angular** | angular-core, angular-architecture, angular-forms, angular-performance |
| **Mobile** | react-native |
| **State** | zustand-5, zustand, redux-toolkit, jotai, recoil |
| **CSS** | tailwind-4, tailwind, nativewind, styled-components, emotion |
| **Testing** | playwright, vitest, pytest, jest, cypress, testing-library, mocha |
| **DB/ORM** | prisma, supabase, django-drf, sqlalchemy, drizzle, mongoose |
| **Backend** | express, fastapi, flask, django, nestjs |
| **Go** | go-testing, golang |
| **DevOps** | github-actions, docker, gcp, cron, kubernetes, terraform |
| **AI/Vector** | pinecone, weaviate, openai-sdk, ai-sdk-5 |
| **Agents** | sdd, mcp-builder, elixir-antipatterns, make, n8n |
| **Desktop** | electron |
| **Vue** | svelte, sveltekit, vue, nuxt |
| **TypeScript** | typescript, zod-4, zod |
| **Java** | java-21, spring-boot-3, hexagonal-architecture |
| **Monitor** | sentry, prometheus, grafana, elk |
| **Integrations** | webhooks, whatsapp, stripe, twilio, sendgrid, mailgun |
| **Messaging** | rabbitmq, kafka |
| **Runtime** | deno, bun, pnpm, bolt-new, bash-scripting |

**Total: 80+ skills** covering full stack development

## API Commands

```bash
# Install skills
sz skills install --recommend # Install recommended for repo type
sz skills install react-19 nextjs-15 tailwind-4

# List and manage
sz skills list # List installed skills
sz skills update # Check for updates

# Configuration
sz config set skills.auto_update weekly
```

## Module Structure

```
modules/claude-skills-sync/
├── module.yaml
├── entry.sh # Main sync logic
├── skills.yaml # List of skills to sync
├── reconcile.sh
├── doctor.sh
└── templates/
gitignore patterns
README.md
```

## Features

1. **Selective install** - Install only needed skills
2. **Version pinning** - Lock to specific skill versions
3. **Custom skills** - Allow custom skill directories
4. **Auto-update** - Configurable update schedule
5. **Documentation** - Generate docs/skills/README.md

## Documentation Sync

Beyond skills, this module can also sync project documentation:

| Document | Description |
|----------|-------------|
| DESIGN.md | Complete design system (colors, typography, components) |
| docs/API.md | API conventions |
| docs/CONTRIBUTING.md | Contribution guidelines |
| docs/ARCHITECTURE.md | Architecture decisions |

Example DESIGN.md includes:
- Color palette (primary, neutral, semantic)
- Typography scale
- Component patterns
- Spacing system

## Setpoints

| Setpoint | Default | Range | Description |
|----------|---------|-------|-------------|
| skills_dir | docs/skills | - | Directory for skills |
| auto_update | false | [true, false] | Auto-update on schedule |
| update_schedule | weekly | [daily, weekly, monthly] | Update frequency |
| pin_versions | true | [true, false] | Lock versions |

## Integration Points

- **Requires**: storage, bus interfaces
- **Provides**: skills.installed, skills.registry
- **Hooks**: reconcile.sh, doctor.sh
- **Bus events**: skills.installed, skills.updated

## Target Directory Structure

```
repo/
├── docs/
│ └── skills/
│ ├── react-19.md
│ ├── nextjs-15.md
│ ├── prisma.md
│ ├── tailwind-4.md
│ └── README.md # Index of all skills
├── .gitignore
└── DESIGN.md # If installed
```

## Acceptance Criteria

1. ✅ Installs skills to docs/skills/
2. ✅ Version pinning works
3. ✅ Auto-update on schedule
4. ✅ README.md index generated
5. ✅ Conflicts resolved
6. ✅ Integration with heartbeat

## Why This Matters

Instead of each developer/AI learning framework quirks separately, the repository itself contains the conventions. Any AI agent (Claude, OpenCode, Cursor, etc.) can read `docs/skills/` and follow the same patterns.
Loading