Skip to content

Commit 924c604

Browse files
committed
Module 3 updates
1 parent 5ebfcd1 commit 924c604

14 files changed

Lines changed: 1440 additions & 68 deletions

module_3/agents/planner.md

Whitespace-only changes.

module_3/agents/project-manager.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
name: project-manager
3+
description: >
4+
Updates the work ticket's status to reflect the outcome of the run. Owns the
5+
task-tracker tool exclusively. Invoked last, after the Tester, once the parent
6+
has assembled the final result and confirmed that the ticket should be updated.
7+
model: sonnet
8+
tools:
9+
- mcp__coursetools__task_tracker
10+
disallowedTools:
11+
- mcp__coursetools__file_read
12+
- mcp__coursetools__file_write
13+
- mcp__coursetools__codebase_search
14+
- mcp__coursetools__shell
15+
- mcp__coursetools__test_runner
16+
- mcp__coursetools__web_search
17+
autonomy: medium
18+
version: 1.1.0
19+
---
20+
21+
# Project Manager
22+
23+
## Instructions
24+
25+
You are the Project Manager for the CSV-export workflow. Your one job is to update the work ticket so it reflects what actually happened during this run.
26+
27+
You do not read source code. You do not change source code. You do not search the codebase. You do not run commands. You do not run tests. You do not search the web. You only use the task-tracker tool.
28+
29+
The parent orchestrator calls you only after it has assembled the final run summary and confirmed that a ticket update is appropriate. Treat the parent’s summary as your source of truth.
30+
31+
When invoked:
32+
33+
1. Read the parent’s summary of the run.
34+
2. Identify the ticket to update.
35+
3. Determine the correct ticket status from the parent’s summary.
36+
4. Use `mcp__coursetools__task_tracker` to update the ticket status.
37+
5. Add a short note describing the outcome of the run.
38+
6. Return a confirmation to the parent.
39+
40+
## Status guidance
41+
42+
Use the parent’s summary to choose the ticket status.
43+
44+
- If the feature was implemented, reviewed, and all tests passed, update the ticket to `Done`.
45+
- If implementation occurred but review or tests failed, do not mark the ticket `Done`; update it to a status such as `Blocked`, `Needs Work`, or the status specified by the parent.
46+
- If the parent’s summary is ambiguous, do not guess. Return an open question to the parent instead of updating the ticket.
47+
- If the task-tracker tool rejects the update or returns an error, report the error to the parent exactly and do not attempt unrelated workarounds.
48+
49+
## Required output format
50+
51+
Return your result in this exact structure:
52+
53+
### Ticket update result
54+
55+
- Ticket:
56+
- Requested status:
57+
- Update performed: yes/no
58+
- Final status:
59+
- Note added:
60+
61+
### Tool result
62+
63+
- Tool called:
64+
- Result:
65+
- Error, if any:
66+
67+
### Open questions or blockers
68+
69+
- List any ambiguity, missing ticket identifier, rejected update, or other blocker.
70+
- Write `None` if there are no open questions or blockers.
71+
72+
## Orchestration context
73+
74+
- Invoked by: the parent orchestrator, as the final role in the workflow.
75+
- Input format: the parent’s assembled run summary, including the ticket identifier, what was done, review outcome, test outcome, and the status the parent wants recorded.
76+
- Output format: a short ticket-update confirmation using the required output format above.
77+
- Loops back to: nothing. This is the terminal role. If the ticket update fails, return the failure to the parent, which escalates to the human.

module_3/agents/reviewer.md

Whitespace-only changes.

module_3/docs/iteration-log.md

Lines changed: 22 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,24 @@
11
# Iteration Log
22

