@the-bearded-bear/claude-craft 7.29.0 → 7.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dev/i18n/de/Paperclip/CLAUDE.md.template +95 -0
- package/Dev/i18n/de/Paperclip/README.md +79 -0
- package/Dev/i18n/de/Paperclip/agents/paperclip-reviewer.md +179 -0
- package/Dev/i18n/de/Paperclip/checklists/new-adapter.md +114 -0
- package/Dev/i18n/de/Paperclip/checklists/new-feature.md +102 -0
- package/Dev/i18n/de/Paperclip/checklists/pre-commit.md +98 -0
- package/Dev/i18n/de/Paperclip/commands/check-architecture.md +78 -0
- package/Dev/i18n/de/Paperclip/commands/check-code-quality.md +68 -0
- package/Dev/i18n/de/Paperclip/commands/check-compliance.md +110 -0
- package/Dev/i18n/de/Paperclip/commands/check-security.md +83 -0
- package/Dev/i18n/de/Paperclip/commands/check-testing.md +70 -0
- package/Dev/i18n/de/Paperclip/commands/generate-adapter.md +187 -0
- package/Dev/i18n/de/Paperclip/commands/generate-agent-config.md +92 -0
- package/Dev/i18n/de/Paperclip/commands/setup-company.md +159 -0
- package/Dev/i18n/de/Paperclip/rules/02-architecture-paperclip.md +128 -0
- package/Dev/i18n/de/Paperclip/rules/03-coding-standards.md +173 -0
- package/Dev/i18n/de/Paperclip/rules/06-tooling.md +221 -0
- package/Dev/i18n/de/Paperclip/rules/07-testing-paperclip.md +198 -0
- package/Dev/i18n/de/Paperclip/rules/08-quality-tools.md +132 -0
- package/Dev/i18n/de/Paperclip/rules/11-security-paperclip.md +146 -0
- package/Dev/i18n/de/Paperclip/rules/12-adapter-protocol.md +239 -0
- package/Dev/i18n/de/Paperclip/skills/adapter-development/SKILL.md +10 -0
- package/Dev/i18n/de/Paperclip/skills/architecture-paperclip/SKILL.md +10 -0
- package/Dev/i18n/de/Paperclip/skills/coding-standards-ts/SKILL.md +10 -0
- package/Dev/i18n/de/Paperclip/skills/paperclip-onboarding/SKILL.md +17 -0
- package/Dev/i18n/de/Paperclip/skills/security-paperclip/SKILL.md +10 -0
- package/Dev/i18n/de/Paperclip/skills/testing-paperclip/SKILL.md +10 -0
- package/Dev/i18n/de/Paperclip/templates/adapter-builtin.template.ts +38 -0
- package/Dev/i18n/de/Paperclip/templates/plugin-worker.template.ts +63 -0
- package/Dev/i18n/en/Paperclip/CLAUDE.md.template +95 -0
- package/Dev/i18n/en/Paperclip/README.md +79 -0
- package/Dev/i18n/en/Paperclip/agents/paperclip-reviewer.md +179 -0
- package/Dev/i18n/en/Paperclip/checklists/new-adapter.md +114 -0
- package/Dev/i18n/en/Paperclip/checklists/new-feature.md +102 -0
- package/Dev/i18n/en/Paperclip/checklists/pre-commit.md +98 -0
- package/Dev/i18n/en/Paperclip/commands/check-architecture.md +78 -0
- package/Dev/i18n/en/Paperclip/commands/check-code-quality.md +68 -0
- package/Dev/i18n/en/Paperclip/commands/check-compliance.md +110 -0
- package/Dev/i18n/en/Paperclip/commands/check-security.md +83 -0
- package/Dev/i18n/en/Paperclip/commands/check-testing.md +70 -0
- package/Dev/i18n/en/Paperclip/commands/generate-adapter.md +187 -0
- package/Dev/i18n/en/Paperclip/commands/generate-agent-config.md +92 -0
- package/Dev/i18n/en/Paperclip/commands/setup-company.md +159 -0
- package/Dev/i18n/en/Paperclip/rules/02-architecture-paperclip.md +128 -0
- package/Dev/i18n/en/Paperclip/rules/03-coding-standards.md +173 -0
- package/Dev/i18n/en/Paperclip/rules/06-tooling.md +221 -0
- package/Dev/i18n/en/Paperclip/rules/07-testing-paperclip.md +198 -0
- package/Dev/i18n/en/Paperclip/rules/08-quality-tools.md +132 -0
- package/Dev/i18n/en/Paperclip/rules/11-security-paperclip.md +146 -0
- package/Dev/i18n/en/Paperclip/rules/12-adapter-protocol.md +239 -0
- package/Dev/i18n/en/Paperclip/skills/adapter-development/SKILL.md +10 -0
- package/Dev/i18n/en/Paperclip/skills/architecture-paperclip/SKILL.md +10 -0
- package/Dev/i18n/en/Paperclip/skills/coding-standards-ts/SKILL.md +10 -0
- package/Dev/i18n/en/Paperclip/skills/paperclip-onboarding/SKILL.md +17 -0
- package/Dev/i18n/en/Paperclip/skills/security-paperclip/SKILL.md +10 -0
- package/Dev/i18n/en/Paperclip/skills/testing-paperclip/SKILL.md +10 -0
- package/Dev/i18n/en/Paperclip/templates/adapter-builtin.template.ts +38 -0
- package/Dev/i18n/en/Paperclip/templates/plugin-worker.template.ts +63 -0
- package/Dev/i18n/es/Paperclip/CLAUDE.md.template +95 -0
- package/Dev/i18n/es/Paperclip/README.md +79 -0
- package/Dev/i18n/es/Paperclip/agents/paperclip-reviewer.md +179 -0
- package/Dev/i18n/es/Paperclip/checklists/new-adapter.md +114 -0
- package/Dev/i18n/es/Paperclip/checklists/new-feature.md +102 -0
- package/Dev/i18n/es/Paperclip/checklists/pre-commit.md +98 -0
- package/Dev/i18n/es/Paperclip/commands/check-architecture.md +78 -0
- package/Dev/i18n/es/Paperclip/commands/check-code-quality.md +68 -0
- package/Dev/i18n/es/Paperclip/commands/check-compliance.md +110 -0
- package/Dev/i18n/es/Paperclip/commands/check-security.md +83 -0
- package/Dev/i18n/es/Paperclip/commands/check-testing.md +70 -0
- package/Dev/i18n/es/Paperclip/commands/generate-adapter.md +187 -0
- package/Dev/i18n/es/Paperclip/commands/generate-agent-config.md +92 -0
- package/Dev/i18n/es/Paperclip/commands/setup-company.md +159 -0
- package/Dev/i18n/es/Paperclip/rules/02-architecture-paperclip.md +128 -0
- package/Dev/i18n/es/Paperclip/rules/03-coding-standards.md +173 -0
- package/Dev/i18n/es/Paperclip/rules/06-tooling.md +221 -0
- package/Dev/i18n/es/Paperclip/rules/07-testing-paperclip.md +198 -0
- package/Dev/i18n/es/Paperclip/rules/08-quality-tools.md +132 -0
- package/Dev/i18n/es/Paperclip/rules/11-security-paperclip.md +146 -0
- package/Dev/i18n/es/Paperclip/rules/12-adapter-protocol.md +239 -0
- package/Dev/i18n/es/Paperclip/skills/adapter-development/SKILL.md +10 -0
- package/Dev/i18n/es/Paperclip/skills/architecture-paperclip/SKILL.md +10 -0
- package/Dev/i18n/es/Paperclip/skills/coding-standards-ts/SKILL.md +10 -0
- package/Dev/i18n/es/Paperclip/skills/paperclip-onboarding/SKILL.md +17 -0
- package/Dev/i18n/es/Paperclip/skills/security-paperclip/SKILL.md +10 -0
- package/Dev/i18n/es/Paperclip/skills/testing-paperclip/SKILL.md +10 -0
- package/Dev/i18n/es/Paperclip/templates/adapter-builtin.template.ts +38 -0
- package/Dev/i18n/es/Paperclip/templates/plugin-worker.template.ts +63 -0
- package/Dev/i18n/fr/Paperclip/CLAUDE.md.template +99 -0
- package/Dev/i18n/fr/Paperclip/README.md +79 -0
- package/Dev/i18n/fr/Paperclip/agents/paperclip-reviewer.md +179 -0
- package/Dev/i18n/fr/Paperclip/checklists/new-adapter.md +114 -0
- package/Dev/i18n/fr/Paperclip/checklists/new-feature.md +102 -0
- package/Dev/i18n/fr/Paperclip/checklists/pre-commit.md +98 -0
- package/Dev/i18n/fr/Paperclip/commands/check-architecture.md +78 -0
- package/Dev/i18n/fr/Paperclip/commands/check-code-quality.md +68 -0
- package/Dev/i18n/fr/Paperclip/commands/check-compliance.md +110 -0
- package/Dev/i18n/fr/Paperclip/commands/check-security.md +83 -0
- package/Dev/i18n/fr/Paperclip/commands/check-testing.md +70 -0
- package/Dev/i18n/fr/Paperclip/commands/generate-adapter.md +187 -0
- package/Dev/i18n/fr/Paperclip/commands/generate-agent-config.md +92 -0
- package/Dev/i18n/fr/Paperclip/commands/setup-company.md +159 -0
- package/Dev/i18n/fr/Paperclip/rules/02-architecture-paperclip.md +128 -0
- package/Dev/i18n/fr/Paperclip/rules/03-coding-standards.md +173 -0
- package/Dev/i18n/fr/Paperclip/rules/06-tooling.md +221 -0
- package/Dev/i18n/fr/Paperclip/rules/07-testing-paperclip.md +198 -0
- package/Dev/i18n/fr/Paperclip/rules/08-quality-tools.md +132 -0
- package/Dev/i18n/fr/Paperclip/rules/11-security-paperclip.md +146 -0
- package/Dev/i18n/fr/Paperclip/rules/12-adapter-protocol.md +239 -0
- package/Dev/i18n/fr/Paperclip/skills/adapter-development/SKILL.md +10 -0
- package/Dev/i18n/fr/Paperclip/skills/architecture-paperclip/SKILL.md +10 -0
- package/Dev/i18n/fr/Paperclip/skills/coding-standards-ts/SKILL.md +10 -0
- package/Dev/i18n/fr/Paperclip/skills/paperclip-onboarding/SKILL.md +17 -0
- package/Dev/i18n/fr/Paperclip/skills/security-paperclip/SKILL.md +10 -0
- package/Dev/i18n/fr/Paperclip/skills/testing-paperclip/SKILL.md +10 -0
- package/Dev/i18n/fr/Paperclip/templates/adapter-builtin.template.ts +38 -0
- package/Dev/i18n/fr/Paperclip/templates/plugin-worker.template.ts +63 -0
- package/Dev/i18n/pt/Paperclip/CLAUDE.md.template +95 -0
- package/Dev/i18n/pt/Paperclip/README.md +79 -0
- package/Dev/i18n/pt/Paperclip/agents/paperclip-reviewer.md +179 -0
- package/Dev/i18n/pt/Paperclip/checklists/new-adapter.md +114 -0
- package/Dev/i18n/pt/Paperclip/checklists/new-feature.md +102 -0
- package/Dev/i18n/pt/Paperclip/checklists/pre-commit.md +98 -0
- package/Dev/i18n/pt/Paperclip/commands/check-architecture.md +78 -0
- package/Dev/i18n/pt/Paperclip/commands/check-code-quality.md +68 -0
- package/Dev/i18n/pt/Paperclip/commands/check-compliance.md +110 -0
- package/Dev/i18n/pt/Paperclip/commands/check-security.md +83 -0
- package/Dev/i18n/pt/Paperclip/commands/check-testing.md +70 -0
- package/Dev/i18n/pt/Paperclip/commands/generate-adapter.md +187 -0
- package/Dev/i18n/pt/Paperclip/commands/generate-agent-config.md +92 -0
- package/Dev/i18n/pt/Paperclip/commands/setup-company.md +159 -0
- package/Dev/i18n/pt/Paperclip/rules/02-architecture-paperclip.md +128 -0
- package/Dev/i18n/pt/Paperclip/rules/03-coding-standards.md +173 -0
- package/Dev/i18n/pt/Paperclip/rules/06-tooling.md +221 -0
- package/Dev/i18n/pt/Paperclip/rules/07-testing-paperclip.md +198 -0
- package/Dev/i18n/pt/Paperclip/rules/08-quality-tools.md +132 -0
- package/Dev/i18n/pt/Paperclip/rules/11-security-paperclip.md +146 -0
- package/Dev/i18n/pt/Paperclip/rules/12-adapter-protocol.md +239 -0
- package/Dev/i18n/pt/Paperclip/skills/adapter-development/SKILL.md +10 -0
- package/Dev/i18n/pt/Paperclip/skills/architecture-paperclip/SKILL.md +10 -0
- package/Dev/i18n/pt/Paperclip/skills/coding-standards-ts/SKILL.md +10 -0
- package/Dev/i18n/pt/Paperclip/skills/paperclip-onboarding/SKILL.md +17 -0
- package/Dev/i18n/pt/Paperclip/skills/security-paperclip/SKILL.md +10 -0
- package/Dev/i18n/pt/Paperclip/skills/testing-paperclip/SKILL.md +10 -0
- package/Dev/i18n/pt/Paperclip/templates/adapter-builtin.template.ts +38 -0
- package/Dev/i18n/pt/Paperclip/templates/plugin-worker.template.ts +63 -0
- package/Dev/scripts/install-paperclip-rules.sh +184 -0
- package/README.md +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — Paperclip
|
|
2
|
+
|
|
3
|
+
> Generiert: {{GENERATION_DATE}} | Claude Craft v{{VERSION}}
|
|
4
|
+
|
|
5
|
+
## Was (Stack & Struktur)
|
|
6
|
+
|
|
7
|
+
**Stack**: Node.js 20+ LTS, TypeScript 5.x (strict), React 18+, Vitest, pnpm 9.15+, PostgreSQL 15+
|
|
8
|
+
**Paperclip**: 2026.403.0+ (MIT) — https://docs.paperclip.ing/
|
|
9
|
+
|
|
10
|
+
**Paperclip ist ein Two-Layer-System**: Eine Control-Plane (Server + Web + DB), die den gesamten Governance-Zustand verwaltet, und Adapter, die Arbeit ausführen und zurückmelden. Adapter entscheiden niemals über Budgets oder Approvals.
|
|
11
|
+
|
|
12
|
+
### Projektstruktur
|
|
13
|
+
```
|
|
14
|
+
paperclip/
|
|
15
|
+
├── server/ # Node.js + TS API (Module: agents, approvals, costs, ...)
|
|
16
|
+
├── ui/ # React UI (Dashboard, Org-Chart, Approvals)
|
|
17
|
+
├── shared/ # Zwischen Server und Web geteilte Typen
|
|
18
|
+
├── adapters/ # Adapter (claude-local, codex-local, http, process, ...)
|
|
19
|
+
└── tests/ # Übergreifende / E2E-Tests
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Warum (Governance-Invarianten)
|
|
23
|
+
|
|
24
|
+
| Invariante | Begründung |
|
|
25
|
+
|---|---|
|
|
26
|
+
| Adapter halten niemals Governance-Zustand | Auditierbarkeit + konsistente Policy |
|
|
27
|
+
| Budgets sind harte Grenzen | Keine stillen Überschreitungen |
|
|
28
|
+
| Approvals blockieren die Ausführung | Human-in-the-Loop ist real |
|
|
29
|
+
| Jede Mutation emittiert ein Activity-Event | Append-only Audit-Trail |
|
|
30
|
+
| `companyId` aus Session, niemals vom Client | Mandantenisolation |
|
|
31
|
+
|
|
32
|
+
Siehe `rules/02-architecture-paperclip.md` und `rules/12-adapter-protocol.md`.
|
|
33
|
+
|
|
34
|
+
## Wie (Befehle & Workflows)
|
|
35
|
+
|
|
36
|
+
### Entwicklung
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm install
|
|
40
|
+
pnpm dev # Server + Web im Watch-Modus
|
|
41
|
+
pnpm test # Vitest
|
|
42
|
+
pnpm test --coverage
|
|
43
|
+
pnpm lint
|
|
44
|
+
pnpm typecheck
|
|
45
|
+
pnpm build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Datenbank
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pnpm db:migrate
|
|
52
|
+
pnpm db:seed
|
|
53
|
+
pnpm db:reset # Nur dev
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Paperclip CLI
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npx paperclipai onboard --yes
|
|
60
|
+
paperclipai plugin list
|
|
61
|
+
paperclipai agent list
|
|
62
|
+
paperclipai company list
|
|
63
|
+
paperclipai approval list
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Workflow
|
|
67
|
+
|
|
68
|
+
1. **Analysieren** — Betroffene Module identifizieren, Governance-Auswirkungen (`rules/01-workflow-analysis.md`)
|
|
69
|
+
2. **TDD** — Red → Green → Refactor (`rules/07-testing-paperclip.md`)
|
|
70
|
+
3. **Adapter-Änderungen** → Shared Contract Suite ausführen (`rules/12-adapter-protocol.md`)
|
|
71
|
+
4. **Governance-Check** — Activity-Log, Budget, Approvals verdrahtet
|
|
72
|
+
5. **Compliance** — `/paperclip:check-compliance` vor PR ausführen
|
|
73
|
+
6. **Commit** — Conventional Commits
|
|
74
|
+
|
|
75
|
+
## Referenzen
|
|
76
|
+
|
|
77
|
+
| Thema | Regeldatei |
|
|
78
|
+
|---|---|
|
|
79
|
+
| Analyse | `rules/01-workflow-analysis.md` |
|
|
80
|
+
| Architektur | `rules/02-architecture-paperclip.md` |
|
|
81
|
+
| Coding-Standards | `rules/03-coding-standards.md` |
|
|
82
|
+
| Tooling | `rules/06-tooling.md` |
|
|
83
|
+
| Testing | `rules/07-testing-paperclip.md` |
|
|
84
|
+
| Quality-Tools | `rules/08-quality-tools.md` |
|
|
85
|
+
| Sicherheit | `rules/11-security-paperclip.md` |
|
|
86
|
+
| Adapter-Protokoll | `rules/12-adapter-protocol.md` |
|
|
87
|
+
|
|
88
|
+
<!-- PROJECT-SPECIFIC-START -->
|
|
89
|
+
## Projektspezifika
|
|
90
|
+
|
|
91
|
+
{{TECH_STACK}}
|
|
92
|
+
|
|
93
|
+
<!-- Projektspezifische Konfiguration unten hinzufügen -->
|
|
94
|
+
|
|
95
|
+
<!-- PROJECT-SPECIFIC-END -->
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Paperclip — Claude-Craft Integration
|
|
2
|
+
|
|
3
|
+
> **Paperclip**: Open-Source-Orchestrierung für Unternehmen ohne menschliches Personal.
|
|
4
|
+
> Docs: https://docs.paperclip.ing/ · Repo: https://github.com/paperclipai/paperclip · License: MIT
|
|
5
|
+
|
|
6
|
+
Dieses Verzeichnis enthält die Claude-Craft-Regeln, -Befehle, -Skills und -Templates für die Arbeit mit Paperclip — sowohl als **Contributor** zu einer Paperclip-Codebasis als auch als **Operator**, der Paperclip mit Claude Code als Adapter verwendet.
|
|
7
|
+
|
|
8
|
+
## Stack
|
|
9
|
+
|
|
10
|
+
| Tool | Version |
|
|
11
|
+
|---|---|
|
|
12
|
+
| Node.js | 20+ (LTS) |
|
|
13
|
+
| TypeScript | 5.x (strict) |
|
|
14
|
+
| pnpm | 9.15+ |
|
|
15
|
+
| React | 18+ (web UI) |
|
|
16
|
+
| Vitest | latest |
|
|
17
|
+
| PostgreSQL | 15+ (oder embedded für dev) |
|
|
18
|
+
| Paperclip | 2026.403.0+ |
|
|
19
|
+
|
|
20
|
+
## Inhalt
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
Paperclip/
|
|
24
|
+
├── CLAUDE.md.template
|
|
25
|
+
├── README.md (diese Datei)
|
|
26
|
+
├── rules/ # 7 Regeldateien (Architektur, Standards, Tooling, Testing, Qualität, Sicherheit, Adapter-Protokoll)
|
|
27
|
+
├── commands/ # 8 Slash-Befehle (check-*, generate-*, setup-company)
|
|
28
|
+
├── templates/ # Adapter + agent-config Vorlagen
|
|
29
|
+
├── checklists/ # pre-commit, new-feature, new-adapter
|
|
30
|
+
├── agents/ # paperclip-reviewer
|
|
31
|
+
└── skills/ # 6 On-Demand-Skills
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Befehle
|
|
35
|
+
|
|
36
|
+
| Befehl | Zweck |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `/paperclip:check-compliance` | Vollständiges Audit (Architektur + Qualität + Tests + Sicherheit + Adapter-Protokoll), Score /100 |
|
|
39
|
+
| `/paperclip:check-architecture` | Two-Layer-Trennung + Modulgrenzen + Activity-Log-Abdeckung |
|
|
40
|
+
| `/paperclip:check-code-quality` | TypeScript-Strenge, Lint, Komplexität, Logging-Hygiene |
|
|
41
|
+
| `/paperclip:check-testing` | Coverage, Adapter-Vertragstests, mandantenübergreifende Isolation |
|
|
42
|
+
| `/paperclip:check-security` | Tenancy, Secrets, Approvals, Budgets, signierter Adapter-Channel |
|
|
43
|
+
| `/paperclip:generate-adapter` | Generiert einen Adapter (local / process / http) |
|
|
44
|
+
| `/paperclip:generate-agent-config` | Generiert eine `agent.yaml` mit Budget + Approvals |
|
|
45
|
+
| `/paperclip:setup-company` | Bootstrapped eine neue Paperclip-Company End-to-End |
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
|
|
49
|
+
### Via Makefile (aus einem claude-craft Checkout)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
make install-paperclip TARGET=/path/to/my/paperclip-project RULES_LANG=en
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Via Skript
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
./Dev/scripts/install-paperclip-rules.sh --lang=en /path/to/my/paperclip-project
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Flags
|
|
62
|
+
|
|
63
|
+
`--install` · `--update` · `--force` · `--preserve-config` · `--dry-run` · `--backup` · `--interactive` · `--lang=<en|fr|es|de|pt>`
|
|
64
|
+
|
|
65
|
+
## Governance-Invarianten (nicht verhandelbar)
|
|
66
|
+
|
|
67
|
+
- Adapter halten niemals Governance-Zustand (Budgets, Approvals, Permissions sind ausschließlich Control-Plane).
|
|
68
|
+
- Budgets sind harte Grenzen. Stille Überschreitungen sind niemals akzeptabel.
|
|
69
|
+
- Approvals blockieren die Adapter-Ausführung, bis die Control-Plane eine Entscheidung zurückgibt.
|
|
70
|
+
- Jede DB-Mutation emittiert ein Activity-Event. Das Activity-Log ist append-only.
|
|
71
|
+
- `companyId` leitet sich immer aus der authentifizierten Session ab.
|
|
72
|
+
- Plugins deklarieren minimale Capabilities; der Host lehnt Out-of-Scope-Aufrufe mit `CapabilityDeniedError` ab.
|
|
73
|
+
- Öffentliche Endpoints laufen hinter TLS 1.3; Operator-Auth via Better Auth mit rotiertem `BETTER_AUTH_SECRET`.
|
|
74
|
+
|
|
75
|
+
## Links
|
|
76
|
+
|
|
77
|
+
- Paperclip docs: https://docs.paperclip.ing/
|
|
78
|
+
- Paperclip repo: https://github.com/paperclipai/paperclip
|
|
79
|
+
- Claude-Craft: https://github.com/the-bearded-cto/claude-craft
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: paperclip-reviewer
|
|
3
|
+
description: Paperclip-Code-Review-Spezialist — Two-Layer-Architektur, Adapter-Vertrag, Governance-Integrität, TypeScript-Strenge
|
|
4
|
+
model: sonnet
|
|
5
|
+
tools: [Read, Glob, Grep, WebFetch, WebSearch]
|
|
6
|
+
disallowedTools: [Write, Edit, Bash, NotebookEdit]
|
|
7
|
+
permissionMode: default
|
|
8
|
+
skills: [solid-principles, testing, security]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Paperclip-Code-Review-Agent
|
|
12
|
+
|
|
13
|
+
## Identität
|
|
14
|
+
|
|
15
|
+
Ich reviewe Paperclip-Codebasen — sowohl den Core (Control-Plane + Web-UI) als auch benutzerdefinierte Adapter. Mein Fokus liegt auf den Invarianten, die Paperclip als Governance-System vertrauenswürdig machen: **Adapter halten niemals Governance-Zustand**, Budgets sind harte Grenzen, Approvals blockieren die Ausführung, das Activity-Log erfasst jede Mutation, und Tenancy-Isolation wird auf jeder Schicht durchgesetzt.
|
|
16
|
+
|
|
17
|
+
Ich produziere kein generisches TypeScript-Feedback. Ich suche nach dem, was den Governance-Vertrag bricht.
|
|
18
|
+
|
|
19
|
+
## Scoring (100 Punkte)
|
|
20
|
+
|
|
21
|
+
| Kategorie | Punkte | Fokus |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| Architektur & Governance-Integrität | 30 | Monorepo-Grenzen, Server-only-Governance, Activity-Log-Abdeckung |
|
|
24
|
+
| Extension-Korrektheit | 20 | Adapter-Exports, Plugin-SDK-Nutzung, Capability-Minimalismus |
|
|
25
|
+
| TypeScript & Code-Qualität | 20 | Strict-Modus, kein `any`, Error-Modellierung, Komplexität |
|
|
26
|
+
| Sicherheit | 20 | Tenancy, Secrets, Header, Supply-Chain |
|
|
27
|
+
| Tests | 10 | Coverage, Plugin-Harness, Cross-Tenant-Tests, Regressions-Tests |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 1. Architektur & Governance-Integrität (30 Punkte)
|
|
32
|
+
|
|
33
|
+
### Kritisch (Blocker)
|
|
34
|
+
|
|
35
|
+
- Governance-Entscheidung (Budget-Check, Approval-Check, Permission-Check) innerhalb `adapters/**` — Blocker.
|
|
36
|
+
- DB-Mutation ohne angrenzenden `activity.emit(...)`-Aufruf — Blocker.
|
|
37
|
+
- Route-Datei (`routes.ts`) führt DB-Zugriff direkt aus — Blocker.
|
|
38
|
+
- Cross-Modul-Import, der die Service-API umgeht — Blocker.
|
|
39
|
+
|
|
40
|
+
### Major
|
|
41
|
+
|
|
42
|
+
- Modul-Ordner fehlt eines von `routes.ts` / `service.ts` / `repository.ts`.
|
|
43
|
+
- `shared/types/` enthält Runtime-Code (Funktionen, Klassen).
|
|
44
|
+
- Web-UI trifft Governance-Entscheidungen lokal (versteckt Buttons basierend auf Budget-Mathematik, die client-seitig statt über Server-Flag erfolgt).
|
|
45
|
+
|
|
46
|
+
### Minor
|
|
47
|
+
|
|
48
|
+
- Modul überschreitet ~1500 LOC — Aufteilung vorschlagen.
|
|
49
|
+
- Fehlender OpenAPI-Eintrag für eine neue Route.
|
|
50
|
+
|
|
51
|
+
## 2. Extension-Korrektheit (20 Punkte)
|
|
52
|
+
|
|
53
|
+
### Built-in-Adapter (`packages/adapters/*`)
|
|
54
|
+
|
|
55
|
+
**Kritisch (Blocker)**
|
|
56
|
+
- Fehlende `type`, `label`, `models` oder `agentConfigurationDoc`-Exports
|
|
57
|
+
- Governance-Logik (Budget- / Approval- / Permission-Checks) im Adapter implementiert
|
|
58
|
+
- `type` nach Agent-Nutzung umbenannt — Wire-Breakage
|
|
59
|
+
|
|
60
|
+
**Major**
|
|
61
|
+
- `agentConfigurationDoc` nicht synchron mit den echten Feldern, die von `./server` akzeptiert werden
|
|
62
|
+
- `models`-Liste veraltet vs. tatsächliche Runtime-Capabilities
|
|
63
|
+
- Keine Unit-Tests für Spawn / Env-Handling
|
|
64
|
+
|
|
65
|
+
**Minor**
|
|
66
|
+
- Paket fehlt `@paperclipai/*`-Scope
|
|
67
|
+
- Fehlende `CHANGELOG.md`
|
|
68
|
+
|
|
69
|
+
### Plugin (`@paperclipai/plugin-sdk`)
|
|
70
|
+
|
|
71
|
+
**Kritisch (Blocker)**
|
|
72
|
+
- Manifest fordert breitere Capabilities als tatsächlich genutzt (`network`, `filesystem`) — über-gescoped Sandbox
|
|
73
|
+
- Secrets als rohe Werte gelesen statt `ctx.secrets.resolve(ref)`
|
|
74
|
+
- Worker führt Async-I/O im `setup()`-Return-Pfad aus — blockiert Host-Handshake
|
|
75
|
+
|
|
76
|
+
**Major**
|
|
77
|
+
- State auf Disk persistiert statt `ctx.state`
|
|
78
|
+
- Fehlende `onHealth()` oder Health-Implementation, die Upstream aufruft
|
|
79
|
+
- Tests verwenden nicht `createTestHarness` aus `@paperclipai/plugin-sdk/testing`
|
|
80
|
+
|
|
81
|
+
**Minor**
|
|
82
|
+
- Manifest-Version nicht synchron mit `package.json`
|
|
83
|
+
- Fehlende README, die Events / Jobs / Capabilities beschreibt
|
|
84
|
+
|
|
85
|
+
## 3. TypeScript & Code-Qualität (20 Punkte)
|
|
86
|
+
|
|
87
|
+
### Kritisch
|
|
88
|
+
|
|
89
|
+
- `: any` oder `as any` in neuem Code.
|
|
90
|
+
- `@typescript-eslint/no-floating-promises` deaktiviert.
|
|
91
|
+
- `tsconfig` lockert `strict` oder `noUncheckedIndexedAccess`.
|
|
92
|
+
|
|
93
|
+
### Major
|
|
94
|
+
|
|
95
|
+
- Funktionen mit kognitiver Komplexität ≥ 10.
|
|
96
|
+
- Dateien > 300 Zeilen.
|
|
97
|
+
- Default-Exports außerhalb React-Komponenten.
|
|
98
|
+
- `.then()`-Chains statt `async/await`.
|
|
99
|
+
|
|
100
|
+
### Minor
|
|
101
|
+
|
|
102
|
+
- Nicht-konventionelle Dateinamen (nicht Kebab-Case).
|
|
103
|
+
- Ungenutzte Exports (Knip-Findings).
|
|
104
|
+
|
|
105
|
+
## 4. Sicherheit (20 Punkte)
|
|
106
|
+
|
|
107
|
+
### Kritisch
|
|
108
|
+
|
|
109
|
+
- Endpoint liest `companyId` aus Client-Payload.
|
|
110
|
+
- Secret-Wert geloggt.
|
|
111
|
+
- Adapter-Channel nicht signiert oder TLS < 1.3 in Prod-Config.
|
|
112
|
+
- Budget-Increment, das die Grenze stillschweigend überschreiten kann.
|
|
113
|
+
|
|
114
|
+
### Major
|
|
115
|
+
|
|
116
|
+
- Fehlende CSP / HSTS / COOP / CORP-Header.
|
|
117
|
+
- Passwörter mit schwächerem Hash als Argon2id gespeichert.
|
|
118
|
+
- `pnpm audit --audit-level=high` nicht in CI verdrahtet.
|
|
119
|
+
|
|
120
|
+
### Minor
|
|
121
|
+
|
|
122
|
+
- `.env` im Repo vorhanden, aber von `.gitignore` abgedeckt.
|
|
123
|
+
|
|
124
|
+
## 5. Tests (10 Punkte)
|
|
125
|
+
|
|
126
|
+
### Kritisch
|
|
127
|
+
|
|
128
|
+
- Coverage-Schwellenwert fehlt oder unter 80% global gesenkt.
|
|
129
|
+
- Adapter fehlt `contract.test.ts`.
|
|
130
|
+
- Bug-Fix-Commit ohne neuen / modifizierten Test.
|
|
131
|
+
|
|
132
|
+
### Major
|
|
133
|
+
|
|
134
|
+
- Integration-Tests mocken die DB.
|
|
135
|
+
- Kein Cross-Tenant-Isolation-Test für ein Modul.
|
|
136
|
+
- `.only` oder `.skip` auf `main`.
|
|
137
|
+
|
|
138
|
+
### Minor
|
|
139
|
+
|
|
140
|
+
- Snapshots > 180 Tage alt ohne Notiz.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Review-Output
|
|
145
|
+
|
|
146
|
+
Produzieren Sie einen strukturierten Markdown-Report:
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
## Paperclip-Review — {Branch oder Pfad}
|
|
150
|
+
|
|
151
|
+
### Scores
|
|
152
|
+
Architektur & Governance : {NN}/30
|
|
153
|
+
Extension-Korrektheit : {NN}/20
|
|
154
|
+
TypeScript & Code-Qualität : {NN}/20
|
|
155
|
+
Sicherheit : {NN}/20
|
|
156
|
+
Tests : {NN}/10
|
|
157
|
+
────────────────────────────────────
|
|
158
|
+
GESAMT : {NNN}/100 Note: {A-F}
|
|
159
|
+
|
|
160
|
+
### Blocker
|
|
161
|
+
- file:line — Beschreibung — Fix
|
|
162
|
+
|
|
163
|
+
### Majors
|
|
164
|
+
- file:line — Beschreibung — Fix
|
|
165
|
+
|
|
166
|
+
### Minors
|
|
167
|
+
- file:line — Beschreibung — Fix
|
|
168
|
+
|
|
169
|
+
### Top-3-Remediation-Prioritäten
|
|
170
|
+
1. …
|
|
171
|
+
2. …
|
|
172
|
+
3. …
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Bleiben Sie spezifisch: Jeder Finding nennt eine Datei + Zeile, und jeder Fix ist in unter einem Tag umsetzbar. Keine generischen „Erwägen Sie Refactoring"-Bemerkungen.
|
|
176
|
+
|
|
177
|
+
## Nicht-Ziele
|
|
178
|
+
|
|
179
|
+
Ich schreibe Code nicht um. Ich berühre keine Konfiguration. Ich schlage keine Produkt-Features vor. Ich markiere Abweichungen vom Paperclip-Vertrag und von den Claude-Craft-Regeln in `rules/02…12`.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Neue Extension Checklist — Paperclip
|
|
2
|
+
|
|
3
|
+
Eine "neue Extension" ist entweder ein **built-in Adapter** (AI-Runtime unter `packages/adapters/<name>/`) oder ein **Plugin** (Feature, verteilt via `@paperclipai/plugin-sdk` und `create-paperclip-plugin`). Zuerst einen auswählen.
|
|
4
|
+
|
|
5
|
+
## 0. Entscheidung
|
|
6
|
+
|
|
7
|
+
- [ ] Bestätigen: Ist dies eine neue AI-Runtime (**Adapter**) oder ein Feature (**Plugin**)?
|
|
8
|
+
- [ ] Die existierenden Paperclip-Adapter prüfen (`claude-local`, `codex-local`, `cursor-local`, `gemini-local`, `opencode-local`, `openclaw-gateway`, `pi-local`) — vielleicht passt bereits einer
|
|
9
|
+
- [ ] Einen kebab-case-Namen wählen
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Track A — Plugin (am häufigsten)
|
|
14
|
+
|
|
15
|
+
### 1. Scaffold
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm create paperclip-plugin@latest
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- [ ] Output-Verzeichnis enthält `src/worker.ts`, `src/manifest.ts`, `tests/`
|
|
22
|
+
- [ ] `pnpm install` erfolgreich
|
|
23
|
+
|
|
24
|
+
### 2. Manifest
|
|
25
|
+
|
|
26
|
+
- [ ] `id`, `name`, `version` gesetzt; `version` matcht `package.json`
|
|
27
|
+
- [ ] `apiVersion: 1`
|
|
28
|
+
- [ ] `capabilities` **minimal** deklariert (nicht breit `network`, `filesystem`, etc. anfordern)
|
|
29
|
+
- [ ] `categories` angemessen
|
|
30
|
+
- [ ] `instanceConfigSchema` aus einem Zod-Schema generiert mit klarem `.describe(...)` bei jedem Feld
|
|
31
|
+
|
|
32
|
+
### 3. Worker
|
|
33
|
+
|
|
34
|
+
- [ ] `definePlugin({ setup(ctx), onHealth })` Default-Export
|
|
35
|
+
- [ ] `runWorker(plugin, import.meta.url)` vorhanden
|
|
36
|
+
- [ ] `setup(ctx)` registriert Handler synchron (kein Awaiting von Upstream-Calls während Setup)
|
|
37
|
+
- [ ] Events abonniert via `ctx.events.on(...)`
|
|
38
|
+
- [ ] Jobs registriert via `ctx.jobs.register(...)`
|
|
39
|
+
- [ ] Secrets aufgelöst via `ctx.secrets.resolve(ref)` — keine rohen Keys im Code
|
|
40
|
+
- [ ] State persistiert via `ctx.state` mit korrektem Scope (company / project / issue)
|
|
41
|
+
- [ ] HTTP-Aufrufe verwenden `ctx.http.fetch` (respektiert Capabilities und Allowlist)
|
|
42
|
+
|
|
43
|
+
### 4. Tests
|
|
44
|
+
|
|
45
|
+
- [ ] `createTestHarness` aus `@paperclipai/plugin-sdk/testing`
|
|
46
|
+
- [ ] Happy-Path abgedeckt
|
|
47
|
+
- [ ] Event-Handler-Fehlerfall abgedeckt
|
|
48
|
+
- [ ] Health-Check gibt schnell zurück
|
|
49
|
+
|
|
50
|
+
### 5. Installieren & verifizieren
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
paperclipai plugin install ./<plugin-name>
|
|
54
|
+
paperclipai plugin inspect <pluginKey>
|
|
55
|
+
paperclipai plugin enable <pluginKey>
|
|
56
|
+
paperclipai plugin list
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- [ ] Plugin erscheint gesund im Dashboard
|
|
60
|
+
- [ ] Events, auf die es lauscht, triggern seine Handler
|
|
61
|
+
- [ ] Deinstallation hinterlässt keinen Residual-State, den es nicht behalten sollte
|
|
62
|
+
|
|
63
|
+
### 6. Docs
|
|
64
|
+
|
|
65
|
+
- [ ] `README.md` listet auf: Zweck, Config-Felder, erforderliche Capabilities, behandelte Events, exponierte Jobs, bekannte Limits
|
|
66
|
+
- [ ] `CHANGELOG.md` beginnt bei `0.1.0`
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Track B — Built-in Adapter (AI-Runtime)
|
|
71
|
+
|
|
72
|
+
Einen built-in Adapter hinzuzufügen bedeutet, zu Paperclip beizutragen (oder es zu forken).
|
|
73
|
+
|
|
74
|
+
### 1. Package
|
|
75
|
+
|
|
76
|
+
- [ ] Neuer Ordner `packages/adapters/<name>/`
|
|
77
|
+
- [ ] `package.json` benannt als `@paperclipai/adapter-<name>`, im `@paperclipai/*`-Scope
|
|
78
|
+
- [ ] Exports: `.`, `./server`, `./ui`, `./cli` (nur diejenigen, die implementiert werden)
|
|
79
|
+
|
|
80
|
+
### 2. Entry (`src/index.ts`)
|
|
81
|
+
|
|
82
|
+
- [ ] Exportiert `type` (stabiler Wire-Identifier, z.B. `<name>_local`)
|
|
83
|
+
- [ ] Exportiert `label` (human-readable)
|
|
84
|
+
- [ ] Exportiert `models` (ID + Label-Liste)
|
|
85
|
+
- [ ] Exportiert `agentConfigurationDoc` (Markdown, das alle Felder akkurat beschreibt)
|
|
86
|
+
|
|
87
|
+
### 3. Server-Surface (`src/server/index.ts`)
|
|
88
|
+
|
|
89
|
+
- [ ] Process-Spawn + Supervise-Code
|
|
90
|
+
- [ ] Timeout + SIGTERM-Grace-Handling
|
|
91
|
+
- [ ] Workspace-Strategy-Support (`git_worktree` etc.)
|
|
92
|
+
- [ ] Paperclip-Runtime-Umgebungsvariablen (`PAPERCLIP_WORKSPACE_*`, `PAPERCLIP_RUNTIME_*`) zum Child propagiert
|
|
93
|
+
- [ ] **Keine** Budget-/Approval-/Permission-Checks hier — der Server besitzt das
|
|
94
|
+
|
|
95
|
+
### 4. Registrierung
|
|
96
|
+
|
|
97
|
+
- [ ] Server-Boot registriert den Adapter via `registerServerAdapter(adapter)`
|
|
98
|
+
- [ ] Existierende Adapter-Lookup-Helfer (`requireServerAdapter`, etc.) funktionieren damit
|
|
99
|
+
|
|
100
|
+
### 5. UI-/CLI-Surfaces (optional)
|
|
101
|
+
|
|
102
|
+
- [ ] `src/ui/index.ts` — React-Bits für das Adapter-Config-Formular
|
|
103
|
+
- [ ] `src/cli/index.ts` — Subcommands unter `paperclipai`, falls der Adapter sie benötigt
|
|
104
|
+
|
|
105
|
+
### 6. Tests
|
|
106
|
+
|
|
107
|
+
- [ ] Unit-Tests für spawn / parse / env-Logik
|
|
108
|
+
- [ ] Adapter wird End-to-End in den E2E-Tests des Repos getestet, falls breit relevant
|
|
109
|
+
|
|
110
|
+
### 7. Docs
|
|
111
|
+
|
|
112
|
+
- [ ] `agentConfigurationDoc` ist vollständig und korrekt
|
|
113
|
+
- [ ] `CHANGELOG.md` beginnt bei `0.1.0`
|
|
114
|
+
- [ ] Eintrag zur Paperclip-Docs-Website unter "Adapters" hinzugefügt
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Checklist für neue Features — Paperclip
|
|
2
|
+
|
|
3
|
+
Ein Feature in Paperclip berührt typischerweise ein oder mehrere **Module** (`server/src/modules/*`) und manchmal einen **Adapter**. Verwenden Sie diese Checklist End-to-End.
|
|
4
|
+
|
|
5
|
+
## 0. Analyse (vor dem Schreiben von Code)
|
|
6
|
+
|
|
7
|
+
- [ ] Identifizieren Sie die betroffenen Domänen (agents / approvals / costs / …)
|
|
8
|
+
- [ ] Bestimmen Sie, ob Governance betroffen ist (Budgets, Approvals, Activity-Log)
|
|
9
|
+
- [ ] Listen Sie die Datenmigration auf, falls vorhanden
|
|
10
|
+
- [ ] Prüfen Sie auf Cross-Tenant-Implikationen
|
|
11
|
+
- [ ] Schreiben Sie eine 5-Zeilen-Design-Notiz: was ändert sich, warum, welche Dateien
|
|
12
|
+
|
|
13
|
+
## 1. Schema (falls zutreffend)
|
|
14
|
+
|
|
15
|
+
- [ ] Migrationsdatei unter `server/src/db/migrations/` (forward + down)
|
|
16
|
+
- [ ] Neue Spalten nullable ODER in derselben Migration backfilled
|
|
17
|
+
- [ ] Indizes auf allen Spalten, die in WHERE-Klauseln verwendet werden
|
|
18
|
+
- [ ] Activity-Log-Tabelle unberührt (ist Append-only)
|
|
19
|
+
- [ ] `pnpm db:migrate` läuft lokal erfolgreich
|
|
20
|
+
|
|
21
|
+
## 2. Typen (`shared/types`)
|
|
22
|
+
|
|
23
|
+
- [ ] Neue Domain-Typen in `shared/types/<domain>.ts` hinzugefügt
|
|
24
|
+
- [ ] Kein Runtime-Code in `shared/types/`
|
|
25
|
+
- [ ] Diskriminierte Unions für Variant-Typen verwendet
|
|
26
|
+
- [ ] Re-Export-Pfad bei Bedarf aktualisiert
|
|
27
|
+
|
|
28
|
+
## 3. Service (`server/src/modules/<domain>/service.ts`)
|
|
29
|
+
|
|
30
|
+
- [ ] Business-Logik lebt hier
|
|
31
|
+
- [ ] Gibt typisierte Ergebnisse zurück oder wirft `DomainError`
|
|
32
|
+
- [ ] Emittiert ein Activity-Event bei jeder Mutation
|
|
33
|
+
- [ ] Setzt Budget- / Approval-Gates durch, wo relevant
|
|
34
|
+
- [ ] Tenancy: leitet `companyId` aus Session ab, filtert entsprechend
|
|
35
|
+
- [ ] Unit-Tests mit gemocktem Repository
|
|
36
|
+
|
|
37
|
+
## 4. Repository (`server/src/modules/<domain>/repository.ts`)
|
|
38
|
+
|
|
39
|
+
- [ ] Nur parametrisierte Queries
|
|
40
|
+
- [ ] Keine Business-Logik
|
|
41
|
+
- [ ] Integration-Tests gegen echtes Postgres
|
|
42
|
+
|
|
43
|
+
## 5. Routes (`server/src/modules/<domain>/routes.ts`)
|
|
44
|
+
|
|
45
|
+
- [ ] Eine Route pro Operation
|
|
46
|
+
- [ ] Input via Zod (oder äquivalent) validiert
|
|
47
|
+
- [ ] Responses typisiert; Errors auf `DomainError`-Codes gemappt
|
|
48
|
+
- [ ] Kein direkter DB-Zugriff
|
|
49
|
+
- [ ] OpenAPI-Spec aktualisiert
|
|
50
|
+
|
|
51
|
+
## 6. Web-UI (falls zutreffend)
|
|
52
|
+
|
|
53
|
+
- [ ] API-Client aus OpenAPI regeneriert (`pnpm generate:api`)
|
|
54
|
+
- [ ] Neue UI unter `ui/src/` (folgt der existierenden Routing-Konvention)
|
|
55
|
+
- [ ] Governance-Flags kommen vom Server, nicht client-computed
|
|
56
|
+
- [ ] Loading- und Error-States behandelt
|
|
57
|
+
- [ ] Accessibility: Keyboard- + Screen-Reader-Pfade verifiziert
|
|
58
|
+
|
|
59
|
+
## 7. Extension-Surface (falls das Feature Änderungen erfordert)
|
|
60
|
+
|
|
61
|
+
### Built-in-Adapter (AI-Runtime)
|
|
62
|
+
|
|
63
|
+
- [ ] `packages/adapters/<name>/src/index.ts` — `type` / `label` / `models` / `agentConfigurationDoc` weiterhin akkurat
|
|
64
|
+
- [ ] Serverseitiger Registry-Eintrag aktualisiert (`registerServerAdapter`)
|
|
65
|
+
- [ ] Existierende Agent-Configs validieren weiterhin (kein Breaking-Field-Rename)
|
|
66
|
+
|
|
67
|
+
### Plugin (Feature)
|
|
68
|
+
|
|
69
|
+
- [ ] Manifest-Capabilities bleiben minimal (nur hinzufügen, was dieses Feature benötigt)
|
|
70
|
+
- [ ] `definePlugin({ setup })`-Wiring für neue Events / Jobs / Data-Provider
|
|
71
|
+
- [ ] Config-Schema (Zod) mit klaren Beschreibungen aktualisiert
|
|
72
|
+
- [ ] Plugin-Test-Harness aus `@paperclipai/plugin-sdk/testing` läuft weiterhin durch
|
|
73
|
+
|
|
74
|
+
## 8. Tests
|
|
75
|
+
|
|
76
|
+
- [ ] Unit: Service-Logik + Error-Pfade
|
|
77
|
+
- [ ] Integration: Modul-Routes + DB mit echtem Postgres
|
|
78
|
+
- [ ] Cross-Tenant-Isolation: User A von Company X kann Company-Y-Daten nicht berühren
|
|
79
|
+
- [ ] Budget-Enforcement: Über-Limit-Versuch gibt `BUDGET_EXCEEDED` zurück
|
|
80
|
+
- [ ] Approval-Gating: Aktion blockiert, bis genehmigt oder Timeout
|
|
81
|
+
- [ ] Adapter-Vertrag: Shared-Suite erneut ausführen
|
|
82
|
+
- [ ] Coverage-Schwellenwerte weiterhin grün (≥ 80 global, ≥ 90 für agents/approvals/costs)
|
|
83
|
+
|
|
84
|
+
## 9. Dokumentation
|
|
85
|
+
|
|
86
|
+
- [ ] CHANGELOG-Eintrag unter `## Unreleased`
|
|
87
|
+
- [ ] OpenAPI-Spec committed
|
|
88
|
+
- [ ] Adapter-README aktualisiert, falls unterstützte Aktionen sich geändert haben
|
|
89
|
+
- [ ] Runbook aktualisiert, falls Feature Incident-Response betrifft (Kill-Switch, Revocation, Export)
|
|
90
|
+
|
|
91
|
+
## 10. Review
|
|
92
|
+
|
|
93
|
+
- [ ] Self-Review: `git diff main...HEAD`
|
|
94
|
+
- [ ] `/paperclip:check-compliance` lokal ausführen
|
|
95
|
+
- [ ] PR-Beschreibung: was, warum, Migrationsplan, Rollback-Plan
|
|
96
|
+
- [ ] Adapter-Vertragstests grün für jeden berührten Adapter
|
|
97
|
+
|
|
98
|
+
## 11. Rollout
|
|
99
|
+
|
|
100
|
+
- [ ] Deploy-Plan: Migrate forward, Code deployen, Health verifizieren
|
|
101
|
+
- [ ] Kill-Switch nach Deploy weiterhin funktional
|
|
102
|
+
- [ ] Activity-Log fängt sichtbar die Events des neuen Features ein
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Pre-Commit-Checklist — Paperclip
|
|
2
|
+
|
|
3
|
+
## Schnelle Validation vor jedem Commit
|
|
4
|
+
|
|
5
|
+
### Code-Qualität
|
|
6
|
+
|
|
7
|
+
- [ ] `pnpm format --check` läuft durch
|
|
8
|
+
- [ ] `pnpm lint` läuft durch (0 Fehler, 0 Warnungen)
|
|
9
|
+
- [ ] `pnpm typecheck` läuft über Workspaces hinweg durch
|
|
10
|
+
- [ ] Kein `any`, kein `as any`, kein `// @ts-ignore`
|
|
11
|
+
- [ ] Kein `console.log` / `debugger` in Runtime-Code
|
|
12
|
+
- [ ] Keine ungenutzten Exports (lokal `pnpm knip` ausführen)
|
|
13
|
+
|
|
14
|
+
### Tests
|
|
15
|
+
|
|
16
|
+
- [ ] `pnpm test --changed` läuft durch
|
|
17
|
+
- [ ] Neues Feature → neue(r) Test(s) hinzugefügt
|
|
18
|
+
- [ ] Bug-Fix → Regressions-Test hinzugefügt
|
|
19
|
+
- [ ] Adapter-Änderung → `contract.test.ts` noch grün
|
|
20
|
+
|
|
21
|
+
### Governance & Sicherheit
|
|
22
|
+
|
|
23
|
+
- [ ] Keine Governance-Entscheidung zu irgendeinem Adapter hinzugefügt (`adapters/**`)
|
|
24
|
+
- [ ] Jede neue DB-Mutation emittiert ein Activity-Event
|
|
25
|
+
- [ ] Keine `companyId` aus Client-Body/Query
|
|
26
|
+
- [ ] Kein Secret-Wert hart codiert
|
|
27
|
+
- [ ] Logs exponieren keine Secrets, Tokens oder vollständige Bodies
|
|
28
|
+
|
|
29
|
+
### Build
|
|
30
|
+
|
|
31
|
+
- [ ] `pnpm build` erfolgreich
|
|
32
|
+
- [ ] Keine neuen Deprecation-Warnungen
|
|
33
|
+
|
|
34
|
+
### Docs
|
|
35
|
+
|
|
36
|
+
- [ ] OpenAPI-Spec für neue/geänderte Routen aktualisiert
|
|
37
|
+
- [ ] Adapter-README aktualisiert, falls unterstützte Aktionen sich geändert haben
|
|
38
|
+
- [ ] CHANGELOG-Eintrag unter `## Unreleased`
|
|
39
|
+
|
|
40
|
+
### Git
|
|
41
|
+
|
|
42
|
+
- [ ] Commit-Message folgt Conventional Commits (`feat(adapters): …`, `fix(approvals): …`)
|
|
43
|
+
- [ ] Branch rebased auf `main`
|
|
44
|
+
- [ ] Keine übrig gebliebenen `TODO: remove` oder `console.log`-Debug-Statements
|
|
45
|
+
- [ ] `.env` ist nicht staged
|
|
46
|
+
|
|
47
|
+
## Automatisierte Validation
|
|
48
|
+
|
|
49
|
+
`package.json`:
|
|
50
|
+
|
|
51
|
+
```jsonc
|
|
52
|
+
{
|
|
53
|
+
"simple-git-hooks": {
|
|
54
|
+
"pre-commit": "pnpm lint-staged",
|
|
55
|
+
"commit-msg": "npx --no-install commitlint --edit \"$1\"",
|
|
56
|
+
"pre-push": "pnpm typecheck && pnpm test --changed"
|
|
57
|
+
},
|
|
58
|
+
"lint-staged": {
|
|
59
|
+
"*.{ts,tsx}": ["eslint --fix", "prettier --write", "vitest related --run"],
|
|
60
|
+
"*.{json,md,yaml,yml}": ["prettier --write"]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Schnellbefehle
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pnpm lint
|
|
69
|
+
pnpm lint --fix
|
|
70
|
+
pnpm typecheck
|
|
71
|
+
pnpm test --changed
|
|
72
|
+
pnpm format
|
|
73
|
+
pnpm audit --audit-level=high
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Häufige Probleme
|
|
77
|
+
|
|
78
|
+
### "Test requires a real DB" in CI
|
|
79
|
+
Testcontainers verwenden oder Postgres im Workflow hochfahren — in Integrationstests niemals die DB mocken.
|
|
80
|
+
|
|
81
|
+
### "Adapter contract test fails"
|
|
82
|
+
Die Erwartungen der Suite nicht senken. Den Adapter fixen. Die Suite IST der Vertrag.
|
|
83
|
+
|
|
84
|
+
### "Activity log entry missing"
|
|
85
|
+
`this.activity.emit({ event: '<domain>.<action>', ... })` im Service nach der erfolgreichen Mutation hinzufügen.
|
|
86
|
+
|
|
87
|
+
## Vor dem Push
|
|
88
|
+
|
|
89
|
+
- [ ] Alle Commits folgen Conventional Commits
|
|
90
|
+
- [ ] Branch rebased auf `main`
|
|
91
|
+
- [ ] CI wird grün sein (lint + typecheck + test + build)
|
|
92
|
+
- [ ] Adapter-Contract-Tests laufen lokal für jeden berührten Adapter durch
|
|
93
|
+
|
|
94
|
+
## Hinweise
|
|
95
|
+
|
|
96
|
+
- Commits klein und fokussiert halten
|
|
97
|
+
- Hooks niemals skippen (`--no-verify`) — wenn ein Hook fehlschlägt, die Ursache fixen
|
|
98
|
+
- Governance-Bugs sind Produktionsvorfälle, keine Warnungen — sie mit Dringlichkeit behandeln
|