pi-agent-toolkit 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/dist/dotfiles/AGENTS.md +197 -0
- package/dist/dotfiles/APPEND_SYSTEM.md +78 -0
- package/dist/dotfiles/agent-modes.json +12 -0
- package/dist/dotfiles/agent-skills/exa-search/.env.example +4 -0
- package/dist/dotfiles/agent-skills/exa-search/SKILL.md +234 -0
- package/dist/dotfiles/agent-skills/exa-search/scripts/exa-api.cjs +197 -0
- package/dist/dotfiles/auth.json.template +5 -0
- package/dist/dotfiles/damage-control-rules.yaml +318 -0
- package/dist/dotfiles/extensions/btw.ts +1031 -0
- package/dist/dotfiles/extensions/commit-approval.ts +590 -0
- package/dist/dotfiles/extensions/context.ts +578 -0
- package/dist/dotfiles/extensions/control.ts +1748 -0
- package/dist/dotfiles/extensions/damage-control/index.ts +543 -0
- package/dist/dotfiles/extensions/damage-control/node_modules/.package-lock.json +22 -0
- package/dist/dotfiles/extensions/damage-control/package-lock.json +28 -0
- package/dist/dotfiles/extensions/damage-control/package.json +7 -0
- package/dist/dotfiles/extensions/dirty-repo-guard.ts +56 -0
- package/dist/dotfiles/extensions/exa-enforce.ts +51 -0
- package/dist/dotfiles/extensions/exa-search-tool.ts +384 -0
- package/dist/dotfiles/extensions/execute-command/index.ts +82 -0
- package/dist/dotfiles/extensions/files.ts +1112 -0
- package/dist/dotfiles/extensions/loop.ts +446 -0
- package/dist/dotfiles/extensions/pr-approval.ts +730 -0
- package/dist/dotfiles/extensions/qna-interactive.ts +532 -0
- package/dist/dotfiles/extensions/question-mode.ts +242 -0
- package/dist/dotfiles/extensions/require-session-name-on-exit.ts +141 -0
- package/dist/dotfiles/extensions/review.ts +2091 -0
- package/dist/dotfiles/extensions/session-breakdown.ts +1629 -0
- package/dist/dotfiles/extensions/term-notify.ts +150 -0
- package/dist/dotfiles/extensions/tilldone.ts +527 -0
- package/dist/dotfiles/extensions/todos.ts +2082 -0
- package/dist/dotfiles/extensions/tools.ts +146 -0
- package/dist/dotfiles/extensions/uv.ts +123 -0
- package/dist/dotfiles/global-skills/brainstorm/SKILL.md +10 -0
- package/dist/dotfiles/global-skills/cli-detector/SKILL.md +192 -0
- package/dist/dotfiles/global-skills/gh-issue-creator/SKILL.md +173 -0
- package/dist/dotfiles/global-skills/google-chat-cards-v2/SKILL.md +237 -0
- package/dist/dotfiles/global-skills/google-chat-cards-v2/references/bridge_tap_implementation.md +466 -0
- package/dist/dotfiles/global-skills/technical-docs/SKILL.md +204 -0
- package/dist/dotfiles/global-skills/technical-docs/references/diagrams.md +168 -0
- package/dist/dotfiles/global-skills/technical-docs/references/examples.md +449 -0
- package/dist/dotfiles/global-skills/technical-docs/scripts/validate_docs.py +352 -0
- package/dist/dotfiles/global-skills/whats-new/SKILL.md +159 -0
- package/dist/dotfiles/intercepted-commands/pip +7 -0
- package/dist/dotfiles/intercepted-commands/pip3 +7 -0
- package/dist/dotfiles/intercepted-commands/poetry +10 -0
- package/dist/dotfiles/intercepted-commands/python +104 -0
- package/dist/dotfiles/intercepted-commands/python3 +104 -0
- package/dist/dotfiles/mcp.json.template +32 -0
- package/dist/dotfiles/models.json +27 -0
- package/dist/dotfiles/settings.json +25 -0
- package/dist/index.js +1344 -0
- package/package.json +34 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: technical-docs
|
|
3
|
+
description: Standards and best practices for creating technical documentation. Use when the user requests documentation updates or asks to create README files, API docs, user guides, or docstrings.
|
|
4
|
+
context: fork
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Technical Documentation Standards
|
|
8
|
+
|
|
9
|
+
Follow these guidelines to create clear, maintainable technical documentation across all formats.
|
|
10
|
+
|
|
11
|
+
## Using This Skill
|
|
12
|
+
|
|
13
|
+
When creating or updating documentation:
|
|
14
|
+
|
|
15
|
+
1. Identify the documentation type (README, API docs, docstrings, user guide)
|
|
16
|
+
2. Apply the relevant sections below based on the type
|
|
17
|
+
3. Follow the Documentation Workflow (Section 3) as the process guide
|
|
18
|
+
4. Use Core Writing Standards (Section 4) for all content
|
|
19
|
+
5. Reference `references/diagrams.md` guidelines when adding visual elements
|
|
20
|
+
6. Reference `references/examples.md` for complete before/after samples
|
|
21
|
+
7. Run through the Quality Checklist (Section 8) before finalizing
|
|
22
|
+
8. Optionally use `scripts/validate_docs.py` to automate validation checks
|
|
23
|
+
|
|
24
|
+
**For docstrings:** Focus on "Python Documentation" section (6.1)
|
|
25
|
+
**For API docs:** Focus on "API Documentation" section (5)
|
|
26
|
+
**For guides/READMEs:** Apply "Core Writing Standards" comprehensively (Section 4)
|
|
27
|
+
|
|
28
|
+
## Documentation Workflow
|
|
29
|
+
|
|
30
|
+
Follow this workflow when creating documentation:
|
|
31
|
+
|
|
32
|
+
1. **Understand the audience and purpose** - Determine technical depth needed
|
|
33
|
+
2. **Structure the content** - Use logical hierarchy with clear sections
|
|
34
|
+
3. **Write concisely** - Active voice, present tense, focused sentences
|
|
35
|
+
4. **Include examples** - Provide runnable code samples
|
|
36
|
+
5. **Validate accuracy** - Cross-reference with actual implementation
|
|
37
|
+
6. **Review for clarity** - Read from target audience perspective
|
|
38
|
+
|
|
39
|
+
## Core Writing Standards
|
|
40
|
+
|
|
41
|
+
### Structure and Organization
|
|
42
|
+
|
|
43
|
+
- Start with concise overview explaining "what" and "why"
|
|
44
|
+
- Use hierarchical headings (H1 → H2 → H3) for logical flow
|
|
45
|
+
- Include table of contents for documents >3 sections
|
|
46
|
+
- Place most important information first (inverted pyramid)
|
|
47
|
+
- Group related concepts in coherent sections
|
|
48
|
+
|
|
49
|
+
### Writing Style
|
|
50
|
+
|
|
51
|
+
- Use active voice and present tense: "The function returns" not "will return"
|
|
52
|
+
- For user-facing instructions, write in second person: "You can configure"
|
|
53
|
+
- Keep sentences concise and single-focused
|
|
54
|
+
- Define technical terms on first use
|
|
55
|
+
- Maintain consistent terminology (avoid synonym alternation)
|
|
56
|
+
|
|
57
|
+
### Code Examples
|
|
58
|
+
|
|
59
|
+
- Provide complete, runnable examples demonstrating real use cases
|
|
60
|
+
- Include both basic and advanced examples when appropriate
|
|
61
|
+
- Add comments explaining non-obvious logic
|
|
62
|
+
- Show expected output/results when relevant
|
|
63
|
+
- Use syntax highlighting with proper language tags
|
|
64
|
+
- Follow project coding standards (type hints, docstrings, etc.)
|
|
65
|
+
|
|
66
|
+
### Formatting Conventions
|
|
67
|
+
|
|
68
|
+
- Use code blocks (```) for multi-line code, inline code (`) for short references
|
|
69
|
+
- Format file paths, commands, environment variables as code
|
|
70
|
+
- **Bold** for important concepts, *italics* for emphasis (sparingly)
|
|
71
|
+
- Use bullet points for lists, numbered lists for sequential steps
|
|
72
|
+
|
|
73
|
+
## API Documentation
|
|
74
|
+
|
|
75
|
+
Document APIs with these required elements:
|
|
76
|
+
|
|
77
|
+
- Document all parameters with types, descriptions, required/optional status
|
|
78
|
+
- Specify return types and possible return values
|
|
79
|
+
- List all exceptions/errors with triggering conditions
|
|
80
|
+
- Include authentication/authorization requirements
|
|
81
|
+
- Provide curl examples or SDK usage examples
|
|
82
|
+
- Document rate limits, pagination, constraints
|
|
83
|
+
|
|
84
|
+
## Project-Specific Conventions
|
|
85
|
+
|
|
86
|
+
### Python Documentation
|
|
87
|
+
|
|
88
|
+
Follow these Python-specific standards from the project:
|
|
89
|
+
|
|
90
|
+
**Docstring Format:**
|
|
91
|
+
- Use Sphinx-style docstrings: `:param`, `:returns`, `:raises`
|
|
92
|
+
- Include type hints in all function signatures (not just in docstrings)
|
|
93
|
+
- Document each parameter, return value, and exception
|
|
94
|
+
|
|
95
|
+
**Example from this codebase:**
|
|
96
|
+
```python
|
|
97
|
+
def build_audience(
|
|
98
|
+
self,
|
|
99
|
+
target_type: TargetType,
|
|
100
|
+
source: MatchSource | ListSource,
|
|
101
|
+
name: str,
|
|
102
|
+
*,
|
|
103
|
+
description: str = "",
|
|
104
|
+
external_id: str = "",
|
|
105
|
+
) -> AudienceBuildResponse:
|
|
106
|
+
"""Build a new audience using the Bridge API.
|
|
107
|
+
|
|
108
|
+
:param target_type: Type of audience target (INDIVIDUAL or HOUSEHOLD)
|
|
109
|
+
:param source: Source configuration (MatchSource for file matching, ListSource for lists)
|
|
110
|
+
:param name: Human-readable audience name
|
|
111
|
+
:param description: Optional audience description
|
|
112
|
+
:param external_id: Optional external identifier for tracking
|
|
113
|
+
:returns: Response containing process ID and initial status
|
|
114
|
+
:raises BridgeAPIError: If API request fails
|
|
115
|
+
:raises ValueError: If required credentials are missing
|
|
116
|
+
"""
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Code Documentation Patterns:**
|
|
120
|
+
- Reference Pydantic models for data structures
|
|
121
|
+
- Document context managers and resource cleanup
|
|
122
|
+
- Explain purpose of explicit flags and typed parameters
|
|
123
|
+
- Show proper enum usage (e.g., `TargetType.INDIVIDUAL` not strings)
|
|
124
|
+
- Include logging examples with loguru-style format strings: `logger.info("Building audience for client {}", client_name)`
|
|
125
|
+
|
|
126
|
+
**Resource Management:**
|
|
127
|
+
Document context managers with cleanup guarantees:
|
|
128
|
+
```python
|
|
129
|
+
@contextmanager
|
|
130
|
+
def _resource_context(self) -> Generator[Resource, None, None]:
|
|
131
|
+
"""Context manager for resource lifecycle.
|
|
132
|
+
|
|
133
|
+
Ensures proper cleanup in both test and production scenarios.
|
|
134
|
+
|
|
135
|
+
:yields: Configured resource instance
|
|
136
|
+
:raises ConnectionError: If resource initialization fails
|
|
137
|
+
"""
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Code References
|
|
141
|
+
|
|
142
|
+
When referencing code in documentation, always include clickable links with line numbers:
|
|
143
|
+
|
|
144
|
+
- Format: `[language.SymbolName](relative/path/file.py:LLineNumber)`
|
|
145
|
+
- Example: `[python.BridgeAPIClient](src/bridge_tap_api/sdk/bridge/client.py:L42)` - Main client class
|
|
146
|
+
- For ranges: `[L283-290](src/bridge_tap_api/sdk/bridge/client.py:L283-290)`
|
|
147
|
+
- Verify line numbers are accurate before including
|
|
148
|
+
|
|
149
|
+
## Visual Communication
|
|
150
|
+
|
|
151
|
+
See [references/diagrams.md](references/diagrams.md) for comprehensive diagram and table usage guidelines including:
|
|
152
|
+
|
|
153
|
+
- When to use Mermaid diagrams vs prose
|
|
154
|
+
- Diagram types (flowcharts, sequence, state, class)
|
|
155
|
+
- Table formatting for parameters, configurations, comparisons
|
|
156
|
+
- Best practices and anti-patterns
|
|
157
|
+
|
|
158
|
+
## Documentation Examples
|
|
159
|
+
|
|
160
|
+
See [references/examples.md](references/examples.md) for complete before/after examples demonstrating these standards in practice, including:
|
|
161
|
+
|
|
162
|
+
- Poor vs good docstrings
|
|
163
|
+
- Poor vs good README structure
|
|
164
|
+
- Poor vs good API documentation
|
|
165
|
+
- Common mistakes and corrections
|
|
166
|
+
|
|
167
|
+
## Quality Checklist
|
|
168
|
+
|
|
169
|
+
Before finalizing documentation, verify these requirements:
|
|
170
|
+
|
|
171
|
+
**Technical Accuracy**
|
|
172
|
+
|
|
173
|
+
- Cross-reference with actual code implementation
|
|
174
|
+
- Test all code examples
|
|
175
|
+
- Validate parameter types and return values
|
|
176
|
+
- Confirm file paths and links
|
|
177
|
+
|
|
178
|
+
**Completeness**
|
|
179
|
+
|
|
180
|
+
- All public APIs/functions documented
|
|
181
|
+
- Edge cases and error conditions covered
|
|
182
|
+
- Prerequisites and dependencies listed
|
|
183
|
+
- Setup/installation steps complete
|
|
184
|
+
|
|
185
|
+
**Links and References**
|
|
186
|
+
|
|
187
|
+
- All hyperlinks tested (not broken)
|
|
188
|
+
- Internal cross-references point to existing sections
|
|
189
|
+
- External documentation links are current
|
|
190
|
+
- Code references point to actual files/functions with correct line numbers
|
|
191
|
+
|
|
192
|
+
**Consistency**
|
|
193
|
+
|
|
194
|
+
- Terminology used consistently throughout
|
|
195
|
+
- Formatting follows established patterns
|
|
196
|
+
- Tone and voice are uniform
|
|
197
|
+
- Examples follow same style
|
|
198
|
+
|
|
199
|
+
**Clarity**
|
|
200
|
+
|
|
201
|
+
- Written for target audience perspective
|
|
202
|
+
- Complex explanations simplified
|
|
203
|
+
- Logical flow between sections
|
|
204
|
+
- Examples progress simple → complex
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Diagrams and Tables Reference
|
|
2
|
+
|
|
3
|
+
This document provides detailed guidelines for using visual elements in technical documentation.
|
|
4
|
+
|
|
5
|
+
## Mermaid Diagrams
|
|
6
|
+
|
|
7
|
+
Use Mermaid diagrams to visually communicate complex concepts that are difficult to explain with prose alone. Diagrams should complement, not replace, written explanations.
|
|
8
|
+
|
|
9
|
+
### When to Use Diagrams
|
|
10
|
+
|
|
11
|
+
- **Process Flows**: Multi-step workflows with decision points, branching, or loops
|
|
12
|
+
- **System Architecture**: Component relationships and interactions
|
|
13
|
+
- **State Transitions**: How entities move between different states
|
|
14
|
+
- **Sequence of Operations**: Temporal relationships and async interactions
|
|
15
|
+
- **Decision Logic**: Complex conditional logic or error handling paths
|
|
16
|
+
|
|
17
|
+
### Diagram Types
|
|
18
|
+
|
|
19
|
+
#### 1. Flowcharts
|
|
20
|
+
|
|
21
|
+
For processes, workflows, and decision logic:
|
|
22
|
+
|
|
23
|
+
```mermaid
|
|
24
|
+
flowchart TD
|
|
25
|
+
A[Start: Submit Job] --> B{Validation Pass?}
|
|
26
|
+
B -->|Yes| C[Build Audience]
|
|
27
|
+
B -->|No| D[Return Error]
|
|
28
|
+
C --> E[Poll Status]
|
|
29
|
+
E --> F{Complete?}
|
|
30
|
+
F -->|Yes| G[Retrieve Results]
|
|
31
|
+
F -->|No| E
|
|
32
|
+
F -->|Error| H[Handle Failure]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### 2. Sequence Diagrams
|
|
36
|
+
|
|
37
|
+
For API interactions, async operations, callback flows:
|
|
38
|
+
|
|
39
|
+
```mermaid
|
|
40
|
+
sequenceDiagram
|
|
41
|
+
participant Client
|
|
42
|
+
participant API
|
|
43
|
+
participant S3
|
|
44
|
+
participant Worker
|
|
45
|
+
|
|
46
|
+
Client->>API: POST /audience/build
|
|
47
|
+
API->>S3: Validate file access
|
|
48
|
+
S3-->>API: Access confirmed
|
|
49
|
+
API->>Worker: Queue build job
|
|
50
|
+
API-->>Client: 202 Accepted (PID)
|
|
51
|
+
Worker->>S3: Download file
|
|
52
|
+
Worker->>API: POST callback/success
|
|
53
|
+
API-->>Client: Webhook notification
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
#### 3. State Diagrams
|
|
57
|
+
|
|
58
|
+
For status transitions, lifecycle management:
|
|
59
|
+
|
|
60
|
+
```mermaid
|
|
61
|
+
stateDiagram-v2
|
|
62
|
+
[*] --> PENDING
|
|
63
|
+
PENDING --> VALIDATING
|
|
64
|
+
VALIDATING --> PROCESSING: Valid
|
|
65
|
+
VALIDATING --> ERROR: Invalid
|
|
66
|
+
PROCESSING --> DONE: Success
|
|
67
|
+
PROCESSING --> ERROR: Failure
|
|
68
|
+
ERROR --> [*]
|
|
69
|
+
DONE --> [*]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### 4. Class Diagrams
|
|
73
|
+
|
|
74
|
+
For data models, inheritance, relationships:
|
|
75
|
+
|
|
76
|
+
```mermaid
|
|
77
|
+
classDiagram
|
|
78
|
+
class BridgeAPIClient {
|
|
79
|
+
+config: BridgeApiConfig
|
|
80
|
+
+build_audience()
|
|
81
|
+
+check_status()
|
|
82
|
+
+get_details()
|
|
83
|
+
}
|
|
84
|
+
class BridgeApiConfig {
|
|
85
|
+
+account_id: str
|
|
86
|
+
+api_key: str
|
|
87
|
+
+base_url: str
|
|
88
|
+
}
|
|
89
|
+
BridgeAPIClient --> BridgeApiConfig
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Diagram Best Practices
|
|
93
|
+
|
|
94
|
+
- **Keep diagrams focused**: One concept per diagram
|
|
95
|
+
- **Limit complexity**: Maximum 10-15 nodes; break complex flows into multiple diagrams
|
|
96
|
+
- **Use clear labels**: Node labels should be concise actions (verbs) or states (nouns)
|
|
97
|
+
- **Add context**: Always explain what the diagram shows before presenting it
|
|
98
|
+
- **Follow conventions**:
|
|
99
|
+
- Flowcharts: Diamonds for decisions, rectangles for actions, rounded for start/end
|
|
100
|
+
- Sequence diagrams: Show temporal order top-to-bottom
|
|
101
|
+
- State diagrams: Show all valid transitions, mark terminal states
|
|
102
|
+
- **Test rendering**: Verify Mermaid syntax is correct
|
|
103
|
+
|
|
104
|
+
### When NOT to Use Diagrams
|
|
105
|
+
|
|
106
|
+
- Simple linear processes (≤3 steps - use numbered lists)
|
|
107
|
+
- Concepts clearer in prose or code examples
|
|
108
|
+
- Diagrams requiring extensive legend/explanation
|
|
109
|
+
- When diagram would be more complex than the code it represents
|
|
110
|
+
|
|
111
|
+
## Tables
|
|
112
|
+
|
|
113
|
+
Use tables when they provide clearer information organization than prose or lists.
|
|
114
|
+
|
|
115
|
+
### When to Use Tables
|
|
116
|
+
|
|
117
|
+
#### Parameter Documentation
|
|
118
|
+
|
|
119
|
+
When documenting multiple parameters with several attributes:
|
|
120
|
+
|
|
121
|
+
| Parameter | Type | Required | Description |
|
|
122
|
+
|-----------|------|----------|-------------|
|
|
123
|
+
| `name` | `str` | Yes | Audience name (3-100 chars) |
|
|
124
|
+
| `type` | `AudienceType` | No | Defaults to MATCH |
|
|
125
|
+
|
|
126
|
+
#### Method/Endpoint Reference
|
|
127
|
+
|
|
128
|
+
Quick reference for multiple endpoints or methods:
|
|
129
|
+
|
|
130
|
+
| Method | Endpoint | Purpose |
|
|
131
|
+
|--------|----------|---------|
|
|
132
|
+
| POST | `/audience/build` | Create new audience |
|
|
133
|
+
| GET | `/audience/{pid}` | Check status |
|
|
134
|
+
|
|
135
|
+
#### Status Codes/Error Codes
|
|
136
|
+
|
|
137
|
+
HTTP status codes, error types, or state enumerations:
|
|
138
|
+
|
|
139
|
+
| Status | Meaning | Action |
|
|
140
|
+
|--------|---------|--------|
|
|
141
|
+
| PENDING | Validation in progress | Poll for updates |
|
|
142
|
+
| DONE | Processing complete | Retrieve results |
|
|
143
|
+
|
|
144
|
+
#### Configuration Options
|
|
145
|
+
|
|
146
|
+
Comparing different configuration choices or settings:
|
|
147
|
+
|
|
148
|
+
| Option | Default | Description |
|
|
149
|
+
|--------|---------|-------------|
|
|
150
|
+
| `timeout` | 60 | Request timeout in seconds |
|
|
151
|
+
| `retry_count` | 3 | Max retry attempts |
|
|
152
|
+
|
|
153
|
+
#### Comparison Tables
|
|
154
|
+
|
|
155
|
+
Feature comparisons, version differences, or option trade-offs:
|
|
156
|
+
|
|
157
|
+
| Feature | Standard | Premium |
|
|
158
|
+
|---------|----------|---------|
|
|
159
|
+
| Match rate | 70% | 85% |
|
|
160
|
+
| Support | Email | Phone + Email |
|
|
161
|
+
|
|
162
|
+
### Table Formatting Standards
|
|
163
|
+
|
|
164
|
+
- Always include header row with descriptive column names
|
|
165
|
+
- Use left alignment for text columns, right alignment for numbers
|
|
166
|
+
- Use inline code formatting (backticks) for code values, parameters, identifiers
|
|
167
|
+
- Keep cell content concise - use bullet points within cells if needed
|
|
168
|
+
- Ensure tables are readable in both rendered and raw markdown formats
|