Workplan dependencies and prio for text research lab workplans

This commit is contained in:
2026-05-04 00:12:07 +02:00
parent 4fc891c076
commit 6f0facd744
18 changed files with 1644 additions and 1 deletions

View File

@@ -6,6 +6,9 @@ domain: markitect
status: done
owner: markitect-tool
topic_slug: markitect
planning_priority: complete
planning_order: 10
depends_on_workplans: []
created: "2026-05-03"
updated: "2026-05-03"
state_hub_workstream_id: "4d405d74-faec-440e-873e-692ff9ca96e7"

View File

@@ -6,6 +6,10 @@ domain: markitect
status: done
owner: markitect-tool
topic_slug: markitect
planning_priority: complete
planning_order: 20
depends_on_workplans:
- MKTT-WP-0001
created: "2026-05-03"
updated: "2026-05-03"
state_hub_workstream_id: "0fe54d2c-d579-4b03-a647-7a15bb835893"

View File

@@ -6,6 +6,12 @@ domain: markitect
status: active
owner: markitect-tool
topic_slug: markitect
planning_priority: P0
planning_order: 40
depends_on_workplans:
- MKTT-WP-0001
- MKTT-WP-0002
- MKTT-WP-0004
created: "2026-05-03"
updated: "2026-05-03"
state_hub_workstream_id: "9fefb57d-985e-4125-8daf-03554844f45e"
@@ -67,7 +73,7 @@ validation, structured violations, `mkt validate`, and `mkt schema validate`.
```task
id: MKTT-WP-0003-T004
status: todo
status: done
priority: medium
state_hub_task_id: "e4f72218-601e-488f-a5df-171b91a747d2"
```
@@ -75,6 +81,10 @@ state_hub_task_id: "e4f72218-601e-488f-a5df-171b91a747d2"
Implement FR-030 and FR-031 over the structured representation. Start with a
small query language or JSONPath-like adapter only if it remains simple.
Initial implementation complete for simple selectors over frontmatter,
headings, sections, blocks, and metrics, with API access plus `mkt query` and
`mkt extract`.
## P3.5 - Implement transform, compose, and include primitives
```task

View File

@@ -6,6 +6,11 @@ domain: markitect
status: done
owner: markitect-tool
topic_slug: markitect
planning_priority: complete
planning_order: 30
depends_on_workplans:
- MKTT-WP-0001
- MKTT-WP-0002
created: "2026-05-03"
updated: "2026-05-03"
state_hub_workstream_id: "558787e1-d287-46a5-9214-634e8b90a858"

View File

@@ -6,6 +6,11 @@ domain: markitect
status: todo
owner: markitect-tool
topic_slug: markitect
planning_priority: P2
planning_order: 70
depends_on_workplans:
- MKTT-WP-0003
- MKTT-WP-0004
created: "2026-05-03"
updated: "2026-05-03"
state_hub_workstream_id: "7918687e-2364-46b1-ab7e-65aa77cb8449"

View File

@@ -0,0 +1,133 @@
---
id: MKTT-WP-0006
type: workplan
title: "Optional Cache Backend Architecture Core"
domain: markitect
status: todo
owner: markitect-tool
topic_slug: markitect
planning_priority: P1
planning_order: 50
depends_on_workplans:
- MKTT-WP-0004
depends_on_tasks:
- MKTT-WP-0003-T005
created: "2026-05-03"
updated: "2026-05-03"
state_hub_workstream_id: "0c585f8a-5c7e-4c89-b785-5b0089180256"
---
# MKTT-WP-0006: Optional Cache Backend Architecture Core
## Purpose
Create the optional backend fabric that lets `markitect-tool` attach cached
ASTs, indexes, query adapters, context packages, and policy gateways without
making persistent infrastructure mandatory for core CLI use.
## Background
Research and architecture are captured in:
- `docs/research-lab-cache-backend-research.md`
- `docs/cache-backend-architecture-blueprint.md`
## Decision
Do not start this before the current deterministic transform/composition slice
has enough shape to show what cache invalidation must preserve. Start it before
WP-0003 P3.7 caching becomes implementation work.
## P6.1 - Define backend capability model
```task
id: MKTT-WP-0006-T001
status: todo
priority: high
state_hub_task_id: "8c04f146-942c-45b8-9a7b-3bd61916aa4b"
```
Define capability names, backend manifests, and compatibility checks for:
- snapshots
- JSON/AST query
- full-text search
- SQL
- vector/hybrid search
- context packages
- policy enforcement
- provenance
## P6.2 - Define snapshot model and content identity
```task
id: MKTT-WP-0006-T002
status: todo
priority: high
state_hub_task_id: "5debc135-908a-47ed-ba15-564610970e38"
```
Specify content-addressed document snapshots keyed by source content hash,
parser version, parse options, and contract version where relevant.
## P6.3 - Define backend interfaces
```task
id: MKTT-WP-0006-T003
status: todo
priority: high
state_hub_task_id: "a3e37112-1197-4f6f-8de8-7b3067ef060e"
```
Add protocol classes for snapshot backends, index backends, query adapters,
context package registries, and access policy gateways.
## P6.4 - Implement local backend registry
```task
id: MKTT-WP-0006-T004
status: todo
priority: medium
state_hub_task_id: "6c9b8765-4d14-436d-a2c9-c028a31aaade"
```
Load backend manifests from project config and expose registered capabilities
without importing optional dependencies unless needed.
## P6.5 - Add provenance envelope
```task
id: MKTT-WP-0006-T005
status: todo
priority: medium
state_hub_task_id: "7b551eae-99c8-4c8a-b781-18d59d318707"
```
Add provenance metadata shared by snapshots, query results, context packages,
and diagnostics.
## P6.6 - Add CLI scaffolding
```task
id: MKTT-WP-0006-T006
status: todo
priority: medium
state_hub_task_id: "921e589c-8b0d-4eeb-8834-4a4c6c73da65"
```
Add read-only commands:
```text
mkt backend list
mkt backend inspect <id>
mkt cache status
```
No persistent write behavior is required in this task.
## Exit Criteria
- Core CLI still works without any backend.
- Backends can declare capabilities in Markdown/YAML manifests.
- Query and future cache work can target backend interfaces.
- Provenance is represented consistently.

View File

@@ -0,0 +1,125 @@
---
id: MKTT-WP-0007
type: workplan
title: "Advanced Query and Local Index Backend"
domain: markitect
status: todo
owner: markitect-tool
topic_slug: markitect
planning_priority: P2
planning_order: 60
depends_on_workplans:
- MKTT-WP-0006
created: "2026-05-03"
updated: "2026-05-03"
state_hub_workstream_id: "d61a82e4-651a-4df2-944a-9ff996b2e1f6"
---
# MKTT-WP-0007: Advanced Query and Local Index Backend
## Purpose
Implement the first practical backend use case: cached AST introspection,
JSONPath querying, SQLite metadata, and FTS5 search over Markdown documents.
## P7.1 - Implement local snapshot store
```task
id: MKTT-WP-0007-T001
status: todo
priority: high
state_hub_task_id: "8894a9a4-586c-457b-b4e6-add8276ff5f2"
```
Persist parsed document snapshots and source metadata in a local cache
directory.
## P7.2 - Add AST introspection commands
```task
id: MKTT-WP-0007-T002
status: todo
priority: high
state_hub_task_id: "fb9eaa9d-5c20-49a9-a7a6-acae28ac5e20"
```
Add:
```text
mkt ast show <file>
mkt ast stats <file>
```
Use the current parsed document and token model. Do not require cache presence
for single-file use.
## P7.3 - Add optional JSONPath query adapter
```task
id: MKTT-WP-0007-T003
status: todo
priority: high
state_hub_task_id: "a7b46b32-f322-4fe0-a6fb-60b0b823593c"
```
Support JSONPath over `Document.to_dict()` behind an optional dependency and
shared query result envelope.
## P7.4 - Build SQLite metadata and JSON index
```task
id: MKTT-WP-0007-T004
status: todo
priority: medium
state_hub_task_id: "479f11a3-4ab4-451b-991c-7f143f2bffea"
```
Persist source files, content hashes, frontmatter, headings, sections, blocks,
and metrics in SQLite.
## P7.5 - Add FTS5 section/block search
```task
id: MKTT-WP-0007-T005
status: todo
priority: medium
state_hub_task_id: "0f03e9be-b6f0-4e4b-8220-3bbf638a892b"
```
Add full-text search over section and block text with source spans and
relevance ranking.
## P7.6 - Add incremental refresh
```task
id: MKTT-WP-0007-T006
status: todo
priority: medium
state_hub_task_id: "7d9472e6-0716-435b-866c-d2c66ad786cf"
```
Refresh only changed files based on content hash and parser version.
## P7.7 - Add local index CLI
```task
id: MKTT-WP-0007-T007
status: todo
priority: high
state_hub_task_id: "35cc63ff-3723-43d5-aaf6-f9312efa0f4b"
```
Add:
```text
mkt cache init
mkt cache build <path>
mkt cache query <selector-or-query>
mkt search <text>
```
## Exit Criteria
- Legacy AST/JSONPath value is recovered as an optional backend.
- Local repeated queries are faster and explainable.
- Simple selectors still work without cache.

View File

@@ -0,0 +1,109 @@
---
id: MKTT-WP-0008
type: workplan
title: "Agent Working Memory Context Cache"
domain: markitect
status: todo
owner: markitect-tool
topic_slug: markitect
planning_priority: P3
planning_order: 90
depends_on_workplans:
- MKTT-WP-0006
- MKTT-WP-0007
- MKTT-WP-0009
created: "2026-05-03"
updated: "2026-05-03"
state_hub_workstream_id: "6269f338-4f5c-40ee-90e5-0371f5c3874c"
---
# MKTT-WP-0008: Agent Working Memory Context Cache
## Purpose
Create activatable context packages that let agents drop, reactivate, and
reuse project knowledge efficiently while preserving provenance and policy
metadata.
## P8.1 - Define context package schema
```task
id: MKTT-WP-0008-T001
status: todo
priority: high
state_hub_task_id: "21ee9c37-4add-4886-bd03-a7bb4b20e957"
```
Represent source spans, summaries, token estimates, freshness, provenance,
policy labels, and retrieval recipes.
## P8.2 - Implement package creation from queries
```task
id: MKTT-WP-0008-T002
status: todo
priority: high
state_hub_task_id: "4df06b93-13ce-41fb-a8c3-f04d4ad9d752"
```
Create context packages from simple selectors, cached search results, or
manifest files.
## P8.3 - Implement activation lifecycle
```task
id: MKTT-WP-0008-T003
status: todo
priority: medium
state_hub_task_id: "9f3d9792-d655-482d-bae0-262df5fc0136"
```
Support activate, deactivate, refresh, and explain operations for a package.
## P8.4 - Add memory namespaces
```task
id: MKTT-WP-0008-T004
status: todo
priority: medium
state_hub_task_id: "2d090494-0e10-44cd-8e2d-c418d7530b27"
```
Support project, user, agent, thread, and task namespaces without hard-coding
any external agent platform.
## P8.5 - Add summary layers
```task
id: MKTT-WP-0008-T005
status: todo
priority: medium
state_hub_task_id: "4d1cf970-3d6d-4bd5-8da9-ec2399aa7efe"
```
Support deterministic summaries first, then optional LLM-generated summaries
through an injected adapter.
## P8.6 - Add CLI commands
```task
id: MKTT-WP-0008-T006
status: todo
priority: medium
state_hub_task_id: "2f18386c-9d2c-4af1-b8e2-75cb487c1692"
```
Add:
```text
mkt context pack <manifest-or-query>
mkt context activate <package-id>
mkt context explain <package-id>
mkt context refresh <package-id>
```
## Exit Criteria
- Agents can reactivate project context by stable id.
- Context packages show included sources and token budgets.
- Memory writes remain explicit and inspectable.

View File

@@ -0,0 +1,105 @@
---
id: MKTT-WP-0009
type: workplan
title: "Access-Controlled Knowledge Gateway"
domain: markitect
status: todo
owner: markitect-tool
topic_slug: markitect
planning_priority: P2
planning_order: 80
depends_on_workplans:
- MKTT-WP-0006
created: "2026-05-03"
updated: "2026-05-03"
state_hub_workstream_id: "f36acbc9-881d-46f2-9181-67de228df0c2"
---
# MKTT-WP-0009: Access-Controlled Knowledge Gateway
## Purpose
Add a policy boundary for cached retrieval and context packages so Markitect can
support security-sensitive knowledge systems and agent workflows.
## P9.1 - Define access-control ladder
```task
id: MKTT-WP-0009-T001
status: todo
priority: high
state_hub_task_id: "acf240b4-7210-4ee5-90b6-2f2fe1438439"
```
Specify supported modes:
- labels and trust zones
- path/file ACLs
- relationship-based access control
- attribute/rule-based policies
- external policy engines
## P9.2 - Implement local label policy
```task
id: MKTT-WP-0009-T002
status: todo
priority: high
state_hub_task_id: "9eb589d2-82f2-4282-9af0-3958826d397d"
```
Start with local policy labels and diagnostics for denied or redacted results.
## P9.3 - Add policy-aware query filtering
```task
id: MKTT-WP-0009-T003
status: todo
priority: high
state_hub_task_id: "d78ab623-c472-4b24-ad84-08464b574886"
```
Ensure results are filtered before leaving the backend boundary. Result
metadata must report whether policy filtering occurred.
## P9.4 - Add relationship policy adapter design
```task
id: MKTT-WP-0009-T004
status: todo
priority: medium
state_hub_task_id: "bd4c2b7a-6eac-4845-b5c8-9f9c64946f0c"
```
Design an adapter boundary for Zanzibar/OpenFGA/SpiceDB-style relationship
checks without binding the core package to any one service.
## P9.5 - Add rule policy adapter design
```task
id: MKTT-WP-0009-T005
status: todo
priority: medium
state_hub_task_id: "752f1962-e83c-44cc-a1c1-0f89a4ea2a90"
```
Design an adapter boundary for OPA/Rego and Cedar-style rule policies.
## P9.6 - Add decision logs and explainability
```task
id: MKTT-WP-0009-T006
status: todo
priority: medium
state_hub_task_id: "990f01fa-5008-4871-a887-1c6ab4375605"
```
Record policy decisions with subject, action, object, context, decision,
reason, and provenance.
## Exit Criteria
- Local caches can operate in an explicit policy mode.
- Query and context package results are policy-aware.
- More rigid authorization engines can attach later without replacing the
query/cache framework.