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.
- package/LICENSE +21 -0
- package/README.md +129 -0
- package/bin/create-claude-rails.js +8 -0
- package/lib/cli.js +414 -0
- package/lib/copy.js +113 -0
- package/lib/db-setup.js +51 -0
- package/lib/metadata.js +41 -0
- package/lib/settings-merge.js +84 -0
- package/package.json +29 -0
- package/templates/EXTENSIONS.md +311 -0
- package/templates/README.md +485 -0
- package/templates/hooks/git-guardrails.sh +67 -0
- package/templates/hooks/skill-telemetry.sh +66 -0
- package/templates/hooks/skill-tool-telemetry.sh +54 -0
- package/templates/hooks/stop-hook.md +56 -0
- package/templates/memory/patterns/_pattern-template.md +119 -0
- package/templates/memory/patterns/pattern-intelligence-first.md +41 -0
- package/templates/rules/enforcement-pipeline.md +151 -0
- package/templates/scripts/finding-schema.json +94 -0
- package/templates/scripts/load-triage-history.js +151 -0
- package/templates/scripts/merge-findings.js +126 -0
- package/templates/scripts/pib-db-schema.sql +68 -0
- package/templates/scripts/pib-db.js +365 -0
- package/templates/scripts/triage-server.mjs +98 -0
- package/templates/scripts/triage-ui.html +536 -0
- package/templates/skills/audit/SKILL.md +269 -0
- package/templates/skills/audit/phases/finding-output.md +56 -0
- package/templates/skills/audit/phases/perspective-execution.md +63 -0
- package/templates/skills/audit/phases/perspective-selection.md +44 -0
- package/templates/skills/audit/phases/structural-checks.md +54 -0
- package/templates/skills/audit/phases/triage-history.md +45 -0
- package/templates/skills/debrief/SKILL.md +278 -0
- package/templates/skills/debrief/phases/auto-maintenance.md +48 -0
- package/templates/skills/debrief/phases/close-work.md +88 -0
- package/templates/skills/debrief/phases/health-checks.md +54 -0
- package/templates/skills/debrief/phases/inventory.md +40 -0
- package/templates/skills/debrief/phases/loose-ends.md +52 -0
- package/templates/skills/debrief/phases/record-lessons.md +67 -0
- package/templates/skills/debrief/phases/report.md +59 -0
- package/templates/skills/debrief/phases/update-state.md +48 -0
- package/templates/skills/execute/SKILL.md +293 -0
- package/templates/skills/execute/phases/commit-and-deploy.md +66 -0
- package/templates/skills/execute/phases/load-plan.md +49 -0
- package/templates/skills/execute/phases/perspectives.md +49 -0
- package/templates/skills/execute/phases/validators.md +50 -0
- package/templates/skills/execute/phases/verification-tools.md +67 -0
- package/templates/skills/investigate/SKILL.md +159 -0
- package/templates/skills/menu/SKILL.md +61 -0
- package/templates/skills/onboard/SKILL.md +301 -0
- package/templates/skills/onboard/phases/detect-state.md +70 -0
- package/templates/skills/onboard/phases/generate-context.md +81 -0
- package/templates/skills/onboard/phases/generate-session-loop.md +87 -0
- package/templates/skills/onboard/phases/interview.md +158 -0
- package/templates/skills/onboard/phases/modularity-menu.md +159 -0
- package/templates/skills/onboard/phases/summary.md +122 -0
- package/templates/skills/orient/SKILL.md +240 -0
- package/templates/skills/orient/phases/auto-maintenance.md +48 -0
- package/templates/skills/orient/phases/briefing.md +53 -0
- package/templates/skills/orient/phases/context.md +47 -0
- package/templates/skills/orient/phases/data-sync.md +35 -0
- package/templates/skills/orient/phases/health-checks.md +50 -0
- package/templates/skills/orient/phases/perspectives.md +46 -0
- package/templates/skills/orient/phases/work-scan.md +69 -0
- package/templates/skills/perspectives/_composition-patterns.md +240 -0
- package/templates/skills/perspectives/_context-template.md +152 -0
- package/templates/skills/perspectives/_eval-protocol.md +208 -0
- package/templates/skills/perspectives/_groups-template.yaml +49 -0
- package/templates/skills/perspectives/_lifecycle.md +93 -0
- package/templates/skills/perspectives/_prompt-guide.md +266 -0
- package/templates/skills/perspectives/accessibility/SKILL.md +177 -0
- package/templates/skills/perspectives/anti-confirmation/SKILL.md +170 -0
- package/templates/skills/perspectives/boundary-conditions/SKILL.md +261 -0
- package/templates/skills/perspectives/box-health/SKILL.md +338 -0
- package/templates/skills/perspectives/data-integrity/SKILL.md +152 -0
- package/templates/skills/perspectives/debugger/SKILL.md +218 -0
- package/templates/skills/perspectives/documentation/SKILL.md +166 -0
- package/templates/skills/perspectives/meta-process/SKILL.md +257 -0
- package/templates/skills/perspectives/mobile-responsiveness/SKILL.md +151 -0
- package/templates/skills/perspectives/organized-mind/SKILL.md +335 -0
- package/templates/skills/perspectives/output-contract.md +148 -0
- package/templates/skills/perspectives/performance/SKILL.md +165 -0
- package/templates/skills/perspectives/process/SKILL.md +235 -0
- package/templates/skills/perspectives/qa/SKILL.md +201 -0
- package/templates/skills/perspectives/security/SKILL.md +176 -0
- package/templates/skills/perspectives/technical-debt/SKILL.md +112 -0
- package/templates/skills/plan/SKILL.md +356 -0
- package/templates/skills/plan/phases/calibration-examples.md +75 -0
- package/templates/skills/plan/phases/completeness-check.md +44 -0
- package/templates/skills/plan/phases/composition-check.md +36 -0
- package/templates/skills/plan/phases/overlap-check.md +62 -0
- package/templates/skills/plan/phases/perspective-critique.md +47 -0
- package/templates/skills/plan/phases/plan-template.md +69 -0
- package/templates/skills/plan/phases/present.md +60 -0
- package/templates/skills/plan/phases/research.md +43 -0
- package/templates/skills/plan/phases/work-tracker.md +95 -0
- package/templates/skills/pulse/SKILL.md +242 -0
- package/templates/skills/pulse/phases/auto-fix-scope.md +40 -0
- package/templates/skills/pulse/phases/checks.md +58 -0
- package/templates/skills/pulse/phases/output.md +54 -0
- package/templates/skills/seed/SKILL.md +259 -0
- package/templates/skills/seed/phases/build-perspective.md +93 -0
- package/templates/skills/seed/phases/evaluate-existing.md +61 -0
- package/templates/skills/seed/phases/maintain.md +92 -0
- package/templates/skills/seed/phases/scan-signals.md +82 -0
- package/templates/skills/triage-audit/SKILL.md +251 -0
- package/templates/skills/triage-audit/phases/apply-verdicts.md +90 -0
- package/templates/skills/triage-audit/phases/load-findings.md +38 -0
- package/templates/skills/triage-audit/phases/triage-ui.md +66 -0
- package/templates/skills/upgrade/SKILL.md +265 -0
- package/templates/skills/upgrade/phases/apply.md +86 -0
- package/templates/skills/upgrade/phases/detect-current.md +82 -0
- package/templates/skills/upgrade/phases/diff-upstream.md +72 -0
- package/templates/skills/upgrade/phases/merge.md +97 -0
- package/templates/skills/validate/SKILL.md +116 -0
- package/templates/skills/validate/phases/validators.md +53 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orient
|
|
3
|
+
description: |
|
|
4
|
+
Session start orientation. Reads project state, syncs data, scans work
|
|
5
|
+
items, runs health checks and maintenance, then presents a briefing so
|
|
6
|
+
the session starts informed. This is a skeleton skill using the phases/
|
|
7
|
+
directory pattern. Use when: session start, "orient", "what's the state",
|
|
8
|
+
"/orient".
|
|
9
|
+
related:
|
|
10
|
+
- type: file
|
|
11
|
+
path: .claude/skills/orient/phases/context.md
|
|
12
|
+
role: "Project-specific: what to read at session start"
|
|
13
|
+
- type: file
|
|
14
|
+
path: .claude/skills/orient/phases/data-sync.md
|
|
15
|
+
role: "Project-specific: how to sync fresh data"
|
|
16
|
+
- type: file
|
|
17
|
+
path: .claude/skills/orient/phases/work-scan.md
|
|
18
|
+
role: "Project-specific: what work items to check"
|
|
19
|
+
- type: file
|
|
20
|
+
path: .claude/skills/orient/phases/health-checks.md
|
|
21
|
+
role: "Project-specific: system health checks"
|
|
22
|
+
- type: file
|
|
23
|
+
path: .claude/skills/orient/phases/auto-maintenance.md
|
|
24
|
+
role: "Project-specific: recurring session-start tasks"
|
|
25
|
+
- type: file
|
|
26
|
+
path: .claude/skills/orient/phases/briefing.md
|
|
27
|
+
role: "Project-specific: how to present the orientation"
|
|
28
|
+
- type: file
|
|
29
|
+
path: .claude/skills/orient/phases/perspectives.md
|
|
30
|
+
role: "Project-specific: which perspectives to activate"
|
|
31
|
+
- type: file
|
|
32
|
+
path: .claude/skills/perspectives/_context.md
|
|
33
|
+
role: "Project identity and configuration"
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
# /orient — Session Orientation
|
|
37
|
+
|
|
38
|
+
## Purpose
|
|
39
|
+
|
|
40
|
+
Start every session with a clear picture of current state so the user
|
|
41
|
+
doesn't have to carry it in their head. Without orientation, Claude starts
|
|
42
|
+
blind — makes the same mistakes, asks the same questions, misses what
|
|
43
|
+
changed since last time. The session loop is the system's learning
|
|
44
|
+
mechanism: orient reads the past, debrief writes the future.
|
|
45
|
+
|
|
46
|
+
This is a **skeleton skill** using the `phases/` directory pattern. The
|
|
47
|
+
orchestration (what to do and in what order) is generic. Your project
|
|
48
|
+
defines the specifics — what files to read, what data to sync, what work
|
|
49
|
+
items to check — in phase files under `phases/`.
|
|
50
|
+
|
|
51
|
+
### Phase File Protocol
|
|
52
|
+
|
|
53
|
+
Phase files have three states:
|
|
54
|
+
|
|
55
|
+
| State | Meaning |
|
|
56
|
+
|-------|---------|
|
|
57
|
+
| Absent or empty | Use this skeleton's **default behavior** for the phase |
|
|
58
|
+
| Contains only `skip: true` | **Explicitly opted out** — skip this phase entirely |
|
|
59
|
+
| Contains content | **Custom behavior** — use the file's content instead |
|
|
60
|
+
|
|
61
|
+
The skeleton always does something reasonable when a phase file is absent.
|
|
62
|
+
Phase files customize, not enable. Use `skip: true` when you actively
|
|
63
|
+
don't want a phase to run — not even the default.
|
|
64
|
+
|
|
65
|
+
## Why This Matters
|
|
66
|
+
|
|
67
|
+
If Claude Code starts a session without reading what happened last time,
|
|
68
|
+
it has no memory. If it ends a session without recording what happened,
|
|
69
|
+
the next session starts blind. Orient doesn't need to be complex — a
|
|
70
|
+
minimal orient reads a project description and a status file. A mature
|
|
71
|
+
orient pulls fresh data, checks queues, evaluates health, and surfaces
|
|
72
|
+
what needs attention. The complexity grows from use: each check gets
|
|
73
|
+
added because its absence caused a problem. But the loop itself must
|
|
74
|
+
exist from day one, or nothing that follows has a foundation.
|
|
75
|
+
|
|
76
|
+
## Workflow
|
|
77
|
+
|
|
78
|
+
### 1. Load Context (core)
|
|
79
|
+
|
|
80
|
+
Read `phases/context.md` for the list of files and state to load at
|
|
81
|
+
session start. This typically includes status files, memory from prior
|
|
82
|
+
sessions, and project-specific context.
|
|
83
|
+
|
|
84
|
+
**Default (absent/empty):** Read at minimum:
|
|
85
|
+
- The project's root `CLAUDE.md` (already loaded by Claude Code)
|
|
86
|
+
- `system-status.md` or equivalent state file if one exists
|
|
87
|
+
- Memory files from prior sessions if the project uses memory
|
|
88
|
+
|
|
89
|
+
The goal: build a mental model of where things stand before doing
|
|
90
|
+
anything else.
|
|
91
|
+
|
|
92
|
+
### 2. Sync Data (core)
|
|
93
|
+
|
|
94
|
+
Read `phases/data-sync.md` for how to pull fresh canonical data from
|
|
95
|
+
remote sources (databases, APIs, shared storage).
|
|
96
|
+
|
|
97
|
+
**Skip (absent/empty).** Purely local projects don't need it. Projects
|
|
98
|
+
with remote canonical data stores define their sync commands here.
|
|
99
|
+
|
|
100
|
+
Report if sync fails — a stale local cache is better than no data, but
|
|
101
|
+
the user should know it's stale.
|
|
102
|
+
|
|
103
|
+
### 3. Scan Work Items (core)
|
|
104
|
+
|
|
105
|
+
Read `phases/work-scan.md` for what work items to check. This includes
|
|
106
|
+
whatever the project uses to track work: a backlog, task list, inbox,
|
|
107
|
+
queue, or issue tracker.
|
|
108
|
+
|
|
109
|
+
**Skip (absent/empty).** But note: without work scanning, orient can
|
|
110
|
+
only report on project state, not on what needs doing. This phase is
|
|
111
|
+
what connects orientation to action.
|
|
112
|
+
|
|
113
|
+
### 4. Health Checks (core)
|
|
114
|
+
|
|
115
|
+
Read `phases/health-checks.md` for system health and validation checks
|
|
116
|
+
to run at session start. These catch problems early — stale data, broken
|
|
117
|
+
references, failed background processes, configuration drift.
|
|
118
|
+
|
|
119
|
+
**Skip (absent/empty).** Projects add health checks as they discover
|
|
120
|
+
failure modes worth detecting early.
|
|
121
|
+
|
|
122
|
+
> **Orient vs Pulse vs Audit:** Orient health checks verify *operational*
|
|
123
|
+
> state — is the system running, is data fresh, are processes alive?
|
|
124
|
+
> Pulse (embedded in orient) verifies *descriptive* accuracy — do counts
|
|
125
|
+
> match, do documented states match reality? Audit verifies *quality*
|
|
126
|
+
> through expert perspectives — is the code sound, are conventions
|
|
127
|
+
> holding? Orient runs every session; pulse runs inside it; audit runs
|
|
128
|
+
> periodically. Each asks a different question about the same system.
|
|
129
|
+
|
|
130
|
+
### 5. Auto-Maintenance (core)
|
|
131
|
+
|
|
132
|
+
Read `phases/auto-maintenance.md` for recurring automated tasks that
|
|
133
|
+
should run every session. These are operations that would decay if left
|
|
134
|
+
to human memory — the anti-entropy principle in action.
|
|
135
|
+
|
|
136
|
+
**Skip (absent/empty).** Projects add maintenance tasks as they discover
|
|
137
|
+
operations that need regular execution but aren't worth remembering to
|
|
138
|
+
invoke manually.
|
|
139
|
+
|
|
140
|
+
### 6. Activate Perspectives (core)
|
|
141
|
+
|
|
142
|
+
Read `phases/perspectives.md` for which expert perspectives or lenses
|
|
143
|
+
should be active during this session. Perspectives watch for specific
|
|
144
|
+
concerns (quality, security, process adherence, non-project items)
|
|
145
|
+
without being explicitly invoked for each decision.
|
|
146
|
+
|
|
147
|
+
**Skip (absent/empty).**
|
|
148
|
+
|
|
149
|
+
### 7. Present Briefing (presentation)
|
|
150
|
+
|
|
151
|
+
Read `phases/briefing.md` for how to present the orientation results.
|
|
152
|
+
This phase controls format, sections, tone, and any time-aware or
|
|
153
|
+
context-aware presentation modes.
|
|
154
|
+
|
|
155
|
+
**Default (absent/empty):** Present a simple summary of what was gathered
|
|
156
|
+
in steps 1-6: project state, work items needing attention, any health
|
|
157
|
+
issues found, maintenance results.
|
|
158
|
+
|
|
159
|
+
### 8. Discover Custom Phases
|
|
160
|
+
|
|
161
|
+
After running the core phases above, check for any additional phase
|
|
162
|
+
files in `phases/` that the skeleton doesn't define. These are project-
|
|
163
|
+
specific extensions. Each custom phase file declares its position in the
|
|
164
|
+
workflow (e.g., "runs after work scan, before briefing"). Execute them
|
|
165
|
+
at their declared position.
|
|
166
|
+
|
|
167
|
+
### 9. Name the Session
|
|
168
|
+
|
|
169
|
+
Rename the session so the sidebar is scannable. Every session that starts
|
|
170
|
+
with `/orient` looks identical in the history — naming fixes this.
|
|
171
|
+
|
|
172
|
+
After the briefing and the user's response, derive a short name (3-6
|
|
173
|
+
words) from what the user says they're working on. If the user hasn't
|
|
174
|
+
stated a focus, ask.
|
|
175
|
+
|
|
176
|
+
## Phase Summary
|
|
177
|
+
|
|
178
|
+
| Phase | Absent = | What it customizes |
|
|
179
|
+
|-------|----------|-------------------|
|
|
180
|
+
| `context.md` | Default: read CLAUDE.md, status, memory | What files and state to load |
|
|
181
|
+
| `data-sync.md` | Skip | How to sync remote data |
|
|
182
|
+
| `work-scan.md` | Skip | What work items to check |
|
|
183
|
+
| `health-checks.md` | Skip | System health checks |
|
|
184
|
+
| `auto-maintenance.md` | Skip | Recurring session-start tasks |
|
|
185
|
+
| `perspectives.md` | Skip | Which perspectives to activate |
|
|
186
|
+
| `briefing.md` | Default: simple summary | How to present orientation |
|
|
187
|
+
|
|
188
|
+
## Quick Mode
|
|
189
|
+
|
|
190
|
+
Phases are either **core** (maintain system state) or **presentation**
|
|
191
|
+
(surface information for the user). For lightweight sessions where the
|
|
192
|
+
user already knows what they're doing, skip presentation phases. Core
|
|
193
|
+
phases always run because they keep the system healthy.
|
|
194
|
+
|
|
195
|
+
- **Core phases** (always run): context, data-sync, work-scan,
|
|
196
|
+
health-checks, auto-maintenance, perspectives
|
|
197
|
+
- **Presentation phases** (skippable): briefing
|
|
198
|
+
|
|
199
|
+
A project that wants a quick orient variant skips the briefing phase
|
|
200
|
+
and outputs a one-line confirmation instead.
|
|
201
|
+
|
|
202
|
+
## Extending
|
|
203
|
+
|
|
204
|
+
To customize a phase: write content in the corresponding `phases/` file.
|
|
205
|
+
To skip a phase: leave the file empty or don't create it.
|
|
206
|
+
To add a phase the skeleton doesn't define: create a new file in
|
|
207
|
+
`phases/` with a description of when it runs relative to the core
|
|
208
|
+
phases. Claude reads whatever phase files exist at runtime.
|
|
209
|
+
|
|
210
|
+
Examples of phases mature projects add:
|
|
211
|
+
- Command queue processing (check for instructions from external UIs)
|
|
212
|
+
- Deferred item evaluation (re-check trigger conditions on paused work)
|
|
213
|
+
- Time-aware briefing modes (morning briefing vs. standard session)
|
|
214
|
+
- Proactive skill suggestions (surface tools relevant to current state)
|
|
215
|
+
- Calendar integration (upcoming events that need preparation)
|
|
216
|
+
|
|
217
|
+
## Calibration
|
|
218
|
+
|
|
219
|
+
**Core failure this targets:** Starting a session without context, forcing
|
|
220
|
+
the user to reconstruct state from memory or ask for information the
|
|
221
|
+
system already has.
|
|
222
|
+
|
|
223
|
+
### Without Skill (Bad)
|
|
224
|
+
|
|
225
|
+
New session starts. Claude says "How can I help?" The user asks about
|
|
226
|
+
their project status — Claude searches files, reads logs, gives a partial
|
|
227
|
+
picture. The user asks about pending tasks — Claude queries again. The
|
|
228
|
+
user mentions something from last session — Claude has no memory of it.
|
|
229
|
+
|
|
230
|
+
Three round trips to assemble context that one orientation would have
|
|
231
|
+
surfaced. Meanwhile, an overdue deadline sits unmentioned because nobody
|
|
232
|
+
asked about it.
|
|
233
|
+
|
|
234
|
+
### With Skill (Good)
|
|
235
|
+
|
|
236
|
+
New session starts. Claude loads project state, syncs fresh data, scans
|
|
237
|
+
the work backlog, and presents: here's where things stand, here's what
|
|
238
|
+
needs attention, here's what changed since last time. The overdue item
|
|
239
|
+
is surfaced before the user has to remember it. One message, full
|
|
240
|
+
picture. The user decides what to work on from an informed position.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Auto-Maintenance — Recurring Session-Start Tasks
|
|
2
|
+
|
|
3
|
+
Define automated tasks that should run every session. These are operations
|
|
4
|
+
that would decay if left to human memory — the anti-entropy principle
|
|
5
|
+
applied to session management.
|
|
6
|
+
|
|
7
|
+
The distinction from health checks: health checks DETECT problems;
|
|
8
|
+
auto-maintenance DOES work. A health check reports "data is stale."
|
|
9
|
+
|
|
10
|
+
When this file is absent or empty, this step is skipped. (`skip: true`
|
|
11
|
+
is equivalent to absent here.)
|
|
12
|
+
An auto-maintenance task runs the sync to fix it.
|
|
13
|
+
|
|
14
|
+
## What to Include
|
|
15
|
+
|
|
16
|
+
For each task, provide:
|
|
17
|
+
- **What** — the operation to perform
|
|
18
|
+
- **Why every session** — what decays if this is skipped
|
|
19
|
+
- **Command** — how to run it
|
|
20
|
+
- **Auto-execute?** — yes (run silently) or surface (ask user first)
|
|
21
|
+
|
|
22
|
+
## Example Maintenance Tasks
|
|
23
|
+
|
|
24
|
+
Uncomment and adapt these for your project:
|
|
25
|
+
|
|
26
|
+
<!--
|
|
27
|
+
### Process Pending Queue Items
|
|
28
|
+
```bash
|
|
29
|
+
# Check for items queued by external systems
|
|
30
|
+
curl -s https://your-api.example.com/api/queue/pending
|
|
31
|
+
```
|
|
32
|
+
Items queued from a UI or external integration since last session.
|
|
33
|
+
Auto-execute routine items; surface unusual ones for confirmation.
|
|
34
|
+
|
|
35
|
+
### Rotate Logs
|
|
36
|
+
```bash
|
|
37
|
+
# Truncate logs that grow unbounded
|
|
38
|
+
tail -1000 sync/app.log > sync/app.log.tmp && mv sync/app.log.tmp sync/app.log
|
|
39
|
+
```
|
|
40
|
+
Prevents log files from consuming disk. Silent, no user interaction.
|
|
41
|
+
|
|
42
|
+
### Refresh Cached Computations
|
|
43
|
+
```bash
|
|
44
|
+
./scripts/rebuild-index.sh
|
|
45
|
+
```
|
|
46
|
+
Regenerates derived data that may have drifted from source files.
|
|
47
|
+
Run if source files changed since last session.
|
|
48
|
+
-->
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Briefing — How to Present the Orientation
|
|
2
|
+
|
|
3
|
+
Define how to present the results of orientation to the user. This is
|
|
4
|
+
the presentation phase — it can be skipped in quick mode without losing
|
|
5
|
+
any system maintenance value.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, the default behavior is: present a
|
|
8
|
+
simple summary of project state, work items, and any health issues.
|
|
9
|
+
To explicitly skip the briefing, write only `skip: true`.
|
|
10
|
+
|
|
11
|
+
## What to Include
|
|
12
|
+
|
|
13
|
+
- **Format** — how to structure the briefing (sections, order, grouping)
|
|
14
|
+
- **Tone** — how to communicate (practical, warm, terse, etc.)
|
|
15
|
+
- **Modes** — if your project uses different presentation modes (e.g.,
|
|
16
|
+
morning vs. standard, verbose vs. compact), define them here
|
|
17
|
+
- **Suggestions** — contextual recommendations based on gathered data
|
|
18
|
+
|
|
19
|
+
## Example Briefing Formats
|
|
20
|
+
|
|
21
|
+
Uncomment and adapt these for your project:
|
|
22
|
+
|
|
23
|
+
<!--
|
|
24
|
+
### Standard Briefing
|
|
25
|
+
|
|
26
|
+
Present in this order:
|
|
27
|
+
1. **Items needing attention** — overdue, flagged, or blocked work
|
|
28
|
+
2. **Inbox** — counts of unprocessed items
|
|
29
|
+
3. **Recent activity** — what changed since last session
|
|
30
|
+
4. **Suggested focus** — 1-3 items grounded in data, not generic
|
|
31
|
+
|
|
32
|
+
Tone: direct, practical. Lead with what matters most.
|
|
33
|
+
Close with: "What are we working on?"
|
|
34
|
+
|
|
35
|
+
### Compact Briefing (quick mode fallback)
|
|
36
|
+
|
|
37
|
+
One line per category, counts only:
|
|
38
|
+
```
|
|
39
|
+
Overdue: 2 | Due today: 1 | Inbox: 5 | Health: OK
|
|
40
|
+
```
|
|
41
|
+
No suggestions, no narrative. Just the numbers.
|
|
42
|
+
|
|
43
|
+
### Time-Aware Modes
|
|
44
|
+
|
|
45
|
+
If the session time matters for your project:
|
|
46
|
+
- **Morning** (first session of day): include calendar, completions
|
|
47
|
+
since yesterday, day-ahead view
|
|
48
|
+
- **Evening** (after 5pm): include tomorrow preview, prep needed
|
|
49
|
+
- **Standard** (all other): focus on work surface and system state
|
|
50
|
+
|
|
51
|
+
Track which mode ran today with a datestamp file to avoid repeating
|
|
52
|
+
the morning briefing on subsequent sessions.
|
|
53
|
+
-->
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Context — What to Read at Session Start
|
|
2
|
+
|
|
3
|
+
Define what files and state to load so the session starts with a model
|
|
4
|
+
of where things stand. The /orient skill reads this file and loads each
|
|
5
|
+
item before proceeding.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, the default behavior is: read the
|
|
8
|
+
project's root CLAUDE.md, system-status.md, and relevant memory files.
|
|
9
|
+
To explicitly skip context loading, write only `skip: true`.
|
|
10
|
+
|
|
11
|
+
## What to Include
|
|
12
|
+
|
|
13
|
+
For each context source, provide:
|
|
14
|
+
- **What** — the file or data to read
|
|
15
|
+
- **Why** — what it tells you about current state
|
|
16
|
+
- **How** — the command or tool to read it (Read tool, sqlite3, curl, etc.)
|
|
17
|
+
|
|
18
|
+
## Example Context Sources
|
|
19
|
+
|
|
20
|
+
Uncomment and adapt these for your project:
|
|
21
|
+
|
|
22
|
+
<!--
|
|
23
|
+
### System Status
|
|
24
|
+
```
|
|
25
|
+
Read system-status.md
|
|
26
|
+
```
|
|
27
|
+
The single-source-of-truth for what's built, what's broken, and what's
|
|
28
|
+
next. Read every session — it's the fastest way to know where things
|
|
29
|
+
stand.
|
|
30
|
+
|
|
31
|
+
### Memory Files
|
|
32
|
+
```
|
|
33
|
+
Read memory/MEMORY.md for the index, then load files relevant to the
|
|
34
|
+
session's likely focus.
|
|
35
|
+
```
|
|
36
|
+
Persistent context from prior sessions — user preferences, project
|
|
37
|
+
state, feedback patterns, references. Don't read everything — scan
|
|
38
|
+
the index and load what's relevant.
|
|
39
|
+
|
|
40
|
+
### Project-Specific State
|
|
41
|
+
```
|
|
42
|
+
Read config/project-state.yaml
|
|
43
|
+
```
|
|
44
|
+
Whatever your project uses to track configuration, feature flags,
|
|
45
|
+
environment state, or deployment status. Anything that changes between
|
|
46
|
+
sessions and affects how you work.
|
|
47
|
+
-->
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Data Sync — How to Pull Fresh Canonical Data
|
|
2
|
+
|
|
3
|
+
Define how to sync data from remote canonical sources so the local
|
|
4
|
+
environment has current information. The /orient skill reads this file
|
|
5
|
+
and runs each sync step before scanning work items.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, this step is skipped — purely local
|
|
8
|
+
projects don't need it. (`skip: true` is equivalent to absent here.)
|
|
9
|
+
|
|
10
|
+
## What to Include
|
|
11
|
+
|
|
12
|
+
For each sync source, provide:
|
|
13
|
+
- **Source** — where the canonical data lives
|
|
14
|
+
- **Command** — how to pull it locally
|
|
15
|
+
- **Failure handling** — what to do if sync fails (use stale data? report?)
|
|
16
|
+
|
|
17
|
+
## Example Sync Sources
|
|
18
|
+
|
|
19
|
+
Uncomment and adapt these for your project:
|
|
20
|
+
|
|
21
|
+
<!--
|
|
22
|
+
### Database Sync
|
|
23
|
+
```bash
|
|
24
|
+
./scripts/sync-db.sh --pull
|
|
25
|
+
```
|
|
26
|
+
Pulls the production database to a local cache. If this fails, note
|
|
27
|
+
staleness and continue — stale data is better than no data.
|
|
28
|
+
|
|
29
|
+
### API State Refresh
|
|
30
|
+
```bash
|
|
31
|
+
curl -s https://your-api.example.com/api/status > .cache/api-status.json
|
|
32
|
+
```
|
|
33
|
+
Fetches current state from a remote API. Cache locally so subsequent
|
|
34
|
+
queries during the session don't require network calls.
|
|
35
|
+
-->
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Health Checks — System Health at Session Start
|
|
2
|
+
|
|
3
|
+
Define health and validation checks to run early in the session. These
|
|
4
|
+
catch problems before they waste time — stale data, broken references,
|
|
5
|
+
failed background processes, configuration drift.
|
|
6
|
+
|
|
7
|
+
Projects add health checks as they discover failure modes worth detecting
|
|
8
|
+
early. A new project may have none; a mature project may have many.
|
|
9
|
+
|
|
10
|
+
When this file is absent or empty, this step is skipped. (`skip: true`
|
|
11
|
+
is equivalent to absent here.)
|
|
12
|
+
|
|
13
|
+
## What to Include
|
|
14
|
+
|
|
15
|
+
For each check, provide:
|
|
16
|
+
- **Name** — short label for reporting
|
|
17
|
+
- **Command** — how to run the check
|
|
18
|
+
- **What it catches** — what failure looks like
|
|
19
|
+
- **Severity** — blocking (stop and fix) vs. warning (note and continue)
|
|
20
|
+
|
|
21
|
+
## Example Health Checks
|
|
22
|
+
|
|
23
|
+
Uncomment and adapt these for your project:
|
|
24
|
+
|
|
25
|
+
<!--
|
|
26
|
+
### Data Freshness
|
|
27
|
+
```bash
|
|
28
|
+
# Check if local data cache is recent enough to trust
|
|
29
|
+
LAST_SYNC=$(stat -f %m .cache/db.sqlite 2>/dev/null || echo 0)
|
|
30
|
+
NOW=$(date +%s)
|
|
31
|
+
AGE=$(( (NOW - LAST_SYNC) / 3600 ))
|
|
32
|
+
[ "$AGE" -lt 24 ] && echo "fresh" || echo "STALE: ${AGE}h old"
|
|
33
|
+
```
|
|
34
|
+
Warns if local data hasn't been synced in over 24 hours. Not blocking —
|
|
35
|
+
stale data is usable but may be wrong.
|
|
36
|
+
|
|
37
|
+
### Background Process Health
|
|
38
|
+
```bash
|
|
39
|
+
# Check if a background process is still running
|
|
40
|
+
pgrep -f "your-daemon" > /dev/null && echo "running" || echo "NOT RUNNING"
|
|
41
|
+
```
|
|
42
|
+
Warns if a background process that should be running has stopped.
|
|
43
|
+
|
|
44
|
+
### Reference Integrity
|
|
45
|
+
```bash
|
|
46
|
+
./scripts/validate-refs.sh
|
|
47
|
+
```
|
|
48
|
+
Checks that cross-references between files are still valid. Catches
|
|
49
|
+
renames and deletions that break links.
|
|
50
|
+
-->
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Perspectives — Which Expert Lenses to Activate
|
|
2
|
+
|
|
3
|
+
Define which perspectives (expert evaluation lenses) should be active
|
|
4
|
+
during this session. Active perspectives watch for specific concerns
|
|
5
|
+
throughout the session without being explicitly invoked for each decision.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, this step is skipped. (`skip: true`
|
|
8
|
+
is equivalent to absent here.)
|
|
9
|
+
|
|
10
|
+
## What to Include
|
|
11
|
+
|
|
12
|
+
For each perspective, provide:
|
|
13
|
+
- **Name** — the perspective to activate
|
|
14
|
+
- **Path** — where the perspective's SKILL.md lives
|
|
15
|
+
- **When active** — always, or only under certain conditions
|
|
16
|
+
- **What it watches for** — the concern this lens monitors
|
|
17
|
+
|
|
18
|
+
## Example Perspective Configurations
|
|
19
|
+
|
|
20
|
+
Uncomment and adapt these for your project:
|
|
21
|
+
|
|
22
|
+
<!--
|
|
23
|
+
### Always-On Perspectives
|
|
24
|
+
|
|
25
|
+
These activate every session regardless of focus:
|
|
26
|
+
|
|
27
|
+
**QA Perspective** (`.claude/skills/perspectives/qa/SKILL.md`):
|
|
28
|
+
Watches for untested changes, missing edge cases, and quality gaps.
|
|
29
|
+
Active whenever code is being written or modified.
|
|
30
|
+
|
|
31
|
+
**Process Perspective** (`.claude/skills/perspectives/process/SKILL.md`):
|
|
32
|
+
Watches for process deviations — skipped steps, missing validation,
|
|
33
|
+
undocumented decisions. Active every session.
|
|
34
|
+
|
|
35
|
+
### Conditional Perspectives
|
|
36
|
+
|
|
37
|
+
These activate based on session context:
|
|
38
|
+
|
|
39
|
+
**Security Perspective** (`.claude/skills/perspectives/security/SKILL.md`):
|
|
40
|
+
Activate when the session involves authentication, data handling,
|
|
41
|
+
external APIs, or user input processing.
|
|
42
|
+
|
|
43
|
+
**Performance Perspective** (`.claude/skills/perspectives/performance/SKILL.md`):
|
|
44
|
+
Activate when the session involves database queries, rendering logic,
|
|
45
|
+
or data processing at scale.
|
|
46
|
+
-->
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Work Scan — What Work Items to Check
|
|
2
|
+
|
|
3
|
+
Define what work items to scan so orient can surface what needs attention.
|
|
4
|
+
This is what connects orientation to action — without it, orient can
|
|
5
|
+
only report on project state, not on what needs doing.
|
|
6
|
+
|
|
7
|
+
When this file is absent or empty, the default behavior is: query the
|
|
8
|
+
reference data layer (pib-db) for open actions and projects. If pib-db
|
|
9
|
+
is not initialized, skip gracefully with a note that work tracking is
|
|
10
|
+
available via `node scripts/pib-db.js init`.
|
|
11
|
+
|
|
12
|
+
## Default Behavior (pib-db)
|
|
13
|
+
|
|
14
|
+
When no custom work-scan is configured, query pib-db:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Open actions (overdue first, then due today, then flagged, then recent)
|
|
18
|
+
node scripts/pib-db.js list-actions
|
|
19
|
+
|
|
20
|
+
# Active projects with open action counts
|
|
21
|
+
node scripts/pib-db.js list-projects
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Present grouped by urgency:
|
|
25
|
+
- **Overdue** — actions with `due` before today
|
|
26
|
+
- **Due today** — actions with `due` = today
|
|
27
|
+
- **Flagged** — actions with `flagged = 1`
|
|
28
|
+
- **Recent** — actions created in the last 7 days
|
|
29
|
+
|
|
30
|
+
If pib-db doesn't exist (file not found), skip with: "Work tracking
|
|
31
|
+
available — run `node scripts/pib-db.js init` to set up."
|
|
32
|
+
|
|
33
|
+
## What to Include
|
|
34
|
+
|
|
35
|
+
For each work source, provide:
|
|
36
|
+
- **What** — the query or command to find open work
|
|
37
|
+
- **What it surfaces** — overdue items, due today, flagged/urgent, blocked
|
|
38
|
+
- **Format** — how to present results (counts, lists, grouped)
|
|
39
|
+
|
|
40
|
+
## Example Work Scans
|
|
41
|
+
|
|
42
|
+
Uncomment and adapt these for your project:
|
|
43
|
+
|
|
44
|
+
<!--
|
|
45
|
+
### Task Backlog
|
|
46
|
+
```bash
|
|
47
|
+
sqlite3 project.db "SELECT id, text, status, due_date FROM tasks WHERE status != 'done' ORDER BY due_date"
|
|
48
|
+
```
|
|
49
|
+
All open tasks. Group by: overdue, due today, due this week, no date.
|
|
50
|
+
|
|
51
|
+
### Inbox / Queue
|
|
52
|
+
```bash
|
|
53
|
+
sqlite3 project.db "SELECT COUNT(*) FROM inbox WHERE processed = 0"
|
|
54
|
+
```
|
|
55
|
+
Unprocessed items that arrived since last session. Report count; details
|
|
56
|
+
come during processing.
|
|
57
|
+
|
|
58
|
+
### Issue Tracker
|
|
59
|
+
```bash
|
|
60
|
+
gh issue list --state open --assignee @me --json number,title,labels
|
|
61
|
+
```
|
|
62
|
+
Open issues assigned to the user. Flag any marked urgent or blocking.
|
|
63
|
+
|
|
64
|
+
### Markdown Task Lists
|
|
65
|
+
```bash
|
|
66
|
+
grep -r '- \[ \]' docs/todo.md
|
|
67
|
+
```
|
|
68
|
+
If work is tracked in markdown files, scan for unchecked items.
|
|
69
|
+
-->
|