5-phase-workflow 2.0.1 → 2.0.2

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/bin/install.js CHANGED
@@ -393,7 +393,8 @@ function getWorkflowManagedFiles() {
393
393
  skills: [
394
394
  'configure-docs-index',
395
395
  'configure-skills',
396
- 'generate-readme'
396
+ 'generate-readme',
397
+ 'use-index'
397
398
  ],
398
399
 
399
400
  // Hooks: specific hook files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5-phase-workflow",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "A dev-workflow for Claude Code and Codex",
5
5
  "bin": {
6
6
  "foifi": "bin/install.js"
@@ -30,7 +30,7 @@ Do NOT proceed until you have a clear understanding of what to analyze.
30
30
 
31
31
  1. Derive a short kebab-case name from the analysis subject (e.g., `user-auth`, `order-processing`, `payment-integration`). This becomes the filename: `{name}-analysis.md`.
32
32
 
33
- 2. Identify the relevant modules and layers to analyze. If `.5/index/` exists, read the index files for a quick structural overview. Otherwise, use Glob to understand the project layout.
33
+ 2. Identify the relevant modules and layers to analyze. Invoke the `use-index` skill for a quick structural overview. The skill will rebuild the index if stale; fall back to Glob only if the index is missing.
34
34
 
35
35
  3. Use Glob and Grep to locate the relevant source files. Search for key classes, interfaces, functions, and types related to the analysis subject.
36
36
 
@@ -111,7 +111,7 @@ Use `multiSelect: false` to get single focus area initially.
111
111
 
112
112
  Based on the user's focus area, explore the codebase if needed:
113
113
 
114
- **Index shortcut:** Before spawning Explore agents or running Glob/Grep, check if `.5/index/` exists. If it does, read `.5/index/README.md` first for the generation timestamp — if fresh (under 1 day old), read the relevant index files (e.g., modules.md for scope changes, routes.md for API discussions, models.md for data model questions) to quickly gather context and skip broad scanning. If outdated, inform the user they can run `.5/index/rebuild-index.sh` to refresh it. If `.5/index/` does not exist, inform the user they can run `/5:reconfigure` to generate it. In both missing/outdated cases, fall back to Glob/Grep or Explore agents for exploration.
114
+ **Index shortcut:** Before spawning Explore agents or running Glob/Grep, invoke the `use-index` skill to quickly orient in the codebase using the generated index.
115
115
 
116
116
  **For technical constraint discussions:**
117
117
  - Search for similar implementations
@@ -79,6 +79,8 @@ Do not ask technical follow-ups yet.
79
79
 
80
80
  ## Step 3: Explore Codebase
81
81
 
82
+ If `.5/index/` exists, check the `Generated:` timestamp in `.5/index/README.md`. If the index is more than one day old, run `.5/index/rebuild-index.sh` to refresh it before spawning the Explore agent.
83
+
82
84
  Spawn one Explore agent. In Codex, use `agent_type: explorer`, `model: gpt-5.4-mini`, and `reasoning_effort: low`.
83
85
 
84
86
  ```text
@@ -88,7 +90,7 @@ Feature description:
88
90
  {feature description}
89
91
 
90
92
  Tasks:
91
- 1. If `.5/index/` exists, read `.5/index/README.md` first. Use only relevant fresh index files; do not rescan broad project structure. If stale, note it and fall back to targeted Grep/Glob.
93
+ 1. If `.5/index/` exists, read `.claude/skills/use-index/SKILL.md` and follow its guidance to select and read relevant index files. Skip broad project scanning. If the index is missing, fall back to targeted Grep/Glob and note it in the report.
92
94
  2. Identify relevant modules, existing patterns, and likely target files.
93
95
  3. Find at most 3 similar implementations and reusable helpers.
94
96
  4. Identify test framework, test file conventions, and the narrowest relevant build/test commands.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: use-index
3
+ description: Navigate the .5/index/ codebase index to quickly identify target files and understand project structure. Use before running broad Glob/Grep scans when you need to find where a feature lives, where new code should go, which routes exist, or what the data model looks like.
4
+ allowed-tools: Read, Bash
5
+ user-invocable: false
6
+ ---
7
+
8
+ # Use Index
9
+
10
+ Use `.5/index/` to orient in the codebase quickly before resorting to broad file scans.
11
+
12
+ ## Step 1: Check existence
13
+
14
+ ```bash
15
+ ls .5/index/ 2>/dev/null
16
+ ```
17
+
18
+ If the directory is missing or empty, inform the user they can run `/5:reconfigure` to generate it, then fall back to Glob/Grep.
19
+
20
+ ## Step 2: Read the manifest
21
+
22
+ Read `.5/index/README.md`. It lists every generated index file, its purpose, and the generation timestamp.
23
+
24
+ ## Step 3: Check freshness
25
+
26
+ Look for the `Generated:` timestamp in README.md.
27
+
28
+ - **Fresh (≤ 1 day):** proceed with the index.
29
+ - **Stale (> 1 day):** run `.5/index/rebuild-index.sh` to rebuild it, then proceed with the refreshed index.
30
+
31
+ ## Step 4: Read only the relevant file(s)
32
+
33
+ Pick the file that matches the task. Skip unrelated ones.
34
+
35
+ | Task | File |
36
+ |------|------|
37
+ | Where does new code go / what modules exist? | `modules.md` |
38
+ | API surface, HTTP routes, or handlers | `routes.md` |
39
+ | Data models, schemas, or migrations | `models.md` |
40
+ | Shared helpers, utilities, or exported functions | `libraries.md` |
41
+ | Build, run, test, or dev-workflow commands | `commands.md` |
42
+
43
+ ## Step 5: Interpret entries
44
+
45
+ Each file has compact entries — path plus a short descriptor (HTTP method, exported name, key field, etc.). Use them to identify target files directly. Do not read the full index file if a handful of entries answer the question.
46
+
47
+ ## Step 6: Fall back gracefully
48
+
49
+ If a file is too sparse or an area is missing from the index, note the gap and fall back to a targeted Grep/Glob for that area only. Do not re-scan sections already covered by a fresh index entry.
@@ -87,8 +87,6 @@ Strong success criteria let you loop independently. Weak criteria ("make it work
87
87
 
88
88
  {CODEBASE_INDEX_LINKS}
89
89
 
90
- ## Index Freshness
91
-
92
- If the codebase index files are more than one day old, regenerate them by running `.5/index/rebuild-index.sh` before relying on them.
90
+ Use the `use-index` skill before running broad Glob/Grep scans. It handles freshness checks, file selection by task type, and fallback strategies. If index files are more than one day old, regenerate them by running `.5/index/rebuild-index.sh` before relying on them.
93
91
 
94
92
  {CUSTOM_DOCUMENTATION}