diff --git a/docs/compatibility-policy.md b/docs/compatibility-policy.md new file mode 100644 index 0000000..de28b91 --- /dev/null +++ b/docs/compatibility-policy.md @@ -0,0 +1,47 @@ +# Compatibility Policy + +`markitect-tool` is a successor, not a compatibility release of +`markitect-main`. + +## Default + +Do not preserve legacy module paths, database-backed workflows, or command names +unless the new PRD/FRS requires the behavior. + +The durable compatibility target is the new product contract: + +- Markdown input/output +- Structured document representation +- Schema validation and reporting +- Transform/query/template operations +- `mkt` CLI and library API + +## What May Be Compatible + +Compatibility is acceptable for: + +- Markdown schema file format, if it remains clean and provider-neutral. +- Validation error concepts and output formats, if they fit the new structured + error model. +- Template variable syntax, if deterministic and documented. +- Transclusion/include directive syntax, if made explicit and testable. +- Selected fixture files, if they do not encode platform assumptions. + +## What Should Not Be Compatible + +Do not carry forward: + +- `markitect.*` import paths as public API. +- `markitect` CLI command names as MVP aliases. +- SQLite/database ingest/list/query behavior. +- GraphQL API behavior. +- Infospace, spaces, prompt execution, LLM provider configuration, rendering, + asset, finance, wishlist, or legacy-management behavior. +- Backward compatibility shims whose only purpose is old internal tooling. + +## Migration Stance + +Consumers should migrate to `mkt` and the new library API intentionally. Any +compatibility shim must have a named downstream consumer, a removal condition or +stability commitment, and tests proving it does not pull platform concerns into +the core. diff --git a/docs/dependency-classification.md b/docs/dependency-classification.md new file mode 100644 index 0000000..08fa2e6 --- /dev/null +++ b/docs/dependency-classification.md @@ -0,0 +1,54 @@ +# Dependency Classification + +Source: `/home/worsch/markitect-main/pyproject.toml` and `package.json` + +## Core Candidates + +| Dependency | Recommendation | Reason | +| --- | --- | --- | +| `markdown-it-py` | Keep | Mature Markdown parser; good fit for deterministic parse contract. | +| `PyYAML` | Keep | Needed for frontmatter, config, and markdown schema metadata. | +| `click>=8` | Keep or replace deliberately | Legacy CLI uses Click. Keeping it lowers migration cost. | +| `jsonpath-ng>=1.5` | Conditional | Useful only if `mkt query` adopts JSONPath over structured docs. | +| `toml` / stdlib `tomllib` | Conditional | Use `tomllib` for read-only TOML on Python 3.11+; add a writer only if needed. | +| `tabulate` | Optional | Nice for human tables; structured output should not depend on it. | + +## Optional Integration Candidates + +| Dependency | Recommendation | Reason | +| --- | --- | --- | +| `llm-connect` | Optional extra only | FR-042 allows LLM-assisted generation, but core must remain provider-neutral. | +| `networkx` | Defer | Maybe useful later for transclusion reference graphs; mostly higher-layer. | +| `markdownify`, `markitdown-no-magika`, `pymupdf4llm` | Do not include in core | Multi-format proxy conversion is out of markdown-native scope. | + +## Drop from Successor Core + +| Dependency/source | Reason | +| --- | --- | +| Local capability packages | Old project ecosystem/tooling, not syntax-layer contract. | +| `aiohttp` | Only needed by old service/provider integrations. | +| `jsdom`, `jest` | Browser/editor/rendering tests are out of scope for core toolkit. | + +## Recommended Initial Stack + +Assuming Python 3.12+: + +```toml +[project] +dependencies = [ + "markdown-it-py", + "PyYAML", + "click>=8.0", +] + +[project.optional-dependencies] +query = ["jsonpath-ng>=1.5"] +tables = ["tabulate>=0.9"] +llm = ["llm-connect @ file:///home/worsch/llm-connect"] +dev = ["pytest"] +``` + +## Packaging Decision Needed + +`MKTT-WP-0001-T004` should decide Python minimum version, package import name, +CLI entry point, build backend, versioning, test runner, and lint/type tools. diff --git a/docs/legacy-cli-command-map.md b/docs/legacy-cli-command-map.md new file mode 100644 index 0000000..2212a88 --- /dev/null +++ b/docs/legacy-cli-command-map.md @@ -0,0 +1,84 @@ +# Legacy CLI Command Map + +Source command: `markitect` +Successor command: `mkt` + +This map classifies `markitect-main` commands as migrate, reimplement, defer, +or drop for `markitect-tool`. + +## Command Policy + +`mkt` should expose composable syntax-layer operations. It should not expose +database lifecycle, platform services, rendering applications, project finance, +wishlist, or legacy management commands. + +## Core Commands to Reimplement + +| Legacy command | Future `mkt` shape | Decision | +| --- | --- | --- | +| `ast-show` | `mkt parse --format tree/json` | Reimplement with new representation. | +| `ast-query` | `mkt query ` | Reimplement; selector syntax TBD. | +| `ast-stats` | `mkt inspect --stats` | Reimplement if lightweight. | +| `metadata` | `mkt matter get ` or parse output field | Reimplement around matter contract. | +| `frontmatter-*` | `mkt matter front ...` | Reimplement if matter editing remains in scope. | +| `contentmatter-*` | `mkt matter content ...` | Reimplement only if contentmatter is formalized. | +| `tailmatter-*` | `mkt matter tail ...` | Reimplement only if tailmatter is formalized. | +| `schema-generate` | `mkt schema derive ` | Reimplement. | +| `validate` | `mkt validate --schema ` | Reimplement. | +| `schema-validate` | `mkt schema validate ` | Reimplement. | +| `schema-analyze` | `mkt schema inspect ` | Defer unless needed for MVP. | +| `schema-refine` | `mkt schema refine ` | Defer; only deterministic refinements. | +| `generate-stub` | `mkt generate stub --schema ` | Reimplement. | +| `generate-drafts` | `mkt generate drafts --schema --data ` | Reimplement later. | +| `template-render` | `mkt template render