lore-agent-task-manager 0.1.0__py3-none-any.whl

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.
Files changed (97) hide show
  1. lore/__init__.py +5 -0
  2. lore/__main__.py +5 -0
  3. lore/artifact.py +50 -0
  4. lore/cli.py +2786 -0
  5. lore/codex.py +316 -0
  6. lore/db.py +1320 -0
  7. lore/defaults/GETTING-STARTED.md +38 -0
  8. lore/defaults/LORE-AGENT.md +32 -0
  9. lore/defaults/artifacts/codex/CODEX.md +143 -0
  10. lore/defaults/artifacts/codex/conceptual/entities/task.md +51 -0
  11. lore/defaults/artifacts/codex/conceptual/entities/user.md +47 -0
  12. lore/defaults/artifacts/codex/conceptual/relationships/user--task.md +58 -0
  13. lore/defaults/artifacts/codex/conceptual/workflows/complete-task.md +47 -0
  14. lore/defaults/artifacts/codex/conceptual/workflows/create-and-assign-entity.md +68 -0
  15. lore/defaults/artifacts/codex/constraints/constraints.md +59 -0
  16. lore/defaults/artifacts/codex/decisions/001-sqlite-storage.md +64 -0
  17. lore/defaults/artifacts/codex/decisions/adr-no-default-content-tests.md +33 -0
  18. lore/defaults/artifacts/codex/glossary/glossary.md +40 -0
  19. lore/defaults/artifacts/codex/integrations/integrations.md +47 -0
  20. lore/defaults/artifacts/codex/operations/deployment/development.md +105 -0
  21. lore/defaults/artifacts/codex/operations/deployment/overview.md +57 -0
  22. lore/defaults/artifacts/codex/operations/deployment/production.md +88 -0
  23. lore/defaults/artifacts/codex/operations/deployment/staging.md +57 -0
  24. lore/defaults/artifacts/codex/operations/git.md +95 -0
  25. lore/defaults/artifacts/codex/operations/runbooks/runbook-template.md +75 -0
  26. lore/defaults/artifacts/codex/personas/persona.md +48 -0
  27. lore/defaults/artifacts/codex/security/security-model.md +62 -0
  28. lore/defaults/artifacts/codex/standards/code-conventions.md +61 -0
  29. lore/defaults/artifacts/codex/standards/design-principles.md +67 -0
  30. lore/defaults/artifacts/codex/standards/testing.md +71 -0
  31. lore/defaults/artifacts/codex/technical/backend/api/tasks.md +81 -0
  32. lore/defaults/artifacts/codex/technical/backend/overview.md +58 -0
  33. lore/defaults/artifacts/codex/technical/database/overview.md +45 -0
  34. lore/defaults/artifacts/codex/technical/database/schemas/tasks.md +49 -0
  35. lore/defaults/artifacts/codex/technical/database/schemas/users.md +38 -0
  36. lore/defaults/artifacts/codex/technical/frontend/overview.md +41 -0
  37. lore/defaults/artifacts/codex/technical/overview.md +59 -0
  38. lore/defaults/artifacts/feature-implementation/codex-change-proposal.md +91 -0
  39. lore/defaults/artifacts/feature-implementation/context-map.md +44 -0
  40. lore/defaults/artifacts/feature-implementation/crazy-prd.md +88 -0
  41. lore/defaults/artifacts/feature-implementation/crazy-tech-spec.md +79 -0
  42. lore/defaults/artifacts/feature-implementation/prd-draft.md +128 -0
  43. lore/defaults/artifacts/feature-implementation/prd.md +125 -0
  44. lore/defaults/artifacts/feature-implementation/tech-spec-draft.md +134 -0
  45. lore/defaults/artifacts/feature-implementation/tech-spec.md +138 -0
  46. lore/defaults/artifacts/feature-implementation/user-story-index.md +59 -0
  47. lore/defaults/artifacts/feature-implementation/user-story.md +126 -0
  48. lore/defaults/doctrines/feature-implementation/feature-implementation.yaml +387 -0
  49. lore/defaults/doctrines/feature-implementation/quick-feature-implementation.yaml +206 -0
  50. lore/defaults/doctrines/feature-implementation/tdd-implementation.yaml +51 -0
  51. lore/defaults/doctrines/update-changelog.yaml +24 -0
  52. lore/defaults/gitignore +20 -0
  53. lore/defaults/knights/changelog-scribe.md +105 -0
  54. lore/defaults/knights/feature-implementation/architect.md +65 -0
  55. lore/defaults/knights/feature-implementation/ba.md +73 -0
  56. lore/defaults/knights/feature-implementation/crazy-architect.md +41 -0
  57. lore/defaults/knights/feature-implementation/crazy-pm.md +39 -0
  58. lore/defaults/knights/feature-implementation/pm.md +61 -0
  59. lore/defaults/knights/feature-implementation/scout.md +67 -0
  60. lore/defaults/knights/feature-implementation/tdd-green.md +32 -0
  61. lore/defaults/knights/feature-implementation/tdd-red.md +31 -0
  62. lore/defaults/knights/feature-implementation/tdd-refactor.md +40 -0
  63. lore/defaults/knights/feature-implementation/tech-lead.md +73 -0
  64. lore/defaults/knights/feature-implementation/tech-writer.md +68 -0
  65. lore/defaults/schema.sql +60 -0
  66. lore/defaults/skills/explore-codex/SKILL.md +60 -0
  67. lore/defaults/skills/new-artifact/SKILL.md +73 -0
  68. lore/defaults/skills/new-doctrine/SKILL.md +79 -0
  69. lore/defaults/skills/new-knight/SKILL.md +72 -0
  70. lore/defaults/skills/new-watcher/SKILL.md +45 -0
  71. lore/defaults/skills/start-quest/SKILL.md +100 -0
  72. lore/defaults/watchers/change-log-updates.yaml +16 -0
  73. lore/doctrine.py +271 -0
  74. lore/frontmatter.py +96 -0
  75. lore/graph.py +73 -0
  76. lore/ids.py +16 -0
  77. lore/init.py +137 -0
  78. lore/knight.py +97 -0
  79. lore/migrations/__init__.py +1 -0
  80. lore/migrations/v1_to_v2.py +10 -0
  81. lore/migrations/v2_to_v3.py +24 -0
  82. lore/migrations/v3_to_v4.py +19 -0
  83. lore/migrations/v4_to_v5.py +41 -0
  84. lore/migrations/v5_to_v6.py +18 -0
  85. lore/models.py +323 -0
  86. lore/oracle.py +204 -0
  87. lore/paths.py +56 -0
  88. lore/priority.py +36 -0
  89. lore/py.typed +0 -0
  90. lore/root.py +27 -0
  91. lore/validators.py +149 -0
  92. lore/watcher.py +158 -0
  93. lore_agent_task_manager-0.1.0.dist-info/METADATA +194 -0
  94. lore_agent_task_manager-0.1.0.dist-info/RECORD +97 -0
  95. lore_agent_task_manager-0.1.0.dist-info/WHEEL +4 -0
  96. lore_agent_task_manager-0.1.0.dist-info/entry_points.txt +2 -0
  97. lore_agent_task_manager-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,44 @@
