sequential-think
Multi-step reasoning engine for complex analysis and systematic problem solving. Use when: (1) Complex debugging scenarios with multiple layers, (2) Architectural analysis and system design, (3) Problems requiring hypothesis testing and validation, (4) Multi-component failure inv
Install
npx skills add https://github.com/Dianel555/DSkills/tree/main/skills/sequential-think
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dianel555-dskills@llmmart
git clone https://github.com/Dianel555/DSkills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole dianel555/dskills collection as a plugin from our marketplace. Git is the plain clone.
README
Sequential Think CLI
Standalone iterative thinking engine for complex problem-solving. No MCP dependency required.
Installation
No external dependencies required - uses Python standard library only.
# Verify Python 3.7+
python --version
Quick Start
# Start a thinking chain
python sequential_think_cli.py think -t "Analyzing the problem..." -n 1 -T 5
# Continue thinking
python sequential_think_cli.py think -t "Based on analysis, I hypothesize..." -n 2 -T 5
# Complete the chain
python sequential_think_cli.py think -t "Conclusion: the solution is..." -n 5 -T 5 --no-next
# View history
python sequential_think_cli.py history
# Clear history
python sequential_think_cli.py clear
Commands
think - Process a Thought
python sequential_think_cli.py think [options]
Required:
-t, --thought Current thinking step content
-n, --thought-number Current position in sequence (1-based)
-T, --total-thoughts Estimated total thoughts needed
Optional:
--no-next Mark as final thought (no more thinking needed)
--is-revision This thought revises previous thinking
--revises-thought N Which thought number is being reconsidered
--branch-from N Branching point thought number
--branch-id ID Identifier for current branch
--needs-more Signal more thoughts needed beyond estimate
-q, --quiet Suppress formatted output to stderr
history - View Thought History
python sequential_think_cli.py history [options]
Options:
-f, --format Output format: json or text (default: text)
clear - Clear History
python sequential_think_cli.py clear
Examples
Basic Thinking Chain
# Step 1: Problem identification
python sequential_think_cli.py think \
-t "The API is returning 500 errors. Need to identify root cause." \
-n 1 -T 4
# Step 2: Hypothesis
python sequential_think_cli.py think \
-t "Hypothesis: Database connection pool exhaustion based on error logs." \
-n 2 -T 4
# Step 3: Verification
python sequential_think_cli.py think \
-t "Verified: Connection pool max=10, active=10, waiting=50. Pool exhausted." \
-n 3 -T 4
# Step 4: Conclusion
python sequential_think_cli.py think \
-t "Solution: Increase pool size to 50 and add connection timeout." \
-n 4 -T 4 --no-next
Revision Example
# Initial thought
python sequential_think_cli.py think \
-t "The bug is in the authentication module." \
-n 1 -T 3
# Revise after new evidence
python sequential_think_cli.py think \
-t "Correction: Bug is in session management, not auth." \
-n 2 -T 3 --is-revision --revises-thought 1
Branching Example
# Main path
python sequential_think_cli.py think -t "Approach A: Refactor the service" -n 1 -T 3
python sequential_think_cli.py think -t "Approach A requires 3 weeks" -n 2 -T 3
# Branch to explore alternative
python sequential_think_cli.py think \
-t "Alternative: Use existing library instead" \
-n 3 -T 4 --branch-from 1 --branch-id "lib-approach"
Output Format
think command
{
"thoughtNumber": 2,
"totalThoughts": 5,
"nextThoughtNeeded": true,
"branches": [],
"thoughtHistoryLength": 2
}
history command (JSON)
{
"history": [
{
"thought": "...",
"thought_number": 1,
"total_thoughts": 5,
"next_thought_needed": true,
"is_revision": false,
"timestamp": "2024-01-15T10:30:00"
}
],
"branches": {},
"totalThoughts": 1
}
Data Storage
Thought history is persisted to:
- Location:
~/.config/sequential-think/thought_history.json - Format: JSON
- Persistence: Survives across sessions until cleared
When to Use
| Scenario | Recommended |
|---|---|
| Complex debugging (3+ components) | ✅ Yes |
| Architectural analysis | ✅ Yes |
| Root cause investigation | ✅ Yes |
| Multi-step problem solving | ✅ Yes |
| Simple bug fix | ❌ No |
| Single-file change | ❌ No |
| Quick explanation | ❌ No |
Best Practices
- Start with reasonable estimate - Adjust
totalThoughtsas you learn more - Use revisions explicitly - Mark
--is-revisionwhen reconsidering - Branch for alternatives - Explore different approaches with
--branch-from - Don't rush completion - Only use
--no-nextwhen truly done - Clear between sessions - Run
clearwhen starting new problem
Skill manifest
Sequential Think
Structured iterative thinking for complex problem-solving. Standalone CLI only (no MCP dependency).
Execution Methods
Run scripts/sequential_think_cli.py via Bash:
# Process a thought
python scripts/sequential_think_cli.py think \
--thought "First, let me analyze the problem structure..." \
--thought-number 1 \
--total-thoughts 5
# Continue thinking chain
python scripts/sequential_think_cli.py think \
--thought "Based on step 1, I hypothesize that..." \
--thought-number 2 \
--total-thoughts 5
# Revise a previous thought
python scripts/sequential_think_cli.py think \
--thought "Reconsidering step 1, I realize..." \
--thought-number 3 \
--total-thoughts 5 \
--is-revision \
--revises-thought 1
# Branch into alternative path
python scripts/sequential_think_cli.py think \
--thought "Alternative approach: what if we..." \
--thought-number 4 \
--total-thoughts 6 \
--branch-from 2 \
--branch-id "alt-approach"
# Final thought (complete chain)
python scripts/sequential_think_cli.py think \
--thought "Conclusion: the solution is..." \
--thought-number 5 \
--total-thoughts 5 \
--no-next
# View thought history
python scripts/sequential_think_cli.py history [--format json|text]
# Clear thought history
python scripts/sequential_think_cli.py clear
Core Principles
Iterative Thinking Process
- Each tool call = one "thought" in the chain
- Build upon, question, or revise previous thoughts
- Express uncertainty when it exists
Dynamic Thought Count
- Start with initial estimate of
totalThoughts - Adjust up/down as understanding evolves
- Add more thoughts even after reaching initial end
Hypothesis-Driven Approach
- Generate hypotheses as potential solutions emerge
- Verify hypotheses based on chain-of-thought steps
- Repeat until satisfied with solution
Completion Criteria
- Only set
nextThoughtNeeded: falsewhen truly finished - Must have satisfactory, verified answer
- Don't rush to conclusion
When to Use
| Scenario | Use Sequential Think |
|---|---|
| Complex debugging (3+ layers) | ✅ Yes |
| Architectural analysis | ✅ Yes |
| Multi-component investigation | ✅ Yes |
| Performance bottleneck analysis | ✅ Yes |
| Root cause analysis | ✅ Yes |
| Simple explanation | ❌ No |
| Single-file change | ❌ No |
| Straightforward fix | ❌ No |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
thought |
string | Yes | Current thinking step content |
thoughtNumber |
int | Yes | Current position in sequence (1-based) |
totalThoughts |
int | Yes | Estimated total thoughts needed |
nextThoughtNeeded |
bool | No | Whether more thinking needed (default: true) |
isRevision |
bool | No | Whether this revises previous thinking |
revisesThought |
int | No | Which thought number is being reconsidered |
branchFromThought |
int | No | Branching point thought number |
branchId |
string | No | Identifier for current branch |
needsMoreThoughts |
bool | No | Signal that more thoughts needed beyond estimate |
Output Format
{
"thoughtNumber": 3,
"totalThoughts": 5,
"nextThoughtNeeded": true,
"branches": ["alt-approach"],
"thoughtHistoryLength": 3
}
Workflow Pattern
Phase 1: Problem Decomposition
Thought 1: Identify problem scope and constraints
Thought 2: Break into sub-problems
Thought 3: Identify dependencies between sub-problems
Phase 2: Hypothesis Generation
Thought 4: Generate initial hypothesis
Thought 5: Identify evidence needed to verify
Phase 3: Verification & Iteration
Thought 6: Test hypothesis against evidence
Thought 7: Revise if needed (isRevision=true)
Thought 8: Branch if alternative path promising
Phase 4: Conclusion
Final Thought: Synthesize findings, provide answer (nextThoughtNeeded=false)
Best Practices
Start with estimate, adjust as needed
- Initial
totalThoughtsis just a guess - Increase if problem more complex than expected
- Decrease if solution found early
- Initial
Use revisions for course correction
- Mark
isRevision=truewhen reconsidering - Reference
revisesThoughtfor clarity
- Mark
Branch for alternative approaches
- Use
branchFromThoughtto explore alternatives - Give meaningful
branchIdnames
- Use
Filter irrelevant information
- Each thought should advance toward solution
- Ignore tangential details
Don't rush completion
- Only
nextThoughtNeeded=falsewhen truly done - Verify hypothesis before concluding
- Only
Anti-Patterns
| Prohibited | Correct |
|---|---|
| Use for simple tasks | Reserve for complex multi-step problems |
| Skip thought numbers | Always increment correctly |
| Conclude without verification | Verify hypothesis before final thought |
| Ignore previous thoughts | Build upon or explicitly revise |
| Fixed totalThoughts | Adjust as understanding evolves |
Integration with Other Tools
With ACE-Tool
ACE-Tool → align current state → Sequential Think → analyze and plan
With Context7
Sequential Think → coordinate analysis → Context7 → provide official patterns
With Serena
Serena → symbol-level exploration → Sequential Think → systematic analysis
Files (dskills)
-
scripts
-
.env.example 229 B · in bundle
-
sequential_think_cli.py 8.9 KB
#!/usr/bin/env python3 """Sequential Think CLI - Standalone iterative thinking engine for complex problem-solving.""" import argparse import json import sys from dataclasses import dataclass, field, asdict from datetime import datetime from pathlib import Path from typing import List, Optional, Dict # ============================================================================ # Data Models # ============================================================================ @dataclass class ThoughtData: thought: str thought_number: int total_thoughts: int next_thought_needed: bool = True is_revision: bool = False revises_thought: Optional[int] = None branch_from_thought: Optional[int] = None branch_id: Optional[str] = None needs_more_thoughts: bool = False timestamp: str = field(default_factory=lambda: datetime.now().isoformat()) # ============================================================================ # Thought History Manager # ============================================================================ class ThoughtHistoryManager: _instance = None def __new__(cls): if cls._instance is None: cls._instance = super().__new__(cls) cls._instance._history: List[ThoughtData] = [] cls._instance._branches: Dict[str, List[ThoughtData]] = {} cls._instance._history_file: Optional[Path] = None return cls._instance @property def history_file(self) -> Path: if self._history_file is None: config_dir = Path.home() / ".config" / "sequential-think" config_dir.mkdir(parents=True, exist_ok=True) self._history_file = config_dir / "thought_history.json" return self._history_file def _load_history(self) -> None: if self.history_file.exists(): try: with open(self.history_file, 'r', encoding='utf-8') as f: data = json.load(f) self._history = [ThoughtData(**t) for t in data.get("history", [])] self._branches = { k: [ThoughtData(**t) for t in v] for k, v in data.get("branches", {}).items() } except (json.JSONDecodeError, IOError, TypeError): self._history = [] self._branches = {} def _save_history(self) -> None: data = { "history": [asdict(t) for t in self._history], "branches": {k: [asdict(t) for t in v] for k, v in self._branches.items()} } with open(self.history_file, 'w', encoding='utf-8') as f: json.dump(data, f, ensure_ascii=False, indent=2) def add_thought(self, thought: ThoughtData) -> Dict: self._load_history() # Auto-adjust total if thought_number exceeds it if thought.thought_number > thought.total_thoughts: thought.total_thoughts = thought.thought_number self._history.append(thought) # Track branches if thought.branch_from_thought and thought.branch_id: if thought.branch_id not in self._branches: self._branches[thought.branch_id] = [] self._branches[thought.branch_id].append(thought) self._save_history() return { "thoughtNumber": thought.thought_number, "totalThoughts": thought.total_thoughts, "nextThoughtNeeded": thought.next_thought_needed, "branches": list(self._branches.keys()), "thoughtHistoryLength": len(self._history) } def get_history(self) -> Dict: self._load_history() return { "history": [asdict(t) for t in self._history], "branches": {k: [asdict(t) for t in v] for k, v in self._branches.items()}, "totalThoughts": len(self._history) } def clear_history(self) -> Dict: self._history = [] self._branches = {} if self.history_file.exists(): self.history_file.unlink() return {"status": "cleared", "message": "Thought history cleared"} manager = ThoughtHistoryManager() # ============================================================================ # Formatters # ============================================================================ def format_thought_text(thought: ThoughtData) -> str: prefix = "" context = "" if thought.is_revision: prefix = "🔄 Revision" context = f" (revising thought {thought.revises_thought})" elif thought.branch_from_thought: prefix = "🌿 Branch" context = f" (from thought {thought.branch_from_thought}, ID: {thought.branch_id})" else: prefix = "💭 Thought" header = f"{prefix} {thought.thought_number}/{thought.total_thoughts}{context}" border = "─" * max(len(header), min(len(thought.thought), 60)) + "────" return f""" ┌{border}┐ │ {header.ljust(len(border) - 2)} │ ├{border}┤ │ {thought.thought[:len(border) - 2].ljust(len(border) - 2)} │ └{border}┘""" def format_history_text(history: Dict) -> str: if not history["history"]: return "No thoughts recorded yet." lines = ["=" * 60, "THOUGHT HISTORY", "=" * 60, ""] for t in history["history"]: thought = ThoughtData(**t) lines.append(format_thought_text(thought)) if history["branches"]: lines.extend(["", "-" * 60, "BRANCHES:", "-" * 60]) for branch_id, thoughts in history["branches"].items(): lines.append(f"\n[{branch_id}]") for t in thoughts: lines.append(f" Thought {t['thought_number']}: {t['thought'][:50]}...") return "\n".join(lines) # ============================================================================ # Commands # ============================================================================ def cmd_think(args) -> None: thought = ThoughtData( thought=args.thought, thought_number=args.thought_number, total_thoughts=args.total_thoughts, next_thought_needed=not args.no_next, is_revision=args.is_revision, revises_thought=args.revises_thought, branch_from_thought=args.branch_from, branch_id=args.branch_id, needs_more_thoughts=args.needs_more ) result = manager.add_thought(thought) # Print formatted thought to stderr for visibility if not args.quiet: print(format_thought_text(thought), file=sys.stderr) # Output JSON result print(json.dumps(result, ensure_ascii=False, indent=2)) def cmd_history(args) -> None: history = manager.get_history() if args.format == "json": print(json.dumps(history, ensure_ascii=False, indent=2)) else: print(format_history_text(history)) def cmd_clear(args) -> None: result = manager.clear_history() print(json.dumps(result, ensure_ascii=False, indent=2)) # ============================================================================ # Main # ============================================================================ def main(): parser = argparse.ArgumentParser( prog="sequential_think_cli", description="Sequential Think CLI - Iterative thinking engine for complex problem-solving" ) subparsers = parser.add_subparsers(dest="command", required=True) # think command p_think = subparsers.add_parser("think", help="Process a thought in the chain") p_think.add_argument("--thought", "-t", required=True, help="Current thinking step content") p_think.add_argument("--thought-number", "-n", type=int, required=True, help="Current position (1-based)") p_think.add_argument("--total-thoughts", "-T", type=int, required=True, help="Estimated total thoughts") p_think.add_argument("--no-next", action="store_true", help="Mark as final thought (no more needed)") p_think.add_argument("--is-revision", action="store_true", help="This thought revises previous thinking") p_think.add_argument("--revises-thought", type=int, help="Which thought number is being reconsidered") p_think.add_argument("--branch-from", type=int, help="Branching point thought number") p_think.add_argument("--branch-id", help="Identifier for current branch") p_think.add_argument("--needs-more", action="store_true", help="Signal more thoughts needed beyond estimate") p_think.add_argument("--quiet", "-q", action="store_true", help="Suppress formatted output to stderr") # history command p_history = subparsers.add_parser("history", help="View thought history") p_history.add_argument("--format", "-f", choices=["json", "text"], default="text", help="Output format") # clear command subparsers.add_parser("clear", help="Clear thought history") args = parser.parse_args() commands = { "think": cmd_think, "history": cmd_history, "clear": cmd_clear, } commands[args.command](args) if __name__ == "__main__": main()
-
-
README.md 4.4 KB
# Sequential Think CLI Standalone iterative thinking engine for complex problem-solving. No MCP dependency required. ## Installation No external dependencies required - uses Python standard library only. ```bash # Verify Python 3.7+ python --version ``` ## Quick Start ```bash # Start a thinking chain python sequential_think_cli.py think -t "Analyzing the problem..." -n 1 -T 5 # Continue thinking python sequential_think_cli.py think -t "Based on analysis, I hypothesize..." -n 2 -T 5 # Complete the chain python sequential_think_cli.py think -t "Conclusion: the solution is..." -n 5 -T 5 --no-next # View history python sequential_think_cli.py history # Clear history python sequential_think_cli.py clear ``` ## Commands ### think - Process a Thought ```bash python sequential_think_cli.py think [options] Required: -t, --thought Current thinking step content -n, --thought-number Current position in sequence (1-based) -T, --total-thoughts Estimated total thoughts needed Optional: --no-next Mark as final thought (no more thinking needed) --is-revision This thought revises previous thinking --revises-thought N Which thought number is being reconsidered --branch-from N Branching point thought number --branch-id ID Identifier for current branch --needs-more Signal more thoughts needed beyond estimate -q, --quiet Suppress formatted output to stderr ``` ### history - View Thought History ```bash python sequential_think_cli.py history [options] Options: -f, --format Output format: json or text (default: text) ``` ### clear - Clear History ```bash python sequential_think_cli.py clear ``` ## Examples ### Basic Thinking Chain ```bash # Step 1: Problem identification python sequential_think_cli.py think \ -t "The API is returning 500 errors. Need to identify root cause." \ -n 1 -T 4 # Step 2: Hypothesis python sequential_think_cli.py think \ -t "Hypothesis: Database connection pool exhaustion based on error logs." \ -n 2 -T 4 # Step 3: Verification python sequential_think_cli.py think \ -t "Verified: Connection pool max=10, active=10, waiting=50. Pool exhausted." \ -n 3 -T 4 # Step 4: Conclusion python sequential_think_cli.py think \ -t "Solution: Increase pool size to 50 and add connection timeout." \ -n 4 -T 4 --no-next ``` ### Revision Example ```bash # Initial thought python sequential_think_cli.py think \ -t "The bug is in the authentication module." \ -n 1 -T 3 # Revise after new evidence python sequential_think_cli.py think \ -t "Correction: Bug is in session management, not auth." \ -n 2 -T 3 --is-revision --revises-thought 1 ``` ### Branching Example ```bash # Main path python sequential_think_cli.py think -t "Approach A: Refactor the service" -n 1 -T 3 python sequential_think_cli.py think -t "Approach A requires 3 weeks" -n 2 -T 3 # Branch to explore alternative python sequential_think_cli.py think \ -t "Alternative: Use existing library instead" \ -n 3 -T 4 --branch-from 1 --branch-id "lib-approach" ``` ## Output Format ### think command ```json { "thoughtNumber": 2, "totalThoughts": 5, "nextThoughtNeeded": true, "branches": [], "thoughtHistoryLength": 2 } ``` ### history command (JSON) ```json { "history": [ { "thought": "...", "thought_number": 1, "total_thoughts": 5, "next_thought_needed": true, "is_revision": false, "timestamp": "2024-01-15T10:30:00" } ], "branches": {}, "totalThoughts": 1 } ``` ## Data Storage Thought history is persisted to: - **Location**: `~/.config/sequential-think/thought_history.json` - **Format**: JSON - **Persistence**: Survives across sessions until cleared ## When to Use | Scenario | Recommended | |----------|-------------| | Complex debugging (3+ components) | ✅ Yes | | Architectural analysis | ✅ Yes | | Root cause investigation | ✅ Yes | | Multi-step problem solving | ✅ Yes | | Simple bug fix | ❌ No | | Single-file change | ❌ No | | Quick explanation | ❌ No | ## Best Practices 1. **Start with reasonable estimate** - Adjust `totalThoughts` as you learn more 2. **Use revisions explicitly** - Mark `--is-revision` when reconsidering 3. **Branch for alternatives** - Explore different approaches with `--branch-from` 4. **Don't rush completion** - Only use `--no-next` when truly done 5. **Clear between sessions** - Run `clear` when starting new problem -
SKILL.md 5.8 KB
--- name: sequential-think description: | Multi-step reasoning engine for complex analysis and systematic problem solving. Use when: (1) Complex debugging scenarios with multiple layers, (2) Architectural analysis and system design, (3) Problems requiring hypothesis testing and validation, (4) Multi-component failure investigation, (5) Performance bottleneck identification. Triggers: "--think", "--think-hard", "--ultrathink", "analyze step by step", "break down this problem", "systematic analysis". IMPORTANT: Do NOT use for simple single-step tasks. --- # Sequential Think Structured iterative thinking for complex problem-solving. Standalone CLI only (no MCP dependency). ## Execution Methods Run `scripts/sequential_think_cli.py` via Bash: ```bash # Process a thought python scripts/sequential_think_cli.py think \ --thought "First, let me analyze the problem structure..." \ --thought-number 1 \ --total-thoughts 5 # Continue thinking chain python scripts/sequential_think_cli.py think \ --thought "Based on step 1, I hypothesize that..." \ --thought-number 2 \ --total-thoughts 5 # Revise a previous thought python scripts/sequential_think_cli.py think \ --thought "Reconsidering step 1, I realize..." \ --thought-number 3 \ --total-thoughts 5 \ --is-revision \ --revises-thought 1 # Branch into alternative path python scripts/sequential_think_cli.py think \ --thought "Alternative approach: what if we..." \ --thought-number 4 \ --total-thoughts 6 \ --branch-from 2 \ --branch-id "alt-approach" # Final thought (complete chain) python scripts/sequential_think_cli.py think \ --thought "Conclusion: the solution is..." \ --thought-number 5 \ --total-thoughts 5 \ --no-next # View thought history python scripts/sequential_think_cli.py history [--format json|text] # Clear thought history python scripts/sequential_think_cli.py clear ``` ## Core Principles ### Iterative Thinking Process - Each tool call = one "thought" in the chain - Build upon, question, or revise previous thoughts - Express uncertainty when it exists ### Dynamic Thought Count - Start with initial estimate of `totalThoughts` - Adjust up/down as understanding evolves - Add more thoughts even after reaching initial end ### Hypothesis-Driven Approach 1. Generate hypotheses as potential solutions emerge 2. Verify hypotheses based on chain-of-thought steps 3. Repeat until satisfied with solution ### Completion Criteria - Only set `nextThoughtNeeded: false` when truly finished - Must have satisfactory, verified answer - Don't rush to conclusion ## When to Use | Scenario | Use Sequential Think | |----------|---------------------| | Complex debugging (3+ layers) | ✅ Yes | | Architectural analysis | ✅ Yes | | Multi-component investigation | ✅ Yes | | Performance bottleneck analysis | ✅ Yes | | Root cause analysis | ✅ Yes | | Simple explanation | ❌ No | | Single-file change | ❌ No | | Straightforward fix | ❌ No | ## Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `thought` | string | Yes | Current thinking step content | | `thoughtNumber` | int | Yes | Current position in sequence (1-based) | | `totalThoughts` | int | Yes | Estimated total thoughts needed | | `nextThoughtNeeded` | bool | No | Whether more thinking needed (default: true) | | `isRevision` | bool | No | Whether this revises previous thinking | | `revisesThought` | int | No | Which thought number is being reconsidered | | `branchFromThought` | int | No | Branching point thought number | | `branchId` | string | No | Identifier for current branch | | `needsMoreThoughts` | bool | No | Signal that more thoughts needed beyond estimate | ## Output Format ```json { "thoughtNumber": 3, "totalThoughts": 5, "nextThoughtNeeded": true, "branches": ["alt-approach"], "thoughtHistoryLength": 3 } ``` ## Workflow Pattern ### Phase 1: Problem Decomposition ``` Thought 1: Identify problem scope and constraints Thought 2: Break into sub-problems Thought 3: Identify dependencies between sub-problems ``` ### Phase 2: Hypothesis Generation ``` Thought 4: Generate initial hypothesis Thought 5: Identify evidence needed to verify ``` ### Phase 3: Verification & Iteration ``` Thought 6: Test hypothesis against evidence Thought 7: Revise if needed (isRevision=true) Thought 8: Branch if alternative path promising ``` ### Phase 4: Conclusion ``` Final Thought: Synthesize findings, provide answer (nextThoughtNeeded=false) ``` ## Best Practices 1. **Start with estimate, adjust as needed** - Initial `totalThoughts` is just a guess - Increase if problem more complex than expected - Decrease if solution found early 2. **Use revisions for course correction** - Mark `isRevision=true` when reconsidering - Reference `revisesThought` for clarity 3. **Branch for alternative approaches** - Use `branchFromThought` to explore alternatives - Give meaningful `branchId` names 4. **Filter irrelevant information** - Each thought should advance toward solution - Ignore tangential details 5. **Don't rush completion** - Only `nextThoughtNeeded=false` when truly done - Verify hypothesis before concluding ## Anti-Patterns | Prohibited | Correct | |------------|---------| | Use for simple tasks | Reserve for complex multi-step problems | | Skip thought numbers | Always increment correctly | | Conclude without verification | Verify hypothesis before final thought | | Ignore previous thoughts | Build upon or explicitly revise | | Fixed totalThoughts | Adjust as understanding evolves | ## Integration with Other Tools ### With ACE-Tool ``` ACE-Tool → align current state → Sequential Think → analyze and plan ``` ### With Context7 ``` Sequential Think → coordinate analysis → Context7 → provide official patterns ``` ### With Serena ``` Serena → symbol-level exploration → Sequential Think → systematic analysis ```
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.