@tduyng/pi-devos 0.0.0-stage → 0.13.6

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.
Files changed (138) hide show
  1. package/CHANGELOG.md +1398 -0
  2. package/LICENSE +201 -0
  3. package/README.md +213 -2
  4. package/package.json +45 -4
  5. package/plugins/devos/agents/reader.md +27 -0
  6. package/plugins/devos/agents/verifier.md +181 -0
  7. package/plugins/devos/pi/extension/devos.ts +615 -0
  8. package/plugins/devos/scripts/check-evidence-router.sh +134 -0
  9. package/plugins/devos/scripts/evidence-router.py +252 -0
  10. package/plugins/devos/scripts/gates/check-dod-core.sh +283 -0
  11. package/plugins/devos/scripts/gates/check-dod.sh +38 -0
  12. package/plugins/devos/scripts/gates/check-handoff.sh +215 -0
  13. package/plugins/devos/scripts/gates/check-implementation-boundary.sh +99 -0
  14. package/plugins/devos/scripts/gates/check-port-source.sh +134 -0
  15. package/plugins/devos/scripts/gates/check-report-locations.sh +148 -0
  16. package/plugins/devos/scripts/gates/check-scenario-coverage.sh +102 -0
  17. package/plugins/devos/scripts/gates/gate-check.mjs +204 -0
  18. package/plugins/devos/scripts/gates/phase-gate.sh +208 -0
  19. package/plugins/devos/scripts/gates/plan-template-check.py +147 -0
  20. package/plugins/devos/scripts/gates/run-gate.sh +148 -0
  21. package/plugins/devos/scripts/gates/spec-template-check.py +165 -0
  22. package/plugins/devos/scripts/gates/test-gates.sh +4306 -0
  23. package/plugins/devos/scripts/gates/test-integrity-rubric.sh +152 -0
  24. package/plugins/devos/scripts/gates/test-phase-gate.sh +116 -0
  25. package/plugins/devos/skills/absorb/SKILL.md +75 -0
  26. package/plugins/devos/skills/absorb/references/distill.md +67 -0
  27. package/plugins/devos/skills/absorb/scripts/check-refs.sh +108 -0
  28. package/plugins/devos/skills/absorb/scripts/knowledge.py +258 -0
  29. package/plugins/devos/skills/build/SKILL.md +71 -0
  30. package/plugins/devos/skills/build/references/advanced-routing.md +19 -0
  31. package/plugins/devos/skills/build/references/defect.md +17 -0
  32. package/plugins/devos/skills/build/references/exposure.md +28 -0
  33. package/plugins/devos/skills/build/references/hard.md +39 -0
  34. package/plugins/devos/skills/build/references/refactor.md +66 -0
  35. package/plugins/devos/skills/build/references/routes.md +56 -0
  36. package/plugins/devos/skills/build/references/scale.md +84 -0
  37. package/plugins/devos/skills/build/references/spike.md +19 -0
  38. package/plugins/devos/skills/build/scripts/construct-census.py +204 -0
  39. package/plugins/devos/skills/build/scripts/dep-order.py +297 -0
  40. package/plugins/devos/skills/build/scripts/ledger.sh +228 -0
  41. package/plugins/devos/skills/build/scripts/route.sh +5 -0
  42. package/plugins/devos/skills/build/scripts/secret-scan.sh +121 -0
  43. package/plugins/devos/skills/build/scripts/toolchain-preflight.py +302 -0
  44. package/plugins/devos/skills/design-taste/SKILL.md +55 -0
  45. package/plugins/devos/skills/design-taste/references/tells.md +85 -0
  46. package/plugins/devos/skills/design-taste/scripts/slop-scan.py +305 -0
  47. package/plugins/devos/skills/docs/SKILL.md +22 -0
  48. package/plugins/devos/skills/docs/references/backfill.md +54 -0
  49. package/plugins/devos/skills/docs/references/init.md +43 -0
  50. package/plugins/devos/skills/docs/references/status.md +71 -0
  51. package/plugins/devos/skills/docs/references/update.md +80 -0
  52. package/plugins/devos/skills/explain/SKILL.md +45 -0
  53. package/plugins/devos/skills/explain/references/quiz.md +21 -0
  54. package/plugins/devos/skills/frame/SKILL.md +71 -0
  55. package/plugins/devos/skills/frame/references/boundaries.md +53 -0
  56. package/plugins/devos/skills/frame/references/decompose.md +96 -0
  57. package/plugins/devos/skills/frame/references/impact.md +43 -0
  58. package/plugins/devos/skills/frame/references/interrogate.md +68 -0
  59. package/plugins/devos/skills/frame/scripts/survey.sh +44 -0
  60. package/plugins/devos/skills/implement/SKILL.md +36 -0
  61. package/plugins/devos/skills/implement/references/conditional-plan.md +17 -0
  62. package/plugins/devos/skills/implement/references/debug-loop.md +7 -0
  63. package/plugins/devos/skills/implement/references/dod.md +32 -0
  64. package/plugins/devos/skills/implement/references/implement.md +52 -0
  65. package/plugins/devos/skills/implement/references/manual-gates.md +16 -0
  66. package/plugins/devos/skills/implement/references/plan.md +160 -0
  67. package/plugins/devos/skills/implement/references/resume.md +9 -0
  68. package/plugins/devos/skills/implement/references/scale.md +86 -0
  69. package/plugins/devos/skills/implement/references/verify-close.md +61 -0
  70. package/plugins/devos/skills/implement/references/visual-verification.md +7 -0
  71. package/plugins/devos/skills/implement/scripts/check-converge.sh +147 -0
  72. package/plugins/devos/skills/implement/scripts/equivalence-check.sh +140 -0
  73. package/plugins/devos/skills/implement/scripts/manifest-queue.sh +185 -0
  74. package/plugins/devos/skills/implement/scripts/ops-log.sh +58 -0
  75. package/plugins/devos/skills/implement/scripts/pilot-consistency.py +173 -0
  76. package/plugins/devos/skills/implement/scripts/validate-spec.sh +268 -0
  77. package/plugins/devos/skills/init/SKILL.md +100 -0
  78. package/plugins/devos/skills/init/references/archetype-sections.md +15 -0
  79. package/plugins/devos/skills/init/references/context.md +42 -0
  80. package/plugins/devos/skills/init/references/conventions-template.md +153 -0
  81. package/plugins/devos/skills/init/references/reverse-engineer.md +3 -0
  82. package/plugins/devos/skills/init/references/rule-format.md +58 -0
  83. package/plugins/devos/skills/init/references/shape-model.md +29 -0
  84. package/plugins/devos/skills/init/scripts/detect-archetype.py +461 -0
  85. package/plugins/devos/skills/init/scripts/render-rule.py +114 -0
  86. package/plugins/devos/skills/init/scripts/reverse-engineer.sh +162 -0
  87. package/plugins/devos/skills/learn/SKILL.md +29 -0
  88. package/plugins/devos/skills/learn/references/destinations.md +43 -0
  89. package/plugins/devos/skills/learn/references/scoring.md +26 -0
  90. package/plugins/devos/skills/product/SKILL.md +40 -0
  91. package/plugins/devos/skills/product/references/planner.md +54 -0
  92. package/plugins/devos/skills/review/SKILL.md +77 -0
  93. package/plugins/devos/skills/review/references/gaps.md +26 -0
  94. package/plugins/devos/skills/spec/SKILL.md +58 -0
  95. package/plugins/devos/skills/spec/references/prototype.md +21 -0
  96. package/plugins/devos/skills/spec/references/question-craft.md +47 -0
  97. package/plugins/devos/skills/spec/references/roadmap-link.md +5 -0
  98. package/plugins/devos/skills/spec/references/write-spec.md +143 -0
  99. package/plugins/devos/skills/spec/scripts/clarify.sh +173 -0
  100. package/plugins/devos/skills/status/SKILL.md +67 -0
  101. package/plugins/devos/skills/status/references/cost.md +38 -0
  102. package/plugins/devos/skills/status/scripts/artifact-budgets.sh +88 -0
  103. package/plugins/devos/skills/status/scripts/check-requires.py +556 -0
  104. package/plugins/devos/skills/status/scripts/context-cost.sh +89 -0
  105. package/plugins/devos/skills/status/scripts/convention-usage.sh +184 -0
  106. package/plugins/devos/skills/status/scripts/findings-summary.sh +112 -0
  107. package/plugins/devos/skills/status/scripts/quality-correlation.sh +282 -0
  108. package/plugins/devos/skills/status/scripts/sizing-calibration.sh +71 -0
  109. package/plugins/devos/skills/status/scripts/spec-diff.sh +137 -0
  110. package/plugins/devos/skills/surgical-diff/SKILL.md +23 -0
  111. package/plugins/devos/skills/test-integrity/SKILL.md +26 -0
  112. package/plugins/devos/skills/verification-evidence/SKILL.md +17 -0
  113. package/plugins/devos/workflows/common/backlog-file-structure.md +44 -0
  114. package/plugins/devos/workflows/common/category-file-structure.md +41 -0
  115. package/plugins/devos/workflows/common/feature-line-format.md +10 -0
  116. package/plugins/devos/workflows/common/roadmap-file-structure.md +51 -0
  117. package/plugins/devos/workflows/common/suggest-categories.md +76 -0
  118. package/plugins/devos/workflows/common/suggest-milestones.md +92 -0
  119. package/plugins/devos/workflows/doc/doc-health.md +137 -0
  120. package/plugins/devos/workflows/doc/doc-writer.md +44 -0
  121. package/plugins/devos/workflows/doc/init-documentation.md +196 -0
  122. package/plugins/devos/workflows/doc/retro-documentation.md +304 -0
  123. package/plugins/devos/workflows/doc/templates/library.md +58 -0
  124. package/plugins/devos/workflows/doc/templates/service.md +61 -0
  125. package/plugins/devos/workflows/doc/update-documentation.md +194 -0
  126. package/plugins/devos/workflows/doc/write-documentation.md +137 -0
  127. package/plugins/devos/workflows/product/create-product-mission.md +45 -0
  128. package/plugins/devos/workflows/product/create-product-roadmap.md +106 -0
  129. package/plugins/devos/workflows/product/create-product-tech-stack.md +19 -0
  130. package/plugins/devos/workflows/product/gather-product-info.md +25 -0
  131. package/plugins/devos/workflows/product/resume-detection.md +70 -0
  132. package/plugins/devos/workflows/product/reverse-backlog.md +118 -0
  133. package/plugins/devos/workflows/product/reverse-domain-model.md +86 -0
  134. package/plugins/devos/workflows/product/reverse-product-plan.md +81 -0
  135. package/plugins/devos/workflows/product/reverse-tech-stack.md +73 -0
  136. package/plugins/devos/workflows/product/scan-deep.md +113 -0
  137. package/plugins/devos/workflows/product/scan-git.md +122 -0
  138. package/plugins/devos/workflows/product/scan-light.md +154 -0
