owflow 0.6.0 → 0.7.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/LICENSE +21 -21
- package/README.md +448 -283
- package/dist/agents/bottleneck-analyzer.md +332 -333
- package/dist/agents/code-quality-pragmatist.md +353 -354
- package/dist/agents/code-reviewer.md +238 -239
- package/dist/agents/codebase-analysis-reporter.md +245 -246
- package/dist/agents/docs-operator.md +22 -23
- package/dist/agents/e2e-test-verifier.md +447 -448
- package/dist/agents/gap-analyzer.md +501 -502
- package/dist/agents/implementation-completeness-checker.md +219 -220
- package/dist/agents/implementation-planner.md +308 -309
- package/dist/agents/information-gatherer.md +690 -691
- package/dist/agents/production-readiness-checker.md +278 -279
- package/dist/agents/project-analyzer.md +403 -403
- package/dist/agents/reality-assessor.md +365 -366
- package/dist/agents/research-planner.md +449 -450
- package/dist/agents/research-synthesizer.md +402 -403
- package/dist/agents/solution-brainstormer.md +256 -257
- package/dist/agents/solution-designer.md +371 -372
- package/dist/agents/spec-auditor.md +297 -298
- package/dist/agents/specification-creator.md +333 -334
- package/dist/agents/task-classifier.md +449 -450
- package/dist/agents/task-group-implementer.md +283 -284
- package/dist/agents/test-suite-runner.md +194 -195
- package/dist/agents/user-docs-generator.md +508 -509
- package/dist/commands/reviews-code.md +90 -90
- package/dist/commands/reviews-pragmatic.md +99 -99
- package/dist/commands/reviews-production-readiness.md +113 -113
- package/dist/commands/reviews-reality-check.md +110 -110
- package/dist/commands/reviews-spec-audit.md +114 -114
- package/dist/commands/work.md +280 -280
- package/dist/configuration/agents-config.d.ts +2 -0
- package/dist/configuration/agents-config.js +8 -44
- package/dist/configuration/commands-config.d.ts +23 -0
- package/dist/configuration/commands-config.js +17 -17
- package/dist/configuration/skills-config.d.ts +2 -0
- package/dist/configuration/skills-config.js +3 -3
- package/dist/hooks/hooks-diagnostics.d.ts +3 -0
- package/dist/hooks/hooks-diagnostics.js +21 -0
- package/dist/hooks/hooks-persistence.d.ts +17 -0
- package/dist/hooks/hooks-persistence.js +207 -0
- package/dist/hooks/hooks-registry.d.ts +6 -0
- package/dist/hooks/hooks-registry.js +104 -0
- package/dist/hooks/hooks-wrapper.d.ts +25 -0
- package/dist/hooks/hooks-wrapper.js +318 -0
- package/dist/hooks/internal/before-tool.d.ts +6 -0
- package/dist/hooks/internal/before-tool.js +13 -0
- package/dist/hooks/internal/session-compaction.d.ts +9 -0
- package/dist/hooks/{session-compaction.js → internal/session-compaction.js} +9 -7
- package/dist/hooks/runtime/circuit-breaker.d.ts +23 -0
- package/dist/hooks/runtime/circuit-breaker.js +39 -0
- package/dist/hooks/runtime/failure-policy.d.ts +15 -0
- package/dist/hooks/runtime/failure-policy.js +49 -0
- package/dist/hooks/runtime/process-executor.d.ts +33 -0
- package/dist/hooks/runtime/process-executor.js +147 -0
- package/dist/hooks/runtime/status-recorder.d.ts +27 -0
- package/dist/hooks/runtime/status-recorder.js +111 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +111 -40
- package/dist/skills/agents-md-generator/SKILL.md +223 -223
- package/dist/skills/codebase-analyzer/SKILL.md +162 -162
- package/dist/skills/codebase-analyzer/references/code-analysis.md +63 -63
- package/dist/skills/codebase-analyzer/references/combined.md +31 -31
- package/dist/skills/codebase-analyzer/references/context-discovery.md +63 -63
- package/dist/skills/codebase-analyzer/references/file-discovery.md +51 -51
- package/dist/skills/codebase-analyzer/references/migration-target.md +23 -23
- package/dist/skills/codebase-analyzer/references/pattern-mining.md +22 -22
- package/dist/skills/dev-analyze/SKILL.md +115 -115
- package/dist/skills/dev-bugfix/SKILL.md +452 -452
- package/dist/skills/dev-finalize/SKILL.md +118 -118
- package/dist/skills/dev-implement/SKILL.md +167 -167
- package/dist/skills/dev-plan/SKILL.md +147 -147
- package/dist/skills/dev-spec/SKILL.md +182 -182
- package/dist/skills/dev-tdd-red/SKILL.md +94 -94
- package/dist/skills/dev-verify/SKILL.md +153 -153
- package/dist/skills/development/SKILL.md +260 -260
- package/dist/skills/diagrams-mermaid/SKILL.md +183 -159
- package/dist/skills/diagrams-mermaid/references/reference.md +220 -148
- package/dist/skills/docs-manager/SKILL.md +379 -379
- package/dist/skills/docs-manager/docs/INDEX.md +199 -199
- package/dist/skills/docs-manager/docs/standards/backend/api.md +25 -25
- package/dist/skills/docs-manager/docs/standards/backend/migrations.md +22 -22
- package/dist/skills/docs-manager/docs/standards/backend/models.md +25 -25
- package/dist/skills/docs-manager/docs/standards/backend/queries.md +22 -22
- package/dist/skills/docs-manager/docs/standards/frontend/accessibility.md +25 -25
- package/dist/skills/docs-manager/docs/standards/frontend/components.md +28 -28
- package/dist/skills/docs-manager/docs/standards/frontend/css.md +16 -16
- package/dist/skills/docs-manager/docs/standards/frontend/responsive.md +28 -28
- package/dist/skills/docs-manager/docs/standards/global/coding-style.md +25 -25
- package/dist/skills/docs-manager/docs/standards/global/commenting.md +10 -10
- package/dist/skills/docs-manager/docs/standards/global/conventions.md +31 -31
- package/dist/skills/docs-manager/docs/standards/global/error-handling.md +22 -22
- package/dist/skills/docs-manager/docs/standards/global/minimal-implementation.md +22 -22
- package/dist/skills/docs-manager/docs/standards/global/validation.md +28 -28
- package/dist/skills/docs-manager/docs/standards/testing/test-writing.md +25 -25
- package/dist/skills/docs-manager/references/agents-md-template.md +29 -29
- package/dist/skills/docs-manager/references/index-md-template.md +73 -73
- package/dist/skills/flow-init/SKILL.md +234 -234
- package/dist/skills/flow-init/references/architecture-template.md +45 -45
- package/dist/skills/flow-init/references/roadmap-templates.md +93 -93
- package/dist/skills/flow-init/references/tech-stack-template.md +70 -70
- package/dist/skills/flow-init/references/vision-templates.md +75 -75
- package/dist/skills/goal-development/SKILL.md +96 -96
- package/dist/skills/goal-migration/SKILL.md +114 -114
- package/dist/skills/goal-performance/SKILL.md +126 -126
- package/dist/skills/goal-research/SKILL.md +118 -118
- package/dist/skills/html-renderer/SKILL.md +173 -173
- package/dist/skills/html-renderer/references/index.html +318 -318
- package/dist/skills/html-renderer/references/styles.css +388 -388
- package/dist/skills/html-renderer/references/tokens.json +104 -104
- package/dist/skills/implementation-plan-executor/SKILL.md +378 -378
- package/dist/skills/implementation-verifier/SKILL.md +307 -307
- package/dist/skills/migration/SKILL.md +268 -268
- package/dist/skills/migration-analyze/SKILL.md +126 -126
- package/dist/skills/migration-finalize/SKILL.md +161 -161
- package/dist/skills/migration-fix/SKILL.md +155 -155
- package/dist/skills/migration-implement/SKILL.md +131 -131
- package/dist/skills/migration-plan/SKILL.md +131 -131
- package/dist/skills/migration-spec/SKILL.md +135 -135
- package/dist/skills/migration-spec/references/migration-strategies.md +430 -430
- package/dist/skills/migration-target/SKILL.md +134 -134
- package/dist/skills/migration-target/references/migration-types.md +489 -489
- package/dist/skills/migration-verify/SKILL.md +184 -184
- package/dist/skills/orchestrator-framework/SKILL.md +65 -65
- package/dist/skills/orchestrator-framework/references/command-namespacing.md +7 -7
- package/dist/skills/orchestrator-framework/references/confirm-or-revise-exception.md +20 -20
- package/dist/skills/orchestrator-framework/references/delegation-rules.md +54 -54
- package/dist/skills/orchestrator-framework/references/dispatcher-handoff.md +27 -27
- package/dist/skills/orchestrator-framework/references/fix-loop-contract.md +65 -65
- package/dist/skills/orchestrator-framework/references/gate-contract.md +122 -122
- package/dist/skills/orchestrator-framework/references/orchestrator-creation-checklist.md +51 -51
- package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +235 -235
- package/dist/skills/performance/SKILL.md +267 -267
- package/dist/skills/performance-analyze/SKILL.md +129 -129
- package/dist/skills/performance-analyze/references/performance-optimization-guide.md +271 -271
- package/dist/skills/performance-finalize/SKILL.md +117 -117
- package/dist/skills/performance-implement/SKILL.md +114 -114
- package/dist/skills/performance-plan/SKILL.md +112 -112
- package/dist/skills/performance-spec/SKILL.md +145 -145
- package/dist/skills/performance-verify/SKILL.md +164 -164
- package/dist/skills/research/SKILL.md +249 -249
- package/dist/skills/research-brainstorm/SKILL.md +120 -120
- package/dist/skills/research-brainstorm/references/brainstorming-techniques.md +84 -84
- package/dist/skills/research-converge/SKILL.md +130 -130
- package/dist/skills/research-design/SKILL.md +146 -146
- package/dist/skills/research-design/references/design-techniques.md +40 -40
- package/dist/skills/research-finalize/SKILL.md +125 -125
- package/dist/skills/research-fork/SKILL.md +190 -190
- package/dist/skills/research-gather/SKILL.md +133 -133
- package/dist/skills/research-plan/SKILL.md +141 -141
- package/dist/skills/research-plan/references/research-methodologies.md +710 -710
- package/dist/skills/research-quick/SKILL.md +139 -139
- package/dist/skills/research-synthesize/SKILL.md +127 -127
- package/dist/skills/rule-reviewer/SKILL.md +334 -334
- package/dist/skills/standards-discover/SKILL.md +260 -260
- package/dist/skills/standards-discover/references/aggregation-strategy.md +76 -76
- package/dist/skills/standards-discover/references/code-pattern-prompt.md +68 -68
- package/dist/skills/standards-discover/references/config-analyzer-prompt.md +67 -67
- package/dist/skills/standards-discover/references/docs-extractor-prompt.md +65 -65
- package/dist/skills/standards-discover/references/external-analyzer-prompt.md +75 -75
- package/dist/skills/standards-update/SKILL.md +207 -207
- package/dist/templates/orchestrator-state-base.yml +17 -17
- package/dist/templates/orchestrator-state-development.yml +95 -95
- package/dist/templates/orchestrator-state-migration.yml +95 -95
- package/dist/templates/orchestrator-state-performance.yml +64 -64
- package/dist/templates/orchestrator-state-research.yml +67 -67
- package/dist/tools/fork_task.d.ts +17 -0
- package/dist/tools/fork_task.js +21 -11
- package/dist/tools/verify_template.d.ts +11 -0
- package/dist/tools/verify_template.js +32 -17
- package/dist/tui/hooks-dialogs.d.ts +20 -0
- package/dist/tui/hooks-dialogs.js +181 -0
- package/dist/tui/hooks-presenter.d.ts +15 -0
- package/dist/tui/hooks-presenter.js +70 -0
- package/dist/tui/hooks-sidebar.d.ts +10 -0
- package/dist/tui/hooks-sidebar.js +104 -0
- package/dist/tui/primitives.d.ts +21 -0
- package/dist/tui/primitives.js +47 -0
- package/dist/tui.d.ts +12 -0
- package/dist/tui.js +129 -0
- package/dist/types/hook-types.d.ts +125 -0
- package/dist/types/hook-types.js +76 -0
- package/dist/types/opencode-types.d.ts +13 -0
- package/dist/utils/file-util.d.ts +2 -0
- package/dist/utils/file-util.js +6 -6
- package/dist/utils/fork-task.d.ts +27 -0
- package/dist/utils/fork-task.js +18 -23
- package/dist/utils/plugin-info.d.ts +3 -0
- package/dist/utils/plugin-info.js +8 -10
- package/dist/utils/workflow-paths.d.ts +17 -0
- package/dist/utils/workflow-paths.js +18 -0
- package/dist/utils/yaml-structure.d.ts +7 -0
- package/dist/utils/yaml-structure.js +7 -11
- package/package.json +68 -48
- package/dist/hooks/before-tool.js +0 -19
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
# Aggregation Strategy — Confidence Scoring & Deduplication
|
|
2
|
-
|
|
3
|
-
## Deduplication Rules
|
|
4
|
-
|
|
5
|
-
Group findings by `category + standard_name`. When multiple findings match:
|
|
6
|
-
|
|
7
|
-
1. **Merge evidence** — Combine all evidence items from all sources
|
|
8
|
-
2. **Track sources** — Note which phases contributed (config, code, docs, external)
|
|
9
|
-
3. **Take strongest description** — Prefer documented > config > code-inferred
|
|
10
|
-
4. **Preserve examples** — Combine unique examples
|
|
11
|
-
|
|
12
|
-
## Confidence Scoring
|
|
13
|
-
|
|
14
|
-
Calculate final confidence using these factors:
|
|
15
|
-
|
|
16
|
-
### Source Count (max 45 points)
|
|
17
|
-
- Each unique source: +15 points (config, code-patterns, documentation, pr-reviews, ci-config, pre-commit)
|
|
18
|
-
- Cap at 45 points (3+ sources)
|
|
19
|
-
|
|
20
|
-
### Consistency (max 20 points)
|
|
21
|
-
- >= 90% consistency across sampled files: +20
|
|
22
|
-
- 70-89% consistency: +10
|
|
23
|
-
- < 70% consistency: +0
|
|
24
|
-
|
|
25
|
-
### Explicitness (max 15 points)
|
|
26
|
-
- Found in config file (explicit rule): +15
|
|
27
|
-
- Found in documentation (explicitly stated): +10
|
|
28
|
-
- Inferred from code patterns only: +5
|
|
29
|
-
|
|
30
|
-
### Evidence Strength (max 20 points)
|
|
31
|
-
- Per evidence item: +5 points, cap at 20 (4+ evidence items)
|
|
32
|
-
|
|
33
|
-
### PR Feedback Boost (max 10 points)
|
|
34
|
-
- 5+ PR reviews mention this: +10
|
|
35
|
-
- 3-4 PR reviews: +5
|
|
36
|
-
|
|
37
|
-
**Final score**: Sum of factors, capped at 100.
|
|
38
|
-
|
|
39
|
-
## Conflict Detection
|
|
40
|
-
|
|
41
|
-
Flag conflicts when two findings for the same aspect give contradictory guidance:
|
|
42
|
-
|
|
43
|
-
- Same tool, different settings (e.g., ESLint vs Prettier disagreeing on semicolons)
|
|
44
|
-
- Documentation says one thing, config enforces another
|
|
45
|
-
- Code patterns don't match documented standards
|
|
46
|
-
|
|
47
|
-
Present each conflict to user with both sides and evidence.
|
|
48
|
-
|
|
49
|
-
## Confidence Categories
|
|
50
|
-
|
|
51
|
-
| Level | Range | Guidance |
|
|
52
|
-
|-------|-------|----------|
|
|
53
|
-
| High | >= 80% | Strong evidence, multiple sources. Safe to apply. |
|
|
54
|
-
| Medium | 60-79% | Some evidence, may need clarification. Review recommended. |
|
|
55
|
-
| Low | < 60% | Weak or inconsistent patterns. May indicate area needing standardization. |
|
|
56
|
-
|
|
57
|
-
## Presentation Order
|
|
58
|
-
|
|
59
|
-
1. High confidence findings (batch approval option)
|
|
60
|
-
2. Medium confidence findings (individual review)
|
|
61
|
-
3. Conflicts (resolution required)
|
|
62
|
-
4. Low confidence findings (informational, skip option)
|
|
63
|
-
|
|
64
|
-
## Presentation Format
|
|
65
|
-
|
|
66
|
-
Before approval prompts, present a **full summary table** grouped by confidence level. Each finding row shows:
|
|
67
|
-
|
|
68
|
-
- **Standard name** and **category**
|
|
69
|
-
- **Confidence score** (numeric, 0-100)
|
|
70
|
-
- **Sources** — all contributing sources listed (e.g., "config, code, docs"). This is key for user trust and decision-making.
|
|
71
|
-
- **Brief description** (one line, truncated if needed)
|
|
72
|
-
|
|
73
|
-
When drilling into individual findings (medium confidence, or user-requested drill-down), show:
|
|
74
|
-
- Full description and examples (preferred/avoid patterns)
|
|
75
|
-
- Evidence items with source attribution (which source provided each piece of evidence)
|
|
76
|
-
- Confidence score breakdown: show points from each factor (source count, consistency, explicitness, evidence strength, PR boost) so user understands why the score is what it is
|
|
1
|
+
# Aggregation Strategy — Confidence Scoring & Deduplication
|
|
2
|
+
|
|
3
|
+
## Deduplication Rules
|
|
4
|
+
|
|
5
|
+
Group findings by `category + standard_name`. When multiple findings match:
|
|
6
|
+
|
|
7
|
+
1. **Merge evidence** — Combine all evidence items from all sources
|
|
8
|
+
2. **Track sources** — Note which phases contributed (config, code, docs, external)
|
|
9
|
+
3. **Take strongest description** — Prefer documented > config > code-inferred
|
|
10
|
+
4. **Preserve examples** — Combine unique examples
|
|
11
|
+
|
|
12
|
+
## Confidence Scoring
|
|
13
|
+
|
|
14
|
+
Calculate final confidence using these factors:
|
|
15
|
+
|
|
16
|
+
### Source Count (max 45 points)
|
|
17
|
+
- Each unique source: +15 points (config, code-patterns, documentation, pr-reviews, ci-config, pre-commit)
|
|
18
|
+
- Cap at 45 points (3+ sources)
|
|
19
|
+
|
|
20
|
+
### Consistency (max 20 points)
|
|
21
|
+
- >= 90% consistency across sampled files: +20
|
|
22
|
+
- 70-89% consistency: +10
|
|
23
|
+
- < 70% consistency: +0
|
|
24
|
+
|
|
25
|
+
### Explicitness (max 15 points)
|
|
26
|
+
- Found in config file (explicit rule): +15
|
|
27
|
+
- Found in documentation (explicitly stated): +10
|
|
28
|
+
- Inferred from code patterns only: +5
|
|
29
|
+
|
|
30
|
+
### Evidence Strength (max 20 points)
|
|
31
|
+
- Per evidence item: +5 points, cap at 20 (4+ evidence items)
|
|
32
|
+
|
|
33
|
+
### PR Feedback Boost (max 10 points)
|
|
34
|
+
- 5+ PR reviews mention this: +10
|
|
35
|
+
- 3-4 PR reviews: +5
|
|
36
|
+
|
|
37
|
+
**Final score**: Sum of factors, capped at 100.
|
|
38
|
+
|
|
39
|
+
## Conflict Detection
|
|
40
|
+
|
|
41
|
+
Flag conflicts when two findings for the same aspect give contradictory guidance:
|
|
42
|
+
|
|
43
|
+
- Same tool, different settings (e.g., ESLint vs Prettier disagreeing on semicolons)
|
|
44
|
+
- Documentation says one thing, config enforces another
|
|
45
|
+
- Code patterns don't match documented standards
|
|
46
|
+
|
|
47
|
+
Present each conflict to user with both sides and evidence.
|
|
48
|
+
|
|
49
|
+
## Confidence Categories
|
|
50
|
+
|
|
51
|
+
| Level | Range | Guidance |
|
|
52
|
+
|-------|-------|----------|
|
|
53
|
+
| High | >= 80% | Strong evidence, multiple sources. Safe to apply. |
|
|
54
|
+
| Medium | 60-79% | Some evidence, may need clarification. Review recommended. |
|
|
55
|
+
| Low | < 60% | Weak or inconsistent patterns. May indicate area needing standardization. |
|
|
56
|
+
|
|
57
|
+
## Presentation Order
|
|
58
|
+
|
|
59
|
+
1. High confidence findings (batch approval option)
|
|
60
|
+
2. Medium confidence findings (individual review)
|
|
61
|
+
3. Conflicts (resolution required)
|
|
62
|
+
4. Low confidence findings (informational, skip option)
|
|
63
|
+
|
|
64
|
+
## Presentation Format
|
|
65
|
+
|
|
66
|
+
Before approval prompts, present a **full summary table** grouped by confidence level. Each finding row shows:
|
|
67
|
+
|
|
68
|
+
- **Standard name** and **category**
|
|
69
|
+
- **Confidence score** (numeric, 0-100)
|
|
70
|
+
- **Sources** — all contributing sources listed (e.g., "config, code, docs"). This is key for user trust and decision-making.
|
|
71
|
+
- **Brief description** (one line, truncated if needed)
|
|
72
|
+
|
|
73
|
+
When drilling into individual findings (medium confidence, or user-requested drill-down), show:
|
|
74
|
+
- Full description and examples (preferred/avoid patterns)
|
|
75
|
+
- Evidence items with source attribution (which source provided each piece of evidence)
|
|
76
|
+
- Confidence score breakdown: show points from each factor (source count, consistency, explicitness, evidence strength, PR boost) so user understands why the score is what it is
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
# Code Pattern Analyzer — Subagent Prompt Template
|
|
2
|
-
|
|
3
|
-
Analyze source code patterns to discover coding conventions and standards used in the project.
|
|
4
|
-
|
|
5
|
-
## Task
|
|
6
|
-
|
|
7
|
-
Sample code files, detect consistent patterns in naming/imports/structure, return findings as YAML.
|
|
8
|
-
|
|
9
|
-
## Sampling Strategy
|
|
10
|
-
|
|
11
|
-
For performance, sample rather than exhaustive analysis:
|
|
12
|
-
|
|
13
|
-
- **Frontend files**: Sample up to 50 files (`*.ts`, `*.tsx`, `*.js`, `*.jsx`, `*.vue`, `*.svelte`)
|
|
14
|
-
- **Backend files**: Sample up to 50 files (`*.py`, `*.rb`, `*.java`, `*.go`, `*.rs`)
|
|
15
|
-
- **Test files**: Sample up to 30 files (`*.test.*`, `*.spec.*`, `*_test.*`)
|
|
16
|
-
|
|
17
|
-
Use Glob to find files, then Read a representative sample from different directories.
|
|
18
|
-
|
|
19
|
-
## Patterns to Detect
|
|
20
|
-
|
|
21
|
-
1. **File Naming**: PascalCase, kebab-case, snake_case, camelCase — calculate consistency %
|
|
22
|
-
2. **Import Patterns**: Absolute vs relative, path aliases (`@/`), import grouping/sorting
|
|
23
|
-
3. **Error Handling**: try/catch usage, custom error classes, error wrapping, logging patterns
|
|
24
|
-
4. **Component Structure** (frontend): Functional vs class components, hooks usage, props patterns
|
|
25
|
-
5. **API Patterns** (backend): Endpoint naming, resource naming (plural/singular), versioning
|
|
26
|
-
6. **Function Style**: Arrow functions vs declarations, async/await vs promises
|
|
27
|
-
7. **Type Patterns**: TypeScript strictness, type vs interface usage, generics patterns
|
|
28
|
-
|
|
29
|
-
## Consistency Threshold
|
|
30
|
-
|
|
31
|
-
Only report patterns with **>= 60% consistency** across sampled files.
|
|
32
|
-
|
|
33
|
-
Calculate: `(files following pattern / total files sampled) * 100`
|
|
34
|
-
|
|
35
|
-
## Categorization
|
|
36
|
-
|
|
37
|
-
Discover existing categories from `.owflow/docs/standards/*/`. Baseline categories: `global/`, `frontend/`, `backend/`, `testing/`. Propose new categories if patterns don't fit existing ones.
|
|
38
|
-
|
|
39
|
-
## Confidence Range
|
|
40
|
-
|
|
41
|
-
Code pattern findings: **60-88%** confidence. Higher when consistency is >= 90%.
|
|
42
|
-
|
|
43
|
-
## Output Format
|
|
44
|
-
|
|
45
|
-
Return YAML:
|
|
46
|
-
|
|
47
|
-
```yaml
|
|
48
|
-
findings:
|
|
49
|
-
- category: "[category/subcategory]"
|
|
50
|
-
standard_name: "[Short Name]"
|
|
51
|
-
description: "[What the convention is]"
|
|
52
|
-
confidence: [60-88]
|
|
53
|
-
evidence:
|
|
54
|
-
- "[X] of [Y] files follow this pattern"
|
|
55
|
-
- "Examples: [file1], [file2], [file3]"
|
|
56
|
-
source: "code-patterns"
|
|
57
|
-
examples:
|
|
58
|
-
- "[Correct pattern example]"
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Rules
|
|
62
|
-
|
|
63
|
-
- Sample files randomly across directories for representative results
|
|
64
|
-
- Report file counts in evidence (e.g., "247 of 250 .tsx files use PascalCase")
|
|
65
|
-
- Only report patterns with >= 60% consistency
|
|
66
|
-
- Return empty findings list if no clear patterns emerge
|
|
67
|
-
- Focus on actionable, consistent patterns — not one-off occurrences
|
|
68
|
-
- Do NOT write any files to the project directory. Write your YAML results to: `[output_file]` (the orchestrator replaces this placeholder with an actual temp file path when invoking you).
|
|
1
|
+
# Code Pattern Analyzer — Subagent Prompt Template
|
|
2
|
+
|
|
3
|
+
Analyze source code patterns to discover coding conventions and standards used in the project.
|
|
4
|
+
|
|
5
|
+
## Task
|
|
6
|
+
|
|
7
|
+
Sample code files, detect consistent patterns in naming/imports/structure, return findings as YAML.
|
|
8
|
+
|
|
9
|
+
## Sampling Strategy
|
|
10
|
+
|
|
11
|
+
For performance, sample rather than exhaustive analysis:
|
|
12
|
+
|
|
13
|
+
- **Frontend files**: Sample up to 50 files (`*.ts`, `*.tsx`, `*.js`, `*.jsx`, `*.vue`, `*.svelte`)
|
|
14
|
+
- **Backend files**: Sample up to 50 files (`*.py`, `*.rb`, `*.java`, `*.go`, `*.rs`)
|
|
15
|
+
- **Test files**: Sample up to 30 files (`*.test.*`, `*.spec.*`, `*_test.*`)
|
|
16
|
+
|
|
17
|
+
Use Glob to find files, then Read a representative sample from different directories.
|
|
18
|
+
|
|
19
|
+
## Patterns to Detect
|
|
20
|
+
|
|
21
|
+
1. **File Naming**: PascalCase, kebab-case, snake_case, camelCase — calculate consistency %
|
|
22
|
+
2. **Import Patterns**: Absolute vs relative, path aliases (`@/`), import grouping/sorting
|
|
23
|
+
3. **Error Handling**: try/catch usage, custom error classes, error wrapping, logging patterns
|
|
24
|
+
4. **Component Structure** (frontend): Functional vs class components, hooks usage, props patterns
|
|
25
|
+
5. **API Patterns** (backend): Endpoint naming, resource naming (plural/singular), versioning
|
|
26
|
+
6. **Function Style**: Arrow functions vs declarations, async/await vs promises
|
|
27
|
+
7. **Type Patterns**: TypeScript strictness, type vs interface usage, generics patterns
|
|
28
|
+
|
|
29
|
+
## Consistency Threshold
|
|
30
|
+
|
|
31
|
+
Only report patterns with **>= 60% consistency** across sampled files.
|
|
32
|
+
|
|
33
|
+
Calculate: `(files following pattern / total files sampled) * 100`
|
|
34
|
+
|
|
35
|
+
## Categorization
|
|
36
|
+
|
|
37
|
+
Discover existing categories from `.owflow/docs/standards/*/`. Baseline categories: `global/`, `frontend/`, `backend/`, `testing/`. Propose new categories if patterns don't fit existing ones.
|
|
38
|
+
|
|
39
|
+
## Confidence Range
|
|
40
|
+
|
|
41
|
+
Code pattern findings: **60-88%** confidence. Higher when consistency is >= 90%.
|
|
42
|
+
|
|
43
|
+
## Output Format
|
|
44
|
+
|
|
45
|
+
Return YAML:
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
findings:
|
|
49
|
+
- category: "[category/subcategory]"
|
|
50
|
+
standard_name: "[Short Name]"
|
|
51
|
+
description: "[What the convention is]"
|
|
52
|
+
confidence: [60-88]
|
|
53
|
+
evidence:
|
|
54
|
+
- "[X] of [Y] files follow this pattern"
|
|
55
|
+
- "Examples: [file1], [file2], [file3]"
|
|
56
|
+
source: "code-patterns"
|
|
57
|
+
examples:
|
|
58
|
+
- "[Correct pattern example]"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Rules
|
|
62
|
+
|
|
63
|
+
- Sample files randomly across directories for representative results
|
|
64
|
+
- Report file counts in evidence (e.g., "247 of 250 .tsx files use PascalCase")
|
|
65
|
+
- Only report patterns with >= 60% consistency
|
|
66
|
+
- Return empty findings list if no clear patterns emerge
|
|
67
|
+
- Focus on actionable, consistent patterns — not one-off occurrences
|
|
68
|
+
- Do NOT write any files to the project directory. Write your YAML results to: `[output_file]` (the orchestrator replaces this placeholder with an actual temp file path when invoking you).
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
# Config Standards Analyzer — Subagent Prompt Template
|
|
2
|
-
|
|
3
|
-
Analyze project configuration files to discover coding standards and conventions.
|
|
4
|
-
|
|
5
|
-
## Task
|
|
6
|
-
|
|
7
|
-
Find and analyze configuration files, extract standards, return structured findings as YAML.
|
|
8
|
-
|
|
9
|
-
## Configuration Files to Analyze
|
|
10
|
-
|
|
11
|
-
1. **Linter configs**: `.eslintrc.*`, `.prettierrc*`, `pylintrc`, `.pylintrc`, `.rubocop.yml`, `biome.json`
|
|
12
|
-
2. **Compiler configs**: `tsconfig.json`, `jsconfig.json`
|
|
13
|
-
3. **Package managers**: `package.json` (scripts, conventions), `requirements.txt`, `Gemfile`, `pom.xml`, `go.mod`
|
|
14
|
-
4. **Editor configs**: `.editorconfig` (indentation, line endings, charset)
|
|
15
|
-
5. **Container configs**: `Dockerfile`, `docker-compose.yml`
|
|
16
|
-
|
|
17
|
-
## What to Extract
|
|
18
|
-
|
|
19
|
-
For each config file found, extract rules/settings that indicate coding standards:
|
|
20
|
-
|
|
21
|
-
- **ESLint**: Naming conventions, code style (quotes, semicolons, indentation), framework patterns, import rules
|
|
22
|
-
- **Prettier**: Formatting rules (semi, singleQuote, trailingComma, tabWidth, printWidth)
|
|
23
|
-
- **TypeScript**: Compiler strictness (strict, noImplicitAny), module resolution, path aliases
|
|
24
|
-
- **Package.json**: Script patterns, testing conventions, pre-commit hooks (husky/lint-staged)
|
|
25
|
-
- **EditorConfig**: Indentation style/size, charset, line endings, trailing whitespace
|
|
26
|
-
- **Biome**: Combined lint + format rules
|
|
27
|
-
|
|
28
|
-
## Categorization
|
|
29
|
-
|
|
30
|
-
Discover existing categories from `.owflow/docs/standards/*/`. Baseline categories:
|
|
31
|
-
|
|
32
|
-
- `global/` — Language-agnostic (indentation, line endings, general error handling)
|
|
33
|
-
- `frontend/` — UI-specific (React rules, CSS conventions, component patterns)
|
|
34
|
-
- `backend/` — Server-specific (API rules, database conventions)
|
|
35
|
-
- `testing/` — Test-related (test frameworks, coverage requirements)
|
|
36
|
-
|
|
37
|
-
Propose new categories if findings don't fit existing ones.
|
|
38
|
-
|
|
39
|
-
## Confidence Range
|
|
40
|
-
|
|
41
|
-
Config-based findings: **70-85%** confidence (explicit configuration = strong evidence).
|
|
42
|
-
|
|
43
|
-
## Output Format
|
|
44
|
-
|
|
45
|
-
Return YAML:
|
|
46
|
-
|
|
47
|
-
```yaml
|
|
48
|
-
findings:
|
|
49
|
-
- category: "[category/subcategory]"
|
|
50
|
-
standard_name: "[Short Name]"
|
|
51
|
-
description: "[What the standard requires]"
|
|
52
|
-
confidence: [70-85]
|
|
53
|
-
evidence:
|
|
54
|
-
- "[config-file]: [specific rule or setting]"
|
|
55
|
-
source: "config"
|
|
56
|
-
examples:
|
|
57
|
-
- "[Brief correct example if applicable]"
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Rules
|
|
61
|
-
|
|
62
|
-
- Only include findings with clear evidence from actual config files
|
|
63
|
-
- Be specific in descriptions (not "follow ESLint rules" but "use single quotes for strings")
|
|
64
|
-
- Include exact file paths in evidence
|
|
65
|
-
- Return empty findings list if no config files found
|
|
66
|
-
- Focus on actionable, verifiable standards
|
|
67
|
-
- Do NOT write any files to the project directory. Write your YAML results to: `[output_file]` (the orchestrator replaces this placeholder with an actual temp file path when invoking you).
|
|
1
|
+
# Config Standards Analyzer — Subagent Prompt Template
|
|
2
|
+
|
|
3
|
+
Analyze project configuration files to discover coding standards and conventions.
|
|
4
|
+
|
|
5
|
+
## Task
|
|
6
|
+
|
|
7
|
+
Find and analyze configuration files, extract standards, return structured findings as YAML.
|
|
8
|
+
|
|
9
|
+
## Configuration Files to Analyze
|
|
10
|
+
|
|
11
|
+
1. **Linter configs**: `.eslintrc.*`, `.prettierrc*`, `pylintrc`, `.pylintrc`, `.rubocop.yml`, `biome.json`
|
|
12
|
+
2. **Compiler configs**: `tsconfig.json`, `jsconfig.json`
|
|
13
|
+
3. **Package managers**: `package.json` (scripts, conventions), `requirements.txt`, `Gemfile`, `pom.xml`, `go.mod`
|
|
14
|
+
4. **Editor configs**: `.editorconfig` (indentation, line endings, charset)
|
|
15
|
+
5. **Container configs**: `Dockerfile`, `docker-compose.yml`
|
|
16
|
+
|
|
17
|
+
## What to Extract
|
|
18
|
+
|
|
19
|
+
For each config file found, extract rules/settings that indicate coding standards:
|
|
20
|
+
|
|
21
|
+
- **ESLint**: Naming conventions, code style (quotes, semicolons, indentation), framework patterns, import rules
|
|
22
|
+
- **Prettier**: Formatting rules (semi, singleQuote, trailingComma, tabWidth, printWidth)
|
|
23
|
+
- **TypeScript**: Compiler strictness (strict, noImplicitAny), module resolution, path aliases
|
|
24
|
+
- **Package.json**: Script patterns, testing conventions, pre-commit hooks (husky/lint-staged)
|
|
25
|
+
- **EditorConfig**: Indentation style/size, charset, line endings, trailing whitespace
|
|
26
|
+
- **Biome**: Combined lint + format rules
|
|
27
|
+
|
|
28
|
+
## Categorization
|
|
29
|
+
|
|
30
|
+
Discover existing categories from `.owflow/docs/standards/*/`. Baseline categories:
|
|
31
|
+
|
|
32
|
+
- `global/` — Language-agnostic (indentation, line endings, general error handling)
|
|
33
|
+
- `frontend/` — UI-specific (React rules, CSS conventions, component patterns)
|
|
34
|
+
- `backend/` — Server-specific (API rules, database conventions)
|
|
35
|
+
- `testing/` — Test-related (test frameworks, coverage requirements)
|
|
36
|
+
|
|
37
|
+
Propose new categories if findings don't fit existing ones.
|
|
38
|
+
|
|
39
|
+
## Confidence Range
|
|
40
|
+
|
|
41
|
+
Config-based findings: **70-85%** confidence (explicit configuration = strong evidence).
|
|
42
|
+
|
|
43
|
+
## Output Format
|
|
44
|
+
|
|
45
|
+
Return YAML:
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
findings:
|
|
49
|
+
- category: "[category/subcategory]"
|
|
50
|
+
standard_name: "[Short Name]"
|
|
51
|
+
description: "[What the standard requires]"
|
|
52
|
+
confidence: [70-85]
|
|
53
|
+
evidence:
|
|
54
|
+
- "[config-file]: [specific rule or setting]"
|
|
55
|
+
source: "config"
|
|
56
|
+
examples:
|
|
57
|
+
- "[Brief correct example if applicable]"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Rules
|
|
61
|
+
|
|
62
|
+
- Only include findings with clear evidence from actual config files
|
|
63
|
+
- Be specific in descriptions (not "follow ESLint rules" but "use single quotes for strings")
|
|
64
|
+
- Include exact file paths in evidence
|
|
65
|
+
- Return empty findings list if no config files found
|
|
66
|
+
- Focus on actionable, verifiable standards
|
|
67
|
+
- Do NOT write any files to the project directory. Write your YAML results to: `[output_file]` (the orchestrator replaces this placeholder with an actual temp file path when invoking you).
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
# Documentation Standards Extractor — Subagent Prompt Template
|
|
2
|
-
|
|
3
|
-
Extract coding standards and conventions explicitly documented in project files.
|
|
4
|
-
|
|
5
|
-
## Task
|
|
6
|
-
|
|
7
|
-
Find and parse documentation files, extract explicitly stated standards, return findings as YAML.
|
|
8
|
-
|
|
9
|
-
## Documentation Files to Analyze
|
|
10
|
-
|
|
11
|
-
1. **README.md** — Look for: Code Style, Contributing Guidelines, Conventions, Best Practices sections
|
|
12
|
-
2. **CONTRIBUTING.md** — PR requirements, commit conventions, testing requirements, code review standards
|
|
13
|
-
3. **ARCHITECTURE.md** / `docs/architecture/` — Design patterns, architectural decisions
|
|
14
|
-
4. **ADRs** (Architecture Decision Records) — `adr/`, `decisions/`, `docs/decisions/` directories
|
|
15
|
-
5. **AGENTS.md** / `AGENTS.md` — AI-specific coding instructions and project conventions
|
|
16
|
-
6. **Code of Conduct**, **STYLEGUIDE.md** — If present
|
|
17
|
-
|
|
18
|
-
## What to Extract
|
|
19
|
-
|
|
20
|
-
Look for explicit standard statements:
|
|
21
|
-
|
|
22
|
-
- "We use..." / "This project uses..."
|
|
23
|
-
- "Always..." / "Never..."
|
|
24
|
-
- "Prefer X over Y"
|
|
25
|
-
- "Required: ..." / "Must..."
|
|
26
|
-
- Code examples showing correct/incorrect patterns
|
|
27
|
-
- Numbered rules or guidelines lists
|
|
28
|
-
|
|
29
|
-
**Only extract explicitly stated standards** — do not infer from code examples alone.
|
|
30
|
-
|
|
31
|
-
## Categorization
|
|
32
|
-
|
|
33
|
-
Discover existing categories from `.owflow/docs/standards/*/`. Baseline categories: `global/`, `frontend/`, `backend/`, `testing/`. Propose new categories if patterns don't fit existing ones.
|
|
34
|
-
|
|
35
|
-
## Confidence Range
|
|
36
|
-
|
|
37
|
-
Documentation findings: **80-92%** confidence (explicitly documented = strong evidence).
|
|
38
|
-
|
|
39
|
-
Higher end (90+) when multiple docs agree or when stated as mandatory rules.
|
|
40
|
-
|
|
41
|
-
## Output Format
|
|
42
|
-
|
|
43
|
-
Return YAML:
|
|
44
|
-
|
|
45
|
-
```yaml
|
|
46
|
-
findings:
|
|
47
|
-
- category: "[category/subcategory]"
|
|
48
|
-
standard_name: "[Short Name]"
|
|
49
|
-
description: "[What the standard requires]"
|
|
50
|
-
confidence: [80-92]
|
|
51
|
-
evidence:
|
|
52
|
-
- '[filename]: "[exact quote or paraphrase]"'
|
|
53
|
-
source: "documentation"
|
|
54
|
-
examples:
|
|
55
|
-
- "[Example from docs if provided]"
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Rules
|
|
59
|
-
|
|
60
|
-
- Include exact quotes or close paraphrases in evidence
|
|
61
|
-
- Note which file each standard comes from
|
|
62
|
-
- Return empty findings list if no documentation files found
|
|
63
|
-
- Prioritize actionable, clear standards over vague guidance
|
|
64
|
-
- Do not duplicate what config files already enforce — focus on human-written guidelines
|
|
65
|
-
- Do NOT write any files to the project directory. Write your YAML results to: `[output_file]` (the orchestrator replaces this placeholder with an actual temp file path when invoking you).
|
|
1
|
+
# Documentation Standards Extractor — Subagent Prompt Template
|
|
2
|
+
|
|
3
|
+
Extract coding standards and conventions explicitly documented in project files.
|
|
4
|
+
|
|
5
|
+
## Task
|
|
6
|
+
|
|
7
|
+
Find and parse documentation files, extract explicitly stated standards, return findings as YAML.
|
|
8
|
+
|
|
9
|
+
## Documentation Files to Analyze
|
|
10
|
+
|
|
11
|
+
1. **README.md** — Look for: Code Style, Contributing Guidelines, Conventions, Best Practices sections
|
|
12
|
+
2. **CONTRIBUTING.md** — PR requirements, commit conventions, testing requirements, code review standards
|
|
13
|
+
3. **ARCHITECTURE.md** / `docs/architecture/` — Design patterns, architectural decisions
|
|
14
|
+
4. **ADRs** (Architecture Decision Records) — `adr/`, `decisions/`, `docs/decisions/` directories
|
|
15
|
+
5. **AGENTS.md** / `AGENTS.md` — AI-specific coding instructions and project conventions
|
|
16
|
+
6. **Code of Conduct**, **STYLEGUIDE.md** — If present
|
|
17
|
+
|
|
18
|
+
## What to Extract
|
|
19
|
+
|
|
20
|
+
Look for explicit standard statements:
|
|
21
|
+
|
|
22
|
+
- "We use..." / "This project uses..."
|
|
23
|
+
- "Always..." / "Never..."
|
|
24
|
+
- "Prefer X over Y"
|
|
25
|
+
- "Required: ..." / "Must..."
|
|
26
|
+
- Code examples showing correct/incorrect patterns
|
|
27
|
+
- Numbered rules or guidelines lists
|
|
28
|
+
|
|
29
|
+
**Only extract explicitly stated standards** — do not infer from code examples alone.
|
|
30
|
+
|
|
31
|
+
## Categorization
|
|
32
|
+
|
|
33
|
+
Discover existing categories from `.owflow/docs/standards/*/`. Baseline categories: `global/`, `frontend/`, `backend/`, `testing/`. Propose new categories if patterns don't fit existing ones.
|
|
34
|
+
|
|
35
|
+
## Confidence Range
|
|
36
|
+
|
|
37
|
+
Documentation findings: **80-92%** confidence (explicitly documented = strong evidence).
|
|
38
|
+
|
|
39
|
+
Higher end (90+) when multiple docs agree or when stated as mandatory rules.
|
|
40
|
+
|
|
41
|
+
## Output Format
|
|
42
|
+
|
|
43
|
+
Return YAML:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
findings:
|
|
47
|
+
- category: "[category/subcategory]"
|
|
48
|
+
standard_name: "[Short Name]"
|
|
49
|
+
description: "[What the standard requires]"
|
|
50
|
+
confidence: [80-92]
|
|
51
|
+
evidence:
|
|
52
|
+
- '[filename]: "[exact quote or paraphrase]"'
|
|
53
|
+
source: "documentation"
|
|
54
|
+
examples:
|
|
55
|
+
- "[Example from docs if provided]"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Rules
|
|
59
|
+
|
|
60
|
+
- Include exact quotes or close paraphrases in evidence
|
|
61
|
+
- Note which file each standard comes from
|
|
62
|
+
- Return empty findings list if no documentation files found
|
|
63
|
+
- Prioritize actionable, clear standards over vague guidance
|
|
64
|
+
- Do not duplicate what config files already enforce — focus on human-written guidelines
|
|
65
|
+
- Do NOT write any files to the project directory. Write your YAML results to: `[output_file]` (the orchestrator replaces this placeholder with an actual temp file path when invoking you).
|