Skip to content

docs: product proposal - #15

Closed
cqhasy wants to merge 23 commits into
1024XEngineer:mainfrom
cqhasy:proposal
Closed

docs: product proposal#15
cqhasy wants to merge 23 commits into
1024XEngineer:mainfrom
cqhasy:proposal

Conversation

@cqhasy

@cqhasy cqhasy commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Created the Product Proposal in both Chinese and English

Close: #10

@minorcell minorcell changed the title docs:write MS1 product Proposal docs: product proposal Jul 14, 2026
@minorcell

Copy link
Copy Markdown
Member

@cqhasy PR 的 body 简短写清晰就好,带上 issue task 链接。

@minorcell

minorcell commented Jul 14, 2026

Copy link
Copy Markdown
Member

@cqhasy PR 的 body 简短写清晰就好,带上 issue task 链接。

至少应该简要说明 PR 的改动吧;可以参考:

goplus/xgo#2792

Comment thread doc/en/MS1-ProductProposal.md Outdated
Comment thread doc/en/MS1-ProductProposal.md Outdated
Comment thread doc/en/MS1-ProductProposal.md Outdated
Comment thread doc/en/MS1-ProductProposal.md Outdated
Comment thread doc/en/MS1-ProductProposal.md Outdated
Comment thread doc/en/MS1-ProductProposal.md Outdated
Comment thread doc/en/MS1-ProductProposal.md Outdated
Comment thread doc/en/MS1-ProductProposal.md Outdated
@KurodaKayn
KurodaKayn requested a review from nighca July 15, 2026 03:41
@minorcell
minorcell marked this pull request as ready for review July 15, 2026 03:42

@fennoai fennoai 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.

I found one documentation consistency issue between the English and Chinese proposal files.

Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/en/MS1-ProductProposal.md Outdated
Comment thread doc/image/tile-example.png
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/en/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
Comment thread doc/zh/MS1-ProductProposal.md Outdated
@KurodaKayn
KurodaKayn requested a review from nighca July 21, 2026 02:10

@nighca nighca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

虽然有细节的问题不过影响不大,可以先以这个版本为基础来搞;后续做的过程中如果发现需要调整或细化的内容,直接在 issue 内容里改就好

@nighca

nighca commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

这个 PR 先 close 了

@nighca nighca closed this Jul 21, 2026
@KurodaKayn

Copy link
Copy Markdown
Collaborator

虽然有细节的问题不过影响不大,可以先以这个版本为基础来搞;后续做的过程中如果发现需要调整或细化的内容,直接在 issue 内容里改就好

不合并到仓库里面么

@nighca

nighca commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@KurodaKayn 按实训营的规范要求,这个 PR 不合入,只是其内容作为结论放到 issue 的 description 里,细节可以跟军辉了解下

@KurodaKayn

Copy link
Copy Markdown
Collaborator

@KurodaKayn 按实训营的规范要求,这个 PR 不合入,只是其内容作为结论放到 issue 的 description 里,细节可以跟军辉了解下

👌🏻

@KurodaKayn KurodaKayn mentioned this pull request Jul 21, 2026
nighca pushed a commit that referenced this pull request Jul 30, 2026
* feat:initialize backend architecture

* chore: remove placeholder GitHub Actions workflow

* docs(architecture): add system architecture document

* docs(architecture): add Chinese system architecture document

* docs(architecture): organize translations by language

* docs(architecture): define asset models and service interfaces

* docs:rewirte Overall Architeture

* docs(architecture): sync Chinese architecture translation

* docs(architecture): refine service and view type details

* docs(architecture): sync Chinese architecture document

sync Chinese architecture document

