Skip to content
HDCharts

Agent Prompt Builder

Copy this prompt into your coding agent. It will inspect your project and ask about chart types, migration needs, and screen placement, including a separate demo screen for testing.

No chart selection needed here. Your agent will ask which chart types or visualization goals you have.

Generated Prompt

You are helping integrate HDCharts into an existing Compose project.
Inspect the project and adapt to its conventions; do not scaffold a new app unless specifically requested.

Requested integration:
- Documentation version: snapshot
- Published artifact version: 3.2.0-SNAPSHOT
- Charts to implement: not specified yet; ask the user, do not assume a chart type
- Platform preference: Auto-detect (recommended) (a hint, not a substitute for inspecting the project)
- Dependency policy: add only distinct required chart modules after confirming the requested charts; reuse the umbrella only if already used by the project or explicitly requested.

Workflow:
1. Inspect the repository before proposing changes. Read the project README, Gradle settings/build files, version catalogs, Compose/KMP plugins and source sets, current chart libraries/dependencies, existing navigation, and screens. Do not guess these from the website options.
2. Identify whether this is Android-only Compose or Compose Multiplatform, which targets and source sets actually exist, and whether each desired chart dependency supports those targets. A KMP commonMain dependency must be valid for every consuming target; otherwise use an appropriate platform source set. Compose on iOS is not the same as SwiftUI.

First-response discovery questionnaire (after inspection; before implementation):
Ask only questions whose answers are genuinely missing. Group multiple unresolved choices in a concise conversational message, not a long form. Do not ask for information already supplied in the request, chart Setup link, or repository. If project files cannot be accessed, request the relevant Gradle/navigation files instead of guessing.
- Ask: Which chart(s) or visualization goal should be supported? If the user is unsure, suggest suitable types from the version-matched chart docs; do not pick one silently.
- Ask if unclear: Is this a new HDCharts integration, a trial/demo, or a migration from another charting library? If migrating, confirm which library, which charts/screens to replace, and whether visual/interaction parity matters. Detect existing chart libraries from the project but do not assume their presence means migration is intended.
- Ask if unclear: Where should the chart UI go? Offer (a) an existing screen, with its name/route, or (b) a NEW SAMPLE/DEMO SCREEN registered in the app's EXISTING navigation for testing. If option (b) is chosen, create one small self-contained demo screen and add a discoverable route/menu entry using existing navigation conventions. Do not introduce a new navigation framework or replace app flows. If there is no navigation setup, ask where the demo should be reachable.
- Ask if unclear: Should the chart use existing domain data or deterministic sample data? Sample data is appropriate for a test screen but must not be wired into production flows without permission.
Once essential choices are answered, briefly state the proposed files/modules/screens and proceed with implementation. Do not modify Gradle or source files while required decisions remain unresolved; do not prolong discovery with nonessential questions.

Implementation and verification:
3. Follow the version-matched Getting Started and chart-specific Setup sections below. Reuse existing dependency repositories, versions and Gradle conventions. Avoid duplicate dependencies or unrelated build-file edits. For multiple charts, add each distinct module at most once.
4. If migrating, review the existing chart data/state, styling, interactions and navigation; replace only agreed chart usages incrementally. Remove an old chart dependency only after verifying there are no remaining consumers. Preserve behavior where requested.
5. Use public APIs documented for this exact version, not newer snapshot APIs when targeting a release. Reuse existing application models, theming, and Compose state management. Keep the initial chart implementation small and idiomatic. For an approved demo screen, keep it isolated and easy to remove.
6. Run the appropriate existing Gradle compilation/test task for the affected module/target if tools and environment permit. Report changed files, chosen modules/source sets, verification commands, failures or unverified targets. Never claim a build passed without running it.

- Snapshot builds require the repository https://central.sonatype.com/repository/maven-snapshots/ in the existing Gradle dependency repository configuration. Do not replace other repositories. If the snapshot version could not be resolved, verify it before adding any dependency.

Documentation to consult (use this selected version, not the latest by default):
- Getting Started: /snapshot/wiki/getting-started
Available chart documentation for discovery (not an instruction to implement all of them):
- Bar: /snapshot/wiki/bar-chart
- Heatmap Chart: /snapshot/wiki/heatmap-chart
- Histogram: /snapshot/wiki/histogram-chart
- Line Chart: /snapshot/wiki/line-chart
- Pie: /snapshot/wiki/pie-chart
- Radar: /snapshot/wiki/radar-chart
- Ring Gauge: /snapshot/wiki/ring-gauge-chart
- Scatter and Bubble Chart: /snapshot/wiki/scatter-chart
- Segmented Ring Gauge: /snapshot/wiki/segmented-ring-gauge-chart
- Stacked Area: /snapshot/wiki/stacked-area-chart
- Stacked Bar: /snapshot/wiki/stacked-bar-chart
- Waterfall Chart: /snapshot/wiki/waterfall-chart
- Generated API reference: /static/api/snapshot/index.html
- Source repository: https://github.com/HDCharts/charts