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
20 changes: 10 additions & 10 deletions .claude/WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ flowchart TD

| Directory | Nickname | Owner | Consumers |
|-----------|----------|-------|-----------|
| `docs/prds/` | PRDs (staging) | Alice (writes); af-ship-orch (saves external) | User review; may move to Notion |
| `docs/tech-designs/` | Tech designs (staging) | Dave (writes); af-ship-orch (saves external) | User review; may move to Notion |
| `docs/features/` | Feature catalog | Dave (writes F-NNN) | Alice, Bob, Erin (read) |
| `docs/issue-cases/` | Scar book | Human / eng team | Alice, Dave, Bob, Erin (read) |
| `docs/researches/` | Research log | Bob (writes R-NNN) | Alice (via challenge loop) |
| `internal-docs/prds/` | PRDs (staging) | Alice (writes); af-ship-orch (saves external) | User review; may move to Notion |
| `internal-docs/tech-designs/` | Tech designs (staging) | Dave (writes); af-ship-orch (saves external) | User review; may move to Notion |
| `internal-docs/features/` | Feature catalog | Dave (writes F-NNN) | Alice, Bob, Erin (read) |
| `internal-docs/issue-cases/` | Scar book | Human / eng team | Alice, Dave, Bob, Erin (read) |
| `internal-docs/researches/` | Research log | Bob (writes R-NNN) | Alice (via challenge loop) |
| `docs/payloads/` | Payload map | Erin (writes P-NNN, FIELD_MAP) | Alice, Dave (via challenge loop) |

---
Expand Down Expand Up @@ -100,7 +100,7 @@ If unsure whether a task is maintenance or a feature → use `/af-ship`.
```
/af-ship <description>
→ af-ship-orch creates task wizard → calls alice-pm
→ Alice writes PRD → saves to docs/prds/<slug>.md → asks user to review
→ Alice writes PRD → saves to internal-docs/prds/<slug>.md → asks user to review
→ User approves PRD
→ Alice invokes Bob and/or Erin if needed
→ Bob/Erin produce findings → Alice challenges (max 2 iterations)
Expand All @@ -111,7 +111,7 @@ If unsure whether a task is maintenance or a feature → use `/af-ship`.
**From existing PRD:**
```
/af-ship-from-prd <url-or-path> (or /af-ship --prd <url-or-path>)
→ af-ship-orch fetches / reads PRD → saves to docs/prds/<slug>.md → calls alice-pm
→ af-ship-orch fetches / reads PRD → saves to internal-docs/prds/<slug>.md → calls alice-pm
→ Alice challenges PRD for completeness → resolves gaps with user
→ Alice delegates to Bob/Erin/Dave (no second review pause)
→ [Phase 1 / 2 / 3 below]
Expand All @@ -120,15 +120,15 @@ If unsure whether a task is maintenance or a feature → use `/af-ship`.
**From existing tech design:**
```
/af-ship-from-tech-design <url-or-path> (or /af-ship --tech-design <url-or-path>)
→ af-ship-orch fetches / reads tech design → saves to docs/tech-designs/<slug>.md → calls alice-pm
→ af-ship-orch fetches / reads tech design → saves to internal-docs/tech-designs/<slug>.md → calls alice-pm
→ Alice runs full challenge agenda → Dave addresses issues (max 2 iterations)
→ Alice: "Satisfied — Dave, this is ready."
→ [Phase 2 / 3 below — Phase 1 skipped, PRD gate bypassed]
```

