From writing code to orchestrating AI — how the team should set up Claude, where the leverage is, and the guardrails that keep us safe.
The biggest unlock isn't faster typing. It's that you stop being the bottleneck.
CLAUDE.md, MCP descriptions, memoryRule of thumb: if you're typing the same thing twice, it belongs in CLAUDE.md, a slash command, an MCP description, or a hook — not in your head.
Lowest friction. Best for shell-heavy work, git ops, anything where Claude needs to see command output directly. Sessions live under ~/.claude/projects/.
Best for code-heavy tasks with side-by-side diffs. Picks up the same settings + project allowlist. Use /ide from CLI to attach a terminal session.
Real session management, mobile/web continuity, push notifications for background runs. The PM-of-AI surface.
Why I migrated to Desktop: named sessions per project, parallel chats, mobile pickup from claude.ai, and background agents surface as proper notifications — not lines scrolling off a terminal.
One repo. Three checkouts. Three Claude sessions. Zero merge chaos.
git worktree add creates a separate working directory pointed at a different branch.claude/ — isolated session history, allowlists, and context# spin up three parallel workspaces on TaskManager git worktree add ../TM-routing feature.routing git worktree add ../TM-merge-fix bugfix.merge-accounts git worktree add ../TM-llm-tuning feature.llm-tuning # open one Claude per worktree cd ../TM-routing && claude # window 1 cd ../TM-merge-fix && claude # window 2 # cleanup git worktree remove ../TM-routing git worktree prune
remove with no trace on main.isolation: "worktree" sub-agent flag for fully-sandboxed AI work.~/.claude/settings.jsonPersonal, machine-wide. Yours alone.
// my settings.json { "effortLevel": "high", "mcpServers": { "DTLR-Database-Tools": { ... }, "chrome-devtools": { ... } } }
<repo>/.claude/settings.local.jsonProject, gitignored. Yours per repo.
permissions.allow — pre-approved Bash patterns to kill prompt fatigue/fewer-permission-prompts to auto-build the list from your transcripts<repo>/.claude/settings.jsonProject, committed. Team defaults.
CLAUDE.md — Three LayersThe single highest-leverage file you can write. Auto-loaded when Claude enters a directory.
~/.claude/CLAUDE.mdLoads every session. Who you are, hard rules, pointers to org docs. Keep it short.
<repo>/CLAUDE.mdCommitted. What this service is/isn't, architecture in 5 bullets, gotchas, run/test/deploy. Pointers, not prose.
<repo>/<area>/CLAUDE.mdAuto-loads when working in that subtree. Domain-specific rules that don't belong at the top.
Reference example: DTLR-MCP/Toolbox/CLAUDE.md — documents the schema brain (data sources, security posture, gotchas like location_code vs location_id, ShopperTrak/RetailNext naming history). When the next dev (or AI) extends it, they don't have to ask.
design.md — Plan Before You BuildThe expensive failure mode is correct execution of the wrong design. A 10-minute design pass prevents most of that.
/effort low | medium | highlow | Renames, formatting, quick edits. Fast and cheap. |
medium | Default. Bug fixes, small features. |
high | Multi-file, architectural, security-sensitive. Mine is pinned here. |
/fast | Opus 4.6 with faster output for known-simple work. |
Slow-and-thorough beats fast-and-sloppy on leverage work. Flip down to medium for cleanup tickets.
| Command | What it does |
|---|---|
| /init | Scaffold a CLAUDE.md for the current repo |
| /effort low|medium|high | Set thoroughness for the session |
| /fast | Toggle fast-mode on Opus 4.6 |
| /clear | Drop conversation context (use when switching topics) |
| /compact | Manually compact context (auto happens near the limit) |
| /review | Review a PR (uses gh under the hood) |
| /security-review | Security pass on pending changes |
| /simplify | Have Claude review its own changes for reuse/quality/duplication |
| /fewer-permission-prompts | Audit transcripts and propose Bash allowlist additions |
| /loop <interval> <prompt> | Recurring local agent (or self-paced if no interval) |
| /schedule | Manage cron-scheduled remote agents |
| /help | List everything |
Build your own: drop markdown files in ~/.claude/commands/ (personal) or <repo>/.claude/commands/ (team). Treat them like saved prompts.
MCP (Model Context Protocol) is how Claude talks to anything that isn't a file.
Internal MCP at 10.67.0.67:8080. ~22 tools across 6 sources. Read-only.
Browser automation, screenshots, console + network inspection, Lighthouse.
Render Mermaid / CSV / XML diagrams inline in conversation.
Official Shopify docs + GraphQL/theme validation.
Search/fetch official MS docs — useful for Foundry, Azure, Graph.
Personal → ~/.claude/settings.json. Team-wide → repo's .claude/settings.json.
get-schema-summary as the table of contentsGlobal_AI_Readerlocation_code vs location_id, ShopperTrak vs RetailNext) live in the descriptions — not in each apptools.yaml in DTLR-MCP/Toolbox once
Use it from terminal Claude: "What were our top 5 selling SKUs last week?" → tool routes to delorean-execute-query on sales_transactions_daily → you get the answer with no SQL written.
Documentation that improves itself. Every session leaves the corpus smarter than it found it.
Agent hits an undocumented table or column while answering
Sample rows + foreign keys + naming patterns + query history → infer purpose
Column hints, join keys, gotchas, "BEST FOR" guidance
Tagged schema-doc:auto. SME reviews + merges.
Next session inherits the upgrade. Routes faster, queries better, finds the next gap.
DTLR-MCP/Toolbox/tools.yaml — tool descriptions are the routing brainDTLR-MCP/Toolbox/CLAUDE.md — tier-1/2/3 priority + how to add a table/initNET-1457)X-Api-Key middleware on all endpointssecretref:) — nothing in committed configServices/LLM/AzureOpenAIService.cs — thin wrapper around Foundry's GPT (gpt-5.4)IAzureOpenAIService plugs into any background jobVendor-style competitor sweep — price, promo, shipping, stock. Built on MAF / Semantic Kernel on .NET, sharing runtime with DTLR-IQ & DevAgent. Sister-chains framed as alignment partners, not threats.
Teams-integrated RAG bot. Ingests Confluence, policies, handbooks. Vector search → cited answers. Embedded in DREAM portal too.
Shared schema brain (slide 9). Every agent gets the same routing intelligence. tools.yaml + CLAUDE.md.
Cross-agent contract: IAgent<TRequest,TResult>. Future agents (forecasting, vendor-comms) plug in through the same shape.
Same .NET runtime. Same Foundry config. Same Teams plumbing. Layer once, reuse everywhere.
gpt-5.4IConfiguration — never hard-coded.gitignore always. Commit .env.example with keys, never values.secretref: env-var refs — rotate without a commit.Which corpus? HR? Procedure? System docs? Live analytics?
Vector search the picked corpus → top-k chunks
System prompt + chunks + user question → cited answer
If the question needs live data — call DTLR-Database-Tools directly
Three controls + one operating model.
/loop"Every 5 min, check the deploy and ping me on failure." Active monitoring while you're at the keyboard.
/scheduleCron-style remote triggers. Wakes whether you're online or not. "Every weekday 7am: PR summary to Teams."
Desktop app fires agents from your phone. Push notifications when background work finishes.
/loop on the deploy + DevAgent on tagged tickets. Fri 5pm scheduled agent → weekly wrap. Zero touches on weekends.
| Layer | Lives | Use For |
|---|---|---|
| Conversation context | Until /clear or compaction | The current task |
| Plans / tasks | Current conversation | Step-by-step within one task |
| Memory | Across conversations | What future-you needs to know |
/clear is free; cross-context noise hurts both jobs.Production breaks. By the time you read the alert, the PR is open with a screenshot. No human in the inner loop.
Click any step to see how it actually wires up — what's already in place vs. what's next.
AI is the lever. The team that masters orchestration wins. We are already ahead — let's stay there.
CLAUDE.md. Set your effortLevel. Install one MCP. That's it.
claude-ai-cheatsheet.md# one worktree per concern git worktree add ../TM-routing feature.routing git worktree add ../TM-merge-fix bugfix.merge-accounts git worktree add ../TM-llm-tuning feature.llm-tuning # open one Claude per worktree (CLI) cd ../TM-routing && claude cd ../TM-merge-fix && claude cd ../TM-llm-tuning && claude # or in the Desktop app: New Session per path # branch already exists? Use it directly: git worktree add ../TM-hotfix hotfix.SP-Logo-update # inspect what's checked out git worktree list # cleanup when done git worktree remove ../TM-routing git worktree prune # GC stale entries
Tip: name your worktrees by concern not by branch (TM-routing beats TM-feature-routing-v2) — it's what shows up in your shell prompt and Desktop session list.
Spawn 4 Explore sub-agents in parallel (single message,
multiple tool calls) to research these areas independently:
1. Search TaskManager/app/Services for any direct usage of
AzureOpenAIService — list all consumers and their patterns.
2. Search DTLR-IQ for prompt-template patterns we should reuse
when wiring an LLM into other background jobs.
3. Search DevAgent for sandbox + secret-handling patterns,
specifically how it isolates per-ticket workspaces.
4. Search ResearchAgent for the SK -> MAF migration TODOs
and Dtlr.Agents.Abstractions usage.
Once all four return, synthesize a single architecture note
describing how to extract Dtlr.Agents.Abstractions to /Shared/
when the second consumer lands. Save to docs/abstractions-extraction.md.This is the fan-out / fan-in pattern: 4 sub-agents work in parallel, your main context stays clean, you get one synthesized output back.
1) From the repo root:
git worktree add ../TM-feature.routing feature.routing
cd ../TM-feature.routing
2) Open Claude (CLI or Desktop session pointed at this path),
then paste:
Read CLAUDE.md and the last 10 commits on this branch. Then:
- Read all relevant order-routing services and their tests
- Propose a design.md for routing-by-inventory-and-distance
- Do NOT write code yet — I want to review the plan first
3) Review design.md. When ready:
"Implement the plan from design.md. Commit incrementally
with conventional-commit messages. Run tests after each
commit. Stop and ask if a test fails."
4) When done:
git worktree remove ../TM-feature.routing
(the branch lives on; only the working dir is removed)Each step in this flow happens in a separate thread. The worktree is the container. The Claude session is the worker. You are the orchestrator.
Pick one Tier-3 table from DTLR-MCP/Toolbox/tools.yaml that
currently has only a stub description. Using:
- hellcat-list-columns to get the schema
- 2-3 small hellcat-execute-query SELECTs (LIMIT 50) to
sample real values
- get-schema-summary to see what neighbors it joins to
Produce, for that table:
1. Column-by-column purpose inferred from naming + values + FKs
2. Join keys to nearby tables (with example join clauses)
3. 1-2 "BEST FOR" usage hints
4. Any non-obvious gotchas (NULL semantics, legacy names, etc.)
Then update tools.yaml AND DTLR-MCP/Toolbox/CLAUDE.md and open a
draft doc-PR tagged schema-doc:auto with me as reviewer.
Hard constraints:
- Description fields only — no logic changes
- Read-only — no INSERT/UPDATE/DELETE
- If you're unsure about a column, say "purpose unclear"
rather than guess.Run this in a worktree on DTLR-MCP. Each table you process leaves the corpus permanently smarter for every future agent.
Audit this repo's CLAUDE.md against the current state of the codebase.
Check:
1. Architecture in 5 bullets — is each one still accurate?
Verify by reading Program.cs / Startup / DI registrations.
2. Run / test / deploy steps — do they still work?
Actually try them. Don't skip.
3. Gotchas — any new ones from the last 30 commits?
Pay special attention to commits with "fix" or "hotfix"
in the subject — those usually surface gotchas worth
documenting.
4. Pointers — are linked docs / files still in those
locations? Run a path check.
5. Effort — is the file under ~200 lines? If not, what's
redundant or outdated?
Produce a unified diff. DO NOT commit yet — I want to review.Generate a runtime architecture diagram for this service by reading:
- Program.cs and any Startup.cs
- All AddSingleton/AddScoped/AddTransient calls
- All IOptions bindings and configuration sections
- All Hangfire job registrations and schedules
- All HttpClient registrations and their target URLs
- appsettings.*.json connection strings + dependencies
Render with the drawio MCP. The diagram should show:
- External dependencies (DBs, MCP servers, queues, APIs)
grouped by direction (in / out / bidirectional)
- Internal services + their wiring
- Background jobs labeled with their cron / triggers
- Secrets sources annotated (env, secretref, IConfiguration)
Save the source to docs/architecture.drawio and a PNG to
docs/architecture.png. Add a paragraph to CLAUDE.md pointing
to both.Crawl this repo and rank documentation gaps by impact. For each public class, controller, job, and service: - Does it have a doc-comment / summary? - Does CLAUDE.md mention it? - Has it been changed in the last 90 days? Compute an "impact * staleness" score and produce a prioritized list of the top 15 gaps. For each: - File + line - Why it matters - One-paragraph proposed doc Save to docs/doc-gaps.md. Don't fill the gaps yet — we'll triage the list together first.
Source: our existing Datadog setup on TaskManager + APIs.
Triggers: error-rate spike, new exception class, P95 latency breach, Hangfire job failure, custom log signals.
Webhook target: a "Triage Agent" endpoint (mirrors DevAgent's GitHub webhook handler) that receives the alert payload + correlation IDs.
Triage Agent receives the Datadog payload, dedupes against open tickets (fingerprint = exception class + service + last-N stack frames), and creates or comments on the right Jira ticket.
Each ticket gets:
AI-assignable if confidence > thresholdReuses DevAgent's existing Jira OAuth + Basic auth integration — no new auth surface.
New service. Same .NET runtime as DevAgent + ResearchAgent. Built on Dtlr.Agents.Abstractions (IAgent<TRequest,TResult>).
Job:
Critically: the Triage Agent never writes code. Its only output is a well-decorated ticket. That separation keeps the failure mode contained.
DevAgent picks up the ticket, sandbox-clones, then:
DTLR-Database-Tools MCP (read-only)chrome-devtools MCP to drive the broken UI flowIf repro fails: posts a "cannot repro — need more info" comment back on the ticket and stops. No silent failures, no fabricated fixes.
Same flow as today's DevAgent:
needs-human labelHard rules:
Draft PR includes:
Posted to a Teams Adaptive Card with approve / request-changes buttons — senior reviewers can ship from their phone.
Two paths:
The deploy pipeline itself stays the same. This loop adds a smart feeder upstream of it, not a replacement.
Using the DTLR-Database-Tools MCP, answer this without writing SQL by hand — let the tool descriptions route you: "What were our top 5 selling SKUs last week chain-wide? Show units, revenue, and which department they belong to. Use the most recent fully-closed week." After it answers, follow up with: "Now break that down by region. Did any region rank a SKU significantly differently than the chain? Flag anything with a rank delta of 3 or more." Notice what the agent picks: it should land on delorean.sales_transactions_daily for the chain query, and use store_master + the location join for the regional break — without you ever telling it which tables to use.
This is the demo that makes business stakeholders' jaws drop. No SQL, no schema knowledge, no help from us. Just a question.
Hunt for anomalies in our last 7 days of sales data. Look for:
- SKU velocity z-scores that have flipped sign
- Categories with WoW deltas outside their 28-day baseline
- Stores where total revenue dropped > 20% but traffic
(RetailNext exits) was flat or up
- Products that climbed > 10 ranks vs last week
Use TaskManager's discipline rules:
- Weather and holidays are CONTRIBUTORS, never whole
explanations
- Do not fabricate fallback explanations — say "no clear
cause" if the data doesn't support one
- Surface only signals significant at the chain (>=90)
or region (>=85) level
Produce a 4-bullet anomaly digest with each bullet citing
the SQL it ran.This is exactly how the TaskManager Analyst Reporting flow works under the hood — only here you're running it ad-hoc instead of on a schedule.
# Generate the secrets locally
DEVAGENT_API_KEY=$(openssl rand -hex 32)
CALLBACK_API_KEY=$(openssl rand -hex 32)
GITHUB_WEBHOOK_SECRET=$(openssl rand -hex 32)
# Create the Container App with secrets + env-var refs
az containerapp create \
--name devagent \
--resource-group dtlr-devagent \
--environment dtlr-devagent-env \
--image dtlrdevagent.azurecr.io/devagent:latest \
--secrets \
"devagent-api-key=$DEVAGENT_API_KEY" \
"callback-api-key=$CALLBACK_API_KEY" \
"github-webhook-secret=$GITHUB_WEBHOOK_SECRET" \
"claude-api-key=<sk-ant-...>" \
--env-vars \
"DevAgent__ApiKey=secretref:devagent-api-key" \
"Callback__ApiKey=secretref:callback-api-key" \
"GitHubWebhook__Secret=secretref:github-webhook-secret" \
"CodingAgent__ClaudeApiKey=secretref:claude-api-key"
# Rotate any secret in place — no commit, no redeploy
az containerapp secret set -n devagent -g dtlr-devagent \
--secrets "devagent-api-key=$(openssl rand -hex 32)"
az containerapp revision restart -n devagent -g dtlr-devagent \
--revision "$(az containerapp revision list -n devagent \
-g dtlr-devagent --query '[0].name' -o tsv)"The full playbook lives in DTLR-Agents/docs/deploy-devagent-container-app.md — including paired-secret coordination with the Teams bot and GitHub webhook secret rotation.
Post-deploy:
This is the closing of the loop. Without verification it's just a fancy ticket-creator. With verification, the system has feedback — and that's what makes it self-improving.