@jahanxu/trellis 0.4.2 → 0.5.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/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +58 -1
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +17 -0
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +19 -0
- package/dist/constants/paths.js.map +1 -1
- package/dist/templates/claude/commands/trellis/handoff.md +90 -387
- package/dist/templates/claude/commands/trellis/pick-task.md +74 -444
- package/dist/templates/claude/hooks/inject-subagent-context.py +17 -101
- package/dist/templates/claude/hooks/ralph-loop.py +1 -0
- package/dist/templates/claude/hooks/session-start.py +170 -54
- package/dist/templates/iflow/commands/trellis/handoff.md +148 -0
- package/dist/templates/iflow/commands/trellis/pick-task.md +145 -0
- package/dist/templates/iflow/hooks/inject-subagent-context.py +1 -0
- package/dist/templates/iflow/hooks/ralph-loop.py +1 -0
- package/dist/templates/iflow/hooks/session-start.py +171 -0
- package/dist/templates/markdown/index.d.ts +9 -0
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +10 -0
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/spec/roles/designer/index.md.txt +57 -0
- package/dist/templates/markdown/spec/roles/designer/mock-data-standards.md.txt +63 -0
- package/dist/templates/markdown/spec/roles/designer/prototype-guidelines.md.txt +49 -0
- package/dist/templates/markdown/spec/roles/frontend-impl/api-integration.md.txt +63 -0
- package/dist/templates/markdown/spec/roles/frontend-impl/index.md.txt +57 -0
- package/dist/templates/markdown/spec/roles/frontend-impl/prototype-to-production.md.txt +57 -0
- package/dist/templates/markdown/spec/roles/pm/index.md.txt +45 -0
- package/dist/templates/markdown/spec/roles/pm/prd-template.md.txt +64 -0
- package/dist/templates/markdown/spec/roles/pm/requirement-checklist.md.txt +43 -0
- package/dist/templates/trellis/index.d.ts +1 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +2 -0
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/add_session.py +3 -2
- package/dist/templates/trellis/scripts/common/cli_adapter.py +4 -4
- package/dist/templates/trellis/scripts/common/developer.py +4 -4
- package/dist/templates/trellis/scripts/common/git_context.py +7 -7
- package/dist/templates/trellis/scripts/common/paths.py +64 -14
- package/dist/templates/trellis/scripts/common/phase.py +2 -2
- package/dist/templates/trellis/scripts/common/registry.py +16 -16
- package/dist/templates/trellis/scripts/common/task_queue.py +10 -10
- package/dist/templates/trellis/scripts/common/task_utils.py +5 -5
- package/dist/templates/trellis/scripts/common/worktree.py +8 -8
- package/dist/templates/trellis/scripts/pool.py +214 -265
- package/dist/templates/trellis/scripts/task.py +3 -116
- package/package.json +3 -3
- package/dist/templates/claude/commands/trellis/before-role-work.md +0 -364
- package/dist/templates/trellis/VERSION +0 -1
- package/dist/templates/trellis/deliverables/README.md +0 -51
- package/dist/templates/trellis/paths.README.md +0 -277
- package/dist/templates/trellis/paths.yaml +0 -41
- package/dist/templates/trellis/pool/implementations.json +0 -5
- package/dist/templates/trellis/pool/prototypes.json +0 -5
- package/dist/templates/trellis/pool/requirements.json +0 -5
- package/dist/templates/trellis/scripts/common/project_paths.py +0 -189
- package/dist/templates/trellis/scripts/handoff_generator.py +0 -380
- package/dist/templates/trellis/spec/roles/designer/index.md +0 -243
- package/dist/templates/trellis/spec/roles/designer/mock-data-standards.md +0 -481
- package/dist/templates/trellis/spec/roles/designer/prototype-guidelines.md +0 -429
- package/dist/templates/trellis/spec/roles/frontend-impl/api-integration.md +0 -565
- package/dist/templates/trellis/spec/roles/frontend-impl/index.md +0 -321
- package/dist/templates/trellis/spec/roles/frontend-impl/state-management.md +0 -599
- package/dist/templates/trellis/spec/roles/pm/index.md +0 -112
- package/dist/templates/trellis/spec/roles/pm/prd-template.md +0 -124
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Frontend Implementation Role Guidelines
|
|
2
|
+
|
|
3
|
+
> Standards for converting prototypes to production code.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This directory contains guidelines for the Frontend Implementation role in the three-role collaboration pipeline. Fill in each file with your project's specific conventions.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Guidelines Index
|
|
14
|
+
|
|
15
|
+
| Guide | Description | Status |
|
|
16
|
+
|-------|-------------|--------|
|
|
17
|
+
| [API Integration](./api-integration.md) | How to replace mock data with real APIs | To fill |
|
|
18
|
+
| [Prototype to Production](./prototype-to-production.md) | Checklist for converting prototypes | To fill |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
1. Pick a prototype from the pool: `/trellis:pick-task prototypes <id>`
|
|
25
|
+
2. Read the upstream HANDOFF.md carefully - it lists all TODOs
|
|
26
|
+
3. Replace mock data with real API calls
|
|
27
|
+
4. Add error handling, loading states, and edge case handling
|
|
28
|
+
5. Write tests for critical paths
|
|
29
|
+
6. Run `/trellis:handoff` to complete
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Output Directory
|
|
34
|
+
|
|
35
|
+
Production code goes directly into the project source tree (e.g., `src/features/<feature>/`).
|
|
36
|
+
|
|
37
|
+
A copy or reference is also placed in: `deliverables/production/<feature-id>/`
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Key Principle
|
|
42
|
+
|
|
43
|
+
> **Preserve the prototype's UX, replace the data layer.**
|
|
44
|
+
>
|
|
45
|
+
> The Designer's prototype defines the look and interaction.
|
|
46
|
+
> Your job is to make it work with real data and handle all edge cases.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Also Read
|
|
51
|
+
|
|
52
|
+
- `spec/frontend/` - Project frontend conventions (components, hooks, state management)
|
|
53
|
+
- `spec/backend/` - API conventions (if applicable)
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
**Language**: All documentation should be written in **English**.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Prototype to Production Checklist
|
|
2
|
+
|
|
3
|
+
> Step-by-step checklist for converting a Designer's prototype to production code.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Pre-Implementation
|
|
8
|
+
|
|
9
|
+
- [ ] Read HANDOFF.md thoroughly - note all "Logic for Frontend to Implement" items
|
|
10
|
+
- [ ] Identify all mock data locations (search for `// TODO:`, `// Mock:`, `mock` prefix)
|
|
11
|
+
- [ ] Review prototype component structure - decide what to keep vs refactor
|
|
12
|
+
- [ ] Check if prototype components follow project conventions (if not, note adjustments)
|
|
13
|
+
|
|
14
|
+
## Data Layer
|
|
15
|
+
|
|
16
|
+
- [ ] Replace all mock data with API calls or store connections
|
|
17
|
+
- [ ] Add proper TypeScript types for API responses
|
|
18
|
+
- [ ] Implement data fetching hooks (or use existing patterns)
|
|
19
|
+
- [ ] Add caching strategy if needed (React Query, SWR, etc.)
|
|
20
|
+
|
|
21
|
+
## Error Handling
|
|
22
|
+
|
|
23
|
+
- [ ] Add error boundaries for component-level errors
|
|
24
|
+
- [ ] Handle API errors with user-friendly messages
|
|
25
|
+
- [ ] Implement retry logic for transient failures
|
|
26
|
+
- [ ] Add fallback UI for error states
|
|
27
|
+
|
|
28
|
+
## State Management
|
|
29
|
+
|
|
30
|
+
- [ ] Connect to global state (auth, theme, etc.) as needed
|
|
31
|
+
- [ ] Implement form state management
|
|
32
|
+
- [ ] Handle optimistic updates if applicable
|
|
33
|
+
- [ ] Clean up state on unmount
|
|
34
|
+
|
|
35
|
+
## UX Polish
|
|
36
|
+
|
|
37
|
+
- [ ] Loading skeletons for async content
|
|
38
|
+
- [ ] Smooth transitions between states
|
|
39
|
+
- [ ] Keyboard navigation works correctly
|
|
40
|
+
- [ ] Focus management for modals/dialogs
|
|
41
|
+
|
|
42
|
+
## Testing
|
|
43
|
+
|
|
44
|
+
- [ ] Unit tests for business logic
|
|
45
|
+
- [ ] Integration tests for API interactions
|
|
46
|
+
- [ ] Accessibility testing (screen reader, keyboard-only)
|
|
47
|
+
|
|
48
|
+
## Final Check
|
|
49
|
+
|
|
50
|
+
- [ ] All TODO comments from prototype are resolved
|
|
51
|
+
- [ ] No mock data remains in production code
|
|
52
|
+
- [ ] Lint and type check pass
|
|
53
|
+
- [ ] Visual diff with prototype (should look identical)
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
**Language**: All documentation should be written in **English**.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# PM (Product Manager) Role Guidelines
|
|
2
|
+
|
|
3
|
+
> Standards for product requirements and feature specification.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This directory contains guidelines for the PM role in the three-role collaboration pipeline. Fill in each file with your project's specific conventions.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Guidelines Index
|
|
14
|
+
|
|
15
|
+
| Guide | Description | Status |
|
|
16
|
+
|-------|-------------|--------|
|
|
17
|
+
| [PRD Template](./prd-template.md) | Standard PRD structure and content requirements | To fill |
|
|
18
|
+
| [Requirement Checklist](./requirement-checklist.md) | Quality checklist before handoff | To fill |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
1. Create a task with `/trellis:start`
|
|
25
|
+
2. Write PRD and supporting documents in `deliverables/requirements/<feature-id>/`
|
|
26
|
+
3. Run `/trellis:handoff` to generate HANDOFF.md and add to pool
|
|
27
|
+
4. Downstream Designer picks from the `requirements` pool
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Output Directory
|
|
32
|
+
|
|
33
|
+
All PM deliverables go to: `deliverables/requirements/<feature-id>/`
|
|
34
|
+
|
|
35
|
+
Required files:
|
|
36
|
+
- `prd.md` - Product requirements document
|
|
37
|
+
|
|
38
|
+
Optional files:
|
|
39
|
+
- `user-stories.md` - Detailed user stories
|
|
40
|
+
- `wireframes/` - Low-fidelity wireframes
|
|
41
|
+
- `acceptance-criteria.md` - Detailed acceptance criteria
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
**Language**: All documentation should be written in **English**.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# PRD Template
|
|
2
|
+
|
|
3
|
+
> Standard structure for Product Requirements Documents.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
# Feature: {Feature Name}
|
|
11
|
+
|
|
12
|
+
## Background
|
|
13
|
+
Why this feature is needed. Business context and user pain points.
|
|
14
|
+
|
|
15
|
+
## Goals
|
|
16
|
+
- Primary goal
|
|
17
|
+
- Secondary goals
|
|
18
|
+
|
|
19
|
+
## User Stories
|
|
20
|
+
As a [user type], I want to [action] so that [benefit].
|
|
21
|
+
|
|
22
|
+
## Requirements
|
|
23
|
+
|
|
24
|
+
### Functional Requirements
|
|
25
|
+
1. ...
|
|
26
|
+
2. ...
|
|
27
|
+
|
|
28
|
+
### Non-Functional Requirements
|
|
29
|
+
- Performance: ...
|
|
30
|
+
- Security: ...
|
|
31
|
+
- Accessibility: ...
|
|
32
|
+
|
|
33
|
+
## UI/UX Requirements
|
|
34
|
+
- Layout description
|
|
35
|
+
- Key interactions
|
|
36
|
+
- Error states
|
|
37
|
+
|
|
38
|
+
## API Requirements (if applicable)
|
|
39
|
+
- Endpoints needed
|
|
40
|
+
- Data format expectations
|
|
41
|
+
|
|
42
|
+
## Acceptance Criteria
|
|
43
|
+
- [ ] Criterion 1
|
|
44
|
+
- [ ] Criterion 2
|
|
45
|
+
|
|
46
|
+
## Out of Scope
|
|
47
|
+
- Items explicitly excluded from this feature
|
|
48
|
+
|
|
49
|
+
## Open Questions
|
|
50
|
+
- Questions that need resolution
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Guidelines
|
|
56
|
+
|
|
57
|
+
1. **Be specific**: Avoid vague language like "should be fast" - specify measurable criteria
|
|
58
|
+
2. **Include edge cases**: Document what happens with empty data, errors, permission issues
|
|
59
|
+
3. **Reference designs**: Link to Figma/mockups when available
|
|
60
|
+
4. **Scope clearly**: Explicitly state what is NOT included
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
**Language**: All documentation should be written in **English**.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Requirement Checklist
|
|
2
|
+
|
|
3
|
+
> Quality checklist before handing off requirements to the Designer.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Pre-Handoff Checklist
|
|
8
|
+
|
|
9
|
+
### Completeness
|
|
10
|
+
- [ ] All user stories are written with clear acceptance criteria
|
|
11
|
+
- [ ] Edge cases are documented (empty states, error states, loading states)
|
|
12
|
+
- [ ] UI/UX requirements include layout descriptions and key interactions
|
|
13
|
+
- [ ] API requirements are specified (if applicable)
|
|
14
|
+
- [ ] Non-functional requirements are defined (performance, security, accessibility)
|
|
15
|
+
|
|
16
|
+
### Clarity
|
|
17
|
+
- [ ] No ambiguous language (e.g., "fast", "nice", "user-friendly" without metrics)
|
|
18
|
+
- [ ] Technical constraints are explicitly stated
|
|
19
|
+
- [ ] Out-of-scope items are listed
|
|
20
|
+
- [ ] Open questions are resolved or explicitly deferred
|
|
21
|
+
|
|
22
|
+
### Consistency
|
|
23
|
+
- [ ] Feature aligns with existing product patterns
|
|
24
|
+
- [ ] Naming conventions match existing features
|
|
25
|
+
- [ ] No contradictions between requirements sections
|
|
26
|
+
|
|
27
|
+
### Downstream Readiness
|
|
28
|
+
- [ ] Designer can start prototyping without needing clarification meetings
|
|
29
|
+
- [ ] All referenced resources (Figma links, API docs) are accessible
|
|
30
|
+
- [ ] Priority and scope are clear
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Common Issues to Avoid
|
|
35
|
+
|
|
36
|
+
1. **Missing error states**: Every user action should have a defined failure path
|
|
37
|
+
2. **Implicit assumptions**: State all assumptions explicitly
|
|
38
|
+
3. **Feature creep**: Keep scope tight - add "future considerations" for nice-to-haves
|
|
39
|
+
4. **Missing data requirements**: Specify what data the UI needs and where it comes from
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
**Language**: All documentation should be written in **English**.
|
|
@@ -39,6 +39,7 @@ export declare const taskScript: string;
|
|
|
39
39
|
export declare const getContextScript: string;
|
|
40
40
|
export declare const addSessionScript: string;
|
|
41
41
|
export declare const createBootstrapScript: string;
|
|
42
|
+
export declare const poolScript: string;
|
|
42
43
|
export declare const workflowMdTemplate: string;
|
|
43
44
|
export declare const worktreeYamlTemplate: string;
|
|
44
45
|
export declare const gitignoreTemplate: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAcH,eAAO,MAAM,WAAW,QAAsC,CAAC;AAG/D,eAAO,MAAM,UAAU,QAA6C,CAAC;AACrE,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,eAAe,QAA8C,CAAC;AAC3E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,cAAc,QAA6C,CAAC;AACzE,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,cAAc,QAA6C,CAAC;AACzE,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAG9E,eAAO,MAAM,cAAc,QAAkD,CAAC;A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AC;AAC9D,eAAO,MAAM,oBAAoB,QAAgC,CAAC;AAClE,eAAO,MAAM,iBAAiB,QAAgC,CAAC;AAE/D;;GAEG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAoCnD"}
|
|
@@ -51,6 +51,7 @@ export const taskScript = readTemplate("scripts/task.py");
|
|
|
51
51
|
export const getContextScript = readTemplate("scripts/get_context.py");
|
|
52
52
|
export const addSessionScript = readTemplate("scripts/add_session.py");
|
|
53
53
|
export const createBootstrapScript = readTemplate("scripts/create_bootstrap.py");
|
|
54
|
+
export const poolScript = readTemplate("scripts/pool.py");
|
|
54
55
|
// Configuration files
|
|
55
56
|
export const workflowMdTemplate = readTemplate("workflow.md");
|
|
56
57
|
export const worktreeYamlTemplate = readTemplate("worktree.yaml");
|
|
@@ -87,6 +88,7 @@ export function getAllScripts() {
|
|
|
87
88
|
scripts.set("get_context.py", getContextScript);
|
|
88
89
|
scripts.set("add_session.py", addSessionScript);
|
|
89
90
|
scripts.set("create_bootstrap.py", createBootstrapScript);
|
|
91
|
+
scripts.set("pool.py", poolScript);
|
|
90
92
|
return scripts;
|
|
91
93
|
}
|
|
92
94
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,SAAS,YAAY,CAAC,YAAoB;IACxC,OAAO,Y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EnD,OAAO;IACP,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;IACpD,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACnC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;IAChD,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;IAChD,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAEnC,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -8,6 +8,7 @@ Usage:
|
|
|
8
8
|
echo "content" | python3 add_session.py --title "Title" --commit "hash"
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
+
from __future__ import annotations
|
|
11
12
|
|
|
12
13
|
import sys
|
|
13
14
|
|
|
@@ -42,13 +43,13 @@ MAX_LINES = 2000
|
|
|
42
43
|
# Helper Functions
|
|
43
44
|
# =============================================================================
|
|
44
45
|
|
|
45
|
-
def get_latest_journal_info(dev_dir: Path) -> tuple[
|
|
46
|
+
def get_latest_journal_info(dev_dir: Path) -> tuple[Path | None, int, int]:
|
|
46
47
|
"""Get latest journal file info.
|
|
47
48
|
|
|
48
49
|
Returns:
|
|
49
50
|
Tuple of (file_path, file_number, line_count).
|
|
50
51
|
"""
|
|
51
|
-
latest_file:
|
|
52
|
+
latest_file: Path | None = None
|
|
52
53
|
latest_num = -1
|
|
53
54
|
|
|
54
55
|
for f in dev_dir.glob(f"{FILE_JOURNAL_PREFIX}*.md"):
|
|
@@ -25,10 +25,10 @@ Usage:
|
|
|
25
25
|
)
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
|
+
from __future__ import annotations
|
|
28
29
|
|
|
29
30
|
from dataclasses import dataclass
|
|
30
31
|
from pathlib import Path
|
|
31
|
-
from typing import Optional
|
|
32
32
|
from typing import ClassVar, Literal
|
|
33
33
|
|
|
34
34
|
Platform = Literal["claude", "opencode", "cursor", "iflow", "codex", "kilo", "kiro", "gemini", "antigravity"]
|
|
@@ -216,7 +216,7 @@ class CLIAdapter:
|
|
|
216
216
|
self,
|
|
217
217
|
agent: str,
|
|
218
218
|
prompt: str,
|
|
219
|
-
session_id:
|
|
219
|
+
session_id: str | None = None,
|
|
220
220
|
skip_permissions: bool = True,
|
|
221
221
|
verbose: bool = True,
|
|
222
222
|
json_output: bool = True,
|
|
@@ -312,7 +312,7 @@ class CLIAdapter:
|
|
|
312
312
|
else:
|
|
313
313
|
return ["claude", "--resume", session_id]
|
|
314
314
|
|
|
315
|
-
def get_resume_command_str(self, session_id: str, cwd:
|
|
315
|
+
def get_resume_command_str(self, session_id: str, cwd: str | None = None) -> str:
|
|
316
316
|
"""Get human-readable resume command string.
|
|
317
317
|
|
|
318
318
|
Args:
|
|
@@ -389,7 +389,7 @@ class CLIAdapter:
|
|
|
389
389
|
"""
|
|
390
390
|
return self.platform == "claude"
|
|
391
391
|
|
|
392
|
-
def extract_session_id_from_log(self, log_content: str) ->
|
|
392
|
+
def extract_session_id_from_log(self, log_content: str) -> str | None:
|
|
393
393
|
"""Extract session ID from log output (OpenCode only).
|
|
394
394
|
|
|
395
395
|
OpenCode generates session IDs in format: ses_xxx
|
|
@@ -8,11 +8,11 @@ Provides:
|
|
|
8
8
|
show_developer_info - Show developer information
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
+
from __future__ import annotations
|
|
11
12
|
|
|
12
13
|
import sys
|
|
13
14
|
from datetime import datetime
|
|
14
15
|
from pathlib import Path
|
|
15
|
-
from typing import Optional
|
|
16
16
|
|
|
17
17
|
from .paths import (
|
|
18
18
|
DIR_WORKFLOW,
|
|
@@ -30,7 +30,7 @@ from .paths import (
|
|
|
30
30
|
# Developer Initialization
|
|
31
31
|
# =============================================================================
|
|
32
32
|
|
|
33
|
-
def init_developer(name: str, repo_root:
|
|
33
|
+
def init_developer(name: str, repo_root: Path | None = None) -> bool:
|
|
34
34
|
"""Initialize developer.
|
|
35
35
|
|
|
36
36
|
Creates:
|
|
@@ -148,7 +148,7 @@ def init_developer(name: str, repo_root: Optional[Path] = None) -> bool:
|
|
|
148
148
|
return True
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
def ensure_developer(repo_root:
|
|
151
|
+
def ensure_developer(repo_root: Path | None = None) -> None:
|
|
152
152
|
"""Ensure developer is initialized, exit if not.
|
|
153
153
|
|
|
154
154
|
Args:
|
|
@@ -163,7 +163,7 @@ def ensure_developer(repo_root: Optional[Path] = None) -> None:
|
|
|
163
163
|
sys.exit(1)
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
def show_developer_info(repo_root:
|
|
166
|
+
def show_developer_info(repo_root: Path | None = None) -> None:
|
|
167
167
|
"""Show developer information.
|
|
168
168
|
|
|
169
169
|
Args:
|
|
@@ -8,6 +8,7 @@ Provides:
|
|
|
8
8
|
output_text - Output context in text format
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
+
from __future__ import annotations
|
|
11
12
|
|
|
12
13
|
import sys
|
|
13
14
|
|
|
@@ -23,7 +24,6 @@ if sys.platform == "win32":
|
|
|
23
24
|
import json
|
|
24
25
|
import subprocess
|
|
25
26
|
from pathlib import Path
|
|
26
|
-
from typing import Optional
|
|
27
27
|
|
|
28
28
|
from .paths import (
|
|
29
29
|
DIR_SCRIPTS,
|
|
@@ -45,7 +45,7 @@ from .paths import (
|
|
|
45
45
|
# =============================================================================
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
def _run_git_command(args: list[str], cwd:
|
|
48
|
+
def _run_git_command(args: list[str], cwd: Path | None = None) -> tuple[int, str, str]:
|
|
49
49
|
"""Run a git command and return (returncode, stdout, stderr).
|
|
50
50
|
|
|
51
51
|
Uses UTF-8 encoding with -c i18n.logOutputEncoding=UTF-8 to ensure
|
|
@@ -67,7 +67,7 @@ def _run_git_command(args: list[str], cwd: Optional[Path] = None) -> tuple[int,
|
|
|
67
67
|
return 1, "", str(e)
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
def _read_json_file(path: Path) ->
|
|
70
|
+
def _read_json_file(path: Path) -> dict | None:
|
|
71
71
|
"""Read and parse a JSON file."""
|
|
72
72
|
try:
|
|
73
73
|
return json.loads(path.read_text(encoding="utf-8"))
|
|
@@ -80,7 +80,7 @@ def _read_json_file(path: Path) -> Optional[dict]:
|
|
|
80
80
|
# =============================================================================
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
def get_context_json(repo_root:
|
|
83
|
+
def get_context_json(repo_root: Path | None = None) -> dict:
|
|
84
84
|
"""Get context as a dictionary.
|
|
85
85
|
|
|
86
86
|
Args:
|
|
@@ -160,7 +160,7 @@ def get_context_json(repo_root: Optional[Path] = None) -> dict:
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
|
|
163
|
-
def output_json(repo_root:
|
|
163
|
+
def output_json(repo_root: Path | None = None) -> None:
|
|
164
164
|
"""Output context in JSON format.
|
|
165
165
|
|
|
166
166
|
Args:
|
|
@@ -175,7 +175,7 @@ def output_json(repo_root: Optional[Path] = None) -> None:
|
|
|
175
175
|
# =============================================================================
|
|
176
176
|
|
|
177
177
|
|
|
178
|
-
def get_context_text(repo_root:
|
|
178
|
+
def get_context_text(repo_root: Path | None = None) -> str:
|
|
179
179
|
"""Get context as formatted text.
|
|
180
180
|
|
|
181
181
|
Args:
|
|
@@ -345,7 +345,7 @@ def get_context_text(repo_root: Optional[Path] = None) -> str:
|
|
|
345
345
|
return "\n".join(lines)
|
|
346
346
|
|
|
347
347
|
|
|
348
|
-
def output_text(repo_root:
|
|
348
|
+
def output_text(repo_root: Path | None = None) -> None:
|
|
349
349
|
"""Output context in text format.
|
|
350
350
|
|
|
351
351
|
Args:
|