Skip to content
Merged
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
65 changes: 62 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
# Compatibility shim
## Workflow Orchestration

This repository uses `AGENTS.md` as the canonical instruction file for all coding agents.
### 1. Plan Mode Default
- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
- If something goes sideways, STOP and re-plan immediately - don't keep pushing
- Use plan mode for verification steps, not just building
- Write detailed specs upfront to reduce ambiguity

If your tool auto-loads `CLAUDE.md`, apply the rules from `AGENTS.md`.
---

### 2. Subagent Strategy
- Use subagents liberally to keep main context window clean
- Offload research, exploration, and parallel analysis to subagents
- For complex problems, throw more compute at it via subagents
- One task per subagent for focused execution

---

### 3. Self-Improvement Loop
- After ANY correction from the user: update `tasks/lessons.md` with the pattern
- Write rules for yourself that prevent the same mistake
- Ruthlessly iterate on these lessons until mistake rate drops
- Review lessons at session start for relevant project

---

### 4. Verification Before Done
- Never mark a task complete without proving it works
- Diff behavior between main and your changes when relevant
- Ask yourself: "Would a staff engineer approve this?"
- Run tests, check logs, demonstrate correctness

---

### 5. Demand Elegance (Balanced)
- For non-trivial changes: pause and ask "is there a more elegant way?"
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Skip this for simple, obvious fixes - don't over-engineer
- Challenge your own work before presenting it

---

### 6. Autonomous Bug Fixing
- When given a bug report: just fix it. Don't ask for hand-holding
- Point at logs, errors, failing tests - then resolve them
- Zero context switching required from the user
- Go fix failing CI tests without being told how

---

## Task Management
1. **Plan First**: Write plan to `tasks/todo.md` with checkable items
2. **Verify Plan**: Check in before starting implementation
3. **Track Progress**: Mark items complete as you go
4. **Explain Changes**: High-level summary at each step
5. **Document Results**: Add review section to `tasks/todo.md`
6. **Capture Lessons**: Update `tasks/lessons.md` after corrections

---

## Core Principles
- **Simplicity First**: Make every change as simple as possible. Impact minimal code
- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards
- **Minimal Impact**: Changes should only touch what's necessary. Avoid introducing bugs
20 changes: 20 additions & 0 deletions backend/api/alignment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""Alignment gate API — evaluate whether a concept fits the curriculum."""

from __future__ import annotations

from fastapi import APIRouter
from pydantic import BaseModel, Field

from backend.services.alignment_gate import evaluate

router = APIRouter(prefix="/api/alignment", tags=["alignment"])


class AlignmentRequest(BaseModel):
value: str = Field(..., min_length=1, max_length=200)
signal_type: str = Field(default="concept")


@router.post("/evaluate")
async def evaluate_alignment(body: AlignmentRequest):
return evaluate(body.value, body.signal_type)
8 changes: 0 additions & 8 deletions backend/api/career.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
JobRecommendationImpressionRequest,
JobRecommendationImpressionResponse,
JobRecommendationsResponse,
PatternsOverview,
UserCareerGoal,
UserCareerGoalResponse,
)
Expand All @@ -40,7 +39,6 @@
from backend.services.career.goal import get_career_goal, upsert_career_goal
from backend.services.career.inventory import get_career_taxonomy_inventory
from backend.services.career.job_ingest import extract_job_from_url, save_job_to_corpus
from backend.services.career.patterns import get_patterns_overview
from backend.services.career.recommendations import (
get_job_recommendation_feedback_stats,
get_job_recommendations,
Expand Down Expand Up @@ -98,12 +96,6 @@ def career_composites():
return get_composites_overview()


@router.get("/patterns", response_model=PatternsOverview)
def career_patterns():
"""Get enterprise pattern fit scores against user skill profile."""
return get_patterns_overview()


@router.get("/coaches", response_model=CoachRecommendationsResponse)
async def career_coaches():
"""Generate personalized coach recommendations based on career gaps."""
Expand Down
2 changes: 1 addition & 1 deletion backend/api/concepts.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ async def extract_atoms_endpoint(concept_id: str):

@router.post("/refresh-counts")
def refresh_counts():
"""Recompute source_count for all concepts from learning_concepts."""
"""Recompute source_count for all concepts from signals."""
updated = refresh_all_source_counts()
return {"status": "ok", "updated": updated}

Expand Down
Loading
Loading