Skip to content

docs: add S15 tonal roadmap and map symbolic-harmony research - #103

Merged
PhysShell merged 9 commits into
mainfrom
agent/s15-symbolic-harmony-roadmap
Jul 13, 2026
Merged

docs: add S15 tonal roadmap and map symbolic-harmony research#103
PhysShell merged 9 commits into
mainfrom
agent/s15-symbolic-harmony-roadmap

Conversation

@PhysShell

@PhysShell PhysShell commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the append-only S15: Tonal context and harmonic control stage and maps the recent symbolic-harmony / interactive-evolution research onto the existing roadmap instead of inventing competing ownership.

New docs

  • docs/stages/S15-tonal-context-and-harmonic-control.md
    • records Phase 0 evidence research and Phase 1 shared tonal core as accepted/closed;
    • defines Phase 2 explicit scoped context as the next increment;
    • plans scope/confidence calibration, harmonic fixtures, soft harmonic policy, and local-context cadence;
    • preserves the existing freezes on automatic scope selection, confidence cutoffs, generation integration, and cadence.
  • docs/audit/2026-07-symbolic-harmony-and-evolution-research.md
    • evaluates ekzhang/harmony, napulen/romanyh, AugmentedNet, harmalysis, perfect-shuffle-music, composing.studio, and crepe as architectural inputs;
    • maps responsibilities to S7/S8/S9/S12/S15;
    • records explicit non-decisions: no SATB transplant, no generic register planner without new evidence, no neural/Datalog dependency, no new Evolution stage yet.

Existing stage updates

  • S6: records accepted register hardening and moves cadence ownership to S15 Phase 6.
  • S7: adds concrete layered-path, multi-bar DP/Viterbi, deterministic k-best, and specialised-client slices.
  • S8: adds the Griff textual playground plus candidate/tonal/path/lineage inspector direction.
  • S9: phases feedback capture, preference reranking, Evolution Lab, and diversity/collapse controls.
  • S12: keeps AugmentedNet/MiniBach as research inputs behind existing neural gates.
  • S13: clarifies that S15 owns shared tonal inference/calibration while S13 retains the complement projection.
  • Stage-label reconciliation now extends the canonical append-only roadmap through S15.

Why

The research converges on one product line:

enumerate feasible local possibilities
→ explain transition costs
→ optimise globally
→ return diverse top-k
→ let the human choose
→ retain feedback and lineage

The docs now assign each part once:

  • S15 supplies harmonic meaning and uncertainty;
  • S7 optimises global paths;
  • S8 displays alternatives;
  • S9 learns from selection;
  • S12 remains the later neural layer.

Impact

Documentation only. No production code, schema, generation behaviour, dependency, or acceptance status changes.

Validation

  • Compared branch against main: 9 documentation files only, 0 code files.
  • Cross-checked stage ownership against the canonical reconciliation doc and current S6/S7/S8/S9/S12/S13 stage docs.
  • TonalContext Phase 1 remains accepted/closed at af26206; Phase 2 is documented as not started.

Summary by CodeRabbit

  • Documentation
    • Added roadmap guidance for append-only stage numbering and cross-cutting work.
    • Introduced the S15 tonal and harmonic context roadmap, including uncertainty, evidence-scoped analysis, and calibration plans.
    • Clarified boundaries for neural assistance and research-only integrations.
    • Updated S7–S9 and S13 documentation with plans for global alternatives, provenance inspection, feedback workflows, and evolutionary experiments.
    • Documented completed S6 hardening work and deferred cadence-related enhancements.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates roadmap governance and stage documentation for symbolic harmony, global path optimization, preview tooling, human feedback, neural-assistance boundaries, and structural evolution experiments across stages S6–S15.

Changes

Roadmap, harmony, and evolution planning

