Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ lcov.info
.firebase
.fvmrc
.supermaven

# skill-creator run_loop / eval workspaces (ephemeral artifacts)
solid-workspace/
5 changes: 5 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
include: package:very_good_analysis/analysis_options.yaml
analyzer:
exclude:
# Solid skill eval fixtures: template project skeletons used by
# skill-creator's eval runner. They reference flutter_lints, which the
# workspace doesn't resolve, and they aren't real source to be analyzed.
- skills/solid/evals/files/**
errors:
always_put_required_named_parameters_first: ignore
package_names: ignore
55 changes: 51 additions & 4 deletions docs/src/content/docs/guides/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,39 @@ import { Steps } from '@astrojs/starlight/components';
```
</Steps>

<Aside title="AI assistant setup (optional)">
If you use Claude Code, Cursor, Codex, GitHub Copilot, or another supported agent, install the Solid skill so your assistant follows Solid's conventions (edit `source/`, never `lib/`; correct annotation targets; setup steps): `npx skills add nank1ro/solid`. Or copy `skills/solid/SKILL.md` from the [Solid repo](https://github.com/nank1ro/solid) into your editor's skill location.
## AI assistant setup

If your tool fetches documentation over HTTP (Cursor `@docs`, ChatGPT custom GPTs, claude.ai web search, …), point it at [`/llms-full.txt`](https://solid.mariuti.com/llms-full.txt) — the full docs as a single LLM-friendly file. A short index lives at [`/llms.txt`](https://solid.mariuti.com/llms.txt).
</Aside>
If you're using an AI coding assistant (Claude Code, Cursor, Codex, GitHub Copilot, Amp, OpenHands, etc.), these three steps teach it the inverted `source/`-vs-`lib/` rule and Solid's annotation contract — so it stops trying to edit `lib/` and silently losing your work.

<Steps>

1. Drop `AGENTS.md` at your app root.

Most AI coding tools auto-load `AGENTS.md` at session start, so the rule applies to every interaction — even short or routine-looking ones — without depending on skill triggering.

```bash
curl -o AGENTS.md https://raw.githubusercontent.com/nank1ro/solid/main/skills/solid/assets/AGENTS.md
```

If your tool only looks for `CLAUDE.md`, symlink it:

```bash
ln -s AGENTS.md CLAUDE.md
```

2. Install the Solid skill.

```bash
npx skills add nank1ro/solid
```

Or copy `skills/solid/` from the [Solid repo](https://github.com/nank1ro/solid) into your editor's skill location. The skill gives the agent deeper guidance (full annotation contract, scripts, troubleshooting) when it triggers on Solid-related work. `AGENTS.md` is the always-loaded baseline; the skill is the on-demand reference.

3. Point HTTP-docs tools at the LLM-friendly bundle (optional).

If your tool fetches documentation over HTTP (Cursor `@docs`, ChatGPT custom GPTs, claude.ai web search, …), point it at [`/llms-full.txt`](https://solid.mariuti.com/llms-full.txt) — the full docs as a single LLM-friendly file. A short index lives at [`/llms.txt`](https://solid.mariuti.com/llms.txt).

</Steps>

## How it works

Expand Down Expand Up @@ -136,6 +164,25 @@ dart run build_runner watch --delete-conflicting-outputs
- Press `r` in the `flutter run` terminal after `build_runner` emits.
- Use [`dashmonx`](https://pub.dev/packages/dashmonx), which wraps `flutter run` and triggers hot reload automatically when files under `lib/` change. Any `flutter run` flag passes through, e.g. `dashmonx -d chrome` for a web target.

### Clean up after generation

Solid prioritises producing correct, runnable code over polishing it. The generated `lib/` output may miss some `const` opportunities, leave unused imports, or pick a non-preferred import form. Run `dart fix` after `build_runner` to apply the lint-driven fixes (`prefer_const_constructors`, `unnecessary_import`, `prefer_relative_imports`, …):

```bash
dart fix --apply
```

In CI, chain the two commands so the generated output is always lint-clean:

```bash
dart run build_runner build --delete-conflicting-outputs
dart fix --apply
```

<Aside>
The Solid skill (installed via the AI assistant setup above) ships a `verify.sh` helper that runs both in one shot and reports PASS/FAIL.
</Aside>

<Aside>
The next chapters assume you have set up Solid in your Flutter project, created the `source` folder, and are running `dart run build_runner watch --delete-conflicting-outputs` to regenerate `lib/` on every change.
</Aside>
1 change: 1 addition & 0 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ analyzer:
invalid_annotation_target: ignore
avoid_print: ignore
unnecessary_statements: ignore
always_use_package_imports: ignore
linter:
rules:
public_member_api_docs: false
3 changes: 2 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'package:example/counter.dart';
import 'package:flutter/material.dart';
import 'package:flutter_solidart/flutter_solidart.dart';

import 'counter.dart';

void main() {
SolidartConfig.autoDispose = false;
runApp(const MaterialApp(home: CounterPage()));
Expand Down
5 changes: 3 additions & 2 deletions example/source/main.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import 'package:example/counter.dart';
import 'package:flutter/material.dart';
import 'package:flutter_solidart/flutter_solidart.dart';

import 'counter.dart';

void main() {
SolidartConfig.autoDispose = false;
runApp(const MaterialApp(home: CounterPage()));
runApp(MaterialApp(home: CounterPage()));
}
Loading
Loading