@colin4k1024/tsp 2.5.3 → 2.5.4
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/commands/goal.md +7 -1
- package/commands/heartbeat.md +34 -1
- package/commands/loop-start.md +34 -6
- package/commands/triage.md +8 -1
- package/hooks/README.md +2 -2
- package/hooks/harness-statusline.js +9 -30
- package/hooks/strategic-compact/README.md +11 -12
- package/manifests/install-components.json +40 -0
- package/manifests/install-modules.json +43 -0
- package/manifests/install-profiles.json +2 -0
- package/package.json +1 -1
- package/schemas/loop-spec.schema.json +124 -0
- package/scripts/hooks/pre-compact.js +39 -8
- package/scripts/hooks/session-start-goal-resume.js +3 -20
- package/scripts/hooks/suggest-compact.js +9 -115
- package/scripts/lib/completion-oracle.js +4 -27
- package/scripts/lib/context-window-state.js +129 -0
- package/scripts/lib/context-window.js +294 -0
- package/scripts/lib/heartbeat-scheduler.js +40 -25
- package/scripts/lib/install-targets/registry.js +1 -1
- package/scripts/lib/loop-oracle.js +5 -0
- package/scripts/lib/loop-spec.js +168 -0
- package/scripts/lib/loop-state-store.js +221 -0
- package/scripts/lib/transcript-usage.js +11 -1
- package/skills/goframe-v2/examples/practices/quick-demo/manifest/config/config.yaml +14 -14
- package/skills/repo-scan/SKILL.md +63 -63
- package/skills/strategic-compact/SKILL.md +11 -2
- package/scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- package/scripts/__pycache__/build_platform_artifacts.cpython-311.pyc +0 -0
- package/scripts/__pycache__/install_platform.cpython-311.pyc +0 -0
- package/scripts/__pycache__/langfuse_trace.cpython-311.pyc +0 -0
- package/scripts/__pycache__/query_audit_logs.cpython-311.pyc +0 -0
- package/scripts/__pycache__/scan_leaked_keys.cpython-311.pyc +0 -0
- package/scripts/__pycache__/team_skills_platform.cpython-311.pyc +0 -0
- package/scripts/__pycache__/team_skills_platform.cpython-313.pyc +0 -0
- package/scripts/__pycache__/validate_library.cpython-311.pyc +0 -0
- package/scripts/__pycache__/validate_workflow_state.cpython-311.pyc +0 -0
- package/scripts/evolution/__pycache__/__init__.cpython-311.pyc +0 -0
- package/scripts/evolution/__pycache__/store.cpython-311.pyc +0 -0
- package/scripts/hooks/__pycache__/__init__.cpython-311.pyc +0 -0
- package/scripts/hooks/__pycache__/mcp_health_check.cpython-311.pyc +0 -0
- package/scripts/hooks/__pycache__/observe.cpython-311.pyc +0 -0
- package/scripts/hooks/__pycache__/session_end.cpython-311.pyc +0 -0
- package/scripts/hooks/__pycache__/session_start.cpython-311.pyc +0 -0
- package/scripts/lib/__pycache__/audit_logger.cpython-311.pyc +0 -0
- package/scripts/lib/__pycache__/audit_query.cpython-311.pyc +0 -0
- package/scripts/lib/__pycache__/hook_contract.cpython-311.pyc +0 -0
- package/scripts/lib/__pycache__/memory_store.cpython-311.pyc +0 -0
- package/scripts/lib/__pycache__/utils.cpython-311.pyc +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: repo-scan
|
|
3
|
-
description: Cross-stack source code asset audit — classifies every file, detects embedded third-party libraries, and delivers actionable four-level verdicts per module with interactive HTML reports.
|
|
4
|
-
origin: community
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# repo-scan
|
|
8
|
-
|
|
9
|
-
> Every ecosystem has its own dependency manager, but no tool looks across C++, Android, iOS, and Web to tell you: how much code is actually yours, what's third-party, and what's dead weight.
|
|
10
|
-
|
|
11
|
-
## When to Use
|
|
12
|
-
|
|
13
|
-
- Taking over a large legacy codebase and need a structural overview
|
|
14
|
-
- Before major refactoring — identify what's core, what's duplicate, what's dead
|
|
15
|
-
- Auditing third-party dependencies embedded directly in source (not declared in package managers)
|
|
16
|
-
- Preparing architecture decision records for monorepo reorganization
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
1
|
+
---
|
|
2
|
+
name: repo-scan
|
|
3
|
+
description: Cross-stack source code asset audit — classifies every file, detects embedded third-party libraries, and delivers actionable four-level verdicts per module with interactive HTML reports.
|
|
4
|
+
origin: community
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# repo-scan
|
|
8
|
+
|
|
9
|
+
> Every ecosystem has its own dependency manager, but no tool looks across C++, Android, iOS, and Web to tell you: how much code is actually yours, what's third-party, and what's dead weight.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
- Taking over a large legacy codebase and need a structural overview
|
|
14
|
+
- Before major refactoring — identify what's core, what's duplicate, what's dead
|
|
15
|
+
- Auditing third-party dependencies embedded directly in source (not declared in package managers)
|
|
16
|
+
- Preparing architecture decision records for monorepo reorganization
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
20
|
```bash
|
|
21
21
|
# Fetch only the pinned commit for reproducibility
|
|
22
22
|
mkdir -p ~/.claude/skills/repo-scan
|
|
@@ -27,52 +27,52 @@ git fetch --depth 1 origin 2742664
|
|
|
27
27
|
git checkout --detach FETCH_HEAD
|
|
28
28
|
cp -r . ~/.claude/skills/repo-scan
|
|
29
29
|
```
|
|
30
|
-
|
|
31
|
-
> Review the source before installing any agent skill.
|
|
32
|
-
|
|
33
|
-
## Core Capabilities
|
|
34
|
-
|
|
35
|
-
| Capability | Description |
|
|
36
|
-
|---|---|
|
|
37
|
-
| **Cross-stack scanning** | C/C++, Java/Android, iOS (OC/Swift), Web (TS/JS/Vue) in one pass |
|
|
38
|
-
| **File classification** | Every file tagged as project code, third-party, or build artifact |
|
|
39
|
-
| **Library detection** | 50+ known libraries (FFmpeg, Boost, OpenSSL…) with version extraction |
|
|
40
|
-
| **Four-level verdicts** | Core Asset / Extract & Merge / Rebuild / Deprecate |
|
|
41
|
-
| **HTML reports** | Interactive dark-theme pages with drill-down navigation |
|
|
42
|
-
| **Monorepo support** | Hierarchical scanning with summary + sub-project reports |
|
|
43
|
-
|
|
44
|
-
## Analysis Depth Levels
|
|
45
|
-
|
|
46
|
-
| Level | Files Read | Use Case |
|
|
47
|
-
|---|---|---|
|
|
48
|
-
| `fast` | 1-2 per module | Quick inventory of huge directories |
|
|
49
|
-
| `standard` | 2-5 per module | Default audit with full dependency + architecture checks |
|
|
50
|
-
| `deep` | 5-10 per module | Adds thread safety, memory management, API consistency |
|
|
51
|
-
| `full` | All files | Pre-merge comprehensive review |
|
|
52
|
-
|
|
53
|
-
## How It Works
|
|
54
|
-
|
|
30
|
+
|
|
31
|
+
> Review the source before installing any agent skill.
|
|
32
|
+
|
|
33
|
+
## Core Capabilities
|
|
34
|
+
|
|
35
|
+
| Capability | Description |
|
|
36
|
+
|---|---|
|
|
37
|
+
| **Cross-stack scanning** | C/C++, Java/Android, iOS (OC/Swift), Web (TS/JS/Vue) in one pass |
|
|
38
|
+
| **File classification** | Every file tagged as project code, third-party, or build artifact |
|
|
39
|
+
| **Library detection** | 50+ known libraries (FFmpeg, Boost, OpenSSL…) with version extraction |
|
|
40
|
+
| **Four-level verdicts** | Core Asset / Extract & Merge / Rebuild / Deprecate |
|
|
41
|
+
| **HTML reports** | Interactive dark-theme pages with drill-down navigation |
|
|
42
|
+
| **Monorepo support** | Hierarchical scanning with summary + sub-project reports |
|
|
43
|
+
|
|
44
|
+
## Analysis Depth Levels
|
|
45
|
+
|
|
46
|
+
| Level | Files Read | Use Case |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `fast` | 1-2 per module | Quick inventory of huge directories |
|
|
49
|
+
| `standard` | 2-5 per module | Default audit with full dependency + architecture checks |
|
|
50
|
+
| `deep` | 5-10 per module | Adds thread safety, memory management, API consistency |
|
|
51
|
+
| `full` | All files | Pre-merge comprehensive review |
|
|
52
|
+
|
|
53
|
+
## How It Works
|
|
54
|
+
|
|
55
55
|
1. **Classify the repo surface**: enumerate files, then tag each as project code, embedded third-party code, or build artifact.
|
|
56
56
|
2. **Detect embedded libraries**: inspect directory names, headers, license files, and version markers to identify bundled dependencies and likely versions.
|
|
57
57
|
3. **Score each module**: group files by module or subsystem, then assign one of the four verdicts based on ownership, duplication, and maintenance cost.
|
|
58
58
|
4. **Highlight structural risks**: call out dead-weight artifacts, duplicated wrappers, outdated vendored code, and modules that should be extracted, rebuilt, or deprecated.
|
|
59
59
|
5. **Produce the report**: return a concise summary plus the interactive HTML output with per-module drill-down so the audit can be reviewed asynchronously.
|
|
60
|
-
|
|
61
|
-
## Examples
|
|
62
|
-
|
|
63
|
-
On a 50,000-file C++ monorepo:
|
|
64
|
-
- Found FFmpeg 2.x (2015 vintage) still in production
|
|
65
|
-
- Discovered the same SDK wrapper duplicated 3 times
|
|
66
|
-
- Identified 636 MB of committed Debug/ipch/obj build artifacts
|
|
67
|
-
- Classified: 3 MB project code vs 596 MB third-party
|
|
68
|
-
|
|
69
|
-
## Best Practices
|
|
70
|
-
|
|
71
|
-
- Start with `standard` depth for first-time audits
|
|
72
|
-
- Use `fast` for monorepos with 100+ modules to get a quick inventory
|
|
73
|
-
- Run `deep` incrementally on modules flagged for refactoring
|
|
74
|
-
- Review the cross-module analysis for duplicate detection across sub-projects
|
|
75
|
-
|
|
76
|
-
## Links
|
|
77
|
-
|
|
78
|
-
- [GitHub Repository](https://github.com/haibindev/repo-scan)
|
|
60
|
+
|
|
61
|
+
## Examples
|
|
62
|
+
|
|
63
|
+
On a 50,000-file C++ monorepo:
|
|
64
|
+
- Found FFmpeg 2.x (2015 vintage) still in production
|
|
65
|
+
- Discovered the same SDK wrapper duplicated 3 times
|
|
66
|
+
- Identified 636 MB of committed Debug/ipch/obj build artifacts
|
|
67
|
+
- Classified: 3 MB project code vs 596 MB third-party
|
|
68
|
+
|
|
69
|
+
## Best Practices
|
|
70
|
+
|
|
71
|
+
- Start with `standard` depth for first-time audits
|
|
72
|
+
- Use `fast` for monorepos with 100+ modules to get a quick inventory
|
|
73
|
+
- Run `deep` incrementally on modules flagged for refactoring
|
|
74
|
+
- Review the cross-module analysis for duplicate detection across sub-projects
|
|
75
|
+
|
|
76
|
+
## Links
|
|
77
|
+
|
|
78
|
+
- [GitHub Repository](https://github.com/haibindev/repo-scan)
|
|
@@ -12,7 +12,7 @@ origin: adapted from ECC
|
|
|
12
12
|
|
|
13
13
|
## 何时激活
|
|
14
14
|
|
|
15
|
-
- 会话上下文超过
|
|
15
|
+
- 会话上下文超过 65% 使用率
|
|
16
16
|
- 需要重组上下文以保留关键信息
|
|
17
17
|
- 长会话中需要压缩早期对话
|
|
18
18
|
- 需要按重要性重新组织 specialist 输出
|
|
@@ -25,6 +25,7 @@ origin: adapted from ECC
|
|
|
25
25
|
|
|
26
26
|
| Trigger | 条件 | 行为 |
|
|
27
27
|
|---------|------|------|
|
|
28
|
+
| `context_65%` | 上下文使用 > 65% | 触发 advisory 压缩建议 |
|
|
28
29
|
| `context_70%` | 上下文使用 > 70% | 触发压缩建议 |
|
|
29
30
|
| `context_85%` | 上下文使用 > 85% | 强制压缩 |
|
|
30
31
|
| `logical_break` | 检测到逻辑断点 | 建议整理 |
|
|
@@ -95,11 +96,19 @@ Specialist:输出详细代码审查报告
|
|
|
95
96
|
系统:保存结论到 memory store
|
|
96
97
|
```
|
|
97
98
|
|
|
99
|
+
## Context 计算与 Compact 轮次
|
|
100
|
+
|
|
101
|
+
- 运行时使用 `scripts/lib/context-window.js` 统一计算上下文压力。
|
|
102
|
+
- 优先消费 CCometixLine-compatible remaining context,例如 `ccometixline.context_window.remaining_percentage`、`ccometixline_context_window.remaining_tokens`、`TSP_CONTEXT_WINDOW_JSON` 或 `CCOMETIXLINE_CONTEXT_FILE`。
|
|
103
|
+
- 如果没有外部 remaining 信号,则退回 Claude `context_window`、transcript JSONL usage、bridge file 和 transcript size fallback。
|
|
104
|
+
- `scripts/hooks/pre-compact.js` 每次 PreCompact 会递增 `.tsp/context/compact-state.json` 的 session / total compact count;`suggest-compact.js` 输出 `compact_count`。
|
|
105
|
+
|
|
98
106
|
## 触发阈值
|
|
99
107
|
|
|
100
108
|
| 使用率 | 紧迫度 | 建议操作 |
|
|
101
109
|
|--------|--------|---------|
|
|
102
|
-
| <
|
|
110
|
+
| < 65% | low | 无需操作 |
|
|
111
|
+
| 65-70% | advisory | 提醒控制上下文增长 |
|
|
103
112
|
| 70-85% | medium | 建议压缩,可选择性执行 |
|
|
104
113
|
| 85-95% | high | 强烈建议压缩 |
|
|
105
114
|
| > 95% | critical | 必须立即压缩 |
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|