|
2 | 2 |
|
3 | 3 | Specialized agents for Sharpy development. Each agent has domain expertise and clear boundaries. |
4 | 4 |
|
5 | | -## Quick Reference |
6 | | - |
7 | | -### Core Agents |
8 | | - |
9 | | -| Agent | File | Domain | |
10 | | -|-------|------|--------| |
11 | | -| Implementer | `implementer.agent.md` | Full implementation + PRs | |
12 | | -| Code Reviewer | `code-reviewer.agent.md` | PR review (read-only) | |
13 | | -| Task Planner | `task-planner.agent.md` | Task decomposition | |
14 | | -| Verification Expert | `verification-expert.agent.md` | Read-only verification | |
15 | | - |
16 | | -### Compiler Pipeline |
17 | | - |
18 | | -| Agent | File | Domain | |
19 | | -|-------|------|--------| |
20 | | -| Lexer Expert | `lexer-expert.agent.md` | Tokenization | |
21 | | -| Parser Expert | `parser-expert.agent.md` | AST construction | |
22 | | -| Semantic Expert | `semantic-expert.agent.md` | Type checking | |
23 | | -| CodeGen Expert | `codegen-expert.agent.md` | C# emission | |
24 | | - |
25 | | -### Library & CLI |
26 | | - |
27 | | -| Agent | File | Domain | |
28 | | -|-------|------|--------| |
29 | | -| Core Library Expert | `core-library-expert.agent.md` | Sharpy.Core stdlib | |
30 | | -| CLI Expert | `cli-expert.agent.md` | sharpyc CLI | |
31 | | -| Test Expert | `test-expert.agent.md` | xUnit tests | |
32 | | - |
33 | | -### Axiom Guardians (Advisory) |
34 | | - |
35 | | -| Agent | File | Guards | |
36 | | -|-------|------|--------| |
37 | | -| .NET Axiom Guardian | `net-axiom-guardian.agent.md` | Axiom 1: .NET/C# 9.0 | |
38 | | -| Python Axiom Guardian | `python-axiom-guardian.agent.md` | Axiom 2: Python syntax | |
39 | | -| Type Safety Guardian | `type-safety-guardian.agent.md` | Axiom 3: Static typing | |
40 | | -| Unity Compatibility Guardian | `unity-compatibility-guardian.agent.md` | Unity constraints | |
41 | | -| Axiom Arbiter | `axiom-arbiter.agent.md` | Conflict resolution | |
42 | | -| Design Philosophy Guardian | `design-philosophy-guardian.agent.md` | Overall design | |
43 | | - |
44 | | -### Quality & Compliance (Advisory) |
| 5 | +> **See also:** [copilot-instructions.md](copilot-instructions.md) for full architecture and patterns. |
45 | 6 |
|
46 | | -| Agent | File | Domain | |
47 | | -|-------|------|--------| |
48 | | -| Spec Adherence | `spec-adherence.agent.md` | Spec compliance | |
49 | | -| Hallucination Defense | `hallucination-defense.agent.md` | Fact-checking | |
50 | | -| Documentation Sync | `documentation-sync.agent.md` | Doc freshness | |
51 | | - |
52 | | -## Agent Boundaries |
53 | | - |
54 | | -### Read-Only Agents |
55 | | -These agents analyze but never modify code: |
56 | | -- `code-reviewer`, `verification-expert`, `spec-adherence`, `hallucination-defense` |
57 | | -- All axiom guardians |
58 | | - |
59 | | -### Domain-Specific Editors |
60 | | -These agents only modify their owned directories: |
61 | | -- `lexer-expert` → `src/Sharpy.Compiler/Lexer/` |
62 | | -- `parser-expert` → `src/Sharpy.Compiler/Parser/` |
63 | | -- `semantic-expert` → `src/Sharpy.Compiler/Semantic/` |
64 | | -- `codegen-expert` → `src/Sharpy.Compiler/CodeGen/` |
65 | | -- `core-library-expert` → `src/Sharpy.Core/` |
66 | | -- `cli-expert` → `src/Sharpy.Cli/` |
| 7 | +## Quick Reference |
67 | 8 |
|
68 | | -### Cross-Cutting Agents |
69 | | -- `implementer` — Full codebase access for features |
70 | | -- `task-planner` — Coordinates specialists |
71 | | -- `test-expert` — Tests for all components |
72 | | -- `documentation-sync` — Docs for all components |
| 9 | +| Agent | Domain | Edits | |
| 10 | +|-------|--------|-------| |
| 11 | +| `implementer` | Full implementation + PRs | All | |
| 12 | +| `code-reviewer` | PR review | Read-only | |
| 13 | +| `task-planner` | Task decomposition | Read-only | |
| 14 | +| `test-expert` | Testing | `*Tests/` | |
| 15 | +| `lexer-expert` | Tokenization | `Compiler/Lexer/` | |
| 16 | +| `parser-expert` | AST construction | `Compiler/Parser/` | |
| 17 | +| `semantic-expert` | Type checking | `Compiler/Semantic/` | |
| 18 | +| `codegen-expert` | C# emission | `Compiler/CodeGen/` | |
| 19 | +| `core-library-expert` | Stdlib | `Sharpy.Core/` | |
| 20 | +| `cli-expert` | CLI | `Sharpy.Cli/` | |
| 21 | + |
| 22 | +### Axiom Guardians (Advisory, Read-Only) |
| 23 | + |
| 24 | +| Agent | Guards | |
| 25 | +|-------|--------| |
| 26 | +| `net-axiom-guardian` | Axiom 1: .NET/C# 9.0 compatibility | |
| 27 | +| `python-axiom-guardian` | Axiom 2: Python syntax fidelity | |
| 28 | +| `type-safety-guardian` | Axiom 3: Static typing | |
| 29 | +| `axiom-arbiter` | Conflict resolution | |
73 | 30 |
|
74 | 31 | ## Key Rules |
75 | 32 |
|
76 | | -All agents must: |
77 | | -- **Never artificially make tests pass** — fix bugs instead |
78 | | -- Run tests before/after changes |
79 | | -- Follow existing code patterns |
80 | | -- Reference language spec when implementing features |
81 | | - |
82 | | -## Axiom Precedence |
| 33 | +1. **Never artificially make tests pass** — fix bugs instead |
| 34 | +2. **Axiom precedence**: .NET > Type Safety > Python Syntax |
| 35 | +3. Run tests before/after changes |
| 36 | +4. Follow existing code patterns |
83 | 37 |
|
84 | | -When axioms conflict: **Axiom 1 > Axiom 3 > Axiom 2** |
85 | | -- .NET compatibility > Type safety > Python syntax |
86 | | -- Unless resolved at zero cost |
87 | | - |
88 | | -## Common Commands |
| 38 | +## Commands |
89 | 39 |
|
90 | 40 | ```bash |
91 | | -dotnet build sharpy.sln # Build all |
92 | | -dotnet test # Run all tests |
93 | | -dotnet format # Format before committing |
94 | | -dotnet run --project src/Sharpy.Cli -- run file.spy # Compile and execute |
95 | | - |
96 | | -# Debugging codegen - inspect generated C# |
97 | | -dotnet run --project src/Sharpy.Cli -- emit csharp file.spy |
98 | | - |
99 | | -# Filtered tests |
100 | | -dotnet test --filter "FullyQualifiedName~Lexer" |
101 | | -dotnet test --filter "FullyQualifiedName~Parser" |
102 | | -dotnet test --filter "FullyQualifiedName~Semantic" |
103 | | -dotnet test --filter "FullyQualifiedName~CodeGen" |
104 | | -dotnet test --filter "FullyQualifiedName~FileBasedIntegrationTests" |
105 | | - |
106 | | -# Verify Python behavior |
107 | | -python3 -c "print([1,2,3].pop())" |
| 41 | +dotnet build sharpy.sln # Build |
| 42 | +dotnet test # Test |
| 43 | +dotnet format # Format |
| 44 | +dotnet run --project src/Sharpy.Cli -- emit csharp file.spy # Debug codegen |
| 45 | +python3 -c "..." # Verify Python behavior |
108 | 46 | ``` |
0 commit comments