Layer / File(s) Summary
Roadmap governance and research decisions
docs/audit/*
Stage numbering rules and the accepted symbolic harmony/evolution research record define source assessments, stage responsibilities, non-adoption decisions, and immediate actions.
S15 tonal context contract
docs/stages/S15-tonal-context-and-harmonic-control.md
Adds the S15 roadmap for scoped tonal evidence, uncertainty, shared estimation, fixtures, calibration, and phased harmonic integration.
Cross-stage ownership and neural-assistance boundaries
docs/stages/S12-neural-assistance.md, docs/stages/S13-complementary-part-generation.md, docs/stages/S6-rule-generator-v0.md
Clarifies S15/S7 ownership, neural-assistance gates and non-goals, shared tonal estimation, and cadence deferral to S15 Phase 6.
S7 layered path and k-best planning
docs/stages/S7-graph-layer.md
Defines layered candidate states, inspectable costs, deterministic global optimization, ranked k-best alternatives, specialized clients, and acceptance criteria.
S8 preview cockpit
docs/stages/S8-preview-app.md
Adds editable text requests, immediate feedback, candidate/provenance inspection, expanded outputs, and stable headless-testable view requirements.
S9 feedback and Evolution Lab
docs/stages/S9-feedback-layer.md
Defines persistable feedback events, EMA reranking, structural evolution experiments, lineage, diversity metrics, and productization gates.

Estimated code review effort: 2 (Simple) | ~15 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main documentation change: adding the S15 tonal roadmap and mapping symbolic-harmony research.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/s15-symbolic-harmony-roadmap

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PhysShell
PhysShell marked this pull request as ready for review July 13, 2026 01:14

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Nitpick comments (1)
docs/stages/S15-tonal-context-and-harmonic-control.md (1)

3-7: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Disambiguate the S6 dependency from the downstream feed.

S15 currently both “Depends on” S6 and “Feeds” S6, which reads as a circular implementation dependency. Clarify that Phase 0/1 consume the existing S6 baseline, while only later S15 phases feed future S6 generation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/stages/S15-tonal-context-and-harmonic-control.md` around lines 3 - 7,
Update the S15 dependency metadata to distinguish phases: state that Phase 0/1
consume the existing S6 rule-generator baseline, and clarify that only later S15
phases feed future S6 generation. Remove the ambiguous direct “Depends on: S6”
and “Feeds: S6 generation” wording while preserving the other dependency
relationships.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/stages/S12-neural-assistance.md`:
- Around line 40-45: Make the harmonic assistance criterion in the Acceptance
criteria section measurable by specifying the labelled evaluation-set scope,
baseline comparison metrics, calibrated-uncertainty target, and explicit
thresholds or conditions for both beating and complementing the S15 symbolic
baseline.
- Around line 32-38: The S12 preconditions reference accepted S15 fixtures
without explicitly requiring the S15 work that produces them. Update the
Preconditions hard gate to name the required S15 phases for the labelled
controls and harmonic fixture DSL, or clearly distinguish the currently
available S15 estimator from future fixtures while preserving the comparison and
uncertainty/abstention requirements.

In `@docs/stages/S6-rule-generator-v0.md`:
- Around line 23-27: Update the S6 stage status and acceptance-criteria wording
so density and syncopation corpus gates are not presented as both unresolved
follow-ups and satisfied gates. Either mark S6 as in progress until those gates
are met, tested, and documented, or explicitly classify them as non-gating
follow-ups while preserving accurate acceptance criteria.

In `@docs/stages/S7-graph-layer.md`:
- Around line 84-92: Define the deterministic k-best contract in Slice C:
specify the path representation, diversity distance and threshold, and whether
filtering occurs before or after global ranking. Record these as resolved
semantics or an explicit open question, and ensure the contract preserves
reproducible top-k global selection rather than allowing path clones.
- Around line 59-63: Clarify in the S7 scoring specification that the displayed
expression is a utility maximized by the ranking logic in core/src/scoring.rs,
or explicitly define the negated form if it is retained as a minimized cost.
Also document the neutral value and behavior used for harmonic_fit when optional
S15 harmonic state is unavailable or not yet calibrated.
- Around line 100-110: Update the acceptance criteria section to name the
quality score, fixture or corpus, and comparison threshold used to show
recombined chains outperform S6. Define a measurable global-arc rule for
multi-bar outputs, including the fixture and threshold for detecting excessive
repeated techniques. Revise the determinism criterion to allow tied optima while
requiring the documented fixed tie-break to select consistently, and specify how
k-best diversity is measured.

In `@docs/stages/S8-preview-app.md`:
- Around line 63-65: Update the Candidate/provenance inspector requirements in
the S8 preview-app document to include the complete S9 feedback identity
contract: candidate stable IDs plus generation and session_id. Specify the
source of generation and session_id, and require the inspector/view model to
carry both values through to feedback persistence.

In `@docs/stages/S9-feedback-layer.md`:
- Around line 39-45: Update the Phase 1 preference reranking EMA specification
around the approve/sign update to define verdict mappings: document the exact
positive magnitude for favorite, distinguish like and dislike behavior, and
explicitly state that skip produces no weight update. Keep the existing EMA
formula and normalization requirements unchanged.
- Around line 93-105: Update the reproducibility acceptance criterion to include
evolution decisions—user-selected parents and operator/mutation choices—as
replay inputs, or explicitly require them to be deterministic outputs of the
seed. Ensure the contract guarantees identical documented inputs reproduce the
same population and lineage.

---

Nitpick comments:
In `@docs/stages/S15-tonal-context-and-harmonic-control.md`:
- Around line 3-7: Update the S15 dependency metadata to distinguish phases:
state that Phase 0/1 consume the existing S6 rule-generator baseline, and
clarify that only later S15 phases feed future S6 generation. Remove the
ambiguous direct “Depends on: S6” and “Feeds: S6 generation” wording while
preserving the other dependency relationships.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bfc117e6-bb8a-4112-91ff-cd138273d5b2

📥 Commits

Reviewing files that changed from the base of the PR and between ae8f7fe and 445231c.

📒 Files selected for processing (9)
  • docs/audit/2026-05-stage-label-reconciliation.md
  • docs/audit/2026-07-symbolic-harmony-and-evolution-research.md
  • docs/stages/S12-neural-assistance.md
  • docs/stages/S13-complementary-part-generation.md
  • docs/stages/S15-tonal-context-and-harmonic-control.md
  • docs/stages/S6-rule-generator-v0.md
  • docs/stages/S7-graph-layer.md
  • docs/stages/S8-preview-app.md
  • docs/stages/S9-feedback-layer.md

Comment on lines 32 to +38
## Preconditions (hard gate)

- Corpus ≥ ~100 phrases; working S6 baseline; S9 feedback integration.
- Not started before all three hold (glossary §17.5).
- Any harmonic neural proposal must also compare against the accepted S15
symbolic estimator/fixtures and preserve uncertainty/abstention rather than
emit one unquestioned label.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Make the S15 prerequisite explicit.

S15’s labelled controls and harmonic fixture DSL are future Phase 3/4 work, but this hard gate requires “accepted S15 ... fixtures” without adding the required S15 phase to S12’s prerequisites. Require the relevant S15 phases explicitly, or distinguish the currently available estimator from future fixtures.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/stages/S12-neural-assistance.md` around lines 32 - 38, The S12
preconditions reference accepted S15 fixtures without explicitly requiring the
S15 work that produces them. Update the Preconditions hard gate to name the
required S15 phases for the labelled controls and harmonic fixture DSL, or
clearly distinguish the currently available S15 estimator from future fixtures
while preserving the comparison and uncertainty/abstention requirements.

Comment on lines 40 to +45
## Acceptance criteria

- Neural suggestions beat S6/S7 on the quality score in a blind comparison.
- Deterministic given a fixed seed and model checkpoint.
- Harmonic assistance, when attempted, beats or complements the S15 symbolic
baseline on a labelled test set and reports calibrated uncertainty.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Make harmonic acceptance measurable.

“Beats or complements” the S15 baseline is not a testable acceptance criterion. Define the labelled evaluation set, comparison metrics, calibration target, and what qualifies as a complementary result.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/stages/S12-neural-assistance.md` around lines 40 - 45, Make the harmonic
assistance criterion in the Acceptance criteria section measurable by specifying
the labelled evaluation-set scope, baseline comparison metrics,
calibrated-uncertainty target, and explicit thresholds or conditions for both
beating and complementing the S15 symbolic baseline.

Comment on lines +23 to +27
> Remaining follow-ups from the list below: anchor preservation, the string/fret
> playability filter, and the density/syncopation corpus gates. Cadence-aware
> endings are no longer owned as an unscoped S6 patch: they move to **S15 Phase
> 6**, after explicit tonal context, scope/confidence calibration, and an
> abstention path exist.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not mark S6 done while its acceptance gates remain open.

Density and syncopation are listed as remaining corpus gates here, but they remain acceptance criteria below. Either move them into explicitly non-gating follow-ups or change the status to in progress; the reconciliation audit requires closed stages to have met, tested, and documented acceptance criteria.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/stages/S6-rule-generator-v0.md` around lines 23 - 27, Update the S6
stage status and acceptance-criteria wording so density and syncopation corpus
gates are not presented as both unresolved follow-ups and satisfied gates.
Either mark S6 as in progress until those gates are met, tested, and documented,
or explicitly classify them as non-gating follow-ups while preserving accurate
acceptance criteria.

Comment on lines +59 to 63
`EnergyState`, rhythmic similarity to part A, and optional S15 harmonic state
once that contract is calibrated.
- Cost function (inspectable, the same weights S9 later tunes):
`harmonic_fit + rhythm_complement + style_fit + playability + phrase_continuity
− mud_penalty − repetition_penalty − fret_jump_penalty`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Define whether this expression is a score or a minimised cost.

The formula is named a cost, but positive fit terms improve the result; meanwhile core/src/scoring.rs ranks higher aggregates first. State explicitly whether S7 maximises this utility or minimises its negation. Also define the neutral/omitted behavior for harmonic_fit before S15 is calibrated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/stages/S7-graph-layer.md` around lines 59 - 63, Clarify in the S7
scoring specification that the displayed expression is a utility maximized by
the ranking logic in core/src/scoring.rs, or explicitly define the negated form
if it is retained as a minimized cost. Also document the neutral value and
behavior used for harmonic_fit when optional S15 harmonic state is unavailable
or not yet calibrated.

Comment on lines +84 to +92
### Slice C — deterministic k-best alternatives

Return several ranked global paths with:

- fixed tie-breaking;
- complete total/local/transition explanations;
- an explicit diversity rule so alternatives are not path clones;
- stable provenance for S8 display and S9 feedback.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Define the diversity rule and k-best selection semantics.

“Explicit diversity rule” is currently only a placeholder: specify the path representation, distance threshold, and whether diversity filtering occurs before or after ranking. Add this as a resolved contract or an explicit open question; otherwise “deterministic k-best” is not reproducible and may not actually return the top-k globally ranked paths.

Also applies to: 111-118

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/stages/S7-graph-layer.md` around lines 84 - 92, Define the deterministic
k-best contract in Slice C: specify the path representation, diversity distance
and threshold, and whether filtering occurs before or after global ranking.
Record these as resolved semantics or an explicit open question, and ensure the
contract preserves reproducible top-k global selection rather than allowing path
clones.

Comment on lines 100 to 110
## Acceptance criteria

- Recombined chains beat S6 single-strategy output on a defined quality score.
- Deterministic for a fixed cost function (Viterbi optimum is unique; ties break
by a fixed documented rule).
- Multi-bar output shows a global arc (e.g. no 4 identical-technique bars in a
row), not a chain of locally-best fragments.
- Every selected path exposes local and transition-cost explanations.
- k-best alternatives are deterministic and measurably distinct under the
documented diversity rule.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Make the acceptance criteria executable.

The criteria need a named quality score, fixture/corpus, comparison threshold, and measurable global-arc rule. Also, “the Viterbi optimum is unique” conflicts with the documented fixed tie-break behavior: tied optima should be allowed as long as selection is deterministic.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/stages/S7-graph-layer.md` around lines 100 - 110, Update the acceptance
criteria section to name the quality score, fixture or corpus, and comparison
threshold used to show recombined chains outperform S6. Define a measurable
global-arc rule for multi-bar outputs, including the fixture and threshold for
detecting excessive repeated techniques. Revise the determinism criterion to
allow tied optima while requiring the documented fixed tie-break to select
consistently, and specify how k-best diversity is measured.

Comment on lines +63 to +65
- [ ] **Candidate/provenance inspector** — candidate scores, novelty, register,
playability, tonal hypotheses, S7 path/transition explanations, and stable
ids sufficient for S9 feedback.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Document the complete S9 feedback identity contract.

Stable candidate IDs alone are not sufficient for the S9 feedback event: docs/stages/S9-feedback-layer.md:28-33 also requires generation and session_id. Specify where those values come from and ensure the inspector/view model carries them so feedback provenance can be persisted correctly.

Also applies to: 130-133

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/stages/S8-preview-app.md` around lines 63 - 65, Update the
Candidate/provenance inspector requirements in the S8 preview-app document to
include the complete S9 feedback identity contract: candidate stable IDs plus
generation and session_id. Specify the source of generation and session_id, and
require the inspector/view model to carry both values through to feedback
persistence.

Comment on lines +39 to 45
### Phase 1 — preference reranking

- Like/dislike/favorite → update feature weights.
- Baseline EMA update: `w_i ← (1-α)·w_i + α·sign(approve)·feature_i_norm`,
`α ≈ 0.1`, weights normalized on the L1 simplex.
- Explainable rerank by similarity / features / tags.
- No gradient descent / RL before S10.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Define how each feedback verdict updates the EMA.

The documented inputs include like, dislike, favorite, and skip, but sign(approve) only defines a binary update. Specify the mapping and magnitude for favorite, and explicitly state that skip is a no-op; otherwise implementations can diverge while still appearing to satisfy the contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/stages/S9-feedback-layer.md` around lines 39 - 45, Update the Phase 1
preference reranking EMA specification around the approve/sign update to define
verdict mappings: document the exact positive magnitude for favorite,
distinguish like and dislike behavior, and explicitly state that skip produces
no weight update. Keep the existing EMA formula and normalization requirements
unchanged.

Comment on lines 93 to 105
## Acceptance criteria

- Ratings measurably shift subsequent ranking toward liked features
(deterministic test with synthetic ratings).
- The profile is inspectable and resettable.
- Feedback events retain stable candidate/session provenance.
- Evolution operators preserve structural validity and pass the normal generator
validators.
- Fixed inputs, feedback sequence, and seed reproduce the same population and
lineage.
- Diversity/collapse metrics are reported before Evolution Lab is considered for
product use.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Include evolution decisions in the reproducibility inputs.

Phase 2 includes user-selected parents and operator/mutation choices, but the acceptance criterion only fixes inputs, feedback, and seed. Add those decisions to the replay contract, or define them as deterministic outputs of the seed; otherwise identical documented inputs may produce different populations and lineage.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/stages/S9-feedback-layer.md` around lines 93 - 105, Update the
reproducibility acceptance criterion to include evolution
decisions—user-selected parents and operator/mutation choices—as replay inputs,
or explicitly require them to be deterministic outputs of the seed. Ensure the
contract guarantees identical documented inputs reproduce the same population
and lineage.

@PhysShell
PhysShell merged commit 6b556a9 into main Jul 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant