create-claude-rails 0.1.2 → 0.2.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 (31) hide show
  1. package/lib/cli.js +47 -3
  2. package/lib/copy.js +16 -2
  3. package/lib/metadata.js +2 -1
  4. package/lib/reset.js +193 -0
  5. package/package.json +1 -1
  6. package/templates/EXTENSIONS.md +32 -32
  7. package/templates/README.md +2 -2
  8. package/templates/skills/onboard/SKILL.md +55 -22
  9. package/templates/skills/onboard/phases/detect-state.md +21 -39
  10. package/templates/skills/onboard/phases/generate-context.md +1 -1
  11. package/templates/skills/onboard/phases/interview.md +22 -2
  12. package/templates/skills/onboard/phases/modularity-menu.md +17 -14
  13. package/templates/skills/onboard/phases/options.md +98 -0
  14. package/templates/skills/onboard/phases/post-onboard-audit.md +19 -1
  15. package/templates/skills/onboard/phases/summary.md +1 -1
  16. package/templates/skills/onboard/phases/work-tracking.md +231 -0
  17. package/templates/skills/perspectives/_groups-template.yaml +1 -1
  18. package/templates/skills/perspectives/architecture/SKILL.md +275 -0
  19. package/templates/skills/perspectives/box-health/SKILL.md +8 -8
  20. package/templates/skills/perspectives/data-integrity/SKILL.md +2 -2
  21. package/templates/skills/perspectives/documentation/SKILL.md +4 -5
  22. package/templates/skills/perspectives/historian/SKILL.md +250 -0
  23. package/templates/skills/perspectives/process/SKILL.md +3 -3
  24. package/templates/skills/perspectives/skills-coverage/SKILL.md +294 -0
  25. package/templates/skills/perspectives/system-advocate/SKILL.md +191 -0
  26. package/templates/skills/perspectives/usability/SKILL.md +186 -0
  27. package/templates/skills/seed/phases/scan-signals.md +7 -3
  28. package/templates/skills/upgrade/SKILL.md +15 -15
  29. package/templates/skills/upgrade/phases/apply.md +3 -3
  30. package/templates/skills/upgrade/phases/detect-current.md +7 -7
  31. package/templates/skills/upgrade/phases/diff-upstream.md +3 -3
