create-claude-rails 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +129 -0
  3. package/bin/create-claude-rails.js +8 -0
  4. package/lib/cli.js +414 -0
  5. package/lib/copy.js +113 -0
  6. package/lib/db-setup.js +51 -0
  7. package/lib/metadata.js +41 -0
  8. package/lib/settings-merge.js +84 -0
  9. package/package.json +29 -0
  10. package/templates/EXTENSIONS.md +311 -0
  11. package/templates/README.md +485 -0
  12. package/templates/hooks/git-guardrails.sh +67 -0
  13. package/templates/hooks/skill-telemetry.sh +66 -0
  14. package/templates/hooks/skill-tool-telemetry.sh +54 -0
  15. package/templates/hooks/stop-hook.md +56 -0
  16. package/templates/memory/patterns/_pattern-template.md +119 -0
  17. package/templates/memory/patterns/pattern-intelligence-first.md +41 -0
  18. package/templates/rules/enforcement-pipeline.md +151 -0
  19. package/templates/scripts/finding-schema.json +94 -0
  20. package/templates/scripts/load-triage-history.js +151 -0
  21. package/templates/scripts/merge-findings.js +126 -0
  22. package/templates/scripts/pib-db-schema.sql +68 -0
  23. package/templates/scripts/pib-db.js +365 -0
  24. package/templates/scripts/triage-server.mjs +98 -0
  25. package/templates/scripts/triage-ui.html +536 -0
  26. package/templates/skills/audit/SKILL.md +269 -0
  27. package/templates/skills/audit/phases/finding-output.md +56 -0
  28. package/templates/skills/audit/phases/perspective-execution.md +63 -0
  29. package/templates/skills/audit/phases/perspective-selection.md +44 -0
  30. package/templates/skills/audit/phases/structural-checks.md +54 -0
  31. package/templates/skills/audit/phases/triage-history.md +45 -0
  32. package/templates/skills/debrief/SKILL.md +278 -0
  33. package/templates/skills/debrief/phases/auto-maintenance.md +48 -0
  34. package/templates/skills/debrief/phases/close-work.md +88 -0
  35. package/templates/skills/debrief/phases/health-checks.md +54 -0
  36. package/templates/skills/debrief/phases/inventory.md +40 -0
  37. package/templates/skills/debrief/phases/loose-ends.md +52 -0
  38. package/templates/skills/debrief/phases/record-lessons.md +67 -0
  39. package/templates/skills/debrief/phases/report.md +59 -0
  40. package/templates/skills/debrief/phases/update-state.md +48 -0
  41. package/templates/skills/execute/SKILL.md +293 -0
  42. package/templates/skills/execute/phases/commit-and-deploy.md +66 -0
  43. package/templates/skills/execute/phases/load-plan.md +49 -0
  44. package/templates/skills/execute/phases/perspectives.md +49 -0
  45. package/templates/skills/execute/phases/validators.md +50 -0
  46. package/templates/skills/execute/phases/verification-tools.md +67 -0
  47. package/templates/skills/investigate/SKILL.md +159 -0
  48. package/templates/skills/menu/SKILL.md +61 -0
  49. package/templates/skills/onboard/SKILL.md +301 -0
  50. package/templates/skills/onboard/phases/detect-state.md +70 -0
  51. package/templates/skills/onboard/phases/generate-context.md +81 -0
  52. package/templates/skills/onboard/phases/generate-session-loop.md +87 -0
  53. package/templates/skills/onboard/phases/interview.md +158 -0
  54. package/templates/skills/onboard/phases/modularity-menu.md +159 -0
  55. package/templates/skills/onboard/phases/summary.md +122 -0
  56. package/templates/skills/orient/SKILL.md +240 -0
  57. package/templates/skills/orient/phases/auto-maintenance.md +48 -0
  58. package/templates/skills/orient/phases/briefing.md +53 -0
  59. package/templates/skills/orient/phases/context.md +47 -0
  60. package/templates/skills/orient/phases/data-sync.md +35 -0
  61. package/templates/skills/orient/phases/health-checks.md +50 -0
  62. package/templates/skills/orient/phases/perspectives.md +46 -0
  63. package/templates/skills/orient/phases/work-scan.md +69 -0
  64. package/templates/skills/perspectives/_composition-patterns.md +240 -0
  65. package/templates/skills/perspectives/_context-template.md +152 -0
  66. package/templates/skills/perspectives/_eval-protocol.md +208 -0
  67. package/templates/skills/perspectives/_groups-template.yaml +49 -0
  68. package/templates/skills/perspectives/_lifecycle.md +93 -0
  69. package/templates/skills/perspectives/_prompt-guide.md +266 -0
  70. package/templates/skills/perspectives/accessibility/SKILL.md +177 -0
  71. package/templates/skills/perspectives/anti-confirmation/SKILL.md +170 -0
  72. package/templates/skills/perspectives/boundary-conditions/SKILL.md +261 -0
  73. package/templates/skills/perspectives/box-health/SKILL.md +338 -0
  74. package/templates/skills/perspectives/data-integrity/SKILL.md +152 -0
  75. package/templates/skills/perspectives/debugger/SKILL.md +218 -0
  76. package/templates/skills/perspectives/documentation/SKILL.md +166 -0
  77. package/templates/skills/perspectives/meta-process/SKILL.md +257 -0
  78. package/templates/skills/perspectives/mobile-responsiveness/SKILL.md +151 -0
  79. package/templates/skills/perspectives/organized-mind/SKILL.md +335 -0
  80. package/templates/skills/perspectives/output-contract.md +148 -0
  81. package/templates/skills/perspectives/performance/SKILL.md +165 -0
  82. package/templates/skills/perspectives/process/SKILL.md +235 -0
  83. package/templates/skills/perspectives/qa/SKILL.md +201 -0
  84. package/templates/skills/perspectives/security/SKILL.md +176 -0
  85. package/templates/skills/perspectives/technical-debt/SKILL.md +112 -0
  86. package/templates/skills/plan/SKILL.md +356 -0
  87. package/templates/skills/plan/phases/calibration-examples.md +75 -0
  88. package/templates/skills/plan/phases/completeness-check.md +44 -0
  89. package/templates/skills/plan/phases/composition-check.md +36 -0
  90. package/templates/skills/plan/phases/overlap-check.md +62 -0
  91. package/templates/skills/plan/phases/perspective-critique.md +47 -0
  92. package/templates/skills/plan/phases/plan-template.md +69 -0
  93. package/templates/skills/plan/phases/present.md +60 -0
  94. package/templates/skills/plan/phases/research.md +43 -0
  95. package/templates/skills/plan/phases/work-tracker.md +95 -0
  96. package/templates/skills/pulse/SKILL.md +242 -0
  97. package/templates/skills/pulse/phases/auto-fix-scope.md +40 -0
  98. package/templates/skills/pulse/phases/checks.md +58 -0
  99. package/templates/skills/pulse/phases/output.md +54 -0
  100. package/templates/skills/seed/SKILL.md +259 -0
  101. package/templates/skills/seed/phases/build-perspective.md +93 -0
  102. package/templates/skills/seed/phases/evaluate-existing.md +61 -0
  103. package/templates/skills/seed/phases/maintain.md +92 -0
  104. package/templates/skills/seed/phases/scan-signals.md +82 -0
  105. package/templates/skills/triage-audit/SKILL.md +251 -0
  106. package/templates/skills/triage-audit/phases/apply-verdicts.md +90 -0
  107. package/templates/skills/triage-audit/phases/load-findings.md +38 -0
  108. package/templates/skills/triage-audit/phases/triage-ui.md +66 -0
  109. package/templates/skills/upgrade/SKILL.md +265 -0
  110. package/templates/skills/upgrade/phases/apply.md +86 -0
  111. package/templates/skills/upgrade/phases/detect-current.md +82 -0
  112. package/templates/skills/upgrade/phases/diff-upstream.md +72 -0
  113. package/templates/skills/upgrade/phases/merge.md +97 -0
  114. package/templates/skills/validate/SKILL.md +116 -0
  115. package/templates/skills/validate/phases/validators.md +53 -0