1
+ ---
2
+ id: fi-context-map
3
+ title: Context Map
4
+ group: feature-implementation
5
+ summary: >
6
+ Template for the Scout to produce a context map for a feature. Identifies
7
+ all relevant codex documents from one lens (business or technical).
8
+ Used twice per feature cycle — once per Scout. Mandatory input for all
9
+ planning agents.
10
+ ---
11
+
12
+ # Context Map — {Feature Name} ({lens: business|technical})
13
+
14
+ **Author:** Scout ({lens} lens)
15
+ **Date:** {date}
16
+ **Feature:** _{one-line feature description}_
17
+ **Lens:** _{business | technical}_
18
+
19
+ ---
20
+
21
+ ## Relevant Documents
22
+
23
+ | ID | Title | Why relevant |
24
+ |----|-------|-------------|
25
+ | `{codex-id-1}` | {title} | _{Specific reason — e.g. "Contains the user workflow this feature extends", "Defines the schema for the table being modified"}_ |
26
+ | `{codex-id-2}` | {title} | _{Specific reason}_ |
27
+ | `{codex-id-3}` | {title} | _{Specific reason}_ |
28
+
29
+ > Add one row per relevant document. The "why relevant" column must be specific enough that a downstream agent knows exactly why to read it.
30
+
31
+ ---
32
+
33
+ ## How to Use This Map
34
+
35
+ Every agent that receives this map should:
36
+ 1. Run `lore codex show <id1> <id2> ...` with all IDs in the table above
37
+ 2. Read every document listed before starting their mission
38
+ 3. Do not explore the codex independently — this map is your entry point
39
+
40
+ ---
41
+
42
+ ## Scout Notes
43
+
44
+ _{Any observations about gaps, ambiguities, or areas where the codex may need updating after this feature ships. Not instructions — observations.}_
@@ -0,0 +1,88 @@
1
+ ---
2
+ id: fi-crazy-prd
3
+ title: Crazy PRD — Divergent Brainstorm
4
+ group: feature-implementation
5
+ summary: >
6
+ Template for the Crazy PM brainstorm pass. Captures wild, unconstrained product
7
+ ideas before the structured PRD Draft. Prioritises breadth over correctness —
8
+ no idea is too ambitious. Top ideas feed into the PRD Draft phase.
9
+ ---
10
+
11
+ # {Feature Name} — Crazy PRD Brainstorm
12
+
13
+ **Author:** Crazy PM
14
+ **Date:** {date}
15
+ **Input:** _{raw user input or problem statement}_
16
+
17
+ ---
18
+
19
+ ## The Wildest Version of This
20
+
21
+ _{Forget constraints. If budget, time, and physics were not a problem, what would this feature be? One paragraph, no hedging._
22
+
23
+ ---
24
+
25
+ ## 10 Crazy Ideas
26
+
27
+ _At least 10 ideas — the more divergent the better. At least two should seem absurd._
28
+
29
+ 1. _{Idea 1}_
30
+ 2. _{Idea 2}_
31
+ 3. _{Idea 3}_
32
+ 4. _{Idea 4}_
33
+ 5. _{Idea 5}_
34
+ 6. _{Idea 6}_
35
+ 7. _{Idea 7}_
36
+ 8. _{Idea 8}_
37
+ 9. _{Idea 9}_
38
+ 10. _{Idea 10}_
39
+
40
+ ---
41
+
42
+ ## Unexpected Users
43
+
44
+ _Who might use this in ways the requester never imagined?_
45
+
46
+ - _{Unexpected persona 1 — why they'd use it, what they'd get from it}_
47
+ - _{Unexpected persona 2}_
48
+ - _{Unexpected persona 3}_
49
+
50
+ ---
51
+
52
+ ## Dangerous Assumptions
53
+
54
+ _What assumptions is the requester making that might be wrong?_
55
+
56
+ - _{Assumption 1 — why it might be false}_
57
+ - _{Assumption 2}_
58
+ - _{Assumption 3}_
59
+
60
+ ---
61
+
62
+ ## The Opposite Feature
63
+
64
+ _What would the anti-version of this look like? Inverting the premise sometimes reveals a better product._
65
+
66
+ _{Describe the opposite — what it does, who it serves, why it might actually be smarter._
67
+
68
+ ---
69
+
70
+ ## Hidden Problems Worth Solving
71
+
72
+ _What deeper or adjacent problems did this request reveal?_
73
+
74
+ - _{Problem 1}_
75
+ - _{Problem 2}_
76
+ - _{Problem 3}_
77
+
78
+ ---
79
+
80
+ ## Top 3 Ideas Worth Carrying Forward
81
+
82
+ _The three most promising ideas to hand off to the PM for the PRD Draft._
83
+
84
+ | Idea | Why It's Worth Exploring |
85
+ |------|--------------------------|
86
+ | _{Idea A}_ | _{Rationale}_ |
87
+ | _{Idea B}_ | _{Rationale}_ |
88
+ | _{Idea C}_ | _{Rationale}_ |
@@ -0,0 +1,79 @@
1
+ ---
2
+ id: fi-crazy-tech-spec
3
+ title: Crazy Tech Spec — Divergent Architecture Brainstorm
4
+ group: feature-implementation
5
+ summary: >
6
+ Template for the Crazy Architect brainstorm pass. Captures unconventional,
7
+ experimental, and contrarian architecture ideas before the structured Tech
8
+ Spec Draft. Prioritises breadth and provocation over correctness. Top ideas
9
+ feed into the Tech Spec Draft phase.
10
+ ---
11
+
12
+ # {Feature Name} — Crazy Tech Spec Brainstorm
13
+
14
+ **Author:** Crazy Architect
15
+ **Date:** {date}
16
+ **Input:** _{PRD codex ID + Pre-Architecture Notes}_
17
+
18
+ ---
19
+
20
+ ## The Most Unconventional Architecture
21
+
22
+ _{Forget existing patterns in this codebase. If you could design this without any constraints, what would it look like? One paragraph._
23
+
24
+ ---
25
+
26
+ ## 10 Unconventional Technical Ideas
27
+
28
+ _At least 10. Include approaches that challenge the obvious choice, use unexpected tech, or invert assumptions._
29
+
30
+ 1. _{Idea 1 — what it is and why it's interesting}_
31
+ 2. _{Idea 2}_
32
+ 3. _{Idea 3}_
33
+ 4. _{Idea 4}_
34
+ 5. _{Idea 5}_
35
+ 6. _{Idea 6}_
36
+ 7. _{Idea 7}_
37
+ 8. _{Idea 8}_
38
+ 9. _{Idea 9}_
39
+ 10. _{Idea 10}_
40
+
41
+ ---
42
+
43
+ ## Dangerous Architecture Assumptions
44
+
45
+ _What does the obvious design take for granted that might be wrong?_
46
+
47
+ - _{Assumption 1 — why it might be wrong}_
48
+ - _{Assumption 2}_
49
+ - _{Assumption 3}_
50
+
51
+ ---
52
+
53
+ ## The Inverted Design
54
+
55
+ _What if you built the opposite architecture — push instead of pull, stateless instead of stateful, event-driven instead of request-response? What would that reveal?_
56
+
57
+ _{Describe the inverted design and what it teaches._
58
+
59
+ ---
60
+
61
+ ## Overlooked Constraints
62
+
63
+ _What performance, security, or scaling constraints is the obvious design likely to hit first?_
64
+
65
+ - _{Constraint 1 — when it bites and how hard}_
66
+ - _{Constraint 2}_
67
+ - _{Constraint 3}_
68
+
69
+ ---
70
+
71
+ ## Top 3 Ideas Worth Carrying Forward
72
+
73
+ _The three most promising ideas to hand off to the Architect._
74
+
75
+ | Idea | Why It's Worth Exploring | Risk |
76
+ |------|--------------------------|------|
77
+ | _{Idea A}_ | _{Rationale}_ | _{Risk if adopted}_ |
78
+ | _{Idea B}_ | _{Rationale}_ | _{Risk if adopted}_ |
79
+ | _{Idea C}_ | _{Rationale}_ | _{Risk if adopted}_ |
@@ -0,0 +1,128 @@
1
+ ---
2
+ id: fi-prd-draft
3
+ title: PRD Draft
4
+ group: feature-implementation
5
+ summary: >
6
+ Template for the PM to write the initial PRD Draft from raw user input.
7
+ Covers executive summary, success criteria, user workflows, functional and
8
+ non-functional requirements. The user appends unstructured feedback directly
9
+ to this file before the PM produces the final PRD.
10
+ ---
11
+
12
+ # {Feature Name} — PRD Draft
13
+
14
+ **Author:** Product Manager
15
+ **Date:** {date}
16
+ **Input:** _{raw user input}_
17
+
18
+ ---
19
+
20
+ ## Executive Summary
21
+
22
+ _{One paragraph: what this feature is, who it is for, and what problem it solves._
23
+
24
+ ### What Makes This Special
25
+
26
+ _{The single differentiator — what this does that alternatives do not._
27
+
28
+ ---
29
+
30
+ ## Project Classification
31
+
32
+ | Attribute | Value |
33
+ |-----------|-------|
34
+ | Project type | _{web app / CLI tool / API / library / ...}_ |
35
+ | Primary users | _{persona or role}_ |
36
+ | Scale | _{expected user count / throughput at launch}_ |
37
+
38
+ ---
39
+
40
+ ## Success Criteria
41
+
42
+ ### User Success
43
+
44
+ _{What "winning" looks like for end users — problem resolved, goal achieved._
45
+
46
+ ### Technical Success
47
+
48
+ _{Performance thresholds, reliability targets, compliance requirements._
49
+
50
+ | Metric | Baseline | Target | Timeline |
51
+ |--------|----------|--------|----------|
52
+ | _{...}_ | _{...}_ | _{...}_ | _{...}_ |
53
+
54
+ ---
55
+
56
+ ## Product Scope
57
+
58
+ ### MVP
59
+
60
+ _{Essential capabilities required to prove core value. Keep this list ruthlessly small._
61
+
62
+ - _{Capability 1}_
63
+ - _{Capability 2}_
64
+
65
+ ### Post-MVP
66
+
67
+ - _{Feature 1}_
68
+
69
+ ### Out of Scope
70
+
71
+ - _{Explicit exclusions to prevent scope creep}_
72
+
73
+ ---
74
+
75
+ ## User Workflows
76
+
77
+ ### {Workflow Name} — {User Type}
78
+
79
+ **Persona:** _{Name, role, context}_
80
+ **Situation:** _{Current challenge or pain point}_
81
+ **Goal:** _{What they want to achieve}_
82
+
83
+ **Steps:**
84
+ 1. _{Opening scene}_
85
+ 2. _{User action — specific command, click, or interaction}_
86
+ 3. _{System response — exact output or state change}_
87
+ 4. _{Resolution}_
88
+
89
+ **Critical decision points:** _{Where things could go wrong or fork}_
90
+ **Success signal:** _{How the user knows they succeeded}_
91
+ **Requirements revealed:** _{Specific capabilities this workflow exposes}_
92
+
93
+ ---
94
+
95
+ ## Functional Requirements
96
+
97
+ ### {Capability Area 1}
98
+
99
+ - **FR-1:** {Actor} can {capability}.
100
+ - **FR-2:** {Actor} can {capability}.
101
+
102
+ ### {Capability Area 2}
103
+
104
+ - **FR-3:** {Actor} can {capability}.
105
+
106
+ ---
107
+
108
+ ## Non-Functional Requirements
109
+
110
+ ### Performance
111
+
112
+ - _{e.g. P95 response time < 200 ms}_
113
+
114
+ ### Security
115
+
116
+ - _{e.g. All data at rest encrypted with AES-256}_
117
+
118
+ ### Reliability
119
+
120
+ - _{e.g. 99.9% uptime SLA}_
121
+
122
+ ---
123
+
124
+ ## Open Questions
125
+
126
+ | # | Question | Owner | Priority |
127
+ |---|----------|-------|----------|
128
+ | 1 | _{Question}_ | _{PM / User / Architect}_ | _{High / Medium / Low}_ |
@@ -0,0 +1,125 @@
1
+ ---
2
+ id: fi-prd
3
+ title: PRD
4
+ group: feature-implementation
5
+ summary: >
6
+ Template for the final PRD produced by the PM after incorporating user
7
+ feedback from the PRD Draft review. This is the authoritative product
8
+ document — clean, complete, all open questions resolved. Flows to every
9
+ downstream agent: Architects, BA, and Tech Writer all read this before working.
10
+ ---
11
+
12
+ # {Feature Name} — PRD
13
+
14
+ **Author:** Product Manager
15
+ **Date:** {date}
16
+ **Supersedes:** _{PRD Draft codex ID}_
17
+
18
+ ---
19
+
20
+ ## Executive Summary
21
+
22
+ _{One paragraph: what this feature is, who it is for, and what problem it solves._
23
+
24
+ ### What Makes This Special
25
+
26
+ _{The single differentiator — what this does that alternatives do not._
27
+
28
+ ---
29
+
30
+ ## Project Classification
31
+
32
+ | Attribute | Value |
33
+ |-----------|-------|
34
+ | Project type | _{web app / CLI tool / API / library / ...}_ |
35
+ | Primary users | _{persona or role}_ |
36
+ | Scale | _{expected user count / throughput at launch}_ |
37
+
38
+ ---
39
+
40
+ ## Success Criteria
41
+
42
+ ### User Success
43
+
44
+ _{What "winning" looks like for end users._
45
+
46
+ ### Technical Success
47
+
48
+ | Metric | Baseline | Target | Timeline |
49
+ |--------|----------|--------|----------|
50
+ | _{...}_ | _{...}_ | _{...}_ | _{...}_ |
51
+
52
+ ---
53
+
54
+ ## Product Scope
55
+
56
+ ### MVP
57
+
58
+ - _{Capability 1}_
59
+ - _{Capability 2}_
60
+
61
+ ### Post-MVP
62
+
63
+ - _{Feature 1}_
64
+
65
+ ### Out of Scope
66
+
67
+ - _{Explicit exclusions}_
68
+
69
+ ---
70
+
71
+ ## User Workflows
72
+
73
+ ### {Workflow Name} — {User Type}
74
+
75
+ **Persona:** _{Name, role, context}_
76
+ **Situation:** _{Current challenge or pain point}_
77
+ **Goal:** _{What they want to achieve}_
78
+
79
+ **Steps:**
80
+ 1. _{Opening scene}_
81
+ 2. _{User action — specific command, click, or interaction}_
82
+ 3. _{System response — exact output or state change}_
83
+ 4. _{Resolution}_
84
+
85
+ **Critical decision points:** _{Where things could go wrong or fork}_
86
+ **Success signal:** _{How the user knows they succeeded}_
87
+
88
+ ---
89
+
90
+ ## Functional Requirements
91
+
92
+ ### {Capability Area 1}
93
+
94
+ - **FR-1:** {Actor} can {capability}.
95
+ - **FR-2:** {Actor} can {capability}.
96
+
97
+ ---
98
+
99
+ ## Non-Functional Requirements
100
+
101
+ ### Performance
102
+
103
+ - _{Threshold}_
104
+
105
+ ### Security
106
+
107
+ - _{Requirement}_
108
+
109
+ ### Reliability
110
+
111
+ - _{Requirement}_
112
+
113
+ ---
114
+
115
+ ## Change Log
116
+
117
+ | Version | Change | Reason |
118
+ |---------|--------|--------|
119
+ | 1.0 | Initial PRD | _{Summarise key decisions made from draft feedback}_ |
120
+
121
+ ---
122
+
123
+ ## Pre-Architecture Notes
124
+
125
+ _(Appended by the user after reviewing this PRD — do not edit until sign-off phase)_
@@ -0,0 +1,134 @@
1
+ ---
2
+ id: fi-tech-spec-draft
3
+ title: Tech Spec Draft
4
+ group: feature-implementation
5
+ summary: >
6
+ Template for the Architect to write the initial Tech Spec Draft from the
7
+ final PRD and pre-architecture feedback. Covers architectural decisions,
8
+ implementation patterns, project structure, and test strategy. The user
9
+ appends unstructured feedback directly to this file before the Architect
10
+ produces the final Tech Spec.
11
+ ---
12
+
13
+ # {Feature Name} — Tech Spec Draft
14
+
15
+ **Author:** Architect
16
+ **Date:** {date}
17
+ **Input:** _{PRD codex ID}_
18
+
19
+ ---
20
+
21
+ ## Core Architectural Decisions
22
+
23
+ | Priority | Decision | Choice | Rationale |
24
+ |----------|----------|--------|-----------|
25
+ | Critical | _{e.g. Database choice}_ | _{choice}_ | _{why}_ |
26
+ | Critical | _{e.g. Auth strategy}_ | _{choice}_ | _{why}_ |
27
+ | Important | _{e.g. API style}_ | _{choice}_ | _{why}_ |
28
+ | Deferred | _{e.g. Caching layer}_ | _{post-MVP}_ | _{why deferred}_ |
29
+
30
+ ---
31
+
32
+ ## Data Architecture
33
+
34
+ | Decision | Choice | Rationale |
35
+ |----------|--------|-----------|
36
+ | Database | _{e.g. SQLite / PostgreSQL}_ | _{why}_ |
37
+ | ORM / query layer | _{e.g. raw SQL / SQLAlchemy}_ | _{why}_ |
38
+ | Migration approach | _{e.g. Alembic / manual}_ | _{why}_ |
39
+ | Data validation | _{e.g. Pydantic / Zod}_ | _{why}_ |
40
+
41
+ ---
42
+
43
+ ## API & Communication
44
+
45
+ | Decision | Choice | Rationale |
46
+ |----------|--------|-----------|
47
+ | API style | _{e.g. REST / GraphQL / CLI}_ | _{why}_ |
48
+ | Error response format | _{e.g. RFC 7807 / custom JSON}_ | _{why}_ |
49
+ | Versioning strategy | _{e.g. URL prefix / none}_ | _{why}_ |
50
+
51
+ ---
52
+
53
+ ## Implementation Patterns
54
+
55
+ _These rules prevent divergence between agents. Every section is a contract._
56
+
57
+ ### Naming Conventions
58
+
59
+ **Database:** _{e.g. snake_case plural tables}_
60
+ **API / CLI:** _{e.g. hyphenated flags, plural noun endpoints}_
61
+ **Code:** _{e.g. snake_case files, PascalCase classes}_
62
+
63
+ ### Error Handling
64
+
65
+ _{How errors are caught, formatted, and surfaced to users._
66
+
67
+ ### Output Formats
68
+
69
+ **Success (example):**
70
+ ```
71
+ {example output}
72
+ ```
73
+
74
+ **Error (example):**
75
+ ```
76
+ {example error output}
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Project Structure
82
+
83
+ _File-level layout for every file that will be added or modified._
84
+
85
+ ```
86
+ {project-root}/
87
+ {path/to/new-file.ext} # Purpose
88
+ {path/to/modified-file.ext} # What changes
89
+ tests/
90
+ e2e/
91
+ {test_feature.ext} # E2E test suite
92
+ unit/
93
+ {test_component.ext} # Unit tests
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Test Strategy
99
+
100
+ ### E2E Coverage
101
+
102
+ _Which user workflows from the PRD must have E2E test coverage. No workflow is optional._
103
+ _Each E2E scenario must reference the relevant workflow document by codex ID (`lore codex search workflow` to find it)._
104
+
105
+ | Workflow (from PRD) | Workflow codex ID | Test scenario | Priority |
106
+ |---------------------|------------------|---------------|----------|
107
+ | _{Workflow name}_ | `lore codex show {conceptual-workflows-id}` | _{What the E2E test will verify}_ | _{High/Medium}_ |
108
+
109
+ ### Unit Coverage
110
+
111
+ _Which components and edge cases require unit tests._
112
+ _Each unit scenario must reference the relevant workflow document by codex ID (`lore codex search workflow` to find it)._
113
+
114
+ | Component | Workflow codex ID | Scenarios to cover |
115
+ |-----------|------------------|---------------------|
116
+ | _{module/function}_ | `lore codex show {conceptual-workflows-id}` | _{list of cases}_ |
117
+
118
+ ### Test Conventions
119
+
120
+ _{Test file naming, directory conventions, fixture strategy, assertion style._
121
+
122
+ ---
123
+
124
+ ## Migration & Rollback
125
+
126
+ _{What changes to existing data or APIs this introduces, and how to roll back if needed._
127
+
128
+ ---
129
+
130
+ ## Open Questions
131
+
132
+ | # | Question | Owner | Priority |
133
+ |---|----------|-------|----------|
134
+ | 1 | _{Question}_ | _{Architect / User}_ | _{High / Medium}_ |