**Phase 1 — Tech design**
```
→ Dave writes tech design → saves to docs/tech-designs/<slug>.md
→ Dave writes tech design → saves to internal-docs/tech-designs/<slug>.md
→ Alice challenges tech design (max 2 iterations)
→ Alice: "Satisfied — Dave, this is ready."
→ Dave asks user to review tech design
Expand All @@ -145,7 +145,7 @@ If unsure whether a task is maintenance or a feature → use `/af-ship`.
**Phase 3 — Feature doc**
```
→ Dave runs impact scan → updates any affected existing F-NNN docs
→ Dave writes new F-NNN feature doc → saves to docs/features/
→ Dave writes new F-NNN feature doc → saves to internal-docs/features/
→ Alice challenges feature doc (max 2 iterations)
→ Alice: "Satisfied — Dave, this is ready."
```
Expand Down
10 changes: 5 additions & 5 deletions .claude/commands/af-quiz-me.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ Generate an interactive HTML quiz from a tech design document.
## Step 1 — Resolve the document

**If $ARGUMENTS is empty:**
List all `.md` files in `docs/tech-designs/`.
List all `.md` files in `internal-docs/tech-designs/`.
- If files exist, list them and ask:
"Which tech design should I quiz you on? (Reply with the number or filename)
Or reply **project** to generate a quiz covering the whole project from the feature catalog."
Wait for the user's selection before continuing.
- If the folder does not exist or is empty, ask:
"No tech designs found in `docs/tech-designs/`. What would you like to do?
"No tech designs found in `internal-docs/tech-designs/`. What would you like to do?
1. Provide a path or Notion URL (reply with the path/URL)
2. Generate a project quiz from the feature catalog (reply **project**)"
Wait for the user's reply before continuing.

**If the user replies `project` (or $ARGUMENTS is `project`):**
Check whether `docs/features/INDEX.md` exists.
Check whether `internal-docs/features/INDEX.md` exists.
- If it does not exist, stop and say:
"No feature catalog found. Run `/af-generate-feature-catalog` first to build `docs/features/`, then try again."
- If it exists, read `docs/features/INDEX.md` to get the full list of features, then read each individual `docs/features/F-*.md` file.
"No feature catalog found. Run `/af-generate-feature-catalog` first to build `internal-docs/features/`, then try again."
- If it exists, read `internal-docs/features/INDEX.md` to get the full list of features, then read each individual `internal-docs/features/F-*.md` file.
Set `<slug>` to `project` and `<title>` to the project name derived from `INDEX.md` (e.g. `MyProject — Project Quiz`).
Proceed to Step 3 in **project mode** (random 10 questions across all features).

Expand Down
2 changes: 1 addition & 1 deletion .claude/commands/af-ship-from-prd.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
If $ARGUMENTS is empty, stop and ask:
"Please provide a Notion URL or a path to a local .md file for the PRD.
Example: `/af-ship-from-prd https://notion.so/team/my-prd`
Example: `/af-ship-from-prd docs/prds/my-feature.md`"
Example: `/af-ship-from-prd internal-docs/prds/my-feature.md`"
Do not proceed until the user provides a URL or path.

Start the feature delivery workflow using an existing PRD.
Expand Down
2 changes: 1 addition & 1 deletion .claude/commands/af-ship-from-tech-design.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
If $ARGUMENTS is empty, stop and ask:
"Please provide a Notion URL or a path to a local .md file for the tech design.
Example: `/af-ship-from-tech-design https://notion.so/team/my-design`
Example: `/af-ship-from-tech-design docs/tech-designs/my-feature.md`"
Example: `/af-ship-from-tech-design internal-docs/tech-designs/my-feature.md`"
Do not proceed until the user provides a URL or path.

Start the delivery workflow using an existing tech design.
Expand Down
2 changes: 1 addition & 1 deletion .claude/commands/af-ship.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The PRD source is the value extracted from $ARGUMENTS after `--prd `.
Extract the URL or path that follows `--tech-design `.
If nothing follows `--tech-design`, stop and ask:
"Please provide a Notion URL or local .md path after --tech-design
(e.g. `/af-ship --tech-design docs/tech-designs/my-feature.md`)."
(e.g. `/af-ship --tech-design internal-docs/tech-designs/my-feature.md`)."
Do not proceed until a URL or path is provided.
Otherwise: invoke the `af-ship-orch` skill in Tech-Design-Given mode.
The tech design source is the value extracted from $ARGUMENTS after `--tech-design `.
Expand Down
6 changes: 3 additions & 3 deletions .claude/prompts/generate-feature-catalog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prompt: Create Feature Catalog

Use this prompt to generate a `docs/features/` catalog for this project.
Use this prompt to generate a `internal-docs/features/` catalog for this project.
Values below are filled during workflow setup — edit them here if needed.

---
Expand All @@ -20,7 +20,7 @@ JIRA_PROJECT_KEY: DELIVERY
## Prompt

````
Create a feature catalog for this project under `docs/features/`.
Create a feature catalog for this project under `internal-docs/features/`.

