Skip to content

Commit 07dbeaf

Browse files
rithviknishadCopilot
andcommitted
Enhancements to documentation agentic workflow
- ensure conventions of versioned docs are followed - ensure flows and concepts are using facing documentation and do not include technical stuff - specify which model to use Co-authored-by: Copilot <copilot@github.com>
1 parent 9261d9e commit 07dbeaf

4 files changed

Lines changed: 281 additions & 119 deletions

File tree

.claude/skills/care-flow-doc/SKILL.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: >-
88
"document how to do X", "the steps are out of date", or "this flow is missing".
99
Covers the quality bar (create-patient), the page structure, sourcing steps from
1010
care_fe rather than guessing, the manual flow sidebar, link/MDX conventions,
11-
3.0≡3.1 versioning, and build validation.
11+
the manual flow sidebar, link/MDX conventions, versioning, and build validation.
1212
---
1313

1414
# Building Care flow docs
@@ -17,13 +17,17 @@ A **flow** answers _"How do I…?"_ — it walks a user through one task in the
1717
start to finish. It is neither a concept (what a thing _is_) nor a reference (what
1818
fields it _has_). A reader arrives at a flow with a job to do.
1919

20-
Flows live at `versioned_docs/version-3.0/flows/<domain>/<slug>.mdx`, mirrored to
21-
`version-3.1`. One task per page.
20+
Flows live at `flows/<domain>/<slug>.mdx` under the versioned docs. Follow the shared
21+
conventions for which version to author in and how to mirror. One task per page.
22+
23+
A flow is **strictly user-facing**. Clinicians and operators read it. Never put code,
24+
file paths, class names, API endpoints, payloads, database columns or permission slugs
25+
in a flow.
2226

2327
## The quality bar
2428

25-
The gold standard is `versioned_docs/version-3.0/flows/clinical/create-patient.mdx`.
26-
**Read it every time.** Study how a good flow:
29+
The gold standard is `flows/clinical/create-patient.mdx`. **Read it every time.** Study
30+
how a good flow:
2731

2832
- Opens with one sentence naming the task and its end state ("the minimum path from
2933
search to a saved record ready for an encounter").
@@ -32,7 +36,10 @@ The gold standard is `versioned_docs/version-3.0/flows/clinical/create-patient.m
3236
- Separates **what you need before you start** from **the steps themselves**.
3337
- Numbers steps as `### 1. <imperative>` and keeps each one to a single decision.
3438
- Uses a table when a step has a set of fields, not a wall of prose.
35-
- Ends with what the user can do next, and the API equivalent for implementers.
39+
- Ends with what the user can do next.
40+
41+
It also carries an `## API equivalent` section. Do not copy that part: flows are now
42+
strictly user-facing, and the technical surface belongs in the reference doc.
3643

3744
## Naming
3845

@@ -53,8 +60,9 @@ Use the same `<domain>` folders as concepts and references.
5360
Mention a keyboard shortcut only if `care_fe/src/config/keyboardShortcuts.json`
5461
actually defines one for that action.
5562
- `## After <the task>` — what the user can do next, as a `| Next step | When |` table.
56-
- `## API equivalent` — the request an implementer would send, in an ```` ```http ````
57-
fence. Take the path and payload from the code, not from memory.
63+
64+
Do **not** add an API or payload section. Flows are user-facing; the technical surface
65+
belongs in the matching reference doc, which the flow can link to.
5866

5967
## Sources
6068

@@ -63,10 +71,9 @@ Use the same `<domain>` folders as concepts and references.
6371
navigation labels. Take every user-visible string from `public/locale/en.json`;
6472
enum display labels use keys shaped `PREFIX__value` (`encounter_status__in_progress`
6573
→ "In Progress"). Never print a raw codebase value in a flow.
66-
2. **`care`** — for the permission the task needs and the API equivalent. Trace the
67-
viewset's `authorize_*` hook to the permission slug the way the concept skill
68-
describes; state it in plain words ("a role with **patient create** permission"),
69-
not as a slug.
74+
2. **`care`** — for the permission the task needs. Trace the viewset's `authorize_*`
75+
hook to the permission slug the way the concept skill describes, then state it in
76+
plain words ("a role with **patient create** permission"), never as a slug.
7077
3. **The matching concept doc** — for the framing you link to, not to repeat.
7178

7279
If the UI does not match what you expected, the flow is wrong or the product changed.
@@ -76,10 +83,8 @@ Report the mismatch; do not write steps you have not verified.
7683

7784
This is the easiest thing to get wrong. Concepts and references are `autogenerated`
7885
from their folders, so a new file appears on its own. **Flows are not.** After adding a
79-
flow, append its doc id to the matching domain's `items` array in BOTH:
80-
81-
- `versioned_sidebars/version-3.0-sidebars.json`
82-
- `versioned_sidebars/version-3.1-sidebars.json`
86+
flow, append its doc id to the matching domain's `items` array in the sidebar file of
87+
every version you wrote to.
8388

8489
```json
8590
{ "type": "category", "label": "Clinical", "key": "clinical-flows",
@@ -101,24 +106,24 @@ shared conventions rather than assuming.
101106
### Creating a new flow
102107

103108
1. Read the `create-patient` gold standard.
104-
2. Trace the task through `care_fe`, and the permission and API through `care`.
109+
2. Trace the task through `care_fe`, and the permission through `care`.
105110
3. Write to `flows/<domain>/<slug>.mdx`.
106-
4. Add the doc id to both sidebar files.
107-
5. Mirror to 3.1, then build.
111+
4. Add the doc id to the sidebar file of every version you wrote to.
112+
5. Mirror as the conventions describe, then build.
108113

109114
### Updating for a product change
110115

111116
1. Decide what changed: the steps (UI moved, labels changed), the prerequisites
112117
(permission or configuration), or the outcome.
113118
2. Update only the affected sections; preserve the rest.
114-
3. Mirror to 3.1, build, and report what changed.
119+
3. Mirror as the conventions describe, build, and report what changed.
115120

116121
## Conventions (shared with concept and reference docs)
117122

118123
Read `../care-concept-doc/references/conventions.md` before writing for: domains &
119124
slugs, the link rule, MDX safety (no `{#…}` heading ids; wrap `{ }` in backticks),
120-
3.0≡3.1 mirroring, and the `npm run build` (all locales) gate. That file is the single
121-
copy — do not fork a third version of it here.
125+
versioning and mirroring, and the `npm run build` (all locales) gate. That file is the
126+
single copy — do not fork a third version of it here, and do not restate its rules.
122127

123128
## Language
124129

0 commit comments

Comments
 (0)