PlotDirector/Docs/Writer/Investigations/Feature-Family-Tree-Design.md

7.5 KiB

Feature Family Tree — data and interaction specification

This document specifies a future view. No graph renderer, interactive prototype, author page or readiness engine is built in Phase3D.2A.

One model, two perspectives

The tree must read the same versioned capability, condition and dependency definitions used by investigation/readiness/preparation. It must not infer dependencies from menu position, duplicate readiness rules in JavaScript or maintain a separate hand-edited tree.

What does this feature need? Start from one capability and traverse upstream hard/useful conditions and their producer alternatives. Show condition truth for the selected book/project, minimum relevant counts, association scope, inline alternatives and unresolved/runtime conditions. Group OR producers as alternatives and AND conditions as independent requirements. Do not show three producer capabilities as three mandatory steps.

What can this feature help me do next? Traverse downstream ProducesDataFor/BenefitsFrom plus complementary WorksWith links. Explain the author benefit and problem-driven or opportunity-driven use. Relevance is not determined by readiness: an unready but helpful destination should remain discoverable, with preparation or an honest restriction shown alongside it.

Shared node and edge data

Record Required information
Capability Stable ID/version, author name/benefit, module/area, current implementation status, recommendation roles, actual trusted entry resolver and typed context contract
Condition Stable ID, hard/useful/optional relationship at the consumer, minimum/association predicate, AND/OR expression, check/provenance/freshness contract, producer alternatives and inline creation
Dependency Stable edge ID, explicit type/direction, source/target, referenced condition, optional strength, source evidence, proposed-vs-source-backed status
Book overlay Selected author/project/book and optional record IDs, readiness status/reasons, count/association/generation proof, evaluated/expiry time; not a persistent declaration that an author completed a feature
Investigation link Original investigation/recommendation/desired capability and pinned diagnostic version; no mutation of diagnostic scores from graph traversal

Requires arrows indicate data need; BenefitsFrom is a less prominent helpful link; ProducesDataFor shows downstream opportunity; WorksWith is visually complementary, not a precedence arrow. Use labels and line style as well as colour. Collapse inherited project/book/chapter context by default so the view does not become a thicket of administrative dependencies.

The exported snapshot has1,418 typed links but74 reusable conditions; it is not intended to render every link at once. The upstream view should expand condition groups rather than draw every possible producer-to-consumer link directly. Baseline context and duplicated type semantics can be filtered without losing their definitions. Keep the same IDs behind all projections.

Initial developer/admin view

  • Search by stable ID, feature name, route/module or relevant entity; filter implementation status, recommendation role and edge type.
  • Inspect one-hop upstream/downstream neighbourhoods, expanding deliberately with a depth/node budget.
  • Display hard vs usefulness vs enhancement; show each condition's AND/OR alternatives, source file/line evidence and proposed selector.
  • Optionally select an authorised project/book and attach a read-only readiness overlay once a resolver exists. Never expose another author's private investigation/history merely because the viewer is an administrator.
  • Flag orphan references, invalid IDs, unresolved producers, route/context failures, stale overlays and cycles. Differentiate invalid hard cycles from complementary or alternative-producer loops.
  • Compare immutable graph versions and aliases; preserve a reproducible view of the graph used by an existing recommendation/preparation plan.
  • Export a focused review slice and provenance, without author prose or credentials. Show partial/planned features as such; do not offer a fake Open action.

Static validation tooling supplied in this phase checks export/reference/source consistency and reports Requires strongly connected components. That tooling is not the developer visualisation or a runtime dependency engine.

Simplified author experience

Begin with an author benefit—“See where people are in a complicated scene”—rather than a taxonomy of modules. Present a small neighbourhood centred on the selected feature or an existing investigation recommendation. Use plain labels such as “You can start now”, “Useful preparation”, “Needs this first”, “Currently unavailable” and “Choose or check context”. Keep diagnostic explanation visible separately.

A blank map can be ready even with no Locations. A room block can create its matching location inline. A relationship network can open before links exist; two relevant character records are needed to create a connection. These distinctions should be visible as sensible choices, not a compulsory setup checklist.

Allow “Open now” for technically usable capabilities, “Prepare first” for the minimum useful journey, “Skip for now” for optional preparation and a clear return to the original investigation. A feature may be both a primary destination for one concern and preparation for another. Show project-wide scope explicitly when a selected-book overlay uses shared cast, locations, maps or floor plans.

If selection is missing, offer existing eligible records before suggesting creation. If data was added elsewhere, refresh and collapse satisfied preparation rather than ask again. If a provider, permission or physical platform is unavailable, explain that fact and offer an appropriate alternative without changing the diagnosis. Never transform a missing row into a judgement about the author's creativity or private preparation.

Accessibility, responsive behaviour and performance

Provide an equivalent linear upstream/downstream list, headings and labelled relationship summaries. Keyboard users must be able to focus a feature, expand alternatives, inspect a reason and open a scoped destination without dragging a graph. Do not rely on hover, colour, tiny nodes or motion. Announce readiness refreshes without moving focus or replacing current diagnostic text.

On small/PWA screens use a focused feature card plus expandable lists rather than a full canvas. Installed PWA is not offline editing; stale/network-failed readiness needs a visible Unknown/last-checked state. Preserve selected book, theme and Writer context. Normal preparation is navigable in ordinary pages; the diagram is an optional discovery aid.

Request only the visible graph slice and batched minimal readiness facts. Cache graph definitions by immutable version and fact overlays by author/scope/generation/expiry. Do not load the whole manuscript or every editor to colour a node. Verify permission/source expiry before opening a tool even if a cached badge says Ready.

Review checkpoints

Approve the shared inventory and condition semantics first. Resolve the saved occupancy write gap and source-store boundaries, then qualify pure facts and aliases. Build the developer view only after graph publication/validation and readiness provenance exist. Review its accuracy, density and keyboard/list presentation before simplifying for authors. The author Family Tree should not precede a reliable shared model or become a replacement questionnaire. Production question generation and Phase4 remain separate work.