Skip to content

feat: add 4 deep-dive comparisons (instruction/MDM/telemetry/token)#33

Merged
wenshao merged 2 commits intomainfrom
feat/instruction-mdm-telemetry-token
Apr 3, 2026
Merged

feat: add 4 deep-dive comparisons (instruction/MDM/telemetry/token)#33
wenshao merged 2 commits intomainfrom
feat/instruction-mdm-telemetry-token

Conversation

@wenshao
Copy link
Copy Markdown
Owner

@wenshao wenshao commented Apr 3, 2026

Summary

Four new comparison articles (852 lines total) based on source code analysis:

Article Lines Core Difference
instruction-loading-deep-dive.md 274 CLAUDE.md 6-layer + @include + frontmatter paths vs QWEN.md 3-layer
mdm-enterprise-deep-dive.md 166 macOS plist + Windows Registry + remote API vs file-only
telemetry-architecture-deep-dive.md 181 505 tengu_ events + Perfetto vs 50 RUM events
token-estimation-deep-dive.md 231 API real-time counting + VCR vs static pattern matching

Test plan

  • Verify markdown tables render correctly
  • Spot-check source code references

🤖 Generated with Claude Code

wenshao and others added 2 commits April 4, 2026 02:06
Four new comparison articles based on Claude Code v2.1.89 and Qwen Code v0.15.0:

1. instruction-loading-deep-dive.md (274 lines)
   - CLAUDE.md 6-layer hierarchy vs QWEN.md 3-layer
   - @include directives (both support, 5-level nesting)
   - Frontmatter path filtering (Claude only)
   - Conditional rules, HTML comment stripping, auto-memory

2. mdm-enterprise-deep-dive.md (166 lines)
   - Claude: macOS plist + Windows Registry + drop-in dir + remote API
   - Qwen: file-based only, no MDM
   - 5-level First-Source-Wins policy precedence

3. telemetry-architecture-deep-dive.md (181 lines)
   - Claude: 505 tengu_ events + 1P Logger + Perfetto tracing
   - Qwen: 50 events + QwenLogger RUM + OTLP
   - Privacy controls comparison

4. token-estimation-deep-dive.md (231 lines)
   - Claude: API real-time counting + VCR cache + thinking budget
   - Qwen: static pattern matching (82 models) + effort levels
   - Natural language budget parsing ("+500k", "spend 2M")

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Round 1 (source verification):
- claudemd.ts: ~2,300 → 1,479 lines (actual wc -l)
- memoryDiscovery.ts: ~217 → 357 lines
- memoryTool.ts: ~113 → 543 lines
- tengu_ event count: ~505 → ~656 (grep -roh unique count)

Round 3 (cross-doc consistency):
- Reconcile telemetry count with 03-architecture.md (782 = binary extraction
  including dynamic events; 656 = source grep unique strings)
- Added note explaining both counting methods

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wenshao wenshao requested a review from Copilot April 3, 2026 18:13
@wenshao wenshao merged commit 9edf909 into main Apr 3, 2026
2 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds four new deep-dive comparison articles to the documentation, focusing on how Claude Code vs Qwen Code differ across instruction loading, enterprise/MDM configuration, telemetry architecture, and token estimation/thinking support.

Changes:

  • Added a deep-dive on token estimation strategies and “thinking” budget handling across providers.
  • Added a deep-dive on telemetry architecture, event taxonomy, and privacy controls.
  • Added deep-dives on enterprise policy management (MDM) and instruction file discovery/include mechanisms.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
docs/comparison/token-estimation-deep-dive.md New article comparing token counting/estimation, thinking configuration, and provider adaptations.
docs/comparison/telemetry-architecture-deep-dive.md New article comparing telemetry pipelines, event volume, sampling, and privacy controls.
docs/comparison/mdm-enterprise-deep-dive.md New article comparing enterprise policy/MDM configuration hierarchies and remote settings handling.
docs/comparison/instruction-loading-deep-dive.md New article comparing instruction file discovery layers, @include, frontmatter path filtering, and trust models.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +70 to +72
| `@/path` | 绝对路径 |
| `@path#fragment` | 自动剥离 `#` 后缀 |
| `@path\ with\ spaces` | 反斜杠转义空格 |
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