Project context: Flutter plugin providing mobile attribution and analytics for iOS and Android, bridging native AppsFlyer SDKs via Dart MethodChannel/EventChannel
Primary language(s): Dart, Objective-C, Java, Kotlin
Expand Down Expand Up @@ -143,7 +143,7 @@ Mark "Propose taxonomy" as completed. Mark "User reviews taxonomy" as `in_progre

---

## Phase 3 — Create `docs/features/`
## Phase 3 — Create `internal-docs/features/`

Mark "User reviews taxonomy" as completed. Mark "Write feature catalog" as `in_progress`.

Expand Down
32 changes: 16 additions & 16 deletions .claude/prompts/generate-issue-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ LANGUAGES: Dart, Objective-C, Java, Kotlin

## TASK

Mine this repository's full git history across all branches and generate `docs/issue-cases/` — an engineering issue case bank with a hot zones map and two-axis classification (Component × Bug Class).
Mine this repository's full git history across all branches and generate `internal-docs/issue-cases/` — an engineering issue case bank with a hot zones map and two-axis classification (Component × Bug Class).

Project context: Flutter plugin providing mobile attribution and analytics for iOS and Android, bridging native AppsFlyer SDKs via Dart MethodChannel/EventChannel
Primary language(s): Dart, Objective-C, Java, Kotlin

Create `docs/issue-cases/INDEX.md`, `docs/issue-cases/TEMPLATE.md`, `docs/issue-cases/GUARDRAILS.md`, and individual `IC-NNN-*.md` files.
Create `internal-docs/issue-cases/INDEX.md`, `internal-docs/issue-cases/TEMPLATE.md`, `internal-docs/issue-cases/GUARDRAILS.md`, and individual `IC-NNN-*.md` files.

---

Expand Down Expand Up @@ -63,7 +63,7 @@ echo "Mining years: $START_YEAR to $CURRENT_YEAR"
Create the staging directory:

```bash
mkdir -p docs/issue-cases/partial
mkdir -p internal-docs/issue-cases/partial
```

For each year from `$START_YEAR` to `$CURRENT_YEAR`, spawn one Agent in parallel. Pass the prompt below verbatim, substituting:
Expand Down Expand Up @@ -109,7 +109,7 @@ For each confirmed bug fix, collect:

## Output format

Write one file per bug fix to docs/issue-cases/partial/ using this name pattern:
Write one file per bug fix to internal-docs/issue-cases/partial/ using this name pattern:
{{YEAR}}-NNN-kebab-short-name.md
where NNN is a zero-padded counter starting at 001, scoped to this year only.

Expand Down Expand Up @@ -144,10 +144,10 @@ year: {{YEAR}}
### Takeaway
[The rule that prevents this class of bug. Be specific to this codebase.]

Also write a one-line summary file docs/issue-cases/partial/{{YEAR}}-index.md listing each case you wrote:
Also write a one-line summary file internal-docs/issue-cases/partial/{{YEAR}}-index.md listing each case you wrote:
{{YEAR}}-NNN-kebab-name.md — [one-line summary]

If you find zero genuine bug fixes for {{YEAR}}, write docs/issue-cases/partial/{{YEAR}}-index.md with a single line:
If you find zero genuine bug fixes for {{YEAR}}, write internal-docs/issue-cases/partial/{{YEAR}}-index.md with a single line:
no cases found
```

Expand Down Expand Up @@ -209,7 +209,7 @@ For each unique DELIVERY-XXXXX number found:
- Record the ticket's `created` date from the Jira response (use as the **Date** field in the IC case)
- Find the corresponding fix commit in git (`git log --all --oneline --grep="DELIVERY-XXXXX"`)
- Inspect the diff (`git show <hash>`)
- Write the IC case to `docs/issue-cases/partial/JIRA-NNN-kebab-short-name.md` (where NNN is a zero-padded counter starting at 001, scoped to this step). Use the same file format as the year-agent cases (frontmatter with `commit:` and `year:` fields, then the IC sections). Step 1b.5 will collect and align all partial files together.
- Write the IC case to `internal-docs/issue-cases/partial/JIRA-NNN-kebab-short-name.md` (where NNN is a zero-padded counter starting at 001, scoped to this step). Use the same file format as the year-agent cases (frontmatter with `commit:` and `year:` fields, then the IC sections). Step 1b.5 will collect and align all partial files together.

