Skip to content

Commit 0aa4601

Browse files
authored
Merge pull request #23 from pankaj4u4m/cc
Cc
2 parents 4a1886c + 24db2cf commit 0aa4601

412 files changed

Lines changed: 103243 additions & 6922 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.production.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ ATELIER_REQUIRE_AUTH=true
88
ATELIER_API_KEY=replace-me
99
ATELIER_SERVICE_URL=http://atelier:8787
1010
ATELIER_MCP_MODE=remote
11-
ATELIER_OPENMEMORY_ENABLED=false
1211
ATELIER_OPENMEMORY_MCP_SERVER_NAME=openmemory
1312
ATELIER_LESSON_PR_BOT_ENABLED=false
1413
GITHUB_TOKEN=

.githooks/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ echo "📍 Checking Pushing $CURRENT_BRANCH to $REMOTE_BRANCH"
1818
# Skip session import + external reports — those are slow, code-independent, and
1919
# covered by tests; only host integrations need to be verified at push time.
2020
echo "🛠️ Running make install (host integrations only)..."
21-
if ! ATELIER_NO_IMPORT=1 ATELIER_STRICT=1 make install; then
21+
if ! ATELIER_STRICT=1 make install; then
2222
echo -e "\033[1;31m❌ make install failed. Push blocked.\033[0m"
2323
echo " Fix the install error locally or use 'git push --no-verify' if you intentionally need to bypass the hook."
2424
exit 1

.github/copilot-instructions.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
applyTo: "**"
3+
---
4+
5+
<!-- Generated by `scripts/sync_agent_context.py`. Edit `../docs/agent-os/README.md` and rerun the generator. -->
6+
7+
8+
## Tool substitution — mandatory
9+
10+
| Use this | Instead of | Why |
11+
|---|---|---|
12+
| `mcp__atelier__read` | `Read` / `Bash(cat ...)` | outline-first, 80-95% fewer tokens on large files |
13+
| `mcp__atelier__search` | `Grep` / `Glob` / `Bash(grep/rg ...)` | ranked, budget-capped, ~280k tokens saved vs naive scan |
14+
| `mcp__atelier__edit` | `Edit` / `Write` | atomic multi-file, snapshot/rollback, diff recorded |
15+
| `mcp__atelier__shell` | `Bash(...)` | ANSI-stripped, line-truncated, token-compact |
16+
| `mcp__atelier__code op=search` | `Bash(grep -rn symbol ...)` | SCIP-indexed, zero subprocess cost |
17+
18+
**Bash is only for git commands and process management.** Do NOT use `Bash(cat file)`, `Bash(grep ...)`, or `Bash(find ...)` — use the atelier equivalents above.
19+
20+
Treat this file as a thin entrypoint. The live source of truth is:
21+
22+
- [Agent OS](../docs/agent-os/README.md)
23+
- [Workflow](../docs/agent-os/workflow.md)
24+
- [Taste invariants](../docs/agent-os/taste-invariants.md)
25+
- [Validation matrix](../docs/agent-os/validation-matrix.md)
26+
- [Architecture](../docs/architecture/README.md)
27+
- [Quality scorecard](../docs/quality/scorecard.md)
28+
- [Plans](../docs/plans/README.md)
29+
- [Decisions](../docs/decisions/README.md)
30+
31+
## Budget optimizer
32+
33+
- Before changing files, name the deliverable and summarize the smallest viable plan.
34+
- Keep context narrow: use only the current goal, relevant files, failing command/output, and known constraints.
35+
- Restate working context in under 10 bullets before editing or after compaction.
36+
- If more than 10 minutes pass without an edit, name the expected deliverable or check with the user.
37+
- If the same approach fails twice, call `rescue` or change approach; do not retry a third time.
38+
39+
## Native fallback
40+
41+
If an Atelier MCP tool returns `noop`, is hidden, or is unavailable, use Copilot or VS Code native file reads, workspace search, shell `rg`, or `grep`.
42+
Always return findings instead of waiting for tool availability to improve.
43+
44+
## Validation
45+
46+
See [Validation matrix](../docs/agent-os/validation-matrix.md) for the minimum checks by change surface. Use the VS Code tasks for repeatable preflight, worktree, and runtime evidence loops.

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ coverage.xml
5858
# Claude Code
5959
.codex/
6060
.claude/
61+
.antigravity/
62+
.antigravitycli/
6163