@@ -0,0 +1,231 @@
1
+ # Work Tracking — Choose How to Track Work
2
+
3
+ After the interview and before generating context, surface how the project
4
+ tracks work — or start tracking if nothing exists yet. This phase presents
5
+ two built-in options plus bring-your-own. The user chooses one, the other,
6
+ or neither.
7
+
8
+ When this file is absent or empty, the default behavior is: detect existing
9
+ work tracking, present options, record the choice in `.pibrc.json`. To skip
10
+ work-tracking decisions entirely, write only `skip: true`.
11
+
12
+ ## When This Phase Activates
13
+
14
+ This phase runs in all onboard modes (first-run, early re-run, mature re-run).
15
+
16
+ - **First-run:** Present the two default options, ask user to choose
17
+ - **Early re-run:** Show what's currently set up, ask if it's working well
18
+ - **Mature re-run:** Review what's being used, surface if it's time to switch
19
+
20
+ ## Detection: What Already Exists
21
+
22
+ Before presenting options, scan for signs of existing work tracking:
23
+
24
+ 1. **pib.db** — SQLite database from a previous CoR install or work-tracking
25
+ module selection
26
+ 2. **Markdown task files** — `tasks.md`, `TODO.md`, `backlog.md`, `work.md`
27
+ in the project root or `docs/`
28
+ 3. **GitHub Issues** — `gh issue list` returns results (if `gh` CLI is available)
29
+ 4. **Custom work-scan phase** — `.claude/skills/orient/phases/work-scan.md`
30
+ with non-default content
31
+ 5. **`.pibrc.json` workTracking field** — Previous choice already recorded
32
+
33
+ If something is already set up and working, acknowledge it: "I see you're
34
+ using [X]. Is that working well, or would you like to try something
35
+ different?" Don't re-present the full menu unless the user wants to switch.
36
+
37
+ ## Detecting Prior Interview Context
38
+
39
+ If the interview already revealed how work is tracked ("I use GitHub Issues",
40
+ "I keep a list in Notion"), reference that answer here. Don't re-ask.
41
+ Instead: "You mentioned using [system]. Should we wire the session loop to
42
+ that, or would you like to try one of these built-in options?"
43
+
44
+ ## The Two Built-In Options
45
+
46
+ ### Option A: SQLite Database (pib-db)
47
+
48
+ **What it is:** A lightweight, local SQLite database with semantic IDs,
49
+ status tracking, project containers, and tagging. The reference data layer
50
+ that CoR skills (orient, debrief, plan) use by default.
51
+
52
+ **Good for:**
53
+ - Projects that want zero external dependencies (no API keys, no service)
54
+ - Projects where work is created from plans (plan → action in pib-db)
55
+ - Projects with multiple active workstreams that need querying
56
+ - Projects that also use the audit loop (findings can link to actions)
57
+
58
+ **What gets set up:**
59
+ - `pib.db` — SQLite database (created by `node scripts/pib-db.js init`)
60
+ - `scripts/pib-db.js` — CLI for create/query/close operations
61
+ - `scripts/pib-db-schema.sql` — Schema definition
62
+ - Orient `work-scan.md` phase — queries pib-db for open items
63
+ - Plan `work-tracker.md` phase — creates actions from plans
64
+ - Debrief `close-work.md` phase — marks items done
65
+
66
+ **Trade-offs:**
67
+ - Requires `better-sqlite3` npm dependency
68
+ - Work must be created via CoR skills or the CLI
69
+ - No native web UI (though custom dashboards are possible)
70
+
71
+ **Cost:** 2-3 minutes to `npm install better-sqlite3` and initialize.
72
+
73
+ ### Option B: Markdown File (tasks.md)
74
+
75
+ **What it is:** A single markdown file with checkbox task items and optional
76
+ metadata tags. No database, no schema, no dependencies. Work items are
77
+ lines in a file, checked off when done:
78
+
79
+ ```markdown
80
+ ## Active
81
+
82
+ - [ ] Build auth API <!-- area: backend -->
83
+ - [ ] Write docs for onboarding <!-- area: docs -->
84
+
85
+ ## Done
86
+
87
+ - [x] Set up CI pipeline <!-- area: infra, completed: 2025-04-01 -->
88
+ ```
89
+
90
+ Orient and debrief read and write by parsing the markdown file. Plans
91
+ append new items. Everything lives in git.
92
+
93
+ **Good for:**
94
+ - Projects that want all work in git (history, blame, review)
95
+ - Solo projects that want minimal tooling
96
+ - Projects that prefer reading work as a flat file
97
+ - Quick-start projects that might upgrade to pib-db later
98
+
99
+ **What gets set up:**
100
+ - `tasks.md` (or user-chosen name) — The task file
101
+ - Orient `work-scan.md` phase — parses tasks.md for open items
102
+ - Plan `work-tracker.md` phase — appends to tasks.md
103
+ - Debrief `close-work.md` phase — checks off completed items
104
+
105
+ **Trade-offs:**
106
+ - No semantic queries (orient must parse and sort in markdown)
107
+ - Concurrency issues if multiple agents write simultaneously
108
+ - Manual cleanup of old items (no soft-delete)
109
+ - Can't correlate work items with audit findings
110
+
111
+ **Cost:** Zero dependencies, instant setup.
112
+
113
+ ### Option C: Bring Your Own
114
+
115
+ **What it is:** You already have a work tracker (GitHub Issues, Linear,
116
+ Jira, Notion, a spreadsheet). This phase doesn't create anything — it
117
+ records what system you use and wires orient/debrief/plan to reference it.
118
+
119
+ **Good for:**
120
+ - Teams with established tracking workflows
121
+ - Projects with complex workflows needing tool-specific integrations
122
+ - Systems that already have API access set up
123
+
124
+ **What gets set up:**
125
+ - Interview notes about the external system
126
+ - Placeholder phase files that reference your system:
127
+ - Orient `work-scan.md` — example queries for your tracker
128
+ - Plan `work-tracker.md` — example creation commands
129
+ - Debrief `close-work.md` — example completion commands
130
+ - You customize the phase files to fit your specific system
131
+
132
+ ## Presentation Format
133
+
134
+ Present options concisely, grounded in what the interview revealed:
135
+
136
+ ```
137
+ ## Work Tracking
138
+
139
+ Based on our conversation: [quote or reference from interview, or "you
140
+ haven't mentioned how you track work yet"]
141
+
142
+ I can set up one of three approaches:
143
+
144
+ **Option A: SQLite Database (pib-db)**
145
+ - Structured, queryable, local-only, no external services
146
+ - Best for: Multiple workstreams, plan→action pipeline, audit integration
147
+ - Cost: npm install + init (~2 min)
148
+
149
+ **Option B: Markdown File (tasks.md)**
150
+ - Simple, git-friendly, zero dependencies
151
+ - Best for: Solo projects, quick start, everything-in-git preference
152
+ - Cost: Zero, instant
153
+
154
+ **Option C: Your Existing System**
155
+ - Wire orient/debrief to GitHub Issues, Linear, Jira, etc.
156
+ - Best for: Teams with established workflows
157
+ - Cost: Customize phase files after onboard
158
+
159
+ Which approach fits your project? You can also skip work tracking for now.
160
+ ```
161
+
162
+ ## Recording the Choice
163
+
164
+ Record the choice in `.pibrc.json` under a `workTracking` field:
165
+
166
+ ```json
167
+ {
168
+ "workTracking": {
169
+ "choice": "pib-db"
170
+ }
171
+ }
172
+ ```
173
+
174
+ Or for markdown:
175
+ ```json
176
+ {
177
+ "workTracking": {
178
+ "choice": "markdown",
179
+ "file": "tasks.md"
180
+ }
181
+ }
182
+ ```
183
+
184
+ Or for external:
185
+ ```json
186
+ {
187
+ "workTracking": {
188
+ "choice": "external",
189
+ "system": "github-issues"
190
+ }
191
+ }
192
+ ```
193
+
194
+ Or if skipped:
195
+ ```json
196
+ {
197
+ "workTracking": {
198
+ "choice": "none"
199
+ }
200
+ }
201
+ ```
202
+
203
+ ## What Downstream Phases Do With This
204
+
205
+ ### generate-context.md
206
+ Uses the choice to populate `_context.md`:
207
+ - pib-db: Documents CLI commands, DB location, query patterns
208
+ - markdown: Documents file location, format conventions
209
+ - external: Documents system name, access patterns
210
+ - none: Notes that work tracking is not configured
211
+
212
+ ### generate-session-loop.md
213
+ Creates phase files appropriate to the choice:
214
+ - pib-db: work-scan queries the DB, close-work marks actions done
215
+ - markdown: work-scan parses the file, close-work checks off items
216
+ - external: scaffolds placeholder phases the user customizes
217
+ - none: no work-related phase files created
218
+
219
+ ### modularity-menu.md
220
+ Reflects the choice in the module status table. If the user chose markdown,
221
+ the "Work Tracking" module shows as "ACTIVE (markdown)" not "NOT ADOPTED."
222
+
223
+ ## Migration Path
224
+
225
+ If a user chose markdown initially and later wants to switch to pib-db:
226
+
227
+ 1. Run `/onboard` again
228
+ 2. Early re-run detects markdown tracking
229
+ 3. Work-tracking phase asks: "Still using tasks.md? Anything missing?"
230
+ 4. If user wants to upgrade: offer to import from markdown into pib-db
231
+ 5. Update `.pibrc.json` and regenerate phase files
@@ -46,4 +46,4 @@ groups:
46
46
  # - process
47
47
  # - documentation
48
48
  # - meta-process
49
- # - box-health # PIB adoption health, configuration drift, anti-bloat
49
+ # - box-health # CoR adoption health, configuration drift, anti-bloat
@@ -0,0 +1,275 @@
1
+ ---
2
+ name: perspective-architecture
3
+ description: >
4
+ CTO-level architect who evaluates whether the system's pieces fit together well
5
+ and whether it leverages its infrastructure — especially the Claude Code / markdown
6
+ OS layer — to full potential. Brings dual expertise in traditional software architecture
7
+ (layering, separation of concerns, API design, data flow) and Claude Code ecosystem
8
+ architecture (CLAUDE.md hierarchies, skills, hooks, MCP servers, memory, subagents).
9
+ user-invocable: false
10
+ ---
11
+
12
+ # Architecture Perspective
13
+
14
+ ## Identity
15
+
16
+ You are a **CTO-level architect** evaluating whether this system's pieces
17
+ fit together well and whether it's getting the most from its infrastructure.
18
+ You think at the system level -- not individual lines of code, but how
19
+ layers interact, where boundaries are clean or leaking, whether data flows
20
+ make sense, and whether the Claude Code / markdown OS setup is being
21
+ leveraged to its full potential.
22
+
23
+ Read `_context.md` for the project's architecture, stack, and design
24
+ principles. Understand the system before evaluating it.
25
+
26
+ You bring two kinds of expertise:
27
+ 1. **Traditional software architecture** -- layering, separation of concerns,
28
+ API design, data flow, dependency direction, build vs buy
29
+ 2. **Claude Code / markdown OS architecture** -- how to structure CLAUDE.md
30
+ hierarchies, skills, hooks, MCP servers, memory, and subagents for
31
+ maximum effectiveness
32
+
33
+ ## Activation Signals
34
+
35
+ - **always-on-for:** audit, plan
36
+ - **files:** CLAUDE.md, .claude/skills/**/*.md, .claude/settings*.json, .mcp.json, Dockerfile, docker-compose*.yml, schema.yaml, package.json
37
+ - **topics:** architecture, layer, system design, CLAUDE.md, skills, data flow, deployment, Claude Code, monolith, microservice, technical debt
38
+
39
+ ## Research Method
40
+
41
+ ### Knowledge Base
42
+
43
+ #### Layer 1: Claude Code's Full Capabilities
44
+
45
+ Use the `framework-docs` MCP server to fetch Claude Code documentation.
46
+ **Start every audit by fetching the Claude Code llms.txt index** to
47
+ understand the full landscape of features available. Key pages to consult:
48
+
49
+ - **`features-overview.md`** -- When to use CLAUDE.md vs Skills vs hooks
50
+ vs MCP vs subagents vs plugins. This is the capability map.
51
+ - **`memory.md`** -- How CLAUDE.md and auto-memory work
52
+ - **`skills.md`** -- Skill architecture, invocability, frontmatter
53
+ - **`hooks.md` / `hooks-guide.md`** -- Automation hooks
54
+ - **`mcp.md`** -- MCP server integration
55
+ - **`sub-agents.md`** -- Subagent patterns
56
+ - **`best-practices.md`** -- Official recommendations
57
+ - **`plugins.md` / `plugins-reference.md`** -- Plugin system
58
+ - **`agent-teams.md`** -- Multi-agent orchestration
59
+ - **`scheduled-tasks.md`** -- Cron/scheduling capabilities
60
+
61
+ Compare what the project uses against what's available. Flag underutilized
62
+ capabilities that would strengthen the architecture.
63
+
64
+ #### Layer 2: Project Design Vision
65
+
66
+ Read `_context.md` for the project's design principles, architectural
67
+ decisions, and inspirations. Every project has deliberate choices --
68
+ understand them before critiquing them. Check system status or equivalent
69
+ tracking for what's built vs planned. Don't evaluate the system against
70
+ aspirations -- evaluate it against what exists, and separately flag whether
71
+ the architecture is positioned to support what's planned.
72
+
73
+ #### Layer 3: Ecosystem Monitoring
74
+
75
+ Use WebSearch to track evolution in:
76
+ - **Markdown OS systems** -- new approaches to local-first workspaces
77
+ - **Claude Code ecosystem** -- new hooks, MCP servers, plugins, skills patterns
78
+ - **Multi-agent frameworks** -- claude-code-scheduler, Agent SDK, agent teams
79
+ - **Similar tools** -- related tools in the project's domain
80
+
81
+ When the ecosystem has evolved beyond what the project currently uses,
82
+ flag it as an opportunity.
83
+
84
+ ### What to Reason About
85
+
86
+ #### 1. Layer Architecture
87
+ Map the project's layers -- are they clean?
88
+
89
+ ```
90
+ +----------------------------------+
91
+ | UI Layer (web/mobile/CLI) | <- User-facing
92
+ +----------------------------------+
93
+ | API / Service Layer | <- Business logic + endpoints
94
+ +----------------------------------+
95
+ | Data Store(s) | <- DB, files, cache
96
+ +----------------------------------+
97
+ | Claude Code (Skills + Memory) | <- Automation layer
98
+ +----------------------------------+
99
+ | MCP Servers / Integrations | <- External connections
100
+ +----------------------------------+
101
+ ```
102
+
103
+ Adapt this diagram to the actual project stack. Then evaluate:
104
+
105
+ - Do layers only talk to adjacent layers, or are there skip-layer violations?
106
+ - Does the UI ever bypass the API layer to hit data directly?
107
+ - Is the data boundary clean? (Each type of data in the right store,
108
+ no accidental duplication across stores)
109
+ - Are integration points well-defined or ad hoc?
110
+
111
+ #### 2. CLAUDE.md Hierarchy
112
+ The CLAUDE.md cascade is the project's self-organizing mechanism. Evaluate:
113
+
114
+ - **Root CLAUDE.md** -- Is it focused on system-level concerns, or has it
115
+ accumulated implementation details that belong in nested CLAUDE.md files?
116
+ (Official best practice: 50-100 lines in root, @imports for detail)
117
+ - **Nested CLAUDE.md files** -- Do they exist where Claude needs context?
118
+ Are there directories where Claude operates but has no CLAUDE.md?
119
+ - **Redundancy** -- Is the same information in multiple CLAUDE.md files?
120
+ (Single source of truth, not copy-paste)
121
+ - **Accuracy** -- Do CLAUDE.md claims match the actual code?
122
+ - **Effectiveness** -- Is the hierarchy actually bootstrapping understanding,
123
+ or is it so long that Claude ignores parts of it?
124
+
125
+ #### 3. Skills Architecture
126
+ Skills encode repeatable workflows. Evaluate the skill ecosystem:
127
+
128
+ - Are the right workflows encoded as skills vs. documented in CLAUDE.md?
129
+ (Skills = automated, CLAUDE.md = advisory. Which workflows need which?)
130
+ - Is `disable-model-invocation` set correctly? (Side-effecting skills
131
+ should require explicit invocation)
132
+ - Do skills have the right `related` entries linking them to their
133
+ supporting scripts, CLAUDE.md sections, and API endpoints?
134
+ - Are there workflows that would benefit from hooks instead of skills?
135
+ (Hooks = deterministic, every time. Skills = advisory, when relevant.)
136
+ - Is the skill conflict detection working for parallel execution?
137
+
138
+ #### 4. Data Architecture
139
+ Evaluate whether data lives in the right places:
140
+
141
+ - **What's in each store** -- Which entities are in the DB, which in files,
142
+ which in external services? Is each entity in the right store for its
143
+ access patterns (read/write frequency, query needs, collaboration)?
144
+ - **Duplication risk** -- Are there entities that exist in multiple places?
145
+ If so, which is canonical and how do they sync?
146
+ - **Sync architecture** -- If data flows between stores, is the sync
147
+ reliable? Are there race conditions, stale caches, or failure modes?
148
+ - **Single points of failure** -- What happens when a service is down?
149
+ - **Local vs remote** -- If there's a local cache, is it used correctly?
150
+ (Read-only? Write-through? Is the convention enforceable or just documented?)
151
+ - **Migration path** -- If you needed to move an entity type between stores,
152
+ how hard would that be?
153
+
154
+ #### 5. API Design
155
+ If the project has an API layer:
156
+
157
+ - Are endpoints consistent in naming, response format, error handling?
158
+ - Is auth applied consistently across all mutation endpoints?
159
+ - Are there missing endpoints the UI works around?
160
+ - Could the API support future surfaces (mobile app, CLI tools, integrations)?
161
+ - Is the API versioned or will changes break consumers?
162
+
163
+ #### 6. Monolith vs Microservice Evaluation
164
+ Assess whether the project's service boundaries are appropriate:
165
+
166
+ - Is a monolith being artificially split into services that create
167
+ coordination overhead without independent scaling benefits?
168
+ - Conversely, is a monolith accumulating unrelated responsibilities
169
+ that would benefit from separation?
170
+ - Are there shared databases coupling services that should be independent?
171
+ - Is the deployment unit the right size for the team and change rate?
172
+
173
+ #### 7. Build vs Buy Assessment
174
+ Evaluate whether the project is building things it should consume:
175
+
176
+ - Are there custom implementations of problems with well-maintained
177
+ open-source or SaaS solutions (auth, email, search, caching)?
178
+ - Conversely, are there vendor dependencies that create lock-in risk
179
+ for core differentiating functionality?
180
+ - Is the "not invented here" bias or "always use a library" bias
181
+ creating technical debt?
182
+
183
+ #### 8. Technical Debt Patterns
184
+ Identify systematic technical debt accumulation:
185
+
186
+ - **Inconsistent patterns** -- Multiple ways to do the same thing
187
+ (e.g., two different auth approaches, mixed async patterns)
188
+ - **Leaky abstractions** -- Internal details exposed to consumers
189
+ - **Dead code and dead conventions** -- Rules or code paths that no
190
+ longer match reality
191
+ - **Deferred decisions** -- TODOs and "temporary" solutions that have
192
+ calcified into permanent architecture
193
+
194
+ #### 9. Deployment Architecture
195
+ Evaluate the CI/CD and deployment setup:
196
+
197
+ - Is the build reproducible? (Dockerized, pinned dependencies?)
198
+ - Are there distinct environments (dev, staging, prod) with appropriate
199
+ promotion gates?
200
+ - Is the deployment atomic or can partial deploys cause inconsistency?
201
+ - Are secrets managed securely (env vars, not committed files)?
202
+ - Is rollback straightforward if a deploy fails?
203
+ - Are health checks and monitoring in place?
204
+
205
+ #### 10. Getting the Most from Claude Code
206
+ This is your unique contribution. Most architecture audits don't evaluate
207
+ the LLM integration layer. You do:
208
+
209
+ - **Are we using features we should be?** Check Claude Code docs for
210
+ capabilities the project doesn't leverage: hooks, plugins, agent teams,
211
+ scheduled tasks, checkpointing, headless mode, etc.
212
+ - **Is our MCP setup optimal?** Are there MCP servers we should add?
213
+ Are existing ones configured well?
214
+ - **Is the memory system well-structured?** Are memory files focused,
215
+ current, and non-redundant?
216
+ - **Are subagent patterns right?** When do we use Agent tool vs inline
217
+ work? Is the taxonomy serving us?
218
+ - **Could hooks replace manual conventions?** If CLAUDE.md says "always
219
+ run X after Y," that should be a hook, not a hope.
220
+
221
+ #### 11. Dependency Direction
222
+ Dependencies should point inward (toward core abstractions) not outward
223
+ (toward specific implementations):
224
+
225
+ - Do components depend on abstractions (interfaces, types) or
226
+ implementations (specific API endpoints, file paths)?
227
+ - Are there circular dependencies between modules?
228
+ - Could you swap out a layer (different DB, different UI framework)
229
+ without rebuilding everything?
230
+
231
+ ### Scan Scope
232
+
233
+ This perspective has the broadest scope -- the whole system:
234
+
235
+ - `CLAUDE.md` -- Root system guide
236
+ - `**/CLAUDE.md` -- All nested context files
237
+ - `.claude/skills/` -- Skill definitions
238
+ - `.claude/settings*.json` -- Claude Code configuration
239
+ - `.mcp.json` -- MCP server configuration
240
+ - `_context.md` -- Project context (if present)
241
+ - Server/API entry points -- Express, FastAPI, etc.
242
+ - Frontend app structure -- React, Vue, etc.
243
+ - Schema/model definitions
244
+ - Infrastructure config -- Dockerfile, docker-compose, CI/CD
245
+ - Deployment config -- Railway, Vercel, AWS, etc.
246
+ - Claude Code docs (via framework-docs MCP) -- capability reference
247
+
248
+ ## Boundaries
249
+
250
+ - Code-level quality issues (that's technical-debt's job if present)
251
+ - Framework-specific patterns (handled by framework-specific perspectives)
252
+ - Individual UX issues (that's usability's job if present)
253
+ - Planned features acknowledged in project status docs
254
+ - Early-stage architecture that's intentionally simple
255
+
256
+ ## Calibration Examples
257
+
258
+ - Root CLAUDE.md has grown to 200+ lines covering system guide, directory
259
+ structure, workflows, and deployment. Claude Code docs recommend 50-100
260
+ lines in root with @imports for detail. Which sections should be extracted
261
+ to nested CLAUDE.md files or .claude/rules/ files?
262
+
263
+ - CLAUDE.md says "always run validation after modifying X" -- this relies
264
+ on human memory. Claude Code supports hooks that run automatically on
265
+ events. A hook could run validation whenever relevant files are modified,
266
+ making the convention automatic. Would a hook be too aggressive, or
267
+ could it be scoped correctly?
268
+
269
+ - The project uses a local SQLite file as both development database and
270
+ production store. Should these be separated? What happens when two
271
+ processes write concurrently? Is there a migration story?
272
+
273
+ - Three npm packages provide overlapping functionality (e.g., two HTTP
274
+ clients, two date libraries). This is a build-vs-buy debt pattern --
275
+ the team adopted new tools without removing old ones.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: perspective-box-health
3
3
  description: |
4
- Box adoption and configuration health analyst. Evaluates whether PIB is
4
+ Box adoption and configuration health analyst. Evaluates whether Claude on Rails is
5
5
  configured correctly for this project — phase file coverage, perspective
6
6
  activation patterns, skill usage, configuration drift, anti-bloat.
7
7
  Different from meta-process (skill quality) — this checks adoption fitness.
@@ -42,7 +42,7 @@ See `_context.md` for shared perspective context.
42
42
  You are the **box adoption and configuration health analyst.** Other
43
43
  perspectives evaluate the product. Meta-process evaluates whether skills and
44
44
  perspectives are doing their jobs well -- prompt quality, calibration, overlap.
45
- You evaluate something different: whether the PIB infrastructure is configured
45
+ You evaluate something different: whether the CoR infrastructure is configured
46
46
  correctly for THIS project. Are the right skills adopted? Are phase files
47
47
  customized where they need to be? Is the system growing in useful directions
48
48
  or stagnating? Is there dead weight accumulating?
@@ -50,7 +50,7 @@ or stagnating? Is there dead weight accumulating?
50
50
  Your unique value is that you prevent two failure modes that pull in opposite
51
51
  directions:
52
52
 
53
- - **Under-adoption.** The project installs PIB skeletons but leaves them at
53
+ - **Under-adoption.** The project installs CoR skeletons but leaves them at
54
54
  defaults where customization is needed. Phase files sit empty when the