@@ -0,0 +1,154 @@
1
+ # Workflow: Light Scan (Phase 1)
2
+
3
+ **Goal:** Analyze an existing project's structure to produce a first map of domains/layers and detect the tech stack. This output drives the deep-scan split.
4
+
5
+ **Role:** Main agent
6
+
7
+ **Input:** Project codebase
8
+
9
+ **Output:** Domain map, detected tech stack, proposed split
10
+
11
+ ---
12
+
13
+ ## Step 1: Structural analysis
14
+
15
+ ### 1.1 Project tree
16
+
17
+ 1. `Bash`: `find . -type f -not -path './.git/*' -not -path './node_modules/*' -not -path './vendor/*' -not -path './.next/*' -not -path './dist/*' -not -path './build/*' -not -path './target/*' | head -500`
18
+ 2. `Bash`: `find . -type d -maxdepth 3 -not -path './.git/*' -not -path './node_modules/*' | sort`
19
+ 3. Identify the main structure (src/, lib/, apps/, services/, packages/, etc.)
20
+
21
+ ### 1.2 Dependencies and package managers
22
+
23
+ Detect and read dependency files:
24
+
25
+ | File | Ecosystem |
26
+ |------|-----------|
27
+ | `package.json` | Node.js/JavaScript |
28
+ | `pom.xml` / `build.gradle` | Java/Kotlin |
29
+ | `go.mod` | Go |
30
+ | `requirements.txt` / `pyproject.toml` / `Pipfile` | Python |
31
+ | `Gemfile` | Ruby |
32
+ | `Cargo.toml` | Rust |
33
+ | `composer.json` | PHP |
34
+ | `Package.swift` | Swift |
35
+
36
+ For each file found: `Read` and extract the main dependencies.
37
+
38
+ ### 1.3 Entry points
39
+
40
+ - `Grep` for `main`, `index`, `app`, `server`, `bootstrap`
41
+ - Detect startup scripts (npm scripts, Makefile, docker-compose)
42
+
43
+ ### 1.4 Existing configuration
44
+
45
+ - `Glob` for config files: `*.config.*`, `.env*`, `docker-compose*`, `Dockerfile*`
46
+ - `Read` the main configuration files
47
+
48
+ ---
49
+
50
+ ## Step 2: Tech stack detection
51
+
52
+ From dependencies and structure, identify:
53
+
54
+ | Category | Detection examples |
55
+ |----------|-------------------|
56
+ | **Languages** | File extensions, package managers |
57
+ | **Frameworks** | Dependencies (react, express, spring, django, rails...) |
58
+ | **Build tools** | webpack, vite, gradle, maven, cargo |
59
+ | **Test frameworks** | jest, pytest, junit, rspec, go test |
60
+ | **Databases** | ORM configs, migration files, connection strings |
61
+ | **Infrastructure** | Dockerfile, docker-compose, terraform, k8s manifests |
62
+
63
+ ---
64
+
65
+ ## Step 3: Existing documentation
66
+
67
+ ### 3.1 Scan documentation
68
+
69
+ 1. `Glob` for docs: `*.md`, `docs/**/*`, `wiki/**/*`, `documentation/**/*`
70
+ 2. `Read` the main README.md (if present)
71
+ 3. Identify potentially useful docs
72
+
73
+ ### 3.2 Mandatory user question
74
+
75
+ **BLOCK and ask via AskUserQuestion:**
76
+
77
+ ```
78
+ Existing documentation detected:
79
+ - README.md: [present/absent]
80
+ - docs/ folder: [N files]
81
+ - Other: [list]
82
+
83
+ Do you consider this documentation:
84
+ A) Relevant: it will be checked against the code to identify what's still valid
85
+ B) Obsolete: it will be ignored, we rebuild from scratch
86
+ ```
87
+
88
+ **WAIT** for the answer before continuing.
89
+
90
+ ---
91
+
92
+ ## Step 4: External MCP sources (optional)
93
+
94
+ If MCP sources (Jira/Confluence/Notion/...) are configured, ask:
95
+
96
+ ```
97
+ External sources detected:
98
+ - [MCP-1: Jira/Confluence/Notion/...]
99
+
100
+ Scan these sources to enrich the analysis?
101
+ - Yes: scan recent tickets/docs
102
+ - No: rely on code only
103
+ ```
104
+
105
+ If accepted, extract: recent tickets (in-progress features, bugs), existing product docs, planning data (roadmap, sprints).
106
+
107
+ ---
108
+
109
+ ## Step 5: First map
110
+
111
+ ### 5.1 Identify domains/layers
112
+
113
+ From the structural analysis, Git (convergence with scan-git), and optionally MCP:
114
+
115
+ 1. Identify **functional domains** (auth, billing, users, notifications...)
116
+ 2. Identify **technical layers** (API, services, data access, UI)
117
+ 3. Cross with Git hot zones (if available) to prioritize
118
+
119
+ ### 5.2 Proposed split
120
+
121
+ Present to the user:
122
+
123
+ ```
124
+ Project map:
125
+
126
+ Detected tech stack:
127
+ - Languages: [list]
128
+ - Frameworks: [list]
129
+ - Databases: [list]
130
+
131
+ Identified domains/layers:
132
+ | # | Domain/Layer | Paths | Files | Priority |
133
+ |---|--------------|-------|-------|----------|
134
+ | 1 | [name] | [paths] | [N] | High (hot zone) |
135
+ | 2 | [name] | [paths] | [N] | Medium |
136
+ | 3 | [name] | [paths] | [N] | Low |
137
+
138
+ Proposal: launch [N] deep-scan agents in parallel.
139
+
140
+ Validate this split? (yes/modify)
141
+ ```
142
+
143
+ **Mandatory validation** before continuing.
144
+
145
+ ---
146
+
147
+ ## Step 6: Output
148
+
149
+ Return to the orchestrator:
150
+ - Detected tech stack
151
+ - Validated split (list of domains with paths)
152
+ - Existing docs: relevant or obsolete (+ paths if relevant)
153
+ - MCP data (if scanned)
154
+ - Git hot zones (if converged with scan-git)