6264
# Claude Desktop
6365
.claude/
@@ -68,9 +70,8 @@ coverage.xml
6870
# Gemini CLI
6971
.gemini/
7072

71-
# Github copilot (generated by install, not source)
72-
.github/copilot-instructions.md*
73-
.github/chatmodes/
73+
# Github copilot workspace backups
74+
.github/copilot-instructions.md.atelier-backup.*
7475

7576
# VSCode test
7677
.vscode-test/
@@ -141,6 +142,7 @@ results/
141142
*.sql
142143
!src/**/*.sql
143144
*.sqlite3
145+
vector_cache.sqlite
144146
dump.rdb
145147
*.rdb
146148

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Canonical Identifier Over Display Name
2+
3+
- **id:** `canonical-identifier-over-display-name`
4+
- **domain:** `state.change`
5+
- **status:** `active`
6+
- **task_types:** integration_change, data_write, rollback
7+
8+
## Situation
9+
Human-readable labels such as titles, URLs, paths, and display names can drift. Mutations and rollbacks should target a stable canonical identifier.
10+
11+
12+
## Triggers
13+
- slug
14+
- handle
15+
- title
16+
- url
17+
18+
## Dead ends
19+
- resolve target from url slug alone
20+
- use display name as stable identity
21+
22+
## Procedure
23+
1. Resolve the target through its canonical stable identifier.
24+
2. Record that identifier before the write.
25+
3. Use the same identifier for the mutation and the readback.
26+
27+
## Verification
28+
- A canonical identifier was recorded before the write.
29+
- The same identifier was used for readback.
30+
31+
## Failure signals
32+
- wrong target updated
33+
- ambiguous match set
34+
35+
## When not to apply
36+
Pure read-only exploration where no state mutation or rollback will happen.
37+
38+
39+
## Scope
40+
- tool_patterns: api.write, db.write
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# My Custom Block
2+
3+
- **id:** `coding-custom-my-custom-block-5e17f4`
4+
- **domain:** `coding.custom`
5+
- **status:** `active`
6+
7+
## Situation
8+
Use this when a custom situation arises
9+
10+
## Procedure
11+
1. Do the thing
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Runtime Learned Recovery
2+
3+
- **id:** `rb-runtime-learned`
4+
- **domain:** `Agent.shopify.publish`
5+
- **status:** `active`
6+
7+
## Situation
8+
When runtime traces show repeated publish failures
9+
10+
## Triggers
11+
- publish
12+
- shopify
13+
14+
## Dead ends
15+
- Retry blindly without validating identifiers
16+
17+
## Procedure
18+
1. Confirm Product GID
19+
2. Run validation before retry
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
id: template-python-fastapi-alembic-migrations
3+
title: Alembic Migration Discipline
4+
domain: coding.python-fastapi
5+
task_types:
6+
- feature
7+
- refactor
8+
triggers:
9+
- Alembic migration
10+
- database schema change
11+
- SQLAlchemy model change
12+
file_patterns:
13+
- "**/alembic/**/*.py"
14+
- "**/migrations/**/*.py"
15+
- "**/models.py"
16+
tool_patterns:
17+
- alembic
18+
situation: "A code change adds, removes, renames, or changes persistence fields. TODO: replace with your migration review checklist."
19+
dead_ends:
20+
- "Changing ORM models without a matching migration."
21+
- "Using autogenerated migration output without reviewing indexes, defaults, and data backfills."
22+
procedure:
23+
- "Create a migration in the same change as the model update."
24+
- "Review autogenerated operations for destructive changes and explicit server defaults."
25+
- "Keep data backfills idempotent or split them from schema-only migrations when needed."
26+
- "Document any manual deployment ordering in the migration or PR description."
27+
verification:
28+
- "Run Alembic upgrade on a clean database."
29+
- "Run Alembic downgrade when the project requires reversible migrations."
30+
- "Run tests that exercise the changed model fields."
31+
failure_signals:
32+
- "Runtime model expects a column that the migration does not create."
33+
- "Migration drops or renames data without an explicit review note."
34+
required_rubrics: []
35+
when_not_to_apply: "Read-only query changes that do not alter persisted schema."
36+
---
37+
38+
TODO: Add your production rollback expectations before using this block unchanged.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
id: template-python-fastapi-dependency-injection
3+
title: FastAPI Dependency Injection Boundaries
4+
domain: coding.python-fastapi
5+
task_types:
6+
- feature
7+
- refactor
8+
triggers:
9+
- Depends
10+
- request scoped dependency
11+
- database session
12+
file_patterns:
13+
- "**/api/**/*.py"
14+
- "**/dependencies.py"
15+
tool_patterns: []
16+
situation: "A route, service, or test needs access to request-scoped resources such as sessions, auth principals, config, or clients. TODO: document your approved dependency names."
17+
dead_ends:
18+
- "Creating database sessions or network clients directly inside route handlers."
19+
- "Using module-level mutable singletons for request-scoped state."
20+
procedure:
21+
- "Expose request-scoped resources through small FastAPI dependency functions."
22+
- "Keep dependencies composable: authentication, session, and external clients should be separately overrideable in tests."
23+
- "Use dependency_overrides in tests instead of monkeypatching global state."
24+
- "Close or yield-clean up resources in the dependency that created them."
25+
verification:
26+
- "Run tests that override the dependency and prove the route uses the override."
27+
- "Check that resources created by yield dependencies are cleaned up after requests."
28+
failure_signals:
29+
- "Tests need network access because dependencies cannot be overridden."
30+
- "Connection/session lifecycle is hidden in route code."
31+
required_rubrics: []
32+
when_not_to_apply: "Simple pure functions that do not depend on request state or external resources."
33+
---
34+
35+
TODO: Add company-specific dependency override examples here.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
id: template-python-fastapi-pydantic-api-boundaries
3+
title: Pydantic Models At API Boundaries
4+
domain: coding.python-fastapi
5+
task_types:
6+
- feature
7+
- refactor
8+
triggers:
9+
- FastAPI request model
10+
- Pydantic response model
11+
- API schema change
12+
file_patterns:
13+
- "**/api/**/*.py"
14+
- "**/schemas.py"
15+
tool_patterns: []
16+
situation: "A FastAPI endpoint accepts or returns structured data. TODO: adapt examples to your service naming conventions."
17+
dead_ends:
18+
- "Returning raw ORM objects directly from handlers."
19+
- "Letting dictionaries drift without a Pydantic schema."
20+
procedure:
21+
- "Define explicit Pydantic request and response models for the endpoint boundary."
22+
- "Keep persistence models separate from public API models unless the team has approved coupling."
23+
- "Set response_model on the route and verify optional/null fields match the public contract."
24+
- "When changing a model, update OpenAPI snapshots or schema tests if the repo has them."
25+
verification:
26+
- "Run the endpoint tests that exercise serialization and validation failures."
27+
- "Inspect the generated OpenAPI schema for changed public fields."
28+
failure_signals:
29+
- "Response contains private database fields."
30+
- "422 behavior changes without an explicit test."
31+
required_rubrics: []
32+
when_not_to_apply: "Pure internal helper changes that do not cross the API boundary."
33+
---
34+
35+
TODO: Replace this note with examples from your service once the template is adopted.

0 commit comments

Comments
 (0)