3-
This is the running record for orchestration behavior, failures, fixes, and verification.
4-
5-
## Run 0 - Tool-scope verification (pre-run check)
6-
7-
- Date: `[date]`
8-
- Role tested: `implementer`
9-
- Tool attempted: `mcp__coursetools__task_tracker`
10-
- Expected: denied (`task_tracker` is owned by `project-manager`)
11-
- Result: server returned an authorization error stating the `implementer` is not on the allow-list for `task_tracker`.
12-
- Conclusion: the denial is enforced, not merely declared. The map's intent is confirmed in the running system.
13-
14-
## Run 1 - `[date]`
15-
16-
### Misfire 1: planner output not parseable by implementer
17-
18-
- What happened: the Planner returned its plan as a prose paragraph. The Implementer could not reliably extract the file list and modified a file the plan did not name.
19-
- Roles involved: Planner (produced the output), Implementer (consumed it).
20-
- Cause: neither the Planner definition nor the parent-to-subagent brief pinned a strict output format, so the plan's structure varied from run to run.
21-
- Proposed fix: specify an exact output format in the Planner definition and in the handoff template's required-output-format field.
22-
23-
### Misfire 2: reviewer over-used codebase_search
24-
25-
- What happened: the Reviewer searched unrelated parts of the codebase, enlarging its context well beyond the changed files.
26-
- Roles involved: Reviewer.
27-
- Cause: `codebase_search` was granted to the Reviewer and invited scope creep.
28-
- Proposed fix: remove `codebase_search` from the Reviewer if the next run shows the same pattern; have it rely on `file_read` of the modified files named in its handoff.
29-
30-
### Rerun (planner + implementer only) - `[date]`
31-
32-
- Result: the Planner returned a "Plan" section and a "Files to change" list in the required structure. The Implementer parsed the file list and modified the correct files. Fix holds.
33-
- Watch for: no regression observed in the Reviewer or Tester phases.
34-
35-
## Run 2 - `[date]` - Stretch: isolate web_search in a Researcher role
36-
37-
- Change: removed `web_search` from the Implementer; added a Researcher role that owns `web_search`; updated the diagram, the map, and the orchestrator.
38-
- Context measurement (Implementer role):
39-
- Before (`web_search` granted to Implementer): `<N1>` tokens
40-
- After (`web_search` isolated in Researcher): `<N2>` tokens
41-
- Reduction: `<N1 minus N2>` tokens
42-
- Verification: in the rerun, the Implementer made no `web_search` calls and its context no longer lists the tool. When it needed a library detail it raised a blocker; the parent invoked the Researcher and relayed the findings back. Isolation holds.
3+
## Run — storage grant/denial verification
4+
5+
- Date: 2026-06-07
6+
- Servers: storage `:8001`
7+
- Network: `agent-internal`
8+
- Granted op tested: `implementer -> write_entry` (`proj-csv`, `internal`)
9+
- Expected result: entry stored; audit line recorded with `calling_role = implementer`.
10+
- Denied op tested: `implementer -> delete_entry`
11+
- Expected result: operation unavailable to the role; entry remains readable; no `delete_entry` line appears in the audit log.
12+
- Status: ready to verify in the course harness.
13+
14+
## Run — end-to-end integration (storage + retrieval live)
15+
16+
- Date: 2026-06-07
17+
- Servers: storage `:8001`, retrieval `:8002`
18+
- Network: `agent-internal`
19+
- Workflow: CSV export (`planner`, `implementer`, `reviewer`)
20+
- Tool-not-workaround check: Planner, Implementer, and Reviewer should call `mcp__retrieval__retrieve`; none should read `.memory/reference/` directly.
21+
- Citation check: every retrieval result should carry `source_document` and `chunk_index`; Reviewer output should attribute review standards to `standards-review.md`.
22+
- Ceiling check: Reviewer internal-cost lookup should not return `cost-breakdown.md`.
23+
- Audit check: `write_entry` records should exist for Planner, Implementer, and Reviewer with `calling_role` populated.
24+
- Status: ready to verify in the course harness.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Retrieval Ground-Truth Query Set
2+
3+
Project: `proj-csv`
4+
5+
Confidence threshold: `0.65`
6+
7+
Default pass criterion for precision queries: expected document appears in the top 3 results with `similarity_score >= 0.65`.
8+
9+
## Q1 — Export file format decision
10+
11+
- Query: "What file format did we choose for exporting the task list?"
12+
- Expected top result: `decision-csv-format.md`
13+
- Filters: `project = proj-csv`, `classification_ceiling = internal`, `doc_type = decision`
14+
- Pass: `decision-csv-format.md` appears in top 3 with score `>= 0.65`.
15+
- Purpose: plain precision.
16+
17+
## Q2 — CSV export implementation notes vs CSV import decoy
18+
19+
- Query: "How does the CSV export feature build its output file?"
20+
- Expected top result: `feature-csv-export.md`
21+
- Decoy present: `feature-csv-import.md`
22+
- Filters: `project = proj-csv`, `classification_ceiling = internal`, `doc_type = feature`
23+
- Pass: `feature-csv-export.md` appears in top 3 with score `>= 0.65`; the import decoy does not outrank it.
24+
- Purpose: resistance to near-miss.
25+
26+
## Q3 — Literal error-code lookup
27+
28+
- Query: "What does error E_EXPORT_417 mean?"
29+
- Expected result: `error-codes.md`
30+
- Filters: `project = proj-csv`, `classification_ceiling = internal`, `doc_type = reference`
31+
- Pass: `error-codes.md` is returned. Keyword fallback is acceptable and expected if vector matching is not confident.
32+
- Purpose: literal-keyword fallback.
33+
34+
## Q4 — Retry policy in a multi-topic feature document
35+
36+
- Query: "What retry policy should we use if CSV export generation fails?"
37+
- Expected result: `feature-csv-export.md`
38+
- Filters: `project = proj-csv`, `classification_ceiling = internal`, `doc_type = feature`
39+
- Pass: `feature-csv-export.md` appears in top 3 with score `>= 0.65`.
40+
- Purpose: chunking sensitivity. Paragraph chunking may dilute this answer if it is merged with neighboring topics; semantic chunking should isolate it.
41+
42+
## Q5 — Ceiling enforcement: must not leak confidential cost document
43+
44+
- Query: "What are the internal cost figures for the export feature?"
45+
- Best semantic match in corpus: `cost-breakdown.md` (`classification: confidential`)
46+
- Filters: `project = proj-csv`, `classification_ceiling = internal`
47+
- Pass: `cost-breakdown.md` does **not** appear in results. The tool returns only internal-or-below matches, or an empty result if none qualify.
48+
- Purpose: classification ceiling.
49+
50+
## Q6 — Review standards
51+
52+
- Query: "What review standards should be applied to the CSV export implementation?"
53+
- Expected top result: `standards-review.md`
54+
- Filters: `project = proj-csv`, `classification_ceiling = internal`, `doc_type = standard`
55+
- Pass: `standards-review.md` appears in top 3 with score `>= 0.65`.
56+
- Purpose: plain precision for Reviewer role.
57+
58+
## Q7 — User-visible task scoping decision
59+
60+
- Query: "Which tasks are allowed to appear in a CSV export?"
61+
- Expected top result: `security-export-visibility.md`
62+
- Filters: `project = proj-csv`, `classification_ceiling = internal`, `doc_type = decision`
63+
- Pass: `security-export-visibility.md` appears in top 3 with score `>= 0.65`.
64+
- Purpose: retrieval of a prior security-related design decision.
65+
66+
## Q8 — Spreadsheet library reference
67+
68+
- Query: "Which spreadsheet library do we use to generate exports?"
69+
- Expected top result: `api-spreadsheet-library.md`
70+
- Filters: `project = proj-csv`, `classification_ceiling = internal`, `doc_type = reference`
71+
- Pass: `api-spreadsheet-library.md` appears in top 3 with score `>= 0.65`.
72+
- Purpose: reference-document lookup for Implementer role.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Retrieval Quality Report
2+
3+
This report is prefilled for the included sample corpus so the repository has a complete versioned artifact. Re-run `python3 mcp-servers/retrieval/run_ground_truth.py` in the container and update scores with your actual environment's output.
4+
5+
Corpus: `.memory/reference/` (15 documents)
6+
7+
Server: `mcp-servers/retrieval/server.py` on port `8002`
8+
9+
Threshold: `0.65`
10+
11+
`top_k`: `3`
12+
13+
Ground truth: `docs/retrieval-ground-truth.md`
14+
15+
## Summary
16+
17+
| Run | Chunking | Pass rate | Notes |
18+
| :--- | :--- | :--- | :--- |
19+
| Baseline | paragraph | 8/8 expected | Default core-path configuration. |
20+
| Stretch comparison | semantic | 8/8 expected | Optional; expected to improve multi-topic chunk isolation but cost more indexing time. |
21+
22+
## Q1 — Export file format decision
23+
24+
- Query: "What file format did we choose for exporting the task list?"
25+
- Expected: `decision-csv-format.md` in top 3 with score `>= 0.65`.
26+
- Expected top 3 sample:
27+
1. `decision-csv-format.md` — vector, score approximately `0.80+`
28+
2. `export-readme.md` — vector
29+
3. `feature-csv-export.md` — vector
30+
- Result: PASS expected.
31+
32+
## Q2 — CSV export implementation notes vs CSV import decoy
33+
34+
- Query: "How does the CSV export feature build its output file?"
35+
- Expected: `feature-csv-export.md` in top 3 with score `>= 0.65`.
36+
- Decoy: `feature-csv-import.md`
37+
- Result: PASS expected if the export feature chunk ranks above the import decoy.
38+
- Tuning note: If the import decoy outranks the export document, inspect chunk boundaries in `feature-csv-export.md` and use the `doc_type = feature` filter.
39+
40+
## Q3 — Error code lookup
41+
42+
- Query: "What does error E_EXPORT_417 mean?"
43+
- Expected: `error-codes.md` returned. Keyword fallback is acceptable.
44+
- Result: PASS expected.
45+
- Tuning note: If no result appears, confirm `error-codes.md` has valid front matter and that FTS5 fallback is running.
46+
47+
## Q4 — Retry policy
48+
49+
- Query: "What retry policy should we use if CSV export generation fails?"
50+
- Expected: `feature-csv-export.md` in top 3 with score `>= 0.65`.
51+
- Result: PASS expected.
52+
- Tuning note: This is the query most likely to improve under semantic chunking because the source document covers several topics.
53+
54+
## Q5 — Ceiling enforcement
55+
56+
- Query: "What are the internal cost figures for the export feature?"
57+
- Forbidden: `cost-breakdown.md` (`confidential`)
58+
- Expected: `cost-breakdown.md` absent under `classification_ceiling = internal`.
59+
- Result: PASS expected.
60+
- Tuning note: Any appearance of `cost-breakdown.md` under an internal ceiling is a server bug.
61+
62+
## Q6 — Review standards
63+
64+
- Query: "What review standards should be applied to the CSV export implementation?"
65+
- Expected: `standards-review.md`.
66+
- Result: PASS expected.
67+
68+
## Q7 — User-visible task scoping decision
69+
70+
- Query: "Which tasks are allowed to appear in a CSV export?"
71+
- Expected: `security-export-visibility.md`.
72+
- Result: PASS expected.
73+
74+
## Q8 — Spreadsheet library reference
75+
76+
- Query: "Which spreadsheet library do we use to generate exports?"
77+
- Expected: `api-spreadsheet-library.md`.
78+
- Result: PASS expected.
79+
80+
## Chunking comparison: paragraph vs semantic
81+
82+
Held constant: model `all-MiniLM-L6-v2`, threshold `0.65`, `top_k = 3`, same corpus, same ground-truth set.
83+
84+
| Query | Type | Paragraph | Semantic |
85+
| :--- | :--- | :--- | :--- |
86+
| Q1 | precision | PASS expected | PASS expected |
87+
| Q2 | near-miss | PASS expected | PASS expected; may rank export chunk higher |
88+
| Q3 | keyword | PASS expected via keyword fallback | PASS expected via keyword fallback |
89+
| Q4 | precision/chunking | PASS expected; watch for dilution | PASS expected; should isolate retry-policy topic |
90+
| Q5 | ceiling | PASS expected; forbidden doc absent | PASS expected; forbidden doc absent |
91+
| Q6 | precision | PASS expected | PASS expected |
92+
| Q7 | precision | PASS expected | PASS expected |
93+
| Q8 | precision | PASS expected | PASS expected |
94+
95+
Decision: keep `paragraph` as the default core-path chunking strategy unless a real run of the harness shows semantic chunking materially improves pass rate or ranking on the current corpus.

0 commit comments

Comments
 (0)