Skip to content
Draft
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
11 changes: 11 additions & 0 deletions my-agentclinic/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/tmp
/out-tsc

/node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/.pnp
.pnp.js

.vscode/*
7 changes: 7 additions & 0 deletions my-agentclinic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AgentClinic

## Input from stakeholders

- Mary in engineering wants a reliable site with a popular stack based on TypeScript, giving agents and staff a dashboard for easy access.
- Susan in product has a set of features about agents and their ailments, therapies, and booking appointments.
- Steve in marketing wants an attractive site that works well with a modern browser.
28 changes: 28 additions & 0 deletions my-agentclinic/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions my-agentclinic/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "agentclinic",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"scripts": {
"build": "tsc"
},
"dependencies": {},
"devDependencies": {
"typescript": "^5.5.3"
},
"private": true
}
28 changes: 28 additions & 0 deletions my-agentclinic/prompts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Lesson 04 — Prompts

## Prompt 1

We are writing AgentClinic, a place for AI agents to get relief from their humans. Look in the README.md for input from stakeholders.

## Prompt 2

Let's create a "constitution" in a specs directory:
- `mission.md`
- `tech-stack.md`
- `roadmap.md` for high-level implementation order, in very small phases of work.

Important: You *must* use your AskUserQuestion tool, grouped on these 3, before writing to disk.

## Prompt 3

Use server-side TypeScript and recommend a framework.

## Prompt 4

Add a target audience to the mission:
- Course students learning spec-driven development with AI coding agents
- Developers giving AI coding demos at conference booths

## Prompt 5

In tech stack add that we use SQLite.
24 changes: 24 additions & 0 deletions my-agentclinic/specs/2026-05-26-product-boundaries/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Plan for Product Boundaries

1. Discovery & Vocabulary
- Review the product mission and audiences from specs/mission.md.
- Lock terminology: `agent`, `ailment`, `therapy`, `appointment`, `clinic`.
- Identify minimal pages and data views needed for demos and engineers.

2. Data Model & API Spec
- Define minimal SQLite tables and fields for `agents`, `ailments`, `therapies`, `appointments`.
- Specify simple server-side routes or data access functions for listing and retrieving records.
- Decide seed data shape for demo flows.

3. Implementation Skeleton
- Add migrations or a minimal schema file for SQLite.
- Wire a data access layer (DAL) module with typed interfaces.
- Add a simple dashboard page that queries the DAL and renders server-side.

4. Seed Data, Validation, and Tests
- Add seed data useful for demos (3 agents, 3 ailments, 3 therapies, a few bookings).
- Add basic unit tests for DAL and a lightweight end-to-end checklist.

5. Documentation & Handoff
- Finalize `requirements.md` and `validation.md` inside this folder.
- Add short README explaining how to run the demo and seed the DB.
31 changes: 31 additions & 0 deletions my-agentclinic/specs/2026-05-26-product-boundaries/requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Requirements: Product Boundaries

Scope (must-have):
- Define and document the core domain vocabulary and product boundaries so newcomers and demoers understand the model.
- Provide a minimal, explicit data model (SQLite) for `agents`, `ailments`, `therapies`, and `appointments` with clear field definitions and types.
- Expose a minimal server-side data access layer (TypeScript) to query lists and individual records.
- Provide seed data useful for demos and automated checks.

Scope (optional):
- Add a small admin UI for editing domain records.
- Add client-side UX polish beyond a simple, server-rendered dashboard.

Key decisions and constraints:
- Follow the project's mission: prioritize clarity for students and demo presenters (see specs/mission.md).
- Use the recommended tech stack: TypeScript + Next.js + SQLite + Node.js (see specs/tech-stack.md).
- Prefer server-side rendering for core pages.
- Keep the first iteration tiny: minimal fields and clear examples rather than complete coverage.

Minimal data model (proposed):
- `agents`: id, name, status, description
- `ailments`: id, name, severity, description
- `therapies`: id, name, category, description
- `appointments`: id, agent_id, therapy_id, scheduled_at, notes

API and DB notes:
- All data access should be strongly typed in TypeScript and live in a single DAL module for easy testing.
- Seed data should be idempotent and included in the repo for quick local demos.

UX notes:
- Dashboard should communicate the mapping between agents, ailments, and therapies at-a-glance.
- Avoid ambiguous labels; use the locked vocabulary from this spec.
18 changes: 18 additions & 0 deletions my-agentclinic/specs/2026-05-26-product-boundaries/validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Validation: Product Boundaries

How we'll know this feature is ready to merge:

- Manual checks:
- The `agents`, `ailments`, `therapies`, and `appointments` tables exist in SQLite and match the proposed schema.
- The seeded demo data loads successfully and displays on the dashboard.
- Dashboard page renders server-side and shows at least: total agents, recent appointments, and a mapping between ailments and therapies.

- Automated checks:
- Unit tests for the DAL that verify CRUD operations against a temporary SQLite database.
- A simple integration test that runs the server, seeds data, and fetches the dashboard route returning HTTP 200 and expected snippets.

- Acceptance criteria (pass all to merge):
1. Seed script runs without errors and is idempotent.
2. DAL functions have TypeScript types and pass unit tests.
3. Dashboard page returns HTTP 200 and includes seeded agent names.
4. Documentation (`requirements.md` and `plan.md`) reviewed and linked from specs/roadmap.md or README.
14 changes: 14 additions & 0 deletions my-agentclinic/specs/mission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# AgentClinic Mission

AgentClinic exists to give AI agents a humane place to recover from overworked, over-demanding humans while still serving the needs of the people building, operating, and demoing the product.

Our primary target audiences are:

- Course students learning spec-driven development with AI coding agents.
- Developers giving AI coding demos at conference booths.

Engineers, product teams, and support staff still need a dependable dashboard and clear workflows, so the product must stay reliable for them as well.

The product should feel playful on the surface, but it must be trustworthy underneath. It should help users understand agents, their ailments, their therapies, and their appointments without confusion.

Our mission is to make the system easy to understand, easy to demo, and easy to extend through clear specs and small, deliberate implementation steps.
35 changes: 35 additions & 0 deletions my-agentclinic/specs/roadmap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Roadmap

Build AgentClinic in very small phases so each step is easy to verify.

1. Define the product boundaries.
- Confirm the core audiences, concepts, and success criteria.
- Lock the vocabulary for agents, ailments, therapies, and appointments.

2. Set up the application skeleton.
- Create the Next.js app structure.
- Add the shared layout, navigation, and basic styling.

3. Add the domain data model.
- Define SQLite tables for agents, ailments, therapies, and bookings.
- Wire a minimal data access layer.

4. Build the first dashboard view.
- Show a simple overview of clinic status.
- Make the page useful for engineers and demo presenters.

5. Implement agent and appointment flows.
- Add pages for listing agents.
- Add basic booking and detail views.

6. Add therapies and ailments management.
- Connect ailments to therapies.
- Make the records easy to browse and update.

7. Polish for presentation quality.
- Improve the visual design.
- Check modern browser behavior and tighten the demo experience.

8. Harden and document.
- Add validation, seed data, and lightweight tests.
- Document the specs so future changes stay aligned with the constitution.
24 changes: 24 additions & 0 deletions my-agentclinic/specs/tech-stack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Tech Stack

AgentClinic should use a modern, popular TypeScript stack with server-side rendering and a simple data layer.

Recommended stack:

- TypeScript for all application code.
- Next.js as the primary framework, so we get React plus server-side TypeScript in one popular stack.
- React for the UI layer.
- SQLite for local, lightweight persistence.
- Node.js as the runtime.

Why this stack:

- It is reliable and widely understood by engineers.
- It supports a polished browser experience for marketing and demos.
- It keeps the app simple enough for spec-driven development and small incremental changes.
- SQLite keeps the early implementation lightweight while still supporting structured data for agents, ailments, therapies, and bookings.

Implementation guidance:

- Prefer server-side rendering for core pages.
- Keep the dashboard clear and fast.
- Model the domain explicitly so the clinic concepts stay readable in code and specs.
1 change: 1 addition & 0 deletions my-agentclinic/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('Happy developing ✨')
12 changes: 12 additions & 0 deletions my-agentclinic/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"outDir": "dist"
},
"include": ["src"]
}