Skip to content

Commit 5842173

Browse files
authored
Add repository-specific Copilot onboarding instructions (#51)
1 parent 5fc2298 commit 5842173

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

‎.github/copilot-instructions.md‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Copilot Coding Agent Instructions for SuperDeck
2+
3+
## What this repository is
4+
- SuperDeck is a Melos monorepo for a Flutter presentation framework that renders Markdown slides.
5+
- Main packages:
6+
- `packages/core`: Markdown parsing, schemas, validation (Dart-only)
7+
- `packages/superdeck`: Flutter runtime/widgets
8+
- `packages/cli`: `superdeck` CLI commands
9+
- `packages/builder`: code generation/build integration
10+
- `demo/`: reference app and slide content used by CI smoke/integration flows
11+
12+
## First-time setup (required)
13+
Use the repo-pinned Flutter SDK via FVM to avoid version drift.
14+
15+
```bash
16+
fvm use --force
17+
dart pub global activate melos
18+
melos bootstrap
19+
```
20+
21+
> Required by workspace config: Dart `>=3.10.0`, Flutter `>=3.38.1`.
22+
23+
## High-signal commands (run from repo root)
24+
- Analyze: `melos run analyze`
25+
- Auto-fix: `melos run fix`
26+
- Generate code: `melos run build_runner:build`
27+
- Unit/widget tests: `melos run test`
28+
- Integration tests (Linux): `melos run test:integration`
29+
- Web smoke tests: `melos run test:e2e:web`
30+
31+
## Agent workflow expectations
32+
1. Keep changes surgical and package-scoped.
33+
2. Run `melos run build_runner:build` before tests when touching code that can affect generated output.
34+
3. Commit generated files when they change (`*.g.dart`, `*.mapper.dart`).
35+
4. Prefer relative imports in Dart files.
36+
5. Follow existing style: two-space indentation, `snake_case.dart` filenames.
37+
38+
## Known pitfalls and fixes
39+
- **Missing toolchain locally (`fvm: command not found`, `dart: command not found`)**
40+
- Cause: environment does not have Dart/FVM preinstalled.
41+
- Workaround: install Dart, then install FVM and Melos, then bootstrap:
42+
```bash
43+
dart pub global activate fvm
44+
export PATH="$HOME/.pub-cache/bin:$PATH"
45+
fvm use --force
46+
dart pub global activate melos
47+
melos bootstrap
48+
```
49+
50+
- **CI failure while building demo assets (`fvm dart run superdeck_cli:main build`)**
51+
- Observed error:
52+
- `Invalid YAML frontmatter in slide ... Error on line 1, column 1: Unexpected character.`
53+
- Triggering content starts with `@section {`.
54+
- Workaround: fix invalid slide frontmatter/config in demo slide content before rerunning CI.
55+
56+
## CI notes
57+
- Main validation workflow: `.github/workflows/test.yml`
58+
- CI sequence is effectively: bootstrap -> build_runner -> contracts check -> tests/integration/web smoke.
59+
- If CI fails in Integration/Web Smoke at "Build SuperDeck Assets", inspect demo slide syntax and frontmatter first.

0 commit comments

Comments
 (0)