| Metadata | Value |
|---|---|
| Status | Completed |
| Version | 1.0.0 |
| Last Updated | 2026-10-16 |
| Author | Sangeetha Grantha Team |
ID: TRACK-150 Status: Completed Owner: Seshadri Created: 2026-10-16 Updated: 2026-10-16
Make the reviewed Dikshitar, Syama Sastri and Tyagaraja classification data (TRACK-145/146/147) visible to Rasika mobile users: show a kriti’s cycle context in the reader, and add browsable, ordered Collections (Navavarana, Navagraha, Pancha Bhuta Sthala, Ratnatrayam, Ghana-raga Pancharatnam and the other reviewed cycles).
krithi_cycle_memberships, tags, new krithis/temples columns and CYCLE_OVERVIEW search documents.CatalogueKrithiReader (openapi) carries no cycle membership, vibhakti or occasion note, and temple is not populated. No endpoint lists cycles. Mobile has no Collections surface. The repository DTO KrithiCycleMembershipDto exists but is not part of the public catalogue contract.Status: Accepted Accepted by: Seshadri (explicit chat instruction, defaults confirmed for all open questions) Accepted at: 2026-10-16
Months of musicological curation are invisible to rasikas. A user reading Kamalambikayastava cannot learn that it is the sixth Avarana of the Navavarana, or move to the fifth or seventh. There is no way to browse a cycle in its proper order.
modules/shared/domain and the OpenAPI spec, so Android and iOS use one change.DISPUTED_CONJECTURE members are labelled as such or withheld; unreviewed or deferred claims never appear. Empty geography means “not reviewed”, not “no kshetra”.DatabaseFactory.dbQuery, DTO boundary, OpenAPI sync, Flyway only (no schema change is expected), no hard-coded dependency versions.CYCLE_OVERVIEW search document. No new editorial copy.no-store behaviour.Rasika mobile users; backend catalogue routes and repositories; shared domain DTOs; OpenAPI spec; mobile presentation and fixtures.
Backend and integration tests for the new endpoints, shared DTO serialisation tests, mobile presenter tests, make test, make test-integration, make test-frontend if touched, OpenAPI sync, and a live check on a seeded database that Navavarana returns 11 members in order.
Status: Accepted Accepted by: Seshadri (explicit chat instruction) Accepted at: 2026-10-16
published and whose membership was written by a reviewed seed (R__seed_09, R__seed_10, R__seed_11). Members whose kriti is not published are omitted. A collection with no remaining members is not listed. The Plan chooses the reviewed-ness guard (candidate: krithi_tags.source = 'reviewed_cycle' joined on the same krithi and tag); krithi_cycle_memberships has no review column, so the guard must not rely on row existence alone.CatalogueKrithiReader gains optional fields, all backward compatible (defaults empty or null):
collections: list of {collectionId, slug, name, role, sequenceOrder, position, memberCount, axisValue, orderBasis}. position is the 1-based rank among visible members. orderBasis is SOURCE or PERFORMANCE_CONVENTION or UNSPECIFIED.previous and next: the neighbouring visible member in the same collection, {krithiId, title, ragaName}, in collections[i].vibhaktiCase and occasionNote, only when non-null.temple: populated from temples when temple_id is set (field already exists in the DTO).GET /v1/catalogue/collections returns {items:[{id, slug, name, composer, memberCount, kind, hasOverview}], } ordered by composer then name. No pagination parameters beyond the existing CataloguePage convention; the expected size is under 30. Unknown parameters return 400, as in other catalogue routes.GET /v1/catalogue/collections/{slug} returns collection metadata, overview text, orderBasis, isComplete (false for open sets such as Shodasa Ganapati and Nottusvara), and ordered members: {krithi:{id,title,ragas,tala}, role, sequenceOrder, position, axisValue, label}. 404 for an unknown or ineligible slug.sequence_order, then normalized title, then UUID. Role order is DHYANA, CORE, OPTIONAL, MANGALAM, with sequence respected inside the collection; DISPUTED_CONJECTURE members always follow core members and carry label = "disputed". DHYANA and MANGALAM carry no axis value and no enclosure number.axisValue is shown as the secondary line (Chakra name, lingam name or Nottusvara tune). Only an allow-list of discriminative_attributes keys is returned as typed fields; the raw JSON is never exposed. The allow-list is set in the Plan from the keys actually present in the seeds.PERFORMANCE_CONVENTION and mobile renders “traditional performance order”. Cycles without a source-attested sequence must not display ordinal numbers; they show unnumbered lists.overview is read from the cycle’s CYCLE_OVERVIEW search document. When absent, overview is null and hasOverview is false. The text is returned as stored and is not generated at request time.orderBasis is SOURCE), axis value, and previous/next buttons that open the neighbouring reader.LoadState. Accessibility: each member row and navigation button has a content description; the disputed label is text, not colour only.CatalogueFixtures cover Navavarana (11 members with dhyana and mangalam), Navagraha (7 core plus 2 disputed), and a performance-convention cycle.modules/shared/domain/.../catalogue/, new endpoints in openapi/sangita-grantha.openapi.yaml, and a CatalogueApi extension in modules/shared/mobile-data. Existing clients that ignore unknown fields keep working.RasikaSessionHeader and RasikaInteractionHeader conventions on the new routes; no credentials or personal data.CatalogueService, which returns CatalogueResult. A repository method in the DAL runs inside DatabaseFactory.dbQuery and returns explicit DTOs, not Exposed rows. The existing KrithiRepository.listCycleMemberships is admin-shaped; the public path adds published-only, reviewed-only queries rather than widening it.(tag_id, sequence_order) it already exists (idx_krithi_cycle_tag). A migration would be a new VNN__ file only.tags.slug. Composer for a collection is derived from its members, and a cycle with members of more than one composer shows the composer of the majority and is flagged in the Plan if it occurs.AUDIT_LOG; the CLAUDE.md rule covers mutations.STOTRA_STYLE tag mirrors the cycle. The collection must be listed once, not once per mirror.vibhaktiCase is Sanskrit grammar terminology. Mobile copy needs a short gloss; the wording is a content decision for the Plan.krithi_tags.source join, or a new column in a later migration?discriminative_attributes keys to expose.Status: Accepted Accepted by: Seshadri (explicit chat instruction, including Spec amendments) Accepted at: 2026-10-16
Written from the accepted Spec after reading CatalogueService, CatalogueRepository, CatalogueV2Routes, the V2 DTO contract, KtorCatalogueApi, the reader/home/browse presenters, and the R__seed_09/10/11 seeds. Nothing is implemented.
/v2/catalogue (CatalogueV2Contract.ROOT). V1 is frozen by CatalogueCompatibilityDecoderTest. Collections endpoints are GET /v2/catalogue/collections and /v2/catalogue/collections/{slug}. They are added to CatalogueV2Contract and the OpenAPI spec, not /v1. This replaces the /v1/catalogue/... paths in Spec 3 and 4.encodeDefaults = true and explicitNulls = false, so new defaulted list fields would appear in V1 responses. Spec 2 is amended: the reader gets a single cycleContext: CatalogueCycleContextDto? = null, populated only under CatalogueVisibility.V2 and omitted when null. collections, vibhaktiCase and occasionNote live inside it. temple is already populated in both versions and is unchanged.krithi_tags row exists for the same (krithi_id, tag_id) with source = 'reviewed_cycle' (set by R__seed_09, R__seed_10, R__seed_11). No migration. The guard is one shared Exposed predicate used by both the reader and collection queries.publishedComposition(V2) predicate (published, including UNESTABLISHED form), matching what V2 readers already show.| Path | Change |
|---|---|
modules/shared/domain/.../catalogue/CatalogueCollectionDtos.kt (new) |
CatalogueCycleContextDto, CatalogueCollectionRefDto, CatalogueCollectionNeighbourDto, CatalogueCollectionSummaryDto, CatalogueCollectionDetailDto, CatalogueCollectionMemberDto, CatalogueOrderBasisDto (SOURCE, PERFORMANCE_CONVENTION, UNSPECIFIED) |
.../catalogue/CatalogueDtos.kt |
Add cycleContext: CatalogueCycleContextDto? = null to CatalogueKrithiReaderDto |
.../catalogue/CatalogueV2Dtos.kt |
Add COLLECTIONS_PATH to CatalogueV2Contract |
modules/backend/dal/.../repositories/CatalogueRepository.kt |
findCycleContext(krithiId), listCollections(), findCollection(slug), reviewed-guard predicate; V2 reader fills cycleContext |
modules/backend/api/.../services/CatalogueService.kt |
getCollections, getCollection; extra-param rejection and slug validation like existing handlers |
modules/backend/api/.../routes/CatalogueV2Routes.kt |
Two get handlers delegating to the service |
openapi/sangita-grantha.openapi.yaml |
New V2 paths and schemas; reader schema gets cycleContext |
modules/shared/mobile-data/.../network/CatalogueApi.kt, KtorCatalogueApi.kt |
listCollections, getCollection |
modules/shared/mobile-data/.../fixture/CatalogueFixtures.kt, harness/RasikaUiTestHarness.kt |
Navavarana, Navagraha, Pancharatnam fixtures and a fake API |
modules/shared/presentation/.../reader/KrithiReaderScreen.kt, KrithiReaderPresenter.kt |
“Part of” card with previous/next |
modules/shared/presentation/.../collections/ (new: CollectionsPresenter, CollectionsScreen, CollectionDetailPresenter, CollectionDetailScreen) |
List and detail |
.../home/HomeScreen.kt, HomePresenter.kt, navigation/RasikaDestination.kt, RasikaApp.kt, RasikaCopy.kt |
Collections shelf on Home, two destinations, copy and vibhakti/role glossary |
modules/backend/api/src/test/.../routes/CatalogueV2RoutesTest.kt + new CatalogueCollectionsTest.kt |
Route and guard tests |
modules/backend/dal/src/test/.../integration/CatalogueCollectionsIntegrationTest.kt (new) |
Flyway-seeded Postgres test of the repository queries |
modules/shared/mobile-data/src/commonTest/.../CatalogueV2ClientTest.kt, presentation commonTest presenter tests |
Client and presenter tests |
application_documentation/03-api/, feature doc under 01-requirements/features/, conductor/tracks.md |
Docs sync and status |
No migration, no AUDIT_LOG write (read-only), no change to modules/frontend.
CatalogueV2Contract; OpenAPI paths and schemas; serialisation test with a frozen V1 decoder proving cycleContext is absent from V1 payloads.listCollections (one grouped query on tags joined to guarded, published memberships); findCollection (members ordered by role rank, sequence_order, normalized title, UUID, with ragas and tala via the existing hydrateSummaries); findCycleContext (one query for the kriti’s memberships, one for neighbours using sequence_order within visible members). Allow-listed attribute keys only: the Plan reads the keys present in the three seeds (laya, structure, mudra today) and exposes those as typed attributes: Map<String,String>, never raw JSON.CYCLE_OVERVIEW row for the tag from search_documents; null when absent.SOURCE when members carry axis values (Navavarana, Pancha Bhuta); PERFORMANCE_CONVENTION for tyagaraja-ghana-raga-pancharatnam; otherwise UNSPECIFIED. If derivation is not possible from stored attributes, use a small slug-to-basis map in one named constant, covered by a test. isComplete false for shodasa-ganapati and nottusvara-sahitya.reviewed_cycle tag join is the guard; a test inserts an unreviewed membership and a published/draft mix and asserts neither appears. If the Tyagaraja legacy mirror tag has source = 'reviewed_cycle' without a membership, it never lists, because listing starts from memberships.SOURCE order basis with a numeric axis; otherwise no ordinals. Tested in the presenter.collections table or migration (data already exists); exposing raw discriminative_attributes; adding endpoints to /v1; generating overview text at request time; a curator-web view in this track.make test (new API tests, V1 decoder test, shared serialisation and mobile client tests).make test-integration (Flyway-seeded repository test: Navavarana returns 11 members in order with dhyana first and mangalam last; Navagraha returns 7 core then 2 disputed; Ghana-raga Pancharatnam returns 5 with PERFORMANCE_CONVENTION; unreviewed and draft rows excluded)../gradlew :modules:shared:domain:allTests :modules:shared:mobile-data:allTests :modules:shared:presentation:allTests (or the module tasks present; confirm names before running).sangita-restart-on-kotlin-change: curl /v2/catalogue/collections and one reader containing cycleContext; confirm V1 reader JSON has no cycleContext.make check-docs, git diff --check, and make agent-evals only if CLAUDE.md or .claude/ changes (none planned).verify-import: collection member counts match krithi_cycle_memberships for each reviewed tag.SOURCE from any axis value. Live data showed that is wrong: Nottusvara and Tiruvarur Pancha Linga carry axis values (a European air, a lingam) that are labels, not a sequence. SOURCE now requires a numbered avarana attribute, so only Kamalamba Navavarana is SOURCE. Ratnatrayam, Pancha Bhuta and the vibhakti sets are UNSPECIFIED and show no ordinals. Covered by an axis value alone does not claim a sequence.CatalogueCollectionsRoutesTest (Testcontainers, real Flyway schema), and the real seeded counts were checked against the live database below.position and coreCount count CORE members only, so Navavarana reads “6 of 9” and Navagraha “7 core”.CatalogueV2Contract.COLLECTIONS_PATH, OpenAPI paths and schemas.RasikaNavigator.replace.cycleContext, reviewed_cycle guard).make test and make test-integration: BUILD SUCCESSFUL (final state). CatalogueCollectionsRoutesTest: 7 tests, 0 failures. New shared tests: CatalogueCollectionsClientTest 5, CollectionsPresenterTest 7, 0 failures. ./gradlew :modules:shared:domain:allTests :modules:shared:mobile-data:allTests :modules:shared:presentation:allTests: BUILD SUCCESSFUL../gradlew :modules:shared:*:assemble and an Xcode build of RasikaApp for the iOS simulator succeeded, so the Android and iOS targets compile.memberCount equals the number of reviewed, published memberships in krithi_cycle_memberships for that tag (for example Navavarana 11, Navagraha 9, Nottusvara 38, Shodasa Ganapati 17). Navavarana returns dhyana, Avaranas 1 to 9 with chakra and yogini, then mangalam. Navagraha returns seven core members then Rahu and Ketu labelled disputed. Ghana-raga Pancharatnam returns PERFORMANCE_CONVENTION. /v2/catalogue/collections/missing is 404, a bad slug and an unknown parameter are 400. The reader for kamalAmbikAyAstava returns position 6 of 9, previous Bhairavi (5th), next Sahana (7th) and vibhakti SHASHTHI. /v1/catalogue/krithis/{id} has no cycleContext, and /v1/catalogue/collections is 404.make check-docs and git diff --check: clean. Not run: Android emulator, make test-frontend (no frontend change), a dark-mode or large-text visual pass.