表格里的路径示例 @path\\ with\\ spaces 在 Markdown inline code 中不需要转义反斜杠,当前会渲染成双反斜杠,导致示例与实际语法不一致。建议改为单反斜杠形式。

Copilot uses AI. Check for mistakes.
- `@include` 不在以下区域内解析:
- HTML 注释 `<!-- ... -->`
- 围栏代码块 ` ```...``` `
- 行内代码 `` `...` ``
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“围栏代码块 ```...```” 这里用单反引号包裹包含反引号的内容,容易导致 Markdown 解析失败/渲染错乱。建议改用更长的 inline code 定界符(例如双反引号包裹)或用 HTML <code> 来展示三反引号示例。

Suggested change
- 行内代码 `` `...` ``
- 行内代码 <code>`...`</code>

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +13
| **macOS plist** | ✅ `com.anthropic.claudecode` domain | ❌ |
| **Windows Registry** | ✅ `HKLM\SOFTWARE\Policies\ClaudeCode` | ❌ |
| **Linux 文件策略** | ✅ `/etc/claude-code/managed-settings.json` | ❌ |
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows Registry 路径在 inline code 中写成了 HKLM\\SOFTWARE\\Policies\\ClaudeCode。Markdown 的 code span 不需要对反斜杠做转义,这会实际显示为双反斜杠,影响可读性/准确性;建议改为单反斜杠形式。

Copilot uses AI. Check for mistakes.
Comment on lines +61 to +64
// 源码: utils/settings/mdm/constants.ts#L23-L26
// HKLM\SOFTWARE\Policies\ClaudeCode (管理员策略,最高)
// HKCU\SOFTWARE\Policies\ClaudeCode (用户级策略,最低)
// 注: SOFTWARE\Policies 在 WOW64 共享——32/64 位无重定向
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本节代码块同样使用了双反斜杠(例如 HKLM\\SOFTWARE\\Policies\\ClaudeCodeSOFTWARE\\Policies)。在 fenced code block 中也无需转义反斜杠,建议统一改为单反斜杠,避免读者复制时出错。

Copilot uses AI. Check for mistakes.
Comment on lines +72 to +75
```
macOS: /Library/Application Support/ClaudeCode/managed-settings.d/
Windows: C:\Program Files\ClaudeCode\managed-settings.d/
Linux: /etc/claude-code/managed-settings.d/
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop-in 目录示例里的 Windows 路径写成了 C:\\Program Files\\ClaudeCode\\...。在普通代码块里反斜杠不需要转义,当前会显示为双反斜杠;建议改为单反斜杠以便直接复制使用。

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +15
| **遥测框架** | 自定义 1P Logger + OpenTelemetry | QwenLogger(RUM)+ OpenTelemetry |
| **上报端点** | Anthropic 内部 API + Datadog | 阿里云 RUM + OTLP(可配置) |
| **事件数量** | ~656 个 `tengu_*` 事件 | ~50 个事件类型 |
| **采样策略** | 按事件类型动态采样(GrowthBook) | 批量刷新(1,000 条 / 60 秒) |
| **调试追踪** | Perfetto(Chrome Trace,ant-only) | 标准 OTLP Span |
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 tengu_* 事件数量写为 ~656,但 PR 描述的摘要表里写的是 “505 tengu_ events”。建议统一 PR 描述与文档中的统计口径/数字(例如是否包含动态构造事件名),避免读者困惑。

Copilot uses AI. Check for mistakes.
wenshao added a commit that referenced this pull request Apr 5, 2026
Closed PR #72 (qwen3.6-plus) — 22 of 26 items duplicated existing 183.
Extracted 4 new items to p2-tools:
- #31 /plan (plan mode)
- #32 /rename (session rename)
- #33 /upgrade (version upgrade + changelog)
- #34 Plugin system (aggregated container for commands+skills+hooks+MCP)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants