@getpipher/workspace 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.
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: workspace-init-agents
3
+ description: Create or improve a project AGENTS.md with intelligent codebase analysis. Host-neutral satellite context file read by Claude Code, Pi, and any AGENTS.md-aware agent.
4
+ argument-hint: ""
5
+ allowed-tools: ["bash", "read", "write", "edit"]
6
+ ---
7
+
8
+ # AGENTS.md Initialization (project satellite)
9
+
10
+ Bismillah! I'll analyze this codebase and create (or improve) a project `AGENTS.md` — the cross-tool context file that Claude Code, Pi, and any `AGENTS.md`-aware agent read on startup.
11
+
12
+ > **Hub / satellite model.** This skill generates a **satellite**: a host-neutral file describing *this repo*. It extends — never duplicates — the **global hub** (`~/.claude/CLAUDE.md` / `~/.pi/agent/AGENTS.md`), which already carries persona, dev standards, git conventions, secret rules, etc. A satellite holds **only project-specific** content (overview, architecture, commands, conventions, gotchas). No identity, no generic standards, no host-specific tooling — those belong to the hub.
13
+
14
+ ---
15
+
16
+ ## Step 0 — Migrate legacy `CLAUDE.md` (host decoupling)
17
+
18
+ `AGENTS.md` is the cross-tool standard (pi prefers it; CC reads it too). `CLAUDE.md` is CC's legacy name. If both exist, the repo double-loads and drifts — normalize to one:
19
+
20
+ - **`CLAUDE.md` exists, no `AGENTS.md`** → `git mv CLAUDE.md AGENTS.md`, then proceed (treat its content as the seed).
21
+ - **Both exist** → ask the user which to keep; default: merge into `AGENTS.md`, `git rm CLAUDE.md`.
22
+ - **Neither exists** → create `AGENTS.md` from scratch (Step 1+).
23
+ - **`AGENTS.md` exists** → analyze and suggest improvements (don't clobber; preserve accurate content).
24
+
25
+ When migrating, rephrase any CC-flavored framing host-neutrally: "guidance to Claude Code" → "guidance for AI agents"; drop any persona/standards that belong in the hub.
26
+
27
+ ---
28
+
29
+ ## Discovery Process
30
+
31
+ ### 1. Start with existing documentation
32
+ - Read README.md for project overview and setup
33
+ - Look for `.cursor/rules/`, `.cursorrules`, `.github/copilot-instructions.md`
34
+ - Find contribution guidelines (CONTRIBUTING.md)
35
+
36
+ ### 2. Discover commands and workflows
37
+ - Check package.json "scripts" (Node.js)
38
+ - Check Makefile targets
39
+ - Look for justfile, Taskfile, or similar task runners
40
+ - Find language-specific files: Cargo.toml, pyproject.toml, build.gradle, etc.
41
+ - Identify CI/CD configs (.github/workflows/, .gitlab-ci.yml) for standard commands
42
+
43
+ ### 3. Understand architecture
44
+ - Read entry points (main.ts, index.js, main.py, cmd/main.go, etc.)
45
+ - Identify directory structure and its purpose
46
+ - Find configuration files and their significance
47
+ - Understand data flow and key abstractions
48
+ - Note any unconventional patterns or design decisions
49
+
50
+ ---
51
+
52
+ ## What to include (project-specific ONLY)
53
+
54
+ ### Essential Commands
55
+ - **Build**: How to compile/bundle the project
56
+ - **Development**: How to run locally with hot reload/watch mode
57
+ - **Testing**: How to run all tests, a single file, or a specific test
58
+ - **Linting/Formatting**: How to check and auto-fix code style
59
+ - **Type Checking**: For typed languages (TypeScript, Python with mypy, etc.)
60
+ - **Database**: Migrations, seeding, reset commands if applicable
61
+ - **Deployment**: Build for production, deployment commands
62
+
63
+ ### Architecture Insights (High-Level Only)
64
+ Information that requires reading **multiple files** to understand:
65
+ - Overall project structure and *why* it's organized that way
66
+ - Key architectural patterns (e.g., "hexagonal architecture with ports/adapters")
67
+ - Data flow between major components
68
+ - Important design decisions or constraints
69
+ - Where different types of work happen (e.g., "Business logic in services/, API routes in controllers/")
70
+ - Non-obvious relationships between modules
71
+
72
+ ### Project-Specific Context
73
+ - Language/framework versions and constraints
74
+ - Important environment variables or configuration
75
+ - Authentication/authorization approach if applicable
76
+ - External dependencies or services the project integrates with
77
+ - Conventions that aren't obvious from code (naming, file placement)
78
+
79
+ ---
80
+
81
+ ## What to exclude
82
+
83
+ ❌ **Anything in the global hub** — persona/identity, dev standards (2-space indent, error handling rules), git/commit conventions, secret-storage rules, a11y/perf mandates. The hub already injects these every session; duplicating them here causes drift.
84
+ ❌ Generic advice ("Write clean code", "Handle errors gracefully")
85
+ ❌ Obvious info discoverable by reading one file
86
+ ❌ Exhaustive file/directory listings
87
+ ❌ Repetition of README content (reference it instead)
88
+ ❌ CC-specific framing ("guidance to Claude Code") — the file is host-neutral
89
+
90
+ ---
91
+
92
+ ## Structure
93
+
94
+ Use this structure (omit sections if not applicable):
95
+
96
+ ```
97
+ <!-- Satellite context file — extends the global hub (~/.claude/CLAUDE.md | ~/.pi/agent/AGENTS.md). Host-neutral; project-specific only. Do not duplicate hub standards here. -->
98
+
99
+ # {Project Name}
100
+
101
+ > One-line description of what this project does.
102
+
103
+ ## Repository Overview
104
+ [1-2 paragraphs: what this project does, primary language/framework]
105
+
106
+ ## Architecture and Structure
107
+ [High-level architecture, key design patterns, major components and relationships]
108
+
109
+ ## Development Environment
110
+ [Prerequisites, setup steps, environment variables]
111
+
112
+ ## Common Commands
113
+ [Grouped: Development, Testing, Building, Database, etc.]
114
+
115
+ ## Technology Stack
116
+ [Key dependencies and why, if non-obvious]
117
+
118
+ ## Workflow Guidelines
119
+ [Project-specific workflows: deployment, migrations, feature development]
120
+
121
+ ## Key Files and Locations
122
+ [Only files that are important but hard to discover]
123
+ ```
124
+
125
+ ---
126
+
127
+ ## Quality Checklist
128
+
129
+ Before finalizing, verify:
130
+ - [ ] File is named `AGENTS.md` (no legacy `CLAUDE.md` left alongside)
131
+ - [ ] Header satellite-comment + host-neutral phrasing (no "Claude Code" / "Pi" framing)
132
+ - [ ] No content duplicated from the global hub (standards, persona, conventions)
133
+ - [ ] Commands are copy-pasteable and tested
134
+ - [ ] Architecture adds value beyond README
135
+ - [ ] No generic development advice
136
+ - [ ] No repetition of README (reference it)
137
+ - [ ] Focused on what makes THIS codebase unique
138
+
139
+ ---
140
+
141
+ ## Important Notes
142
+
143
+ - **If `AGENTS.md` exists**: analyze and suggest specific improvements — don't overwrite wholesale.
144
+ - **Test commands** before documenting (use Bash to verify they work).
145
+ - **Be concise**: quality over quantity — focus on what makes this codebase unique.
146
+ - **Reference, don't repeat**: if README documents something well, point to it.
147
+ - **Required prefix**: every generated file starts with the satellite header-comment + `# {Project Name}`.
148
+
149
+ ---
150
+
151
+ Alhamdulillah! Let's create documentation that makes future work in this codebase smooth and productive — for any agent, any host. InshaAllah!