@@ -0,0 +1,75 @@
1
+ # Calibration Examples — Detailed Before/After Plans
2
+
3
+ Provide project-specific before/after plan examples showing exact
4
+ formatting. The /plan skill reads this file during calibration to
5
+ reinforce what good and bad plans look like in your project's context.
6
+
7
+ When this file is absent or empty, the default behavior is: use the
8
+ narrative calibration examples in the skeleton only. To explicitly skip
9
+ detailed examples, write only `skip: true`.
10
+
11
+ ## What to Include
12
+
13
+ At least one bad plan and one good plan using your project's actual plan
14
+ template format. Show:
15
+ - Real-looking (but anonymized) content
16
+ - The specific failure modes your project has encountered
17
+ - How surface area, acceptance criteria, and feature completeness differ
18
+
19
+ ## Default Examples
20
+
21
+ These generic examples apply to any project using the standard template:
22
+
23
+ ### Bad Plan
24
+
25
+ ```markdown
26
+ ## Implementation
27
+ 1. Add onProjectEmpty callback to useProjectActions hook
28
+ 2. Update FolderCard to accept the callback
29
+
30
+ ## Surface Area
31
+ - files: hooks/useProjectActions.ts
32
+ - files: components/FolderCard.tsx
33
+
34
+ ## Verification
35
+ - Verify it works correctly
36
+ - Check that the callback fires
37
+ ```
38
+
39
+ Problems: Surface area is incomplete (page components that wire the
40
+ callback are missing — the callback exists but nothing calls it).
41
+ Verification criteria are untestable ("works correctly" is not pass/fail).
42
+ The plan delivers dead code: an API nobody invokes.
43
+
44
+ ### Good Plan
45
+
46
+ ```markdown
47
+ ## Problem
48
+ When all actions in a project's folder are completed or moved, the folder
49
+ stays open with an empty list. Users have to manually navigate away.
50
+ Auto-closing or prompting would reduce friction.
51
+
52
+ ## Implementation
53
+ 1. Add onProjectEmpty callback to useProjectActions hook (hooks/useProjectActions.ts)
54
+ 2. Implement empty-detection logic: after action complete/move, check remaining count
55
+ 3. Update FolderCard to accept and invoke onProjectEmpty (components/FolderCard.tsx)
56
+ 4. Wire callback in ActionsPage and ProjectDetailPage to navigate back on empty
57
+ 5. Add empty-state message for the brief moment before navigation
58
+
59
+ ## Surface Area
60
+ - files: hooks/useProjectActions.ts
61
+ - files: components/FolderCard.tsx
62
+ - files: pages/ActionsPage.tsx
63
+ - files: pages/ProjectDetailPage.tsx
64
+
65
+ ## Acceptance Criteria
66
+ - [auto] TypeScript compiles clean: npx tsc -b --noEmit returns 0 errors
67
+ - [auto] Completing last action in a project via API triggers callback (test with curl)
68
+ - [manual] Completing last visible action in FolderCard navigates user back to parent view
69
+ - [manual] Empty state message appears briefly before navigation
70
+ - [manual] Projects with remaining actions are unaffected
71
+ ```
72
+
73
+ Surface area includes every file mentioned in implementation. AC are
74
+ pass/fail with [auto]/[manual] tags. The plan delivers a complete feature
75
+ the user can see and verify — no dead code.
@@ -0,0 +1,44 @@
1
+ # Completeness Check — Domain-Specific Completeness Rules
2
+
3
+ Define additional completeness rules beyond the three generic checks
4
+ (feature completeness, surface area completeness, testable AC). The
5
+ /plan skill reads this file and applies these rules alongside the
6
+ generic checks.
7
+
8
+ When this file is absent or empty, the default behavior is: apply only
9
+ the three generic completeness checks defined in the skeleton. To
10
+ explicitly skip completeness checking, write only `skip: true`.
11
+
12
+ ## What to Include
13
+
14
+ Domain-specific rules that catch incomplete plans in your project:
15
+ - **Required artifacts** — what every plan of a certain type must include
16
+ - **Coupling rules** — "if you change X, you must also change Y"
17
+ - **Category-specific requirements** — different plan types have different
18
+ completeness criteria
19
+
20
+ ## Example Completeness Rules
21
+
22
+ Uncomment and adapt these for your project:
23
+
24
+ <!--
25
+ ### API Changes
26
+ - Every new endpoint must include auth middleware in the surface area
27
+ - Every schema change must include a migration script
28
+ - Every API change must include at least one [auto] AC that exercises it
29
+
30
+ ### UI Changes
31
+ - Every new page must include mobile viewport AC ([manual] at 375px)
32
+ - Every new component must include empty state handling
33
+ - If adding a page, App.tsx routing must be in the surface area
34
+
35
+ ### Infrastructure Changes
36
+ - Cost estimate required for new services or storage
37
+ - Rollback plan required for data migrations
38
+ - Monitoring/alerting changes must accompany new infrastructure
39
+
40
+ ### Coupling Rules
41
+ - Changes to the DB schema require corresponding API endpoint updates
42
+ - Changes to API response format require corresponding frontend updates
43
+ - Changes to shared types require checking all consumers
44
+ -->
@@ -0,0 +1,36 @@
1
+ # Composition Check — Reusable Component Duplication
2
+
3
+ Check whether the planned work duplicates existing reusable components
4
+ in your project. The /plan skill reads this file after drafting and
5
+ before perspective critique.
6
+
7
+ When this file is absent or empty, the default behavior is: skip this
8
+ phase entirely. To explicitly opt out, write only `skip: true`.
9
+
10
+ ## What to Include
11
+
12
+ - **What counts as a reusable component** — skills, plugins, middleware,
13
+ shared libraries, utilities, templates
14
+ - **How to search** — grep patterns, directory scans, registry queries
15
+ - **What to check** — duplication of logic, missing dependency declarations
16
+
17
+ ## Example Composition Check
18
+
19
+ Uncomment and adapt these for your project:
20
+
21
+ <!--
22
+ ### Search for Duplication
23
+ When the plan involves creating or modifying a reusable component
24
+ (skill, plugin, middleware, etc.):
25
+
26
+ 1. Search existing components for overlapping keywords (API endpoints,
27
+ data-fetching patterns, routing logic).
28
+ 2. If overlap exists, the plan should compose with the existing component
29
+ (invoke it) rather than duplicate its logic.
30
+ 3. If the new component depends on others, declare the relationships
31
+ in the plan (e.g., `related` entries, dependency notes).
32
+
33
+ ### Skip When
34
+ - The plan doesn't involve reusable components
35
+ - The plan is a one-off task (bug fix, configuration change)
36
+ -->
@@ -0,0 +1,62 @@
1
+ # Overlap Check — Search for Existing Work
2
+
3
+ Define how to search your project's work tracker for items that overlap
4
+ with proposed work. The /plan skill reads this file before drafting to
5
+ prevent duplicate plans.
6
+
7
+ When this file is absent or empty, the default behavior is: query the
8
+ reference data layer (pib-db) for open actions with similar text to the
9
+ proposed work. If pib-db is not initialized, skip gracefully.
10
+
11
+ ## Default Behavior (pib-db)
12
+
13
+ When no custom overlap check is configured:
14
+
15
+ ```bash
16
+ # Search open actions for keywords related to the proposed work
17
+ node scripts/pib-db.js query "SELECT fid, text, substr(notes, 1, 200) as notes_preview FROM actions WHERE completed = 0 AND deleted_at IS NULL AND (text LIKE '%keyword%' OR notes LIKE '%keyword%')"
18
+ ```
19
+
20
+ Search with multiple keywords derived from the proposed plan's problem
21
+ description. Surface any matches: "Found N open actions that may overlap
22
+ with this plan" — then list them so the user can decide whether to
23
+ proceed, merge, or defer.
24
+
25
+ If pib-db doesn't exist, skip with a note.
26
+
27
+ ## What to Include
28
+
29
+ - **How to query** — the command, API call, or file to search
30
+ - **What to search** — open items, recently closed items, deferred items
31
+ - **Keywords** — search with multiple relevant terms, not just one
32
+
33
+ ## Example Overlap Check Patterns
34
+
35
+ Uncomment and adapt these for your project:
36
+
37
+ <!--
38
+ ### Database Tracker
39
+ ```bash
40
+ sqlite3 project.db "SELECT id, text, substr(notes, 1, 200) FROM tasks WHERE completed = 0 AND (text LIKE '%keyword%' OR notes LIKE '%keyword%')"
41
+ ```
42
+ Search with multiple keywords relevant to the problem space.
43
+
44
+ ### GitHub Issues
45
+ ```bash
46
+ gh issue list --state open --search "keyword" --json number,title,labels
47
+ gh issue list --state closed --search "keyword" --limit 5 --json number,title
48
+ ```
49
+ Check both open and recently closed issues — someone may have already
50
+ solved this or started and abandoned it.
51
+
52
+ ### Markdown Backlog
53
+ ```bash
54
+ grep -i "keyword" backlog.md tasks.md TODO.md
55
+ ```
56
+ Search across all task-tracking files.
57
+
58
+ ### Linear / Jira / External Tracker
59
+ ```bash
60
+ curl -s "https://api.example.com/issues?q=keyword" -H "Authorization: Bearer $TOKEN"
61
+ ```
62
+ -->
@@ -0,0 +1,47 @@
1
+ # Perspective Critique — How to Activate Expert Review
2
+
3
+ Define which perspectives to activate during planning, any special rules,
4
+ and any project-specific critique workflow. The /plan skill reads this
5
+ file before running the perspective critique step.
6
+
7
+ When this file is absent or empty, the default behavior is: scan all
8
+ perspectives in `.claude/skills/perspectives/*/SKILL.md`, activate those
9
+ whose activation signals match the plan's surface area or topic keywords,
10
+ and spawn each as a parallel agent. To explicitly skip perspective
11
+ critique (even if perspectives exist), write only `skip: true`.
12
+
13
+ If no perspectives exist in the project, critique is skipped regardless.
14
+
15
+ ## What to Include
16
+
17
+ - **Always-on perspectives** — perspectives that activate for every plan
18
+ - **Special committees** — groups of perspectives that work together for
19
+ specific plan types (e.g., UI plans get a design committee)
20
+ - **Escalation overrides** — project-specific rules for how to handle
21
+ verdicts (stricter or more lenient than default)
22
+ - **Additional context** — anything perspectives need beyond `_context.md`
23
+
24
+ ## Example Perspective Critique Configuration
25
+
26
+ Uncomment and adapt these for your project:
27
+
28
+ <!--
29
+ ### Always-On for Planning
30
+ These perspectives activate for every plan regardless of surface area:
31
+ - security — every change has security implications
32
+ - architecture — structural coherence across the codebase
33
+
34
+ ### Design Committee (UI Plans)
35
+ When the plan's surface area includes UI files (pages/*.tsx,
36
+ components/**/*.tsx), activate both of these as a committee:
37
+ - information-design — produces visual mock, evaluates hierarchy
38
+ - usability — critiques interaction model, accessibility
39
+
40
+ If the design committee produces a mock, open it in the browser for
41
+ user review. User approval covers plan AND mock.
42
+
43
+ ### Escalation Rules
44
+ - Any **block** from security → stop, no override without explicit user ack
45
+ - Architecture **conditional** → always address before presenting
46
+ - Other **conditional** → include in presentation, user decides
47
+ -->
@@ -0,0 +1,69 @@
1
+ # Plan Template — Your Project's Plan Structure
2
+
3
+ Define the sections every plan should have and what each section contains.
4
+ The /plan skill reads this file when drafting and structures the plan
5
+ accordingly.
6
+
7
+ When this file is absent or empty, the default template is used:
8
+ Problem, Implementation, Surface Area, Acceptance Criteria. To explicitly
9
+ skip (no template structure), write only `skip: true`.
10
+
11
+ ## What to Include
12
+
13
+ - **Required sections** — what every plan must have
14
+ - **Section descriptions** — what goes in each section, how detailed
15
+ - **Optional sections** — sections to include when relevant
16
+ - **Format conventions** — how to mark file paths, new files, categories
17
+
18
+ ## Example Plan Templates
19
+
20
+ Uncomment and adapt these for your project:
21
+
22
+ <!--
23
+ ### Standard Plan Template
24
+
25
+ ```markdown
26
+ ## Problem
27
+ What friction, gap, or issue exists. Why this matters. Include links
28
+ to related issues or feedback if applicable.
29
+
30
+ ## Implementation
31
+ Numbered steps with file paths (`src/components/...`). Enough detail
32
+ to execute without re-exploring. Each step should be independently
33
+ verifiable where possible.
34
+
35
+ ## Surface Area
36
+ Every file that will be created or modified:
37
+ - files: path/to/file1.ext
38
+ - files: path/to/file2.ext (new)
39
+ - dirs: path/to/new-directory/ (new)
40
+
41
+ ## Acceptance Criteria
42
+ Testable criteria — each marked by category:
43
+ - [auto] Criteria verifiable by running a command
44
+ - [manual] Criteria requiring human judgment or interaction
45
+ - [deferred] Criteria that can't be tested until later
46
+
47
+ ## Design Decisions
48
+ Key choices made and why. Include alternatives considered and why they
49
+ were rejected. This helps future sessions evaluate whether the plan
50
+ still makes sense if context has changed.
51
+ ```
52
+
53
+ ### Extended Template (for larger plans)
54
+
55
+ Add these sections when the plan is complex:
56
+
57
+ ```markdown
58
+ ## Dependencies
59
+ Other work items that must be completed first, or that this plan
60
+ affects. Reference by ID, not by description.
61
+
62
+ ## Risk Assessment
63
+ What could go wrong. What's the rollback plan if this doesn't work.
64
+
65
+ ## Migration / Rollout
66
+ If this changes data or behavior, how to migrate. Can it be deployed
67
+ incrementally?
68
+ ```
69
+ -->
@@ -0,0 +1,60 @@
1
+ # Present — How and Where to Present the Plan
2
+
3
+ Define how to present the plan for user approval. The /plan skill reads
4
+ this file when presenting the finished plan.
5
+
6
+ When this file is absent or empty, the default behavior is: present the
7
+ full plan inline in conversation with perspective critique summary,
8
+ design decisions, and uncertainties. Wait for explicit approval.
9
+
10
+ User approval is always required regardless of this file's content —
11
+ this phase customizes HOW the plan is presented, not WHETHER. Using
12
+ `skip: true` here skips the custom presentation but the skeleton still
13
+ presents the plan and waits for approval.
14
+
15
+ ## What to Include
16
+
17
+ - **Presentation format** — how to structure the presentation
18
+ - **Required elements** — anything beyond the plan itself (cost, risk,
19
+ effort estimates, stakeholder impact)
20
+ - **Medium** — where the plan is presented (conversation, document,
21
+ review tool, external system)
22
+ - **Approval workflow** — who approves, how approval is captured
23
+
24
+ ## Example Presentation Configurations
25
+
26
+ Uncomment and adapt these for your project:
27
+
28
+ <!--
29
+ ### Standard Presentation
30
+ Present inline in conversation with:
31
+ 1. The complete plan (all template sections)
32
+ 2. Perspective critique summary (concerns and verdicts)
33
+ 3. Design decisions and alternatives considered
34
+ 4. Open questions or uncertainties
35
+ 5. Estimated effort (S/M/L)
36
+
37
+ Ask: "Does this plan look right? Anything to change before I file it?"
38
+
39
+ ### Document-Based Presentation
40
+ For larger plans, write to a plan document:
41
+ ```bash
42
+ # Write plan to a review file
43
+ Write plan to docs/plans/YYYY-MM-DD-plan-title.md
44
+ ```
45
+ Then present a summary in conversation with a link to the full document.
46
+
47
+ ### Review Tool Integration
48
+ Post the plan to the project's review system:
49
+ ```bash
50
+ # Example: post to a review channel or tool
51
+ curl -X POST https://review-tool.example.com/api/plans \
52
+ -H "Content-Type: application/json" \
53
+ -d '{"title": "...", "body": "...", "author": "claude"}'
54
+ ```
55
+ Present the link in conversation and wait for approval.
56
+
57
+ ### Multi-Stakeholder Plans
58
+ For plans that affect multiple areas, present to each stakeholder
59
+ and collect approval. Note who approved and any conditions.
60
+ -->
@@ -0,0 +1,43 @@
1
+ # Research — What to Investigate Before Planning
2
+
3
+ Define what to always investigate before drafting a plan. The /plan skill
4
+ reads this file and follows this guidance before proposing any solution.
5
+
6
+ When this file is absent or empty, the default behavior is: explore the
7
+ codebase to understand what files are involved, what patterns exist, what
8
+ the current behavior is, and what constraints apply. To explicitly skip
9
+ this phase (no default, no custom), write only `skip: true`.
10
+
11
+ ## What to Include
12
+
13
+ Project-specific research guidance:
14
+ - **Required reading** — files, docs, or external sources to always check
15
+ - **Domain resources** — architecture decision records, design system docs,
16
+ API changelogs, wikis
17
+ - **Consultation patterns** — "always check with [person/team] for changes
18
+ to [area]"
19
+ - **External sources** — MCP servers, documentation sites, ecosystem tools
20
+
21
+ ## Example Research Guidance
22
+
23
+ Uncomment and adapt these for your project:
24
+
25
+ <!--
26
+ ### Always Read First
27
+ - `docs/architecture-decisions/` — check for ADRs related to this area
28
+ - `CHANGELOG.md` — understand recent changes that might affect this work
29
+ - The relevant `CLAUDE.md` in the directory being modified
30
+
31
+ ### Domain Documentation
32
+ Before proposing API changes, check the API style guide at `docs/api-style.md`.
33
+ Before proposing UI changes, check the design system at `docs/design-system.md`.
34
+
35
+ ### External Sources
36
+ Use the framework-docs MCP server to check for relevant framework patterns
37
+ before proposing implementation approaches that might have well-known
38
+ solutions.
39
+
40
+ ### Stakeholder Context
41
+ For changes to shared infrastructure, check whether other teams have
42
+ open work in the same area (query the issue tracker).
43
+ -->
@@ -0,0 +1,95 @@
1
+ # Work Tracker — How to File Work Items
2
+
3
+ Define how to file an approved plan as a work item in your project's
4
+ tracking system. The /plan skill reads this file after user approval.
5
+
6
+ When this file is absent or empty, the default behavior is: create an
7
+ action in the reference data layer (pib-db) with the plan summary in
8
+ notes. If pib-db is not initialized, note that work tracking is available
9
+ via `node scripts/pib-db.js init`.
10
+
11
+ ## Default Behavior (pib-db)
12
+
13
+ When no custom work tracker is configured:
14
+
15
+ ```bash
16
+ # Create an action for the approved plan
17
+ node scripts/pib-db.js create-action "Short imperative plan title" \
18
+ --area "<area>" \
19
+ --notes "## Problem\n...\n\n## Implementation\n..."
20
+ ```
21
+
22
+ Derive the area from the plan's context. Include the full plan in the
23
+ action's notes so it's self-contained — the action IS the plan.
24
+
25
+ If the plan relates to an existing project in pib-db, include
26
+ `--project <project-fid>` to link them.
27
+
28
+ If pib-db doesn't exist, note: "Work tracking available — run
29
+ `node scripts/pib-db.js init` to set up. Plan saved in conversation
30
+ only."
31
+
32
+ ## What to Include
33
+
34
+ - **How to create items** — the API call, CLI command, or file operation
35
+ - **Required fields** — what metadata to include (area, project, priority)
36
+ - **How to determine fields** — where to look up the correct values
37
+ - **Confirmation** — what to report back after creating
38
+
39
+ ## Example Work Tracker Configurations
40
+
41
+ Uncomment and adapt these for your project:
42
+
43
+ <!--
44
+ ### Database API
45
+ ```bash
46
+ curl -X POST https://your-app.example.com/api/tasks \
47
+ -H "Content-Type: application/json" \
48
+ -H "Authorization: Bearer $API_TOKEN" \
49
+ -d '{
50
+ "text": "Short imperative description",
51
+ "area": "<area>",
52
+ "projectId": "<project-id>",
53
+ "notes": "## Problem\n...\n\n## Implementation\n..."
54
+ }'
55
+ ```
56
+ Look up the correct area from the project:
57
+ ```bash
58
+ sqlite3 project.db "SELECT area FROM projects WHERE id = '...'"
59
+ ```
60
+
61
+ ### GitHub Issues
62
+ ```bash
63
+ gh issue create --title "Plan: short description" \
64
+ --body "$(cat <<'EOF'
65
+ ## Problem
66
+ ...
67
+
68
+ ## Implementation
69
+ ...
70
+
71
+ ## Surface Area
72
+ ...
73
+
74
+ ## Acceptance Criteria
75
+ ...
76
+ EOF
77
+ )" --label "plan"
78
+ ```
79
+
80
+ ### Markdown File
81
+ Write the plan to a tasks file:
82
+ ```markdown
83
+ ## [Plan Title] — YYYY-MM-DD
84
+ Status: planned
85
+
86
+ [full plan content]
87
+ ```
88
+
89
+ ### Report Back
90
+ After creating, present:
91
+ - Item ID/link
92
+ - Project/area it was filed under
93
+ - Status
94
+ - Any open questions deferred
95
+ -->