@exaudeus/workrail 3.27.0 → 3.29.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/console/assets/{index-FtTaDku8.js → index-BZ6HkxGf.js} +1 -1
- package/dist/console/index.html +1 -1
- package/dist/manifest.json +3 -3
- package/docs/README.md +57 -0
- package/docs/adrs/001-hybrid-storage-backend.md +38 -0
- package/docs/adrs/002-four-layer-context-classification.md +38 -0
- package/docs/adrs/003-checkpoint-trigger-strategy.md +35 -0
- package/docs/adrs/004-opt-in-encryption-strategy.md +36 -0
- package/docs/adrs/005-agent-first-workflow-execution-tokens.md +105 -0
- package/docs/adrs/006-append-only-session-run-event-log.md +76 -0
- package/docs/adrs/007-resume-and-checkpoint-only-sessions.md +51 -0
- package/docs/adrs/008-blocked-nodes-architectural-upgrade.md +178 -0
- package/docs/adrs/009-bridge-mode-single-instance-mcp.md +195 -0
- package/docs/adrs/010-release-pipeline.md +89 -0
- package/docs/architecture/README.md +7 -0
- package/docs/architecture/refactor-audit.md +364 -0
- package/docs/authoring-v2.md +527 -0
- package/docs/authoring.md +873 -0
- package/docs/changelog-recent.md +201 -0
- package/docs/configuration.md +505 -0
- package/docs/ctc-mcp-proposal.md +518 -0
- package/docs/design/README.md +22 -0
- package/docs/design/agent-cascade-protocol.md +96 -0
- package/docs/design/autonomous-console-design-candidates.md +253 -0
- package/docs/design/autonomous-console-design-review.md +111 -0
- package/docs/design/autonomous-platform-mvp-discovery.md +525 -0
- package/docs/design/claude-code-source-deep-dive.md +713 -0
- package/docs/design/console-cyberpunk-ui-discovery.md +504 -0
- package/docs/design/console-execution-trace-candidates-final.md +160 -0
- package/docs/design/console-execution-trace-candidates.md +211 -0
- package/docs/design/console-execution-trace-design-candidates-v2.md +113 -0
- package/docs/design/console-execution-trace-design-review.md +74 -0
- package/docs/design/console-execution-trace-discovery.md +394 -0
- package/docs/design/console-execution-trace-final-review.md +77 -0
- package/docs/design/console-execution-trace-review.md +92 -0
- package/docs/design/console-performance-discovery.md +415 -0
- package/docs/design/console-ui-backlog.md +280 -0
- package/docs/design/daemon-architecture-discovery.md +853 -0
- package/docs/design/daemon-design-candidates.md +318 -0
- package/docs/design/daemon-design-review-findings.md +119 -0
- package/docs/design/daemon-engine-design-candidates.md +210 -0
- package/docs/design/daemon-engine-design-review.md +131 -0
- package/docs/design/daemon-execution-engine-discovery.md +280 -0
- package/docs/design/daemon-gap-analysis.md +554 -0
- package/docs/design/daemon-owns-console-plan.md +168 -0
- package/docs/design/daemon-owns-console-review.md +91 -0
- package/docs/design/daemon-owns-console.md +195 -0
- package/docs/design/data-model-erd.md +11 -0
- package/docs/design/design-candidates-consolidate-dev-staleness.md +98 -0
- package/docs/design/design-candidates-walk-cache-depth-limit.md +80 -0
- package/docs/design/design-review-consolidate-dev-staleness.md +54 -0
- package/docs/design/design-review-walk-cache-depth-limit.md +48 -0
- package/docs/design/implementation-plan-consolidate-dev-staleness.md +142 -0
- package/docs/design/implementation-plan-walk-cache-depth-limit.md +141 -0
- package/docs/design/layer3b-ghost-nodes-design-candidates.md +229 -0
- package/docs/design/layer3b-ghost-nodes-design-review.md +93 -0
- package/docs/design/layer3b-ghost-nodes-implementation-plan.md +219 -0
- package/docs/design/list-workflows-latency-fix-plan.md +128 -0
- package/docs/design/list-workflows-latency-fix-review.md +55 -0
- package/docs/design/list-workflows-latency-fix.md +109 -0
- package/docs/design/native-context-management-api.md +11 -0
- package/docs/design/performance-sweep-2026-04.md +96 -0
- package/docs/design/routines-guide.md +219 -0
- package/docs/design/sequence-diagrams.md +11 -0
- package/docs/design/subagent-design-principles.md +220 -0
- package/docs/design/temporal-patterns-design-candidates.md +312 -0
- package/docs/design/temporal-patterns-design-review-findings.md +163 -0
- package/docs/design/test-isolation-from-config-file.md +335 -0
- package/docs/design/v2-core-design-locks.md +2746 -0
- package/docs/design/v2-lock-registry.json +734 -0
- package/docs/design/workflow-authoring-v2.md +1044 -0
- package/docs/design/workflow-docs-spec.md +218 -0
- package/docs/design/workflow-extension-points.md +687 -0
- package/docs/design/workrail-auto-trigger-system.md +359 -0
- package/docs/design/workrail-config-file-discovery.md +513 -0
- package/docs/docker.md +110 -0
- package/docs/generated/v2-lock-closure-plan.md +26 -0
- package/docs/generated/v2-lock-coverage.json +797 -0
- package/docs/generated/v2-lock-coverage.md +177 -0
- package/docs/ideas/backlog.md +3927 -0
- package/docs/ideas/design-candidates-mcp-resilience.md +208 -0
- package/docs/ideas/design-review-findings-mcp-resilience.md +119 -0
- package/docs/ideas/implementation_plan.md +249 -0
- package/docs/ideas/third-party-workflow-setup-design-thinking.md +1948 -0
- package/docs/implementation/02-architecture.md +316 -0
- package/docs/implementation/04-testing-strategy.md +124 -0
- package/docs/implementation/09-simple-workflow-guide.md +835 -0
- package/docs/implementation/13-advanced-validation-guide.md +874 -0
- package/docs/implementation/README.md +21 -0
- package/docs/integrations/claude-code.md +300 -0
- package/docs/integrations/firebender.md +315 -0
- package/docs/migration/v0.1.0.md +147 -0
- package/docs/naming-conventions.md +45 -0
- package/docs/planning/README.md +104 -0
- package/docs/planning/github-ticketing-playbook.md +195 -0
- package/docs/plans/README.md +24 -0
- package/docs/plans/agent-managed-ticketing-design.md +605 -0
- package/docs/plans/agentic-orchestration-roadmap.md +112 -0
- package/docs/plans/assessment-gates-engine-handoff.md +536 -0
- package/docs/plans/content-coherence-and-references.md +151 -0
- package/docs/plans/library-extraction-plan.md +340 -0
- package/docs/plans/mr-review-workflow-redesign.md +1451 -0
- package/docs/plans/native-context-management-epic.md +11 -0
- package/docs/plans/perf-fixes-design-candidates.md +225 -0
- package/docs/plans/perf-fixes-design-review-findings.md +61 -0
- package/docs/plans/perf-fixes-new-issues-candidates.md +264 -0
- package/docs/plans/perf-fixes-new-issues-review.md +110 -0
- package/docs/plans/prompt-fragments.md +53 -0
- package/docs/plans/ui-ux-workflow-design-candidates.md +120 -0
- package/docs/plans/ui-ux-workflow-discovery.md +100 -0
- package/docs/plans/ui-ux-workflow-review.md +48 -0
- package/docs/plans/v2-followup-enhancements.md +587 -0
- package/docs/plans/workflow-categories-candidates.md +105 -0
- package/docs/plans/workflow-categories-discovery.md +110 -0
- package/docs/plans/workflow-categories-review.md +51 -0
- package/docs/plans/workflow-discovery-model-candidates.md +94 -0
- package/docs/plans/workflow-discovery-model-discovery.md +74 -0
- package/docs/plans/workflow-discovery-model-review.md +48 -0
- package/docs/plans/workflow-source-setup-phase-1.md +245 -0
- package/docs/plans/workflow-source-setup-phase-2.md +361 -0
- package/docs/plans/workflow-staleness-detection-candidates.md +104 -0
- package/docs/plans/workflow-staleness-detection-review.md +58 -0
- package/docs/plans/workflow-staleness-detection.md +80 -0
- package/docs/plans/workflow-v2-design.md +69 -0
- package/docs/plans/workflow-v2-roadmap.md +74 -0
- package/docs/plans/workflow-validation-design.md +98 -0
- package/docs/plans/workflow-validation-roadmap.md +108 -0
- package/docs/plans/workrail-platform-vision.md +420 -0
- package/docs/reference/agent-context-cleaner-snippet.md +94 -0
- package/docs/reference/agent-context-guidance.md +140 -0
- package/docs/reference/context-optimization.md +284 -0
- package/docs/reference/example-workflow-repository-template/.github/workflows/validate.yml +125 -0
- package/docs/reference/example-workflow-repository-template/README.md +268 -0
- package/docs/reference/example-workflow-repository-template/workflows/example-workflow.json +80 -0
- package/docs/reference/external-workflow-repositories.md +916 -0
- package/docs/reference/feature-flags-architecture.md +472 -0
- package/docs/reference/feature-flags.md +349 -0
- package/docs/reference/god-tier-workflow-validation.md +272 -0
- package/docs/reference/loop-optimization.md +209 -0
- package/docs/reference/loop-validation.md +176 -0
- package/docs/reference/loops.md +465 -0
- package/docs/reference/mcp-platform-constraints.md +59 -0
- package/docs/reference/recovery.md +88 -0
- package/docs/reference/releases.md +177 -0
- package/docs/reference/troubleshooting.md +105 -0
- package/docs/reference/workflow-execution-contract.md +998 -0
- package/docs/roadmap/README.md +22 -0
- package/docs/roadmap/legacy-planning-status.md +103 -0
- package/docs/roadmap/now-next-later.md +70 -0
- package/docs/roadmap/open-work-inventory.md +389 -0
- package/docs/tickets/README.md +39 -0
- package/docs/tickets/next-up.md +76 -0
- package/docs/workflow-management.md +317 -0
- package/docs/workflow-templates.md +423 -0
- package/docs/workflow-validation.md +184 -0
- package/docs/workflows.md +254 -0
- package/package.json +3 -1
- package/spec/authoring-spec.json +61 -16
- package/workflows/workflow-for-workflows.json +252 -93
- package/workflows/workflow-for-workflows.v2.json +188 -77
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Workflow Documentation Feature Specification
|
|
2
|
+
|
|
3
|
+
## Task Description
|
|
4
|
+
|
|
5
|
+
Implement a comprehensive workflow documentation system for WorkRail that provides stateless, text-only access to workflow and platform documentation. The system will enable agents and users to quickly understand workflow purpose, requirements, risks, and usage patterns without requiring UI controls or cross-session persistence.
|
|
6
|
+
|
|
7
|
+
## Key Objectives & Success Criteria
|
|
8
|
+
|
|
9
|
+
### Primary Objectives
|
|
10
|
+
1. **Self-Explanatory Workflows**: Every workflow becomes self-documenting with clear purpose, inputs, outputs, and risks
|
|
11
|
+
2. **Fast Decision Making**: Agents can quickly determine if a workflow fits the user's intent via preview/summary data
|
|
12
|
+
3. **Safety & Risk Management**: Sensitive operations are clearly documented and surfaced before execution
|
|
13
|
+
4. **Stateless Discovery**: Documentation accessible via text-only MCP tools without requiring first-run detection or persistence
|
|
14
|
+
|
|
15
|
+
### Success Criteria
|
|
16
|
+
- New MCP tools (`workflow_docs`, `workrail_help`) provide progressive disclosure of documentation
|
|
17
|
+
- Schema v0.3.0 supports optional `documentation` object with enforced critical fields
|
|
18
|
+
- Step-level `sensitivity` tags enable automatic risk surfacing
|
|
19
|
+
- README resolution with fallback algorithm (JSON → README → defaults)
|
|
20
|
+
- Backward compatibility maintained for existing workflows
|
|
21
|
+
- Integration with existing ValidationEngine and error handling patterns
|
|
22
|
+
|
|
23
|
+
## Scope and Constraints
|
|
24
|
+
|
|
25
|
+
### In Scope
|
|
26
|
+
- **Schema Extension**: Add `documentation` object to workflow schema v0.3.0
|
|
27
|
+
- **Step Sensitivity**: Add optional `sensitivity` tags to steps for risk detection
|
|
28
|
+
- **MCP Tools**: Implement `workflow_docs` and `workrail_help` tools
|
|
29
|
+
- **Documentation Service**: New service for documentation resolution and fallback logic
|
|
30
|
+
- **Storage Integration**: Extend storage abstractions to support README file resolution
|
|
31
|
+
- **Use Case Implementation**: Follow existing patterns for new use cases
|
|
32
|
+
- **Validation Integration**: Enforce critical documentation fields via ValidationEngine
|
|
33
|
+
|
|
34
|
+
### Out of Scope
|
|
35
|
+
- **Internationalization**: No multi-language support needed
|
|
36
|
+
- **CLI Commands**: Documentation linting/validation commands not defined
|
|
37
|
+
- **Migration Tools**: No automated migration assistance for existing workflows
|
|
38
|
+
- **UI Elements**: No buttons, controls, or visual interfaces
|
|
39
|
+
- **Cost/Runtime Estimates**: No prediction capabilities
|
|
40
|
+
- **First-Run Detection**: No user state tracking or onboarding flows
|
|
41
|
+
|
|
42
|
+
### Constraints
|
|
43
|
+
- **Stateless Design**: MCP remains stateless, no agent system access
|
|
44
|
+
- **Text-Only Interface**: All interactions via text, no UI affordances
|
|
45
|
+
- **Backward Compatibility**: Existing workflows must continue functioning
|
|
46
|
+
- **Schema Migration**: Workflows without documentation should gracefully degrade
|
|
47
|
+
- **User Rule Alignment**: Follow established architectural patterns and preferences
|
|
48
|
+
|
|
49
|
+
## System Integration Approach
|
|
50
|
+
|
|
51
|
+
### Architecture Integration
|
|
52
|
+
**applyUserRules()**: The implementation will follow established user preferences:
|
|
53
|
+
- Dependency injection via existing container pattern
|
|
54
|
+
- Immutable patterns for data handling
|
|
55
|
+
- Clean, extensible architecture with interface abstractions
|
|
56
|
+
- Stateless MCP design without agent system coupling
|
|
57
|
+
|
|
58
|
+
**matchPatterns()**: Integration follows existing WorkRail patterns:
|
|
59
|
+
- **MCP Tool Pattern**: Tools defined in `/src/mcp-server.ts` (lines 178-326) with delegation to use cases
|
|
60
|
+
- **Use Case Pattern**: New use cases in `/src/application/use-cases/` following existing structure
|
|
61
|
+
- **Service Pattern**: New `DocumentationService` injected via `/src/container.ts`
|
|
62
|
+
- **Storage Pattern**: Extend `IWorkflowStorage` interface for README resolution
|
|
63
|
+
- **Validation Pattern**: Integration with existing `ValidationEngine` for schema validation
|
|
64
|
+
|
|
65
|
+
### Component Integration
|
|
66
|
+
|
|
67
|
+
#### 1. Schema Layer (`/spec/workflow.schema.json`)
|
|
68
|
+
- **Version**: Bump to v0.3.0 (minor version)
|
|
69
|
+
- **Documentation Object**: Optional with enforced critical fields
|
|
70
|
+
```json
|
|
71
|
+
"documentation": {
|
|
72
|
+
"summary": "required string ≤512 chars",
|
|
73
|
+
"whenToUse": "required array of strings",
|
|
74
|
+
"inputs": "required array with name/required/description",
|
|
75
|
+
"outputs": "required array of strings",
|
|
76
|
+
"risks": "required array of strings",
|
|
77
|
+
"assumptions": "optional array",
|
|
78
|
+
"relatedWorkflows": "optional array",
|
|
79
|
+
"helpHint": "optional string"
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
- **Step Sensitivity**: Optional free-form tags
|
|
83
|
+
```json
|
|
84
|
+
"sensitivity": {
|
|
85
|
+
"level": "string (free-form)",
|
|
86
|
+
"notes": "optional string"
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### 2. MCP Server Layer (`/src/mcp-server.ts`)
|
|
91
|
+
- **New Tools**: Add `workflow_docs` and `workrail_help` tool definitions
|
|
92
|
+
- **Request Handling**: Delegate to use cases following existing pattern (lines 390-442)
|
|
93
|
+
- **Tool Registration**: Follow existing tool registration pattern
|
|
94
|
+
|
|
95
|
+
#### 3. Application Layer
|
|
96
|
+
- **DocumentationService**: New service for resolution logic and fallback handling
|
|
97
|
+
- **Use Cases**:
|
|
98
|
+
- `get-workflow-docs.ts` - Handle `workflow_docs` tool requests
|
|
99
|
+
- `get-workrail-help.ts` - Handle `workrail_help` tool requests
|
|
100
|
+
- **Container Integration**: Inject DocumentationService via existing DI container
|
|
101
|
+
|
|
102
|
+
#### 4. Storage Layer (`/src/infrastructure/storage/`)
|
|
103
|
+
- **Interface Extension**: Add README resolution methods to `IWorkflowStorage`
|
|
104
|
+
- **Implementation Updates**: Each storage implementation handles README files:
|
|
105
|
+
- `FileWorkflowStorage` - File system README resolution
|
|
106
|
+
- `GitWorkflowStorage` - Git-based README handling
|
|
107
|
+
- `RemoteWorkflowStorage` - Remote README fetching
|
|
108
|
+
- Others gracefully degrade or delegate
|
|
109
|
+
|
|
110
|
+
#### 5. Validation Layer (`/src/validation/`)
|
|
111
|
+
- **Schema Validation**: Extend existing ValidationEngine for documentation fields
|
|
112
|
+
- **Critical Field Enforcement**: Validate required documentation fields when present
|
|
113
|
+
- **Error Integration**: Use existing error handling patterns
|
|
114
|
+
|
|
115
|
+
## Impact on Components/Workflows
|
|
116
|
+
|
|
117
|
+
### Existing Workflows
|
|
118
|
+
- **Backward Compatibility**: Workflows without documentation continue functioning
|
|
119
|
+
- **Graceful Degradation**: `workflow_list` shows `docsAvailable: false` for undocumented workflows
|
|
120
|
+
- **Migration Requirement**: Eventually require documentation for full feature support
|
|
121
|
+
|
|
122
|
+
### New Tool Contracts
|
|
123
|
+
|
|
124
|
+
#### `workflow_docs` Tool
|
|
125
|
+
```typescript
|
|
126
|
+
interface WorkflowDocsRequest {
|
|
127
|
+
id: string;
|
|
128
|
+
mode?: "preview" | "full";
|
|
129
|
+
sections?: string[];
|
|
130
|
+
format?: "text" | "markdown" | "json";
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
interface WorkflowDocsResponse {
|
|
134
|
+
// Preview mode: JSON with critical fields
|
|
135
|
+
// Full mode: README content or compiled documentation
|
|
136
|
+
// Sections mode: Targeted content slices
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
#### `workrail_help` Tool
|
|
141
|
+
```typescript
|
|
142
|
+
interface WorkrailHelpRequest {
|
|
143
|
+
section?: "overview" | "workflows" | "troubleshooting" | "faq";
|
|
144
|
+
format?: "text" | "markdown" | "json";
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
#### Enhanced `workflow_list`
|
|
149
|
+
```typescript
|
|
150
|
+
interface WorkflowListItem {
|
|
151
|
+
id: string;
|
|
152
|
+
name: string;
|
|
153
|
+
description: string;
|
|
154
|
+
category: string;
|
|
155
|
+
version: string;
|
|
156
|
+
docsAvailable: boolean; // NEW
|
|
157
|
+
helpHint?: string; // NEW
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Testing/Quality Alignment
|
|
162
|
+
|
|
163
|
+
### Testing Strategy
|
|
164
|
+
- **Unit Tests**: Test DocumentationService resolution logic, fallback behavior
|
|
165
|
+
- **Integration Tests**: Test MCP tool responses, schema validation, storage integration
|
|
166
|
+
- **Contract Tests**: Verify MCP tool response schemas match expected formats
|
|
167
|
+
- **Validation Tests**: Test critical field enforcement and error handling
|
|
168
|
+
|
|
169
|
+
### Quality Gates
|
|
170
|
+
- **Schema Validation**: All documentation objects must validate against v0.3.0 schema
|
|
171
|
+
- **Critical Fields**: Enforce required fields (summary, whenToUse, inputs, outputs, risks)
|
|
172
|
+
- **Backward Compatibility**: Existing workflows must continue functioning
|
|
173
|
+
- **Error Handling**: Graceful fallback when documentation unavailable
|
|
174
|
+
|
|
175
|
+
## Phase 2 Decisions Integration
|
|
176
|
+
|
|
177
|
+
### Clarification Decisions Applied
|
|
178
|
+
1. **MCP Integration**: Tools delegate to use cases with ValidationEngine integration ✓
|
|
179
|
+
2. **Schema Version**: v0.3.0 minor bump with enforced critical fields ✓
|
|
180
|
+
3. **Service Architecture**: New DocumentationService with DI integration ✓
|
|
181
|
+
4. **Storage Integration**: Each storage implementation handles README resolution ✓
|
|
182
|
+
5. **Backward Compatibility**: Require migration, no migration tools, list works ✓
|
|
183
|
+
6. **Internationalization**: Not implemented (removed complexity) ✓
|
|
184
|
+
|
|
185
|
+
### Complexity Validation
|
|
186
|
+
The **Large** complexity classification remains appropriate due to:
|
|
187
|
+
- Multiple new services and architectural components
|
|
188
|
+
- Schema versioning with migration implications
|
|
189
|
+
- Cross-cutting integration across storage, validation, and MCP layers
|
|
190
|
+
- New tool contracts with comprehensive resolution logic
|
|
191
|
+
|
|
192
|
+
## Implementation Phases
|
|
193
|
+
|
|
194
|
+
### Phase 1: Schema & Core Services
|
|
195
|
+
1. Update workflow schema to v0.3.0
|
|
196
|
+
2. Implement DocumentationService with resolution logic
|
|
197
|
+
3. Update container for DI integration
|
|
198
|
+
|
|
199
|
+
### Phase 2: MCP Tool Integration
|
|
200
|
+
1. Add tool definitions to mcp-server.ts
|
|
201
|
+
2. Implement use cases for new tools
|
|
202
|
+
3. Integrate with existing validation patterns
|
|
203
|
+
|
|
204
|
+
### Phase 3: Storage Extension
|
|
205
|
+
1. Extend IWorkflowStorage interface
|
|
206
|
+
2. Update storage implementations for README support
|
|
207
|
+
3. Test fallback behavior across implementations
|
|
208
|
+
|
|
209
|
+
### Phase 4: Validation & Testing
|
|
210
|
+
1. Integrate critical field validation
|
|
211
|
+
2. Comprehensive test coverage
|
|
212
|
+
3. Backward compatibility verification
|
|
213
|
+
|
|
214
|
+
This specification provides a comprehensive foundation for implementing the workflow documentation feature while maintaining alignment with existing architectural patterns and user preferences.
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|