fluffychat/.github/copilot-instructions.md
wcjord dec473d579
Writing assistance (#5598)
* feat: wa working full stack

* feat: writing assistance made anew

* docs: migrate copilot docs to .github/instructions/ format

- Create choreographer.instructions.md (applyTo: lib/pangea/choreographer/**)
- Create events-and-tokens.instructions.md (applyTo: lib/pangea/events/**,lib/pangea/extensions/**)
- Create modules.instructions.md (applyTo: lib/pangea/**) — full module map
- Track copilot-instructions.md (remove .gitignore rule)
- Add documentation reference table to copilot-instructions.md

Content sourced from docs/copilot/ on writing-assistance branch.

* docs: remove old docs/copilot/ (migrated to .github/instructions/)

* docs: update choreographer + modules docs for writing-assistance audit

- Mark IT (Interactive Translation) as deprecated throughout
- Document new ReplacementTypeEnum taxonomy (grammar, surface, word-choice categories)
- Add AssistanceStateEnum, AutocorrectPopup, feedback rerun flow
- Mark SpanDataRepo/span_details as dead code
- Mark SpanChoiceTypeEnum.bestCorrection/bestAnswer as deprecated
- Add new files to modules listing (autocorrect_popup, start_igc_button, etc.)
- Update API endpoints table with active/deprecated/dead status

* formatting, replace deprecated withOpacity calls

* fix linter issues from deprecated types

* use better error color

* move cloing of overlays into choreographer

* reduce duplicate code on igc_controller, update UI on feedback

* couple of adjustments

* display prompt in span card by type

* fix error in tests

* translations

* simplify span card feedback

---------

Co-authored-by: ggurdin <ggurdin@gmail.com>
2026-02-09 15:55:18 -05:00

2.4 KiB

You own the docs. Three sources of truth must agree: docs, code, and prior user guidance. When they don't, resolve it. Update .github/instructions/ docs when your changes shift conventions. Fix obvious factual errors (paths, class names) without asking. Flag ambiguity when sources contradict.

client - Flutter/Dart Language Learning Chat App

Tech Stack

  • Framework: Flutter (SDK ≥3.0), Dart
  • Base: Fork of FluffyChat (package name fluffychat)
  • Protocol: Matrix Client-Server API via matrix Dart SDK
  • Subscriptions: RevenueCat
  • Backend: 2-step-choreographer (FastAPI) via PApiUrls
  • Error Tracking: Sentry
  • Routing: GoRouter

Quick Reference

Project Structure

  • lib/pages/, lib/widgets/, lib/utils/, lib/config/ — FluffyChat base code
  • lib/pangea/All Pangea language-learning code (~30 feature modules)
  • pangea_packages/ — Shared isolate packages
  • Pangea modifications in FluffyChat files marked with // #Pangea ... // Pangea#

Key Files

  • Entry point: lib/main.dart
  • Root state: lib/widgets/matrix.dart (MatrixState)
  • Pangea controller: lib/pangea/common/controllers/pangea_controller.dart
  • Routes: lib/config/routes.dart
  • API URLs: lib/pangea/common/network/urls.dart
  • HTTP client: lib/pangea/common/network/requests.dart
  • Environment: lib/pangea/common/config/environment.dart (reads .env / config.sample.json)
  • Event types: lib/pangea/events/constants/pangea_event_types.dart
  • Choreographer: lib/pangea/choreographer/choreographer.dart

Conventions

  • Package imports use package:fluffychat/...
  • Feature modules follow pattern: models/, repo/ (API calls), widgets/, utils/, constants/
  • API repo files pair with request/response models (e.g., igc_repo.dart + igc_request_model.dart + igc_response_model.dart)
  • Controllers extend ChangeNotifier or use BaseController<T> (stream-based)

Documentation

Detailed guides auto-load from .github/instructions/ when editing matching files:

File Applies To Content
modules.instructions.md lib/pangea/** Full map of ~30 feature modules
choreographer.instructions.md lib/pangea/choreographer/** Writing assistance flow (IGC, IT, text editing)
events-and-tokens.instructions.md lib/pangea/events/**,lib/pangea/extensions/** Custom Matrix events, token model, event wrappers