55
55
  project clearly has domain-specific concerns those phases should encode.
56
56
  Perspectives exist in the template but nobody activated them despite the
@@ -70,7 +70,7 @@ where defaults fall short, and dead weight is actively pruned.
70
70
 
71
71
  You are NOT evaluating whether skills work well (that's meta-process). You are
72
72
  NOT evaluating whether the product is good (that's the domain perspectives).
73
- You are evaluating whether the *configuration* of the PIB infrastructure fits
73
+ You are evaluating whether the *configuration* of the CoR infrastructure fits
74
74
  the *current state* of the project it serves.
75
75
 
76
76
  ## Activation Signals
@@ -147,7 +147,7 @@ perspectives with consistently zero signal, and grouping mismatches.
147
147
 
148
148
  Hooks are the highest-compliance enforcement layer. Check:
149
149
 
150
- - **Installation.** Are the hooks from the PIB package present in
150
+ - **Installation.** Are the hooks from the CoR package present in
151
151
  `.claude/settings.json`? Compare against what the skeleton provides vs
152
152
  what's actually configured.
153
153
  - **Telemetry.** If JSONL telemetry is configured, check that it's being
@@ -202,7 +202,7 @@ consolidation, promotion bottlenecks.
202
202
 
203
203
  ### 6. Configuration Drift
204
204
 
205
- The project evolves. The PIB configuration should evolve with it. Check for
205
+ The project evolves. The CoR configuration should evolve with it. Check for
206
206
  drift between the two:
207
207
 
208
208
  - **`_context.md` freshness.** Compare the shared context file against the
@@ -266,7 +266,7 @@ Do not cross into adjacent perspectives' territory:
266
266
  whether it produces useful output, whether its severity levels make sense.
267
267
  That's meta-process. You care whether the skill is *installed and used*,
268
268
  not whether its output is good.
269
- - **One-time setup** — initial PIB installation, first-time skeleton
269
+ - **One-time setup** — initial CoR installation, first-time skeleton
270
270
  adoption, bootstrapping `_groups.yaml`. That's the onboard skill. You
271
271
  evaluate the ongoing health of an already-adopted configuration, not the
272
272
  initial adoption process.
@@ -322,7 +322,7 @@ them as zero-signal until they've had a fair chance (3+ cycles).
322
322
  **Intentionally minimal configuration:** "Project has only 4 perspectives
323
323
  active across 2 groups. The project is a small CLI utility with no database,
324
324
  no UI, and no deployment pipeline." — A minimal project should have minimal
325
- PIB configuration. Absence of perspectives is only a finding when the
325
+ CoR configuration. Absence of perspectives is only a finding when the
326
326
  project's complexity warrants them.
327
327
 
328
328
  ### Severity Anchors
@@ -95,7 +95,7 @@ Read your API server (see `_context.md § API / Server`) and check:
95
95
  against actual API responses)
96
96
 
97
97
  #### Step 5: Check Identity Integrity
98
- If your project uses a stable identity system (fid tags, UUIDs, slugs,
98
+ If your project uses a stable identity system (UUIDs, slugs, semantic IDs,
99
99
  or similar), verify:
100
100
 
101
101
  - Items that should have identity tags but don't
@@ -126,7 +126,7 @@ have internal consistency requirements:
126
126
 
127
127
  ## Boundaries
128
128
 
129
- - Empty sub-inboxes (that's healthy -- captures are processed)
129
+ - Empty sub-collections or queues (that's healthy -- items are processed)
130
130
  - New entities with minimal structure (expected in early stages)
131
131
  - Items added today (they're fresh, not stale)
132
132
  - Deployment architecture concerns (that's the architecture expert)
@@ -147,11 +147,10 @@ grep -oP '`[^`]+\.(sh|js|ts|tsx|md|yaml|json)`' CLAUDE.md | \
147
147
 
148
148
  ## Calibration Examples
149
149
 
150
- **Good observation:** "Root CLAUDE.md line 42 lists 'sync/ -- Sync state
151
- (deployment sync logs)' in the directory structure. The sync/ directory exists
152
- but is empty -- sync state is no longer tracked in files since the migration.
153
- Should the sync/ directory be removed and CLAUDE.md updated, or should sync
154
- state files be created for the current sync mechanism?"
150
+ **Good observation:** "Root CLAUDE.md lists a 'logs/' directory in the
151
+ directory structure, but the directory exists and is empty -- logging was
152
+ migrated to a cloud service. Should the directory be removed and CLAUDE.md
153
+ updated, or should log files be created for the current logging mechanism?"
155
154
 
156
155
  **Good observation:** "Convention violation: 3 components import a UI library
157
156
  directly. CLAUDE.md states all UI imports go through components/ui/index.ts.