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,61 @@
1
+ ---
2
+ id: example-standards-code-conventions
3
+ title: Code Conventions
4
+ related: []
5
+ stability: stable
6
+ summary: >
7
+ Language style guide, naming conventions, file organisation, import order,
8
+ and comment policy for this project. All agents and contributors must follow these.
9
+ ---
10
+
11
+ # Code Conventions
12
+
13
+ _These conventions are enforced on all code in this project. They are not suggestions._
14
+
15
+ ## Language and Version
16
+
17
+ _State the language and the minimum supported version. Note any language features that are in use or explicitly forbidden._
18
+
19
+ > Example: Python ≥ 3.11. `match` statements and `tomllib` are in use. `walrus operator` is permitted. `exec` and `eval` are forbidden.
20
+
21
+ ## Style Guide
22
+
23
+ _Name the style guide and linter configuration. Where is the linter config file?_
24
+
25
+ > Example: PEP 8 enforced by `ruff`. Configuration in `pyproject.toml` under `[tool.ruff]`. Run with `uv run ruff check .`.
26
+
27
+ | Rule | Value |
28
+ |------|-------|
29
+ | Line length | _e.g. 88 characters_ |
30
+ | Quote style | _e.g. double quotes_ |
31
+ | Import style | _e.g. absolute imports only_ |
32
+ | Trailing comma | _e.g. required in multi-line structures_ |
33
+
34
+ ## Naming Conventions
35
+
36
+ | Concept | Convention | Example |
37
+ |---------|-----------|---------|
38
+ | Functions | _e.g. snake_case_ | `get_task_by_id` |
39
+ | Classes | _e.g. PascalCase_ | `TaskRepository` |
40
+ | Constants | _e.g. UPPER_SNAKE_CASE_ | `MAX_RETRIES` |
41
+ | Files | _e.g. snake_case_ | `task_commands.py` |
42
+ | Test files | _e.g. test_{module}.py_ | `test_task_commands.py` |
43
+ | Test functions | _e.g. test_{behaviour}_ | `test_task_new_rejects_empty_title` |
44
+
45
+ ## File and Module Organisation
46
+
47
+ _How is the source tree organised? One class per file, or grouped by domain? What goes in `__init__.py`?_
48
+
49
+ > Example: One command group per module in `commands/`. `__init__.py` files are empty. Shared utilities go in `utils.py`.
50
+
51
+ ## Import Order
52
+
53
+ _What is the required import order? Is there a tool that enforces it?_
54
+
55
+ > Example: stdlib → third-party → local. Blank line between groups. Enforced by `ruff --select I`.
56
+
57
+ ## Comment and Docstring Policy
58
+
59
+ _When are comments required? What format for docstrings?_
60
+
61
+ > Example: Docstrings required on all public functions. One-line docstrings for simple functions; multi-line for complex ones. Inline comments only where logic is non-obvious. No comments that restate what the code does.
@@ -0,0 +1,67 @@
1
+ ---
2
+ id: example-standards-design-principles
3
+ title: Design Principles
4
+ related: []
5
+ stability: stable
6
+ summary: >
7
+ Core design principles this project follows, what each means in practice,
8
+ and which principles are explicitly rejected. Agents must consult this before
9
+ proposing architectural changes.
10
+ ---
11
+
12
+ # Design Principles
13
+
14
+ _The principles below are not aspirational — they are active constraints on how this codebase is designed. When a new feature or refactor is proposed, it should be evaluated against these principles._
15
+
16
+ ## Principles We Follow
17
+
18
+ ### {Principle 1 — e.g. Single Responsibility}
19
+
20
+ _What this principle means in the context of this project. Be specific — not "functions do one thing" but what that means here._
21
+
22
+ **Do:**
23
+ - _Concrete example of following this principle_
24
+
25
+ **Don't:**
26
+ - _Concrete example of violating this principle_
27
+
28
+ ---
29
+
30
+ ### {Principle 2 — e.g. Explicit over Implicit}
31
+
32
+ _What this means here._
33
+
34
+ **Do:**
35
+ - _Example_
36
+
37
+ **Don't:**
38
+ - _Example_
39
+
40
+ ---
41
+
42
+ ### {Principle 3 — e.g. Fail Fast}
43
+
44
+ _What this means here._
45
+
46
+ **Do:**
47
+ - _Example_
48
+
49
+ **Don't:**
50
+ - _Example_
51
+
52
+ ---
53
+
54
+ ## Principles We Explicitly Reject
55
+
56
+ _List principles that are commonly suggested but that this project has deliberately chosen not to follow, and why. This section is as important as the above — it tells an AI agent what not to suggest._
57
+
58
+ | Principle | Why rejected here |
59
+ |-----------|------------------|
60
+ | _{e.g. Inheritance over composition}_ | _Reason specific to this project_ |
61
+ | _{e.g. Premature abstraction}_ | _Reason_ |
62
+
63
+ ## Trade-off Policy
64
+
65
+ _When two principles conflict, how is the conflict resolved? State the tiebreaker._
66
+
67
+ > Example: When simplicity conflicts with DRY, prefer simplicity. Three similar lines are better than a premature abstraction.
@@ -0,0 +1,71 @@
1
+ ---
2
+ id: example-standards-testing
3
+ title: Testing Standards
4
+ related: []
5
+ stability: stable
6
+ summary: >
7
+ Test types, scope, file location conventions, fixture and mock policy,
8
+ and coverage requirements. Read before writing any test.
9
+ ---
10
+
11
+ # Testing Standards
12
+
13
+ ## Test Types and Scope
14
+
15
+ | Type | Scope | What it tests |
16
+ |------|-------|--------------|
17
+ | Unit | Single function or class | _Logic in isolation. No I/O, no database, no network._ |
18
+ | Integration | Multiple modules together | _Real database, real file system. No network._ |
19
+ | E2E | Full command or request | _The complete path: CLI entry point → database → output. Asserts exact output strings._ |
20
+
21
+ _Remove rows that don't apply. Add rows for other test types (e.g. snapshot, contract, load)._
22
+
23
+ ## What to Test at Which Layer
24
+
25
+ _Be explicit about the boundary between test types for this project._
26
+
27
+ - **Unit tests cover:** _e.g. validation logic, ID generation, status transition rules, output formatting_
28
+ - **Integration tests cover:** _e.g. database queries, migration application, cross-module workflows_
29
+ - **E2E tests cover:** _e.g. every CLI command with its options, every user workflow in the conceptual docs_
30
+
31
+ > If behaviour is specified in a workflow or user story, there must be an E2E test for it. No exceptions.
32
+
33
+ ## File Location Conventions
34
+
35
+ ```
36
+ tests/
37
+ ├── unit/ # Unit tests — mirror src/ structure
38
+ │ └── {module}/
39
+ │ └── test_{file}.py
40
+ ├── integration/ # Integration tests
41
+ │ └── test_{feature}.py
42
+ └── e2e/ # E2E tests — one file per command group or domain
43
+ └── test_{domain}.py
44
+ ```
45
+
46
+ _Adjust to match the actual test directory structure._
47
+
48
+ ## Fixture and Mock Policy
49
+
50
+ _What fixtures are provided? What is allowed to be mocked?_
51
+
52
+ > Example: An in-memory database fixture is provided in `conftest.py`. Never mock the database — use the in-memory fixture. External HTTP calls may be mocked. File system operations use `tmp_path`.
53
+
54
+ | What | Policy |
55
+ |------|--------|
56
+ | Database | _e.g. In-memory SQLite via conftest fixture. Never mock._ |
57
+ | External APIs | _e.g. Mock with responses library._ |
58
+ | File system | _e.g. Use tmp_path fixture._ |
59
+ | Time | _e.g. Freeze with freezegun where needed._ |
60
+
61
+ ## Coverage Requirements
62
+
63
+ _What coverage is required? Where is it configured?_
64
+
65
+ > Example: 80% line coverage required. Run with `uv run pytest --cov=src --cov-fail-under=80`.
66
+
67
+ | Scope | Requirement |
68
+ |-------|------------|
69
+ | Overall | _e.g. ≥ 80% line coverage_ |
70
+ | New code | _e.g. 100% for new modules_ |
71
+ | Critical paths | _e.g. every CLI command must have an E2E test_ |
@@ -0,0 +1,81 @@
1
+ ---
2
+ id: example-tech-api-{domain}
3
+ title: "API — {Domain} Commands"
4
+ related: []
5
+ stability: stable
6
+ summary: >
7
+ CLI command reference (or HTTP endpoint reference) for the {domain} domain.
8
+ Covers all sub-commands, options, output shapes, and error codes.
9
+ ---
10
+
11
+ # API — {Domain} Commands
12
+
13
+ _All commands in the `{domain}` domain. For HTTP APIs, replace "command" with "endpoint" and adjust the table format._
14
+
15
+ ## Commands
16
+
17
+ ### `{domain} list`
18
+
19
+ _Description. What does it return? What filters are available?_
20
+
21
+ **Options:**
22
+
23
+ | Flag | Type | Default | Description |
24
+ |------|------|---------|-------------|
25
+ | `--{filter}` | `{type}` | _none_ | _Filter description_ |
26
+ | `--json` | flag | off | _Output as JSON array_ |
27
+
28
+ **Output (table):**
29
+ ```
30
+ {column-a} {column-b} {column-c}
31
+ {example-1} {val} {val}
32
+ ```
33
+
34
+ **Output (JSON):**
35
+ ```json
36
+ [{"id": "{id}", "{field}": "{value}"}]
37
+ ```
38
+
39
+ ---
40
+
41
+ ### `{domain} show <id>`
42
+
43
+ _Description. What is returned for a single record?_
44
+
45
+ **Exit codes:** `0` success, `1` not found.
46
+
47
+ ---
48
+
49
+ ### `{domain} new <required-arg>`
50
+
51
+ _Description. What is created? What is required vs optional?_
52
+
53
+ **Options:**
54
+
55
+ | Flag | Type | Default | Description |
56
+ |------|------|---------|-------------|
57
+ | `--{option}` | `{type}` | _default_ | _Description_ |
58
+
59
+ **Output:** `Created {domain} {id}`
60
+
61
+ **Exit codes:** `0` success, `1` validation failure, `2` conflict.
62
+
63
+ ---
64
+
65
+ ### `{domain} edit <id>`
66
+
67
+ _Description. What can be changed? What cannot?_
68
+
69
+ **Options:**
70
+
71
+ | Flag | Type | Description |
72
+ |------|------|-------------|
73
+ | `--{field}` | `{type}` | _Description_ |
74
+
75
+ ---
76
+
77
+ ### `{domain} delete <id>`
78
+
79
+ _Soft-delete. The record is excluded from listings but retained in the database._
80
+
81
+ **Exit codes:** `0` success, `1` not found or blocked by constraint.
@@ -0,0 +1,58 @@
1
+ ---
2
+ id: example-tech-backend
3
+ title: Backend
4
+ related: []
5
+ stability: stable
6
+ summary: >
7
+ Command dispatch lifecycle, domain organisation, error output conventions, and exit codes.
8
+ Start here before adding or modifying any backend code.
9
+ ---
10
+
11
+ # Backend
12
+
13
+ _One paragraph. What kind of backend is this (CLI, HTTP API, worker, etc.)? What framework? What is the entry point?_
14
+
15
+ ## Request / Command Dispatch Lifecycle
16
+
17
+ _Show the path a request or command takes from entry point to output. Use a code-style diagram._
18
+
19
+ ```
20
+ User runs: {example command or request}
21
+
22
+ → {entry-point file} {description}
23
+ → {router/group} {description}
24
+ → {handler} {description}
25
+ → validate {what is validated}
26
+ → {db/service} {what is called}
27
+ → output {what is returned}
28
+ ```
29
+
30
+ _Every command/endpoint should follow this pattern. Describe it once here; refer to it in specific command docs._
31
+
32
+ ## Domain Organisation
33
+
34
+ _How is the backend code organised? One module per domain? By layer?_
35
+
36
+ ```
37
+ {source-dir}/
38
+ ├── {domain-a}/ {commands or routes in this domain}
39
+ └── {domain-b}/ {commands or routes in this domain}
40
+ ```
41
+
42
+ _Describe the convention for adding a new domain._
43
+
44
+ ## Error Output Conventions
45
+
46
+ - **Errors go to {stderr/response body}.** _Convention for surfacing errors._
47
+ - **Results go to {stdout/response body}.** _Convention for success output._
48
+ - **No tracebacks in production output.** _Catch specific exceptions; let unexpected ones propagate to the top-level handler._
49
+
50
+ ## Exit Codes / Status Codes
51
+
52
+ | Code | Meaning | When |
53
+ |------|---------|------|
54
+ | {0 / 200} | Success | _Command completed without error_ |
55
+ | {1 / 400} | Not found or invalid input | _Description_ |
56
+ | {2 / 409} | Conflict | _Description_ |
57
+
58
+ _Add rows for all codes your application returns. Remove rows that don't apply._
@@ -0,0 +1,45 @@
1
+ ---
2
+ id: example-tech-database
3
+ title: Database
4
+ related: []
5
+ stability: stable
6
+ summary: >
7
+ Database technology, connection setup, migration pattern, and shared access conventions.
8
+ Read before writing any query or migration.
9
+ ---
10
+
11
+ # Database
12
+
13
+ _One paragraph. What database technology? Where is the database file or server? What library is used to talk to it?_
14
+
15
+ ## Connection
16
+
17
+ _How is a connection opened? Is there a shared factory function? What configuration is applied at connection time (modes, timeouts, pragmas)?_
18
+
19
+ > Always open connections through `{module}.connect()` — never call the database driver directly. This ensures all required configuration is applied consistently.
20
+
21
+ ## Migration Pattern
22
+
23
+ _How are schema migrations managed? What tracks the current version? What is the naming convention for migration files? Can migrations be rolled back?_
24
+
25
+ > Migration files live in `{migrations-dir}/`. Never modify an existing migration file — always add a new one.
26
+
27
+ ## Shared Access Patterns
28
+
29
+ _Rules that apply to every query in the codebase. These must be followed without exception._
30
+
31
+ - **{Soft-delete filter}:** _All read queries must filter `WHERE {deleted_at} IS NULL`._
32
+ - **{Transaction type}:** _All write transactions must use `{BEGIN IMMEDIATE}` or equivalent._
33
+ - **{Timeout}:** _All connections must set a busy/lock timeout._
34
+ - **{No cached counts}:** _Counts are always derived from queries, never stored as columns._
35
+
36
+ > Replace or remove items that don't apply to your database setup.
37
+
38
+ ## Schema Overview
39
+
40
+ _List the main tables or collections and their one-line purpose._
41
+
42
+ | Table / Collection | Purpose |
43
+ |-------------------|---------|
44
+ | `{table_a}` | _Description_ |
45
+ | `{table_b}` | _Description_ |
@@ -0,0 +1,49 @@
1
+ ---
2
+ id: example-tech-schema-{entity-name}
3
+ title: "Schema — {entity name}"
4
+ related: []
5
+ stability: stable
6
+ summary: >
7
+ Database schema for the {entity} table. Columns, constraints, indexes,
8
+ and notes on nullable fields and soft-delete pattern.
9
+ ---
10
+
11
+ # Schema — {Entity Name}
12
+
13
+ ```sql
14
+ CREATE TABLE IF NOT EXISTS {table_name} (
15
+ id TEXT PRIMARY KEY,
16
+ {field_1} TEXT NOT NULL,
17
+ {field_2} TEXT NOT NULL DEFAULT '{default_value}'
18
+ CHECK ({field_2} IN ('{val_a}', '{val_b}')),
19
+ {optional_field} TEXT NULL,
20
+ created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
21
+ updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
22
+ deleted_at TEXT NULL
23
+ );
24
+ ```
25
+
26
+ > Replace fields to match the actual schema. Remove `deleted_at` if hard-delete is used.
27
+
28
+ ## Column Notes
29
+
30
+ | Column | Notes |
31
+ |--------|-------|
32
+ | `id` | _ID format (e.g. ULID with prefix `x-`). Generated in application code._ |
33
+ | `{field_1}` | _Constraints and validation rules (e.g. empty string rejected at CLI layer)._ |
34
+ | `{field_2}` | _Allowed values, default, transition rules if it's a status field._ |
35
+ | `updated_at` | _Must be explicitly set on UPDATE. No ON UPDATE trigger in this database._ |
36
+ | `deleted_at` | _NULL = active. Set on soft-delete. No hard delete._ |
37
+
38
+ ## Indexes
39
+
40
+ | Index | Columns | Purpose |
41
+ |-------|---------|---------|
42
+ | PRIMARY | `id` | _Lookup by ID_ |
43
+ | `idx_{table}_{field}` | `{field}` | _Description_ |
44
+
45
+ ## Foreign Keys
46
+
47
+ | Column | References | On delete |
48
+ |--------|-----------|-----------|
49
+ | `{fk_column}` | `{other_table}(id)` | _Soft-delete tombstone; no CASCADE_ |
@@ -0,0 +1,38 @@
1
+ ---
2
+ id: example-tech-schema-{entity-name-2}
3
+ title: "Schema — {entity name 2}"
4
+ related: []
5
+ stability: stable
6
+ summary: >
7
+ Database schema for the {entity-2} table. Natural key, optional display field,
8
+ soft-delete pattern.
9
+ ---
10
+
11
+ # Schema — {Entity Name 2}
12
+
13
+ ```sql
14
+ CREATE TABLE IF NOT EXISTS {table_name_2} (
15
+ {natural_key} TEXT PRIMARY KEY,
16
+ {display_field} TEXT NOT NULL DEFAULT '',
17
+ created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
18
+ deleted_at TEXT NULL
19
+ );
20
+ ```
21
+
22
+ > Use this template when the entity is identified by a natural key (e.g. email, slug) rather than a generated ID.
23
+
24
+ ## Column Notes
25
+
26
+ | Column | Notes |
27
+ |--------|-------|
28
+ | `{natural_key}` | _Natural identifier. Immutable after creation. Used as FK target in other tables. Case-insensitive (stored normalised)._ |
29
+ | `{display_field}` | _Optional. Display-only. Can be updated freely. Shown as `(unnamed)` or equivalent if empty._ |
30
+ | `created_at` | _Set once at creation. Immutable._ |
31
+ | `deleted_at` | _NULL = active. Soft-delete permanent — no undelete._ |
32
+
33
+ ## Indexes
34
+
35
+ | Index | Columns | Purpose |
36
+ |-------|---------|---------|
37
+ | PRIMARY | `{natural_key}` | _Lookup and FK target_ |
38
+ | `idx_{table}_deleted_at` | `deleted_at` | _Active-record filter_ |
@@ -0,0 +1,41 @@
1
+ ---
2
+ id: example-tech-frontend
3
+ title: Frontend
4
+ related: []
5
+ stability: stable
6
+ summary: >
7
+ Frontend technology, project structure, routing, component conventions,
8
+ and state management. Start here before adding or modifying any UI code.
9
+ ---
10
+
11
+ # Frontend
12
+
13
+ _One paragraph. What kind of frontend is this (web app, CLI output, mobile)? What framework? What is the entry point?_
14
+
15
+ > If this project has no web frontend (e.g. it is a CLI tool), replace this file's content with a single sentence: "This project has no web frontend." Retain the file as a placeholder for teams that add a UI later.
16
+
17
+ ## Framework and Rendering Strategy
18
+
19
+ _Framework (e.g. React, Vue, Svelte), rendering strategy (CSR, SSR, SSG), and key configuration._
20
+
21
+ ## Project Structure
22
+
23
+ ```
24
+ {frontend-dir}/
25
+ ├── {entry-point} # _description_
26
+ ├── {pages-or-routes}/ # _description_
27
+ ├── {components}/ # _description_
28
+ └── {assets}/ # _description_
29
+ ```
30
+
31
+ ## Routing
32
+
33
+ _How are routes defined? File-based or config-based? What are the naming conventions?_
34
+
35
+ ## Component Conventions
36
+
37
+ _File naming, directory nesting rules, when to split a component, how props are typed._
38
+
39
+ ## State Management
40
+
41
+ _What manages shared state (e.g. Zustand, Redux, Context API)? What belongs in global state vs local state?_
@@ -0,0 +1,59 @@
1
+ ---
2
+ id: example-tech-overview
3
+ title: Technical Overview
4
+ related: []
5
+ stability: stable
6
+ summary: >
7
+ Technology stack, project structure, and key architectural patterns.
8
+ Start here before navigating to any other technical documentation.
9
+ ---
10
+
11
+ # Technical Overview
12
+
13
+ _One paragraph. What kind of system is this (CLI tool, web app, API, library, etc.)? What does it run on? What are the key architectural properties (local-first, stateless, event-driven, etc.)?_
14
+
15
+ ## Stack
16
+
17
+ | Component | Technology | Version | Notes |
18
+ |-----------|-----------|---------|-------|
19
+ | Language | _e.g. Python_ | _≥ 3.11_ | _Key language features in use_ |
20
+ | Framework | _e.g. Click, FastAPI_ | _≥ x.y_ | _What it provides_ |
21
+ | Database | _e.g. SQLite, PostgreSQL_ | _version_ | _Key configuration_ |
22
+ | Testing | _e.g. pytest_ | _≥ x.y_ | _Test isolation approach_ |
23
+ | Package manager | _e.g. uv, pip_ | _latest_ | _Lock file location_ |
24
+
25
+ > Add, remove, or rename rows to match the actual stack. Remove rows for components that do not exist (e.g. remove Database if the project has no persistence layer).
26
+
27
+ ## Project Structure
28
+
29
+ ```
30
+ {project-root}/
31
+ ├── {config-file} # _description_
32
+ ├── {lock-file} # _description_
33
+ ├── {source-dir}/
34
+ │ ├── __init__.py
35
+ │ ├── {entry-point} # _description_
36
+ │ └── {key-module}/
37
+ │ └── {file} # _description_
38
+ └── tests/
39
+ ├── {conftest} # _description_
40
+ └── {test-file} # _description_
41
+ ```
42
+
43
+ > Replace with the actual project structure. Keep it at the level of directories and key files — not exhaustive.
44
+
45
+ ## Key Architectural Patterns
46
+
47
+ _Describe two or three patterns that cut across the codebase. Examples: "all database access goes through db.py", "errors are raised as click.ClickException", "all writes use BEGIN IMMEDIATE transactions"._
48
+
49
+ ### {Pattern 1}
50
+
51
+ _Description. Why it exists. Where to find examples._
52
+
53
+ ### {Pattern 2}
54
+
55
+ _Description._
56
+
57
+ ## {Other Important Concept}
58
+
59
+ _Add a section for any architectural property that doesn't fit above: concurrency model, caching strategy, offline behaviour, etc._
@@ -0,0 +1,91 @@
1
+ ---
2
+ id: fi-codex-change-proposal
3
+ title: Codex Change Proposal
4
+ group: feature-implementation
5
+ summary: >
6
+ Template for the Tech Writer to propose additions, updates, or deletions to
7
+ the project codex after the Tech Spec is complete. Lists every document to
8
+ create, update, or retire — with rationale for each. The Tech Writer applies
9
+ these changes directly after the proposal is written (no separate AR step).
10
+ ---
11
+
12
+ # {Feature Name} — Codex Change Proposal
13
+
14
+ **Author:** Tech Writer
15
+ **Date:** {date}
16
+ **PRD:** `lore codex show {prd-id}`
17
+ **Tech Spec:** `lore codex show {tech-spec-id}`
18
+
19
+ ---
20
+
21
+ ## Orientation
22
+
23
+ _Summary of what this feature changes in the project's documented understanding. One paragraph._
24
+
25
+ ---
26
+
27
+ ## Documents to Create
28
+
29
+ | Proposed ID | Type | Group | Title | Rationale |
30
+ |-------------|------|-------|-------|-----------|
31
+ | _{id}_ | _{decision / technical / operations / ...}_ | _{codex group}_ | _{title}_ | _{why this new doc is needed}_ |
32
+
33
+ ### Draft Content
34
+
35
+ _For each document to create, provide a content outline or full draft below._
36
+
37
+ #### {Proposed ID}
38
+
39
+ _{Draft content or detailed outline}_
40
+
41
+ ---
42
+
43
+ ## Documents to Update
44
+
45
+ | Existing ID | Section(s) | Proposed Change | Rationale |
46
+ |-------------|------------|-----------------|-----------|
47
+ | _{id}_ | _{section name}_ | _{what changes}_ | _{why}_ |
48
+
49
+ ### Update Details
50
+
51
+ _For each document to update, describe the specific changes._
52
+
53
+ #### {Existing ID}
54
+
55
+ **Current state:** _{brief description of what it says now}_
56
+ **Proposed change:** _{what to add, modify, or remove}_
57
+
58
+ ---
59
+
60
+ ## Documents to Retire
61
+
62
+ | Existing ID | Rationale |
63
+ |-------------|-----------|
64
+ | _{id}_ | _{why this document is no longer needed or has been superseded}_ |
65
+
66
+ ---
67
+
68
+ ## Consistency Check
69
+
70
+ _Verify that the proposed changes do not contradict existing codex documents._
71
+
72
+ - _{Doc A}_ — _{no conflict / updated to align}_
73
+ - _{Doc B}_ — _{no conflict / updated to align}_
74
+
75
+ ---
76
+
77
+ ## Workflow Coverage
78
+
79
+ _For every new or changed CLI command in this feature, there must be a corresponding workflow doc. For every new user-facing flow, there must be a corresponding workflow doc. List each one — whether it is being created, updated, or confirmed unchanged._
80
+
81
+ | Command / Flow | Workflow ID | Action |
82
+ |----------------|-------------|--------|
83
+ | _{command or flow name}_ | _{conceptual-workflows-...}_ | _{create / update / no change needed}_ |
84
+
85
+ ---
86
+
87
+ ## Coverage Gaps
88
+
89
+ _Any aspects of the feature that should be documented but are not addressed above. Flag these explicitly rather than leaving them undocumented._
90
+
91
+ - _{Gap 1 — why it's out of scope for this proposal}_