feat: add 4 deep-dive comparisons (instruction/MDM/telemetry/token)#33
feat: add 4 deep-dive comparisons (instruction/MDM/telemetry/token)#33
Conversation
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>
There was a problem hiding this comment.
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.
| | `@/path` | 绝对路径 | | ||
| | `@path#fragment` | 自动剥离 `#` 后缀 | | ||
| | `@path\ with\ spaces` | 反斜杠转义空格 | |
There was a problem hiding this comment.
表格里的路径示例 @path\\ with\\ spaces 在 Markdown inline code 中不需要转义反斜杠,当前会渲染成双反斜杠,导致示例与实际语法不一致。建议改为单反斜杠形式。
| - `@include` 不在以下区域内解析: | ||
| - HTML 注释 `<!-- ... -->` | ||
| - 围栏代码块 ` ```...``` ` | ||
| - 行内代码 `` `...` `` |
There was a problem hiding this comment.
“围栏代码块 ```...```” 这里用单反引号包裹包含反引号的内容,容易导致 Markdown 解析失败/渲染错乱。建议改用更长的 inline code 定界符(例如双反引号包裹)或用 HTML <code> 来展示三反引号示例。
| - 行内代码 `` `...` `` | |
| - 行内代码 <code>`...`</code> |
| | **macOS plist** | ✅ `com.anthropic.claudecode` domain | ❌ | | ||
| | **Windows Registry** | ✅ `HKLM\SOFTWARE\Policies\ClaudeCode` | ❌ | | ||
| | **Linux 文件策略** | ✅ `/etc/claude-code/managed-settings.json` | ❌ | |
There was a problem hiding this comment.
Windows Registry 路径在 inline code 中写成了 HKLM\\SOFTWARE\\Policies\\ClaudeCode。Markdown 的 code span 不需要对反斜杠做转义,这会实际显示为双反斜杠,影响可读性/准确性;建议改为单反斜杠形式。
| // 源码: utils/settings/mdm/constants.ts#L23-L26 | ||
| // HKLM\SOFTWARE\Policies\ClaudeCode (管理员策略,最高) | ||
| // HKCU\SOFTWARE\Policies\ClaudeCode (用户级策略,最低) | ||
| // 注: SOFTWARE\Policies 在 WOW64 共享——32/64 位无重定向 |
There was a problem hiding this comment.
本节代码块同样使用了双反斜杠(例如 HKLM\\SOFTWARE\\Policies\\ClaudeCode、SOFTWARE\\Policies)。在 fenced code block 中也无需转义反斜杠,建议统一改为单反斜杠,避免读者复制时出错。
| ``` | ||
| macOS: /Library/Application Support/ClaudeCode/managed-settings.d/ | ||
| Windows: C:\Program Files\ClaudeCode\managed-settings.d/ | ||
| Linux: /etc/claude-code/managed-settings.d/ |
There was a problem hiding this comment.
Drop-in 目录示例里的 Windows 路径写成了 C:\\Program Files\\ClaudeCode\\...。在普通代码块里反斜杠不需要转义,当前会显示为双反斜杠;建议改为单反斜杠以便直接复制使用。
| | **遥测框架** | 自定义 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 | |
There was a problem hiding this comment.
这里的 tengu_* 事件数量写为 ~656,但 PR 描述的摘要表里写的是 “505 tengu_ events”。建议统一 PR 描述与文档中的统计口径/数字(例如是否包含动态构造事件名),避免读者困惑。
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>
Summary
Four new comparison articles (852 lines total) based on source code analysis:
Test plan
🤖 Generated with Claude Code