agent-eng 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/init.js +25 -5
- package/src/templates/.claude/agents/learner.md +65 -0
- package/src/templates/CLAUDE.md +12 -0
package/package.json
CHANGED
package/src/init.js
CHANGED
|
@@ -6,15 +6,20 @@ import { fileURLToPath } from "node:url";
|
|
|
6
6
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
7
|
const TEMPLATES = join(__dirname, "templates");
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const FRAMEWORK_FILES = [
|
|
10
10
|
".claude/settings.json",
|
|
11
11
|
".claude/scripts/update-status.sh",
|
|
12
12
|
".claude/agents/architect.md",
|
|
13
13
|
".claude/agents/executor.md",
|
|
14
|
+
".claude/agents/learner.md",
|
|
14
15
|
".claude/agents/planner.md",
|
|
15
16
|
".claude/agents/reviewer.md",
|
|
16
17
|
".claude/agents/summarizer.md",
|
|
17
18
|
".claude/agents/system-architect.md",
|
|
19
|
+
"orchestration.yaml",
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const PROJECT_STATE_FILES = [
|
|
18
23
|
"architecture/overview.md",
|
|
19
24
|
"architecture/decisions/_template.md",
|
|
20
25
|
"architecture/decisions/0001-how-we-work.md",
|
|
@@ -22,11 +27,13 @@ const STRUCTURE = [
|
|
|
22
27
|
"tickets/_template.md",
|
|
23
28
|
"tickets/_backlog.md",
|
|
24
29
|
"tickets/example/001-example-ticket.md",
|
|
25
|
-
"orchestration.yaml",
|
|
26
30
|
"architecture.yaml",
|
|
27
31
|
"STATUS.md",
|
|
28
32
|
];
|
|
29
33
|
|
|
34
|
+
const PROJECT_STATE_SET = new Set(PROJECT_STATE_FILES);
|
|
35
|
+
const STRUCTURE = [...FRAMEWORK_FILES, ...PROJECT_STATE_FILES];
|
|
36
|
+
|
|
30
37
|
function prompt(question) {
|
|
31
38
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
32
39
|
return new Promise((resolve) => {
|
|
@@ -60,13 +67,18 @@ export async function init(options) {
|
|
|
60
67
|
|
|
61
68
|
const existing = [];
|
|
62
69
|
const fresh = [];
|
|
70
|
+
const protectedFiles = [];
|
|
63
71
|
|
|
64
72
|
for (const file of allFiles) {
|
|
65
73
|
const dest = join(target, file);
|
|
66
|
-
if (existsSync(dest)
|
|
67
|
-
|
|
68
|
-
} else {
|
|
74
|
+
if (!existsSync(dest)) {
|
|
75
|
+
fresh.push(file);
|
|
76
|
+
} else if (options.force) {
|
|
69
77
|
fresh.push(file);
|
|
78
|
+
} else if (PROJECT_STATE_SET.has(file)) {
|
|
79
|
+
protectedFiles.push(file);
|
|
80
|
+
} else {
|
|
81
|
+
existing.push(file);
|
|
70
82
|
}
|
|
71
83
|
}
|
|
72
84
|
|
|
@@ -151,6 +163,14 @@ export async function init(options) {
|
|
|
151
163
|
}
|
|
152
164
|
}
|
|
153
165
|
|
|
166
|
+
if (protectedFiles.length > 0) {
|
|
167
|
+
console.log("");
|
|
168
|
+
console.log("Protected (project state — use --force to overwrite):");
|
|
169
|
+
for (const f of protectedFiles) {
|
|
170
|
+
console.log(` ${f}`);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
154
174
|
console.log("");
|
|
155
175
|
console.log("✔ Agentic workflow initialized");
|
|
156
176
|
console.log("");
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learner
|
|
3
|
+
description: Use to deeply learn a technology or concept used in your project. Finds where it lives in your code, explains it concisely, gives you an interview-ready answer, and quizzes you.
|
|
4
|
+
tools: Read, Grep, Glob, Bash, Write
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a learning agent. The user builds projects with AI assistance and wants to deeply understand the technologies used so they can explain them confidently in interviews.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
12
|
+
When the user asks about a concept or technology:
|
|
13
|
+
|
|
14
|
+
### 1. Find it in the code
|
|
15
|
+
|
|
16
|
+
Search the project for where this concept is actually used. Use grep, glob, and read to find real examples — not hypothetical ones.
|
|
17
|
+
|
|
18
|
+
### 2. Explain what it is (3-5 sentences)
|
|
19
|
+
|
|
20
|
+
No textbook fluff. Explain it like a senior engineer would to a peer who hasn't used it before. Focus on what it does, why it exists, and when you'd reach for it.
|
|
21
|
+
|
|
22
|
+
### 3. Walk through their code
|
|
23
|
+
|
|
24
|
+
Point to specific files and line numbers. Explain what's happening in their implementation — why it's written this way, what each part does, and how data flows through it.
|
|
25
|
+
|
|
26
|
+
### 4. Give an interview answer
|
|
27
|
+
|
|
28
|
+
Write 2-3 sentences the user could say naturally when asked "explain how X works in your project." This should sound human, confident, and specific to their codebase — not generic.
|
|
29
|
+
|
|
30
|
+
### 5. Quiz them
|
|
31
|
+
|
|
32
|
+
Ask one follow-up question that tests whether they actually understand the concept vs just memorized the answer. Good questions probe edge cases, trade-offs, or "what would happen if..."
|
|
33
|
+
|
|
34
|
+
### 6. Save the learning
|
|
35
|
+
|
|
36
|
+
Write the completed learning to `~/Developer/AgentEngineerWorkflow/learnings/{concept-slug}.md` with this format:
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
# {Concept Name}
|
|
40
|
+
|
|
41
|
+
## What it is
|
|
42
|
+
{3-5 sentence explanation}
|
|
43
|
+
|
|
44
|
+
## How I used it
|
|
45
|
+
{File paths, line references, and walkthrough of the specific implementation}
|
|
46
|
+
|
|
47
|
+
## Interview answer
|
|
48
|
+
> {2-3 sentence answer ready to say out loud}
|
|
49
|
+
|
|
50
|
+
## Related concepts to explore
|
|
51
|
+
- {concept 1}
|
|
52
|
+
- {concept 2}
|
|
53
|
+
- {concept 3}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Create the `~/Developer/AgentEngineerWorkflow/learnings/` directory if it doesn't exist.
|
|
57
|
+
|
|
58
|
+
## Guidelines
|
|
59
|
+
|
|
60
|
+
- Always ground explanations in the user's actual code, not abstract examples
|
|
61
|
+
- If the concept isn't found in the project, say so and ask which project to look in
|
|
62
|
+
- Keep language conversational — this is prep for talking to humans, not writing docs
|
|
63
|
+
- The interview answer should mention their specific project, not be generic
|
|
64
|
+
- For the quiz question, don't accept "yes/no" answers — ask something that requires explanation
|
|
65
|
+
- If the concept connects to other technologies in the project, mention them as related concepts to explore next
|
package/src/templates/CLAUDE.md
CHANGED
|
@@ -13,6 +13,7 @@ Agents own the **process** — architecture decisions, work decomposition, quali
|
|
|
13
13
|
| **Decompose** | `/planner` agent | ADR/spec ready, work needs to be broken into tickets |
|
|
14
14
|
| **Execute** | Claude Code **plan mode** (`shift+tab`) | Implementing a specific ticket (includes writing tests) |
|
|
15
15
|
| **Review** | `/reviewer` agent | Code and tests ready for validation |
|
|
16
|
+
| **Learn** | `/learner` agent | Feature complete and introduced a new technology or concept |
|
|
16
17
|
| **Report** | `/summarizer` agent | Sprint or feature complete, stakeholder update needed |
|
|
17
18
|
|
|
18
19
|
### Why hybrid?
|
|
@@ -36,6 +37,17 @@ Agents own the **process** — architecture decisions, work decomposition, quali
|
|
|
36
37
|
3. For each ticket: use plan mode (`shift+tab`) to implement it
|
|
37
38
|
4. After implementation: run `/reviewer` to validate against acceptance criteria
|
|
38
39
|
5. If the ticket touches an existing ADR's scope, verify the decision still holds
|
|
40
|
+
6. If the feature introduced new technologies or concepts, run `/learner` for each one
|
|
41
|
+
|
|
42
|
+
## After Completing a Feature
|
|
43
|
+
|
|
44
|
+
When a feature is done and introduces new technologies, patterns, or concepts the user hasn't worked with before — automatically invoke `/learner` for each new concept. Look for:
|
|
45
|
+
- New libraries or frameworks added to dependencies
|
|
46
|
+
- New architectural patterns (e.g., event sourcing, SSE, pub/sub)
|
|
47
|
+
- New language features or APIs used for the first time
|
|
48
|
+
- New infrastructure concepts (e.g., WebSockets, gRPC, CRDT)
|
|
49
|
+
|
|
50
|
+
This ensures the user can confidently explain every technology in their project.
|
|
39
51
|
|
|
40
52
|
## Testing in Plan Mode
|
|
41
53
|
|