* docs(architecture): refactor system architecture document structure (#4)

* docs(architecture)-refactor-system-architecture-document-structure

* docs(architecture): split architecture docs by concern

* docs:update asset and project data structure

* docs(architecture): define service boundaries (#5)

The architecture document needed clear runtime ownership and communication boundaries.

Document the Core API, AI Service, Asset Worker, frontend, messaging, and storage constraints in English and Chinese.

The design now provides a consistent implementation reference for both language audiences.

* docs: replace system architecture image (#6)

* docs: add system architecture image

* Delete system architecture diagram from documentation

Removed the mermaid diagram illustrating the system architecture.

* Remove diagram from system architecture design

Removed mermaid diagram and related content from the system architecture documentation.

* docs: rename system architecture section (#7)

* docs:change gateway from Traefik to Caddy

* docs:change holonic-Asset System Architecture.svg

* docs(system architecture): add module and interface design overview of core api (#8)

* docs(core-api): add technical design overview

The Core API documentation lacked a consolidated module entry point.

Document module responsibilities, feature flows, and service interface contracts.

Provide a structured foundation for follow-up API design documents.

* docs(project): define module service contracts

The Project module lacked a code-form contract for its public lifecycle.

Add the CRUD service interface and module registration facade.

This clarifies ownership between the interface and module layers.

* docs(ai): define module service contracts

The AI module mixed project responsibilities with incomplete feature contracts.

Separate feature providers and expose the generation lifecycle through a module facade.

This gives AI consumers one consistent contract for generation and result handling.

* docs(core-api): link module contract sources

The Core API overview still pointed to placeholder module documents.

Link the AI and Project sections to their Go-form contract files.

This keeps the module index aligned with the available design sources.

* docs(task): add orchestration contracts

The Core API lacked a dedicated contract for task lifecycle and step orchestration.

Add Task service, step, dispatcher, event publisher, and module facade interfaces.

This centralizes CRUD, transitions, replay, cancellation, progress, and result handling.

* docs(ai): delegate task lifecycle ownership

AI contracts duplicated progress and cancellation responsibilities owned by Task.

Remove the generation lifecycle service, register TaskModule, and rename the AI module file.

This keeps generation providers separate from task orchestration.

* docs(core-api): align module index references

The Core API index name and links no longer matched the current module files.

Rename the index and point AI and Task sections to their Go-form contracts.

This preserves accurate navigation after the module naming changes.

* doc(asset-worker): init design document (#9)

* docs:merge Asset and record

* docs(media): add upload target contracts (#12)

The Core API lacked a focused contract for direct media uploads.

Add a MediaUploadService and module facade for generating temporary object-storage targets.

This keeps the Media scope limited to backend-controlled upload URL creation.

* docs(system architecture): update architecture design to modular monolith with detailed component responsibilities

* docs:add asset module

* docs(system architecture): remove uncessary part and synchronize chinese doc

* docs:update task module

* docs:add tag for Asset

* docs(taxonomy): add asset taxonomy contracts (#13)

* docs(taxonomy): add asset taxonomy contracts

Taxonomy needs explicit module boundaries for asset classification and discovery.

Define providers for tag lifecycle, asset associations, and project-scoped search through TaxonomyModule.

Keep project scope derived from Asset ownership without adding project-level tag fields.

* docs(taxonomy): make contracts discovery-only

Taxonomy should not own tag mutations or persisted asset associations.

Remove tag and association service APIs, then expose tag-based lookup, structured filtering, and LLM semantic discovery.

Keep Asset and index contracts unchanged while deriving project scope from Asset ownership.

* docs:add asset data structure

* docs(project): add data structure contract (#14)

Project lifecycle interfaces need a shared representation of project configuration.

Define project identity, ownership, genre, view, platform, description, reference, and style fields with constrained value types.

Align the contract with the data package while keeping unrelated index changes out of the commit.

* devide asset module to three

* docs(data-structure): define asset-backed generation contracts (#15)

* docs(asset): add resource lookup contract

AI generation needs a stable way to resolve existing Asset resources.

Expose AssetResource lookup through both the service and module contracts.

This enables AI workflows to validate resource identity and type.

* docs(ai): define asset-backed generation contracts

The AI module needs contracts aligned with the current Asset resource model.

Define generation DTOs, provider interfaces, and module entry points for the supported AI operations.

Each operation now returns a Task ID and validates resources through AssetResource identity and type.

* style(project): format service signatures

The Project service signatures use a layout inconsistent with the surrounding contracts.

Format each method signature across multiple lines without changing its types or behavior.

This keeps the Project interface easier to scan alongside the other Core API contracts.

* docs(core-api): correct contract links

Several Core API module references still point to obsolete documentation paths.

Link Media, Asset, and Taxonomy sections to their current Go contract files.

This restores navigation from the Core API index to the maintained module definitions.

* docs(ai): restore character generation contracts

Character assets require AI-backed prototype generation and editing.

Add Character DTOs, provider registration, and module entry points that follow the AssetResource and Task contracts.

This restores Character support without reintroducing direct URL responses.

* rename go.mod

* refactor(core-api): normalize contract paths (#17)

Relative imports and space-containing directories make the Core API contracts ambiguous.

Move the contracts to Core_API/data_structure and use canonical upstream import paths.

This gives every module a stable package reference without changing interface behavior.

* feat(asset):add basic asset interface

* add lefthook.yml,update golangci.yaml

* feat(asset)add asset handler

* feat(project): define project domain model

Project operations need shared entities and value types across application layers.

Add the Project entity with game, view, and platform classifications.

The backend now has a stable domain contract for project workflows.

* feat(project): add in-memory persistence

The project call chain needs a persistence boundary before database wiring is available.

Add DAO contracts, repository mapping, and a thread-safe in-memory adapter.

Higher layers can be wired without introducing project business behavior.

* feat(project): add application service

Project handlers need an application boundary for lifecycle operations.

Add a service contract with a pass-through repository implementation.

The HTTP layer can reach persistence without embedding project business behavior.

* feat(project): expose HTTP skeleton

Project lifecycle operations need typed transport boundaries while behavior remains deferred.

Add DTOs, route registration, and handlers that invoke services with empty responses.

The HTTP chain is connected without implementing project response behavior.

* feat(project): wire executable skeleton

The project HTTP boundary needs runtime composition to exercise the complete call chain.

Wire the memory DAO, repository, service, handler, and optional project routes.

Running the backend now exposes placeholder project endpoints without business behavior.

* build(database): add PostgreSQL driver dependencies

Future database adapters require the selected PostgreSQL driver.

Add the driver and its transitive requirements while preserving existing direct dependencies.

The merged module checksums now cover both dependency graphs.

* docs(project): define repository contract

The project service documentation needs an explicit persistence boundary.

Document insert, lookup, save, and removal operations for Project entities.

Implementations can now align with a shared repository contract.

* docs(asset): define repository contracts

Asset persistence documentation needs explicit boundaries for state, resources, and versions.

Define repository operations for assets, owned resources, and immutable version history.

Storage implementations can now follow consistent Core API contracts.

* feat:implement context,rename backend to core_api

* docs(core-api)!: align AI image generation and editing contracts (#19)

* docs(core-api)!: align AI image generation and editing contracts

* docs(core-api): ImageEditRequest is exposed through an LLMClient image-edit method

* feat(ai): add AI module skeleton and route registration (#20)

* feat(ai): add AI module skeleton and route registration

Add initial skeleton, DTOs, service contracts, handler implementations, and provider interfaces for the AI module.

Define AI service methods for generating assets, UI, scenery layers, and editing prompts. Wire the AI router and handlers into the core API application entrypoint.

Enables HTTP endpoint registration and contract compliance testing for the AI service module.

* refactor(ai): restrict public HTTP operations

Generation and character-edit endpoints are not part of the public HTTP surface.

Keep only the five supported edit handlers in AIRouter and route registration.

This aligns the HTTP layer with the current AI API boundary.

* test(ai): verify public route boundaries

Cover the five supported AI edit endpoints with placeholder response checks.

Verify generation and character-edit paths are not registered and return 404.

Protect the HTTP surface from accidental route exposure.

* refactor(ai): align service request contracts

Recent image contract changes introduce shared generation and edit inputs.

Mirror the revised request fields and remove the obsolete character-edit service.

This keeps the AI skeleton consistent with the current service contract.

* refactor(ai): align image provider contract

The provider boundary needs separate generation and editing request shapes.

Add the image edit operation and remove the obsolete generation count field.

This keeps provider adapters compatible with the revised AI contract.

* refactor(ai): remove object edit HTTP operation

Object editing is not a supported public AI operation.

Remove the handler method, router contract entry, and route registration.

This keeps the HTTP surface limited to supported edit flows.

* test(ai): reject object edit route

Object editing must remain outside the public AI router.

Move the endpoint from success coverage to the unsupported operations set.

This verifies object edit requests receive a 404 response.

* refactor(ai): remove object edit service contract

Object editing is not part of the supported AI service capabilities.

Remove its request and response DTOs together with the service method.

This eliminates the obsolete contract while retaining object generation.

* docs(core-api): normalize documentation path casing (#21)

Core API documentation currently mixes uppercase directory and file names.

Rename the subtree to lowercase snake_case and update path references.

Document the naming rule to prevent new casing inconsistencies.

* feat(asset)connect asset handler、service、repo

* feat(asset)add animations handler

* docs(system-architecture): update frontend architecture details and application structure (#25)

* feat(media): add R2 project preview upload skeleton (#23)

* feat(media): add upload target service contract

Media uploads need a typed boundary for resource-scoped upload targets.

Define request and response DTOs and the single CreateUploadTarget service capability.

Provide a compilable placeholder implementation for later storage integration.

* feat(media): expose upload target endpoint

Media upload target creation needs an HTTP adapter within the existing Echo framework.

Add handler forwarding and route registration for POST /api/v1/media/upload-target.

Keep the transport layer limited to the supported upload target operation.

* feat(media): register upload target module

The executable must assemble Media alongside the existing application modules.

Extend the route registrar and main composition to include the Media handler.

Update existing router tests for the additional registrar dependency slot.

* test(media): cover upload target contract

The Media upload skeleton needs protection for transport fields and placeholder behavior.

Verify JSON field names and the non-nil empty target returned by the service.

Prevent contract drift before object-storage integration is implemented.

* test(media): cover upload target HTTP flow

The new Media endpoint needs coverage across handler delegation and route boundaries.

Verify request forwarding, error propagation, placeholder responses, and unsupported paths.

Protect the single public upload operation from accidental route expansion.

* feat(storage): add S3-compatible object contracts

Core API modules need provider-neutral boundaries for Cloudflare R2 operations.

Add backend URL upload, presigned browser upload, and object metadata lookup types and placeholders.

This keeps storage integration compatible with standard S3 endpoints.

* fix(media): align upload targets with R2 previews

Preview uploads can happen before a Project exists and must use the R2 object model.

Scope the Media contract to content type, object key, and a temporary presigned upload URL.

This removes asset IDs and Cloudflare Images semantics from the upload flow.

* test(storage): cover object operation contracts

The new storage package defines placeholders that later R2 integration will replace.

Exercise backend URL upload, presigned browser upload, and object metadata lookup.

This protects the provider-neutral contract while implementation remains deferred.

* test(media): cover R2 preview upload contracts

The Media contract now accepts pre-Project uploads without a Project identifier.

Verify content-type requests, stable object keys, upload URLs, and placeholder service results.

This prevents the transport model from drifting back to asset-scoped uploads.

* test(media): cover preview upload HTTP flow

The public Media route changed to a Project preview upload target endpoint.

Verify handler delegation, error propagation, placeholder responses, and unsupported paths.

This protects the intended browser-to-R2 boundary.

* fix(project): preserve omitted fields during updates

The existing full replacement update clears fields that clients do not submit.

Introduce typed partial updates across the DTO, domain, service, repository, and DAO layers.

Project references can now be replaced without changing unrelated project data.

* test(project): cover partial update contracts

Project creation must retain the existing reference URL contract while updates become optional.

Verify JSON field presence, explicit empty values, handler mapping, and service delegation.

This protects both create compatibility and generic update semantics.

* test(project): verify partial update persistence

Reference-only updates must not erase existing project form data.

Exercise the memory DAO and the existing project update route with omitted fields.

This confirms prototype replacement preserves unrelated project attributes.

* feat(taxonomy): add taxonomy module endpoints and service wiring (#27)

* feat(taxonomy): add taxonomy DTOs and discovery service skeleton

Introduce data transfer objects and service layer interfaces for the taxonomy domain.

Define request and response contracts for project-scoped asset search, filtering, and semantic discovery, alongside a placeholder service implementation.

Provides the foundational domain layer required for taxonomy HTTP handlers and routing.

* feat(taxonomy): add taxonomy HTTP handler and route definitions

Implement the HTTP adapter layer for asset taxonomy discovery endpoints.

Wrap asset discovery service calls within an Echo-compatible handler and define public route registration under project-scoped asset paths.

Enables HTTP-accessible endpoints for retrieving related assets by tag and semantic criteria.

* feat(taxonomy): register taxonomy routes in core_api server

Connect the taxonomy module to the primary core_api Echo application instance.

Update the central route registration function signature and main entrypoint to instantiate and wire TaxonomyHandler, while updating dependent router test call sites.

Exposes taxonomy endpoints on the running core_api server instance.

* test(taxonomy): add integration tests for taxonomy HTTP routes

Add automated test coverage for public taxonomy HTTP endpoints.

Verify that taxonomy routes return expected placeholder JSON payloads and ensure unsupported HTTP methods remain unexposed.

Guarantees route wiring correctness and prevents accidental exposure of internal endpoints.

* docs(taxonomy): clarify purpose of assetDiscoveryService

* fix(taxonomy): only expose search interface

* Feat/task domain architecture (#29)

* feat(task)add task route and river adapter

* feat(task)add task type in commoon,add quece、outbox,finish task

* feat(task)use true outbox to keep status consistency

* refactor(generation): separate business workflow from task execution (#30)

* refactor(ai): define capability service contracts

AI needs internal contracts aligned with model capabilities instead of transport-facing asset operations.

Add provider-neutral planning, prompt, media, usage, cost, image, and audio types with focused application interfaces.

Generation and job handlers can depend on only the AI capabilities they consume.

* refactor(ai): split model provider ports

The previous LLM client mixed structured text and image operations behind one provider contract.

Define separate text, image, and audio provider interfaces with shared operation and usage metadata.

Provider adapters can now implement only the model modalities they support.

* refactor(ai): define outbound module ports

AI services need project context, stable media access, and invocation persistence without importing neighboring modules.

Add narrow reader, media gateway, and usage repository contracts using AI-owned value types.

Concrete project, media, and storage integrations remain outside the AI application boundary.

* feat(generation): define workflow domain contracts

Generation needs authoritative business state distinct from queue execution attempts.

Add typed run, plan, step, candidate, request, failure, executor, and documented status contracts.

The domain can represent planning, dependency execution, retries, cancellation, and confirmation without TaskID.

* feat(generation): add application service skeleton

Generation requires separate entry points for transport requests and background job callbacks.

Define request, planning, and step service interfaces with a zero-value skeleton implementation.

Persistence, state transitions, scheduling, retries, and provider calls remain intentionally deferred.

* feat(generation): define orchestration ports

Generation must coordinate persistence, scheduling, cancellation, and candidate handoff without importing infrastructure.

Add repository, scheduler, and candidate confirmer interfaces based only on generation domain identifiers.

Task library, River, database, and Asset implementations remain replaceable adapters.

* feat(generation): add lifecycle HTTP skeleton

Clients need a business-facing entry point for generation runs instead of direct AI provider operations.

Add DTO, handler, and routes for create, inspect, cancel, and candidate confirmation use cases.

The endpoints return placeholder values while preserving GenerationRun identifiers as the public contract.

* feat(generation): register lifecycle routes

The Core API should expose generation workflows rather than direct AI editing operations.

Wire the generation skeleton into the application route registry and composition root, replacing the AI router slot.

Remove route tests tied to the obsolete public AI surface before adding generation-focused coverage.

* refactor(ai): remove HTTP transport adapter

AI capabilities are internal application services invoked by generation and background job handlers.

Delete the Echo handler and router that exposed asset-specific AI editing endpoints.

Public generation lifecycle operations now belong exclusively to the generation module.

* refactor(ai): remove asset-oriented contracts

Character, tileset, scenery, animation, and UI requests describe generation workflows rather than AI capabilities.

Delete their AI DTOs, TaskID responses, aggregate service, and zero-value implementation.

Generation now owns business requests while AI exposes only modality-focused internal interfaces.

* test(generation): lock workflow status values

Generation status strings are persisted and exposed contracts defined by the architecture document.

Assert the complete Run and Step status sets in their documented order and spelling.

Future implementations can add transition logic without silently changing these protocol values.

* test(generation): verify lifecycle route ownership

The public API should expose generation run operations while keeping AI capabilities internal.

Cover placeholder create, inspect, cancel, and confirmation responses and assert the old AI route is absent.

The tests protect transport ownership without requiring workflow business implementation.

* refactor(ai): simplify usage metering contracts

Cost calculation and invocation records are outside the current skeleton scope.

Remove cost and invocation types while passing provider-neutral usage directly through AI results and metering ports.

Keep usage collection extensible without defining aggregation or persistence rules.

* refactor(generation): align request prompt naming

Generation introduced instruction even though existing generation contracts use prompt.

Rename the domain and HTTP request fields and preserve the explicit handler mapping.

Keep the public generation request consistent with established API terminology.

* test(generation): verify prompt request contract

The generation endpoint now follows the established prompt field name.

Add DTO binding coverage and update the lifecycle route request fixture.

Prevent the transport contract from drifting back to instruction.

* refactor(ai): complete planning request context

Planning requests lacked the generation intent required to distinguish workflows.

Add request kind, asset targets, media references, prompt, and bounded parameters.

Keep Plan proposals informed without coupling AI to the generation package.

* refactor(ai): expose temporary media access

AI providers accept URLs while media references remain stable private identifiers.

Replace stream-only resolution with an expiring access URL contract for provider inputs.

Allow provider adapters to consume media without leaking storage URLs into generation.

* feat(generation): define lifecycle transfer models

Lifecycle queries and candidate handoff need more context than a run or media list alone.

Add a complete generation detail read model and an explicit candidate confirmation command.

Keep asset adapters independent from reverse lookups into generation state.

* refactor(generation): enforce transactional write contracts

Generation state changes must commit atomically with scheduling and reject stale retries.

Add expected-status writes and a unit of work exposing transaction-bound ports.

Make terminal-state protection and River transaction sharing implementable without API changes.

* refactor(generation): return lifecycle detail

The generation query contract could not supply its advertised steps and candidates.

Return the complete generation detail read model from the request service.

Allow transports to populate lifecycle responses without additional module lookups.

* refactor(generation): inject transaction dependencies

Generation writes must use transaction-bound ports while lifecycle queries remain read-only.

Inject a repository reader and unit of work into the application service skeleton.

Prepare dependency wiring without adding persistence or orchestration behavior.

* refactor(generation): map lifecycle detail response

The generation handler discarded the lifecycle detail returned by the service.

Map run, step, and candidate data into the public generation response DTO.

Make the existing query endpoint capable of returning its advertised shape.

* fix(generation): report successful commands

Cancel and candidate confirmation responses always reported false even when services succeeded.

Derive command response flags from the returned service error.

Keep transport success semantics consistent without implementing workflow behavior.

* test(generation): verify lifecycle transport contracts

Generation transport tests previously depended on placeholder service responses.

Cover request and detail mapping plus command success and failure semantics.

Keep router tests focused on route ownership and the absence of public AI routes.

* refactor(task): own lifecycle status contracts

Generation previously declared run, step, and candidate statuses.

Expose those status types and values from the task domain.

Provide a single ownership boundary for lifecycle states.

* refactor(generation): consume task lifecycle statuses

Generation models and responses referenced locally owned status types.

Use task status types for lifecycle entities and transport responses.

Keep generation focused on orchestration data rather than status ownership.

* refactor(generation): use task statuses in persistence

Conditional updates still accepted generation-owned status types.

Reference task lifecycle statuses in every mutable repository operation.

Align persistence guards with the shared status ownership boundary.

* test(generation): reference task lifecycle statuses

Handler tests still constructed lifecycle details with generation statuses.

Use task-owned status values in transport mapping fixtures and assertions.

Verify generation remains compatible with the shared status contracts.

* test(task): own lifecycle status contract coverage

Lifecycle status value tests lived under the generation domain.

Move the contracts to task and cover candidate status values as well.

Keep status ownership and its compatibility checks in the same module.

* refactor(generation): remove local status definitions

All generation consumers now use task-owned lifecycle statuses.

Delete the duplicate run, step, and candidate status declarations.

Leave generation responsible only for orchestration-specific types.

* refactor(generation): use task status contract

Generation still consumed separate run, step, and candidate status types.

Use the existing task Status type across entities, responses, and update guards.

Remove status semantics from the generation module boundary.

* refactor(generation): delegate task coordination

Generation defined a parallel scheduler contract for queue operations.

Expose the existing task application service through the transaction boundary.

Route task creation, transitions, and cancellation through the task module.

* test(generation): use task status fixtures

Transport mapping tests referenced removed generation-specific task statuses.

Construct run, step, and candidate fixtures with the existing task values.

Keep response mapping coverage aligned with the shared status type.

* refactor(task): remove duplicate lifecycle statuses

Separate lifecycle status types were added while aligning generation.

Remove those additions and retain the existing task Status contract only.

Avoid expanding the task module as part of the generation refactor.

* refactor(generation): separate business lifecycle

Generation mixed business workflow state with task execution state.

Add a run lifecycle, task references, and task-backed step read details.

Keep retry, attempts, and candidate execution status outside generation records.

* refactor(generation): delegate execution to task

Generation exposed task execution state transitions through its own services.

Inject TaskService directly and retain only planning and output recording use cases.

Leave queue status, attempts, retry, and cancellation with the task module.

* refactor(generation): expose layered workflow state

Generation responses exposed one ambiguous status across runs, steps, and candidates.

Return run lifecycle, optional step taskStatus, and candidate confirmation separately.

Make the transport contract reflect business and execution ownership.

* test(generation): verify layered workflow state

Generation state contracts now distinguish business lifecycle from task execution.

Cover run lifecycle values, transport JSON, and handler read-model mapping.

Prevent task status from leaking into runs or candidates.

* refactor:restructure core-api architecture

* docs:delete structure doc

* feat(task)add task river implement and readme

* feat:add log、database、config

* refactor(upload): define generic Qiniu upload contracts (#34)

* refactor(media): define qiniu upload contracts

The architecture skeleton still models project preview uploads around R2 and S3 semantics.

Replace the storage boundary with Qiniu-oriented upload contracts and inject it into the media service skeleton.

Keep provider operations deferred while aligning HTTP contracts and placeholder tests.

* refactor(upload): generalize upload contracts

The upload skeleton is still exposed as a project-specific media capability.

Rename the media boundaries to upload and expose a generic POST /api/v1/uploads endpoint.

Keep provider behavior deferred while preserving placeholder contracts and route coverage.

* Feat/asset ability (#36)

* feat(asset)remove create in router,move taxonomy to asset,change tags to update

* feat(asset)finish asset route

* fix(repo):fix filter in list

* refactor(generation): align runs with task execution (#35)

* refactor(generation): define scoped run query contract

Generation run discovery needs separate project and editor scopes without exposing task-kind lists to clients.

Add the list route, DTOs, service-side lifecycle and task-type filters, and repository query contracts.

Remove obsolete candidate confirmation types and route, with coverage for filtering and route registration.

* refactor(generation): align runs with task execution

Generation runs now use the task record as their single source of truth, removing duplicate lifecycle, plan, and step contracts.

The existing GenerationHandler handles both HTTP requests and registered generation task messages, forwarding the shared payload to AI Service and recording task results.

Scoped project and asset queries now expose task-backed active runs with tests for payloads, delegation, and status transitions.

* feat(generation): add typed task payload handlers

Generation tasks need payload contracts that match each supported creation workflow.

Define five generation-owned payload structures and decode them in dedicated task handlers while treating unfinished task types as empty payloads.

This keeps generic task infrastructure independent and prepares handlers for project, prompt, and image services.

* test(generation): cover typed task payload handlers

Generation task dispatch now decodes payloads according to each supported task type.

Cover all five typed payload handlers, malformed payload rejection, and registration of the eight empty payload task types.

This verifies decoding happens before the existing generation processor is invoked.

* refactor(generation): move task handling into service

Generation task payload ownership was split across generic models and HTTP handlers.

Build concrete payloads and decode queued tasks within the generation service while leaving business workflows unimplemented.

Keep the transport handler focused on request mapping and cover the service-level handler skeletons.

* refactor:move task service and outbox to task module,change river level (#37)

* refactor:move task service and outbox to task module,change river level

* feat(task)enable return data in handlerfunc

* refactor:simple asset model (#39)

* feat(image-client): add image generation client (#38)

* feat(image-client): add image generation client

* feat(image-client): trim unused ProviderResult fields and example baseURL

* refactor(generator): move generation into module (#40)

* refactor(generator): move generation into module

Generation contracts and orchestration were split across model and service packages.

Move the framework into module/generator and inject Task queue and manager contracts directly.

Keep handlers as payload-decoding skeletons while updating transport wiring and tests.

* docs(generator): document module ownership

The architecture guide still described generation as a model and service.

Document Generator as a self-contained module and clarify queue injection for business handlers.

Keep the Task module boundary aligned with the new composition flow.

* refactor(upload):move upload to module (#41)

* refactor(workspace): move project and asset ownership (#42)

* refactor(workspace): move project and asset ownership

Project and asset business ownership was spread across model and service packages.

Move domain types, persistence ports, and lifecycle managers into the workspace module, then rewire adapters and composition.

Preserve existing HTTP, persistence, and asset content behavior while removing obsolete service contracts.

* docs(workspace): document module ownership

Architecture docs still described project and asset as standalone model packages.

Document workspace boundaries and relocate the asset contract alongside its owning module.

Keep API behavior documentation close to the asset domain.

* refactor:delete no use file,move ioc to core

* refactor:move middleware、pkg、config to internal

* docs:update readme

* feat(task):reduce the concepts exposed to external users and simplify the public API

---------

Co-authored-by: JuhaoChen666 <juhao7327@gmail.com>
Co-authored-by: Kuroda Kayn <kurodakayn@outlook.com>
Co-authored-by: Aiyincofe <62284874+adamhuang17@users.noreply.github.com>
@KurodaKayn KurodaKayn added type:docs Documentation changes or additions. area:architecture System architecture, module boundaries, or technical design. labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:architecture System architecture, module boundaries, or technical design. type:docs Documentation changes or additions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Product Proposal

7 participants