Skip to content

Commit 8001f36

Browse files
committed
docs: require all examples to use Deepgram directly or via partner tooling
1 parent e04dba6 commit 8001f36

2 files changed

Lines changed: 45 additions & 94 deletions

File tree

CONTRIBUTING.md

Lines changed: 39 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,146 +1,91 @@
11
# Contributing
22

3-
This repo is primarily maintained by autonomous agents, but humans can direct and override agent decisions at any time.
3+
## Core requirement
44

5-
## Requesting a new example
5+
**Every example must use Deepgram directly or through a partner's tooling/API.**
66

7-
Use the **Queue: New Example** issue template. The agent picks this up on its next daily run and builds the example.
7+
This means Deepgram STT, TTS, Voice Agents, or Audio Intelligence must be demonstrably called — either via the Deepgram SDK, or via a partner integration that routes audio through Deepgram (e.g. LiveKit → Deepgram, Pipecat → Deepgram, Twilio → Deepgram WebSocket). Examples that use a competing speech provider, or that merely reference Deepgram without making real API calls, will be rejected.
88

9-
Alternatively, build it yourself using the [manual contribution](#manual-contribution) process below.
9+
## What makes a good example
1010

11-
## Reviewing open PRs
12-
13-
The agent raises several PR types. Here's how to evaluate each:
14-
15-
### `type:example` — New example app
16-
17-
**Merge if:** The example is working, well-documented, and demonstrates a real use case.
11+
**In scope:**
12+
- Partners with a developer API (Twilio, Vonage, Zoom, etc.)
13+
- AI frameworks and toolkits (LangChain, LlamaIndex, Vercel AI SDK, etc.)
14+
- Frontend frameworks (React, Vue, Svelte, Next.js, Nuxt, etc.)
15+
- Voice/agent infrastructure that uses Deepgram as a provider (LiveKit, Pipecat, etc.)
16+
- Backend frameworks (FastAPI, Express, Gin, etc.)
17+
- Platforms and clouds (AWS, GCP, Azure serverless, etc.)
1818

19-
**Close (reject) if:** The integration is a direct Deepgram competitor (not a partner), the example is trivially simple with no instructional value, or it duplicates an existing example.
19+
**Out of scope:**
20+
- Direct Deepgram competitors that don't use our APIs
21+
- Trivial examples with no real integration value
22+
- Duplicate integrations (check existing examples and open PRs first)
2023

21-
**What happens after merge:** The `update-readme` workflow rebuilds the examples table in the root README automatically.
24+
## Reviewing PRs
2225

23-
### `type:fix`Bug fix to existing example
26+
### `type:example`New example
2427

25-
**Merge if:** The fix resolves the reported failure without breaking anything else.
28+
**Merge if:** Working, well-documented, demonstrates a real Deepgram use case.
2629

27-
**Close if:** The fix introduces new issues or the original example should be removed instead.
30+
**Close if:** Doesn't make real Deepgram API calls, uses a competing provider, is trivially simple, or duplicates an existing example.
2831

29-
## Rejecting a PR
32+
### `type:fix` — Bug fix
3033

31-
Close any PR without merging to reject it. Closed-unmerged PRs act as the agent's rejection memory — it will not re-propose the same integration.
34+
**Merge if:** Resolves the failure without breaking anything else.
3235

33-
To reverse a rejection, reopen the PR or create the example manually.
36+
**Close if:** Introduces new issues or the original example should be removed instead.
3437

3538
## Manual contribution
3639

37-
To add an example yourself:
38-
3940
1. Find the next available number:
4041
```bash
4142
ls examples/ | sort -n | tail -1
4243
# Use that number + 10
4344
```
4445

45-
2. Create the directory following the naming convention:
46+
2. Create the directory:
4647
```bash
4748
mkdir -p examples/{NNN}-{slug}/{src,tests}
4849
```
4950

5051
3. Required files:
51-
- `README.md`description, prerequisites, env vars, how to run
52+
- `README.md`what it does, prerequisites, env vars, how to run
5253
- `.env.example` — every required env var (no values, just `VAR_NAME=`)
5354
- Source code in `src/`
54-
- Tests in `tests/` that exit 0 on success, 1 on failure, 2 on missing credentials
55+
- Tests in `tests/` exit 0 pass, 1 fail, 2 missing credentials
5556

56-
4. Branch and PR:
57+
4. Open a PR:
5758
```bash
58-
git checkout -b example/{slug}
59+
git checkout -b example/{NNN}-{slug}
5960
git add examples/{NNN}-{slug}/
6061
git commit -m "feat(examples): add {description}"
61-
git push origin example/{slug}
62-
gh pr create --title "[Example] {description}" \
63-
--label "type:example" \
64-
--body "..."
65-
```
66-
67-
5. The PR body **must** include a metadata block so agents can parse it:
68-
```html
69-
<!-- metadata
70-
type: example
71-
number: {NNN}
72-
slug: {slug}
73-
language: {node|python|go|rust|dotnet}
74-
products: {stt,tts,agent,intelligence}
75-
integrations: {platform or ecosystem slug}
76-
-->
62+
git push origin example/{NNN}-{slug}
63+
gh pr create --title "[Example] {NNN} — {description}" --label "type:example"
7764
```
7865

7966
## Credential handling
8067

8168
If an example requires external service credentials:
8269

83-
1. List all required env vars in `.env.example` (one per line, format: `VAR_NAME=`)
84-
2. Tests should check for missing vars and exit with code `2` — this signals "missing credentials" to CI, not a real test failure
85-
3. CI will post a comment tagging `@deepgram-devrel` with the list of needed secrets
86-
4. The PR stays open until the secrets are added and tests pass
87-
88-
## What can agents build examples for?
70+
1. List all required env vars in `.env.example`
71+
2. Tests must check for missing vars and exit `2` — CI treats this as "skipped", not "failed"
72+
3. CI will comment with the list of secrets needed
73+
4. The PR stays open until secrets are added and tests pass
8974

90-
**Yes:**
91-
- Partners with a developer API (Twilio, Vonage, Zoom, etc.)
92-
- AI frameworks and toolkits (LangChain, LlamaIndex, Vercel AI SDK, etc.)
93-
- Frontend frameworks (React, Vue, Svelte, Next.js, Nuxt, etc.)
94-
- Voice/agent infrastructure that uses Deepgram as a provider (LiveKit, Pipecat, etc.)
95-
- Backend frameworks (FastAPI, Express, Gin, etc.)
96-
- Platforms and clouds (AWS, GCP, Azure serverless, etc.)
97-
98-
**No:**
99-
- Direct Deepgram competitors that don't use our APIs (AssemblyAI, ElevenLabs standalone, etc.)
100-
- Trivial "hello world" examples with no real integration
101-
- Duplicate integrations (check existing examples and open PRs first)
102-
103-
## Queueing work manually
75+
## Numbering convention
10476

105-
Use the GitHub Issue templates:
77+
Examples are numbered globally in increments of 10. A platform owns its group — a second Twilio example gets `021`, not a new slot. New platforms claim the next free multiple of 10.
10678

107-
| Template | Effect |
108-
|----------|--------|
109-
| **Queue: New Example** | Agent builds an example for a specific integration |
110-
| **Report: Broken Example** | Agent investigates and fixes a failing example |
111-
112-
## Running agents locally
113-
114-
```bash
115-
# Requires: ANTHROPIC_API_KEY set, gh auth login done, git configured
116-
claude --model claude-opus-4-6 -p "$(cat instructions/discover-examples.md)"
117-
claude --model claude-opus-4-6 -p "$(cat instructions/create-example.md)"
118-
```
119-
120-
## File structure reference
79+
## File structure
12180

12281
```
12382
examples/
124-
{NNN}-{slug}/ # Three-digit number + kebab-case slug
83+
{NNN}-{slug}/
12584
README.md # Required
12685
.env.example # Required if any env vars needed
12786
src/ # Source code
128-
tests/ # Tests with credential-checking convention
129-
130-
instructions/ # Agent prompts — humans can edit these
131-
discover-examples.md # How agents find new integration ideas
132-
create-example.md # How agents build examples
133-
review-example.md # How agents review PRs
134-
fix-example.md # How agents fix failing tests
87+
tests/ # Tests (exit 0/1/2 convention)
13588
13689
.github/
137-
workflows/
138-
discover-examples.yml # Weekly: search for new ideas, queue PRs
139-
create-example.yml # Daily + on issue: build queued examples
140-
review-pr.yml # On PR open/sync: self-review
141-
fix-pr.yml # On status:fix-needed label: repair tests
142-
test-node.yml # Node.js test runner
143-
test-python.yml # Python test runner
144-
test-go.yml # Go test runner
145-
update-readme.yml # On merge: rebuild examples table
90+
workflows/ # CI workflows
14691
```

instructions/engineer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
> **HARD RULE: Never create, edit, or delete any file under `.github/`.**
44
> Only modify files under `examples/` and `instructions/`.
55
6+
> **HARD RULE: Every example MUST use Deepgram directly or through a partner's tooling/API.**
7+
> This means Deepgram STT, TTS, Voice Agents, or Audio Intelligence must be demonstrably called —
8+
> either via the Deepgram SDK, or via a partner integration that routes audio through Deepgram
9+
> (e.g. LiveKit → Deepgram, Pipecat → Deepgram, Twilio → Deepgram WebSocket).
10+
> An example that merely mentions Deepgram or uses a competing speech provider is NOT acceptable.
11+
612
You are the Engineer. You build full, working integration examples. Each PR is one
713
`examples/{NNN}-{slug}/` directory. The Researcher has already gathered platform
814
context — read their comment before writing code.

0 commit comments

Comments
 (0)