Commit 1a615a8
feat: add requirements traceability annotations and new LA-REQ tests (#346)
* feat: add requirements traceability annotations and 218 new LA-REQ tests
- Add REQ ID annotations to 32 existing test files so the traceability
system can match tests to their spec requirements (section-level IDs
in module docstrings + sub-item IDs in test method comments)
- Write 218 new tests across 5 files for learning-agents requirements:
- LA-REQ-001: plugin structure (22 tests)
- LA-REQ-003/005: agent file structure and issue lifecycle (49 tests)
- LA-REQ-004: session tracking hooks (45 tests)
- LA-REQ-006/010: learning cycle and issue reporting (65 tests)
- LA-REQ-011: skill routing (37 tests)
- Add PLUG-REQ-001.12 tests for session/agent identity injection hooks
- Coverage improvement: 610 → 987 covered IDs (363 → 93 uncovered)
- All non-LA deepwork core requirements now fully covered
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: complete LA-REQ coverage with DeepSchemas — 100% requirements coverage
- Add 6 anonymous DeepSchemas for judgment-based LA-REQ requirements:
- create-agent/.deepschema.SKILL.md.yml (LA-REQ-002)
- learn/.deepschema.SKILL.md.yml (LA-REQ-006, partial 003)
- identify/.deepschema.SKILL.md.yml (LA-REQ-007, partial 005)
- investigate-issues/.deepschema.SKILL.md.yml (LA-REQ-008)
- incorporate-learnings/.deepschema.SKILL.md.yml (LA-REQ-009)
- prompt-review/.deepschema.SKILL.md.yml (LA-REQ-012)
- Place REQ IDs in YAML comments (not requirement body text) so they
serve as metadata for traceability without polluting the prompt
content sent to reviewer agents
- Add section-level REQ docstring annotations to LA-REQ test files
- Note JOBS-REQ-009 as deprecated in test_quality_gate docstring
- Add JOBS-REQ-012 parent ID to deepwork_jobs deepschema
Coverage: 987 → 1080 covered (93 → 0 uncovered). All 420 spec IDs
across DW-REQ, JOBS-REQ, REVIEW-REQ, PLUG-REQ, and LA-REQ are now
traceable to either tests, deepschemas, or review rules.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: require REQ IDs in YAML comments not requirement body text
Add the req-ids-in-comments requirement to the standard DeepSchema
definition. Requirement IDs (e.g., LA-REQ-007.4) MUST be placed in
YAML comments above the entry, not in the body text. The body text
gets sent to the reviewer agent as the rule prompt — IDs there add
noise without informational value.
EXCEPTION: when a requirement is functionally about citing or
producing a specific ID, the ID may appear in the body.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address review findings on requirements traceability PR
- Fix malformed docstring in test_hook_wrapper.py (banner block was inside
the docstring, splitting the prose summary)
- Remove duplicate `import json` in test_state.py
- Remove redundant `project_root`/`state_manager` fixture redefinitions in
9 test classes (pytest inherits module-scoped fixtures into classes)
- Fix tautological assertion in test_learning_agents_plugin.py
(`has_structured or has_noop` after asserting has_noop is dead code)
- Remove tautological tests from test_learning_agents_file_structure.py
that only verified test fixture constants, not real behavior
- Update bash wildcard patterns in .claude/settings.json to use `:*`
word boundary instead of bare `*`
- Add `dict[str, Any]` typing to test helper return types
- Reframe LA-REQ-006.8/006.10 in learn skill DeepSchema to be filesystem-
verifiable ("SKILL.md MUST instruct the agent to...")
- Update CHANGELOG.md with PR #346 entry
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address second-iteration review findings
- Add `# YOU MUST NOT MODIFY THIS TEST UNLESS THE REQUIREMENT CHANGES`
second line to all 435 traceability comments in the diff
- Migrate fragile keyword-on-prose tests for LA-REQ-006.1/3/6/7/9/11/12
from test_learning_agents_cycle.py into the learn deepschema as
judgment-based requirements
- Update doc/learning_agents_architecture.md: add `model:` field to
agent file example, name conversation_transcript.jsonl in Session
Logs, expand create-agent/learn/identify/investigate-issues/
incorporate-learnings/prompt-review subsections, document dynamic
inclusion of additional_learning_guidelines/*.md
- Apply mypy fixes from python_lint review (drop now-unneeded
type:ignore comments in test_tools_coverage.py)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address test-quality findings from python_code_review
- test_learning_agents_session_tracking.py: lift inline `import re` and
`from glob import glob` to module top; extract `_locate_reminder_file()`
helper to remove duplicated reminder-path fallback logic
- test_learning_agents_file_structure.py: add `check=True` to the three
`subprocess.run` calls that were silently masking script failures
- test_learning_agents_cycle.py: harden the `content.find()` slicing tests
for LA-REQ-006.5 by asserting both positions are >= 0 before the order
comparison; cache `_read_skill()` via `@functools.cache` so each
SKILL.md is read once across the test module instead of 35 times
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: move PR #346 changelog entries to Unreleased section
The requirements traceability entries were incorrectly placed under
[0.13.0] (an already-released section). They belong in [Unreleased]
since this PR has not yet been released.
Also adds an anonymous DeepSchema for CHANGELOG.md that enforces this:
new entries added in a PR must go under [Unreleased], not under any
already-released version section.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 3a6954d commit 1a615a8
51 files changed
Lines changed: 4139 additions & 176 deletions
File tree
- .claude
- doc
- learning_agents/skills
- create-agent
- identify
- incorporate-learnings
- investigate-issues
- learn
- prompt-review
- src/deepwork
- standard_jobs/deepwork_jobs
- standard_schemas/deepschema
- tests/unit
- deepschema
- jobs
- mcp
- plugins
- review
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| 112 | + | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
| 121 | + | |
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
121 | 130 | | |
122 | 131 | | |
123 | 132 | | |
| |||
185 | 194 | | |
186 | 195 | | |
187 | 196 | | |
188 | | - | |
| 197 | + | |
189 | 198 | | |
190 | 199 | | |
191 | 200 | | |
| |||
241 | 250 | | |
242 | 251 | | |
243 | 252 | | |
244 | | - | |
| 253 | + | |
245 | 254 | | |
246 | 255 | | |
247 | 256 | | |
248 | 257 | | |
| 258 | + | |
| 259 | + | |
249 | 260 | | |
250 | 261 | | |
251 | 262 | | |
252 | 263 | | |
253 | | - | |
| 264 | + | |
254 | 265 | | |
255 | 266 | | |
256 | 267 | | |
257 | 268 | | |
258 | | - | |
| 269 | + | |
259 | 270 | | |
260 | 271 | | |
261 | 272 | | |
| |||
265 | 276 | | |
266 | 277 | | |
267 | 278 | | |
268 | | - | |
| 279 | + | |
269 | 280 | | |
270 | 281 | | |
271 | | - | |
| 282 | + | |
272 | 283 | | |
273 | 284 | | |
274 | 285 | | |
275 | | - | |
| 286 | + | |
276 | 287 | | |
277 | 288 | | |
278 | 289 | | |
| |||
Lines changed: 67 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
Lines changed: 105 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
0 commit comments