Skip tickets where the diff shows only infrastructure changes (Dockerfile, CI config, `.edn` config files with no behavior change).

Expand All @@ -219,7 +219,7 @@ Skip tickets where the diff shows only infrastructure changes (Dockerfile, CI co

Mark "Cross-check with Jira" as completed. Mark "Align IC cases" as `in_progress`.

**Collect** all files matching `docs/issue-cases/partial/????-???-*.md`.
**Collect** all files matching `internal-docs/issue-cases/partial/????-???-*.md`.

**Deduplicate** by commit hash: read the `commit:` frontmatter field from each file. If two files share the same hash, keep the one with more lines (richer description) and discard the other.

Expand All @@ -228,7 +228,7 @@ Mark "Cross-check with Jira" as completed. Mark "Align IC cases" as `in_progress
**Renumber** sequentially starting at 1. Assign each file a new ID: `IC-001`, `IC-002`, ..., `IC-NNN`.

**Rename** each file from its temp name to its final name:
- `docs/issue-cases/partial/2019-003-null-dereference.md` → `docs/issue-cases/IC-007-null-dereference.md`
- `internal-docs/issue-cases/partial/2019-003-null-dereference.md` → `internal-docs/issue-cases/IC-007-null-dereference.md`
- Pattern: strip the `YYYY-NNN-` prefix, prepend `IC-NNN-` (using the new sequential number, zero-padded to 3 digits)

**Update** the heading inside each renamed file from `## YYYY-NNN — Name` to `## IC-NNN — Name`.
Expand All @@ -240,9 +240,9 @@ Report a summary table of all actions taken:
| 2019-001-foo | IC-001-foo | abc1234 | 2019-03-12 | renamed |
| 2020-002-bar | — | def5678 | 2020-07-01 | duplicate, discarded |

**Clean up** the staging directory after confirming all files have been moved to `docs/issue-cases/`:
**Clean up** the staging directory after confirming all files have been moved to `internal-docs/issue-cases/`:
```bash
rm -rf docs/issue-cases/partial/
rm -rf internal-docs/issue-cases/partial/
```

Mark "Align IC cases" as completed.
Expand Down Expand Up @@ -326,7 +326,7 @@ Prepend a **Tech Design Checklist** section:
- [ ] All initialization paths covered
- [ ] Any rewrite of a previously-reverted feature must audit the original contract

Write to `docs/issue-cases/GUARDRAILS.md`.
Write to `internal-docs/issue-cases/GUARDRAILS.md`.

---

Expand Down Expand Up @@ -399,7 +399,7 @@ Run immediately after INDEX.md is written. Three checks:

**Check 1 — IC → Feature cross-reference**

If `docs/features/INDEX.md` exists: for each IC case, find the matching F-NNN feature by component name. Add a `feature_ref: [F-NNN]` line to the frontmatter of that IC file. If no match is found, leave the field blank and flag it.
If `internal-docs/features/INDEX.md` exists: for each IC case, find the matching F-NNN feature by component name. Add a `feature_ref: [F-NNN]` line to the frontmatter of that IC file. If no match is found, leave the field blank and flag it.

**Check 2 — Orphaned IC cases**

Expand Down Expand Up @@ -428,8 +428,8 @@ Add a "Before Making Code Changes" section using **active language**:
```
## Before Making Code Changes

Before writing any code that touches a component listed in `docs/issue-cases/INDEX.md`:
1. Open `docs/issue-cases/INDEX.md` and find the component in the Hot Zones Map
Before writing any code that touches a component listed in `internal-docs/issue-cases/INDEX.md`:
1. Open `internal-docs/issue-cases/INDEX.md` and find the component in the Hot Zones Map
2. Read each linked IC case — pay attention to the **Takeaway** rule
3. Explicitly state which past issues are relevant and how the new code avoids repeating them

Expand Down Expand Up @@ -467,7 +467,7 @@ MSG=""
# Add one block per hot-zone component (replace HotZoneFile and ComponentName
# with the actual filenames and component names from the Step 2 Hot Zones Map):
if echo "$FILE_PATH" | grep -qE "HotZoneFile\.(clj|java)"; then
MSG="HOT ZONE — ComponentName: read docs/issue-cases/INDEX.md for relevant cases and apply their Takeaway rules before writing code."
MSG="HOT ZONE — ComponentName: read internal-docs/issue-cases/INDEX.md for relevant cases and apply their Takeaway rules before writing code."
fi

if [ -n "$MSG" ]; then
Expand Down
18 changes: 9 additions & 9 deletions .claude/skills/af-ship-orch/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Immediately mark "Fetch and validate PRD" as `in_progress`.

- Starts with `http` → Notion URL
- Ends with `.md` or contains `/` → local file path
- Otherwise → stop and ask: "Please provide a Notion URL or a path to a local `.md` file (e.g. `https://notion.so/team/my-prd` or `docs/prds/my-feature.md`)."
- Otherwise → stop and ask: "Please provide a Notion URL or a path to a local `.md` file (e.g. `https://notion.so/team/my-prd` or `internal-docs/prds/my-feature.md`)."

**Step 2 — Fetch or read**

Expand All @@ -68,9 +68,9 @@ Immediately mark "Fetch and validate PRD" as `in_progress`.

**Step 3 — Save a local copy**

Save to `docs/prds/<slug>.md`.
Save to `internal-docs/prds/<slug>.md`.
- Derive `<slug>` from the document title (kebab-case, e.g. `dark-mode-settings`).
- If the file is already at `docs/prds/`, use it in place.
- If the file is already at `internal-docs/prds/`, use it in place.
- If no title is detectable, ask: "What slug should I use for this PRD? (e.g. `dark-mode-settings`)"

Mark "Fetch and validate PRD" as `completed`, "Challenge PRD" as `in_progress`.
Expand Down Expand Up @@ -103,7 +103,7 @@ Immediately mark "Fetch and validate tech design" as `in_progress`.

- Starts with `http` → Notion URL
- Ends with `.md` or contains `/` → local file path
- Otherwise → stop and ask: "Please provide a Notion URL or a path to a local `.md` file (e.g. `https://notion.so/team/my-design` or `docs/tech-designs/my-feature.md`)."
- Otherwise → stop and ask: "Please provide a Notion URL or a path to a local `.md` file (e.g. `https://notion.so/team/my-design` or `internal-docs/tech-designs/my-feature.md`)."

**Step 2 — Fetch or read**

Expand All @@ -112,9 +112,9 @@ Immediately mark "Fetch and validate tech design" as `in_progress`.

**Step 3 — Save a local copy**

Save to `docs/tech-designs/<slug>.md`.
Save to `internal-docs/tech-designs/<slug>.md`.
- Derive `<slug>` from the document title (kebab-case).
- If the file is already at `docs/tech-designs/`, use it in place.
- If the file is already at `internal-docs/tech-designs/`, use it in place.
- If no title is detectable, ask: "What slug should I use for this tech design? (e.g. `dark-mode-settings`)"

Mark "Fetch and validate tech design" as `completed`, "Challenge tech design" as `in_progress`.
Expand Down Expand Up @@ -143,21 +143,21 @@ BLOCKING REQUIREMENT: Call the `Skill` tool with `af-ship-orch` BEFORE any other
```
/af-ship <description>
→ af-ship-orch creates tasks → calls alice-pm
→ Alice writes PRD → saves to docs/prds/<slug>.md → asks user to review
→ Alice writes PRD → saves to internal-docs/prds/<slug>.md → asks user to review
→ User approves PRD
→ Alice invokes Bob and/or Erin if needed
→ Bob/Erin produce findings → Alice challenges (max 2 iterations)
→ Alice updates PRD if scope changed
→ Alice invokes Dave
→ Dave writes tech design → saves to docs/tech-designs/<slug>.md
→ Dave writes tech design → saves to internal-docs/tech-designs/<slug>.md
→ Alice challenges tech design (max 2 iterations)
→ Alice: "Satisfied — Dave, this is ready." (on tech design)
→ Dave asks user to review tech design
→ User approves tech design
→ Dave implements + writes unit tests
→ Alice challenges implementation (max 2 iterations)
→ Alice: "Satisfied — Dave, this is ready." (on implementation)
→ Dave writes F-NNN feature doc → saves to docs/features/
→ Dave writes F-NNN feature doc → saves to internal-docs/features/
→ Alice challenges feature doc (max 2 iterations)
→ Alice: "Satisfied — Dave, this is ready." (on feature doc)
→ If unresolved after 2 iterations → Alice escalates to user
Expand Down
Loading