Merge pull request #409 from pangerlkr/main

fix: refresh markdown docs and Windows hook test handling
This commit is contained in:
Affaan Mustafa
2026-03-12 23:55:59 -07:00
committed by GitHub
10 changed files with 49 additions and 43 deletions

View File

@@ -116,7 +116,7 @@ the community.
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
@@ -124,5 +124,5 @@ enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.

View File

@@ -581,7 +581,7 @@ LOGGING = {
| 強力なシークレット | SECRET_KEYに環境変数を使用 |
| パスワード検証 | すべてのパスワードバリデータを有効化 |
| CSRF保護 | デフォルトで有効、無効にしない |
| XSS防止 | Djangoは自動エスケープ、ユーザー入力で`|safe`を使用しない |
| XSS防止 | Djangoは自動エスケープ、ユーザー入力で<code>\|safe</code>を使用しない |
| SQLインジェクション | ORMを使用、クエリで文字列を連結しない |
| ファイルアップロード | ファイルタイプとサイズを検証 |
| レート制限 | APIエンドポイントをスロットル |

View File

@@ -71,14 +71,14 @@
## 归属
本《行为准则》改编自 \[Contributor Covenant]\[homepage]
本《行为准则》改编自 [Contributor Covenant][homepage]
版本 2.0,可在
https://www.contributor-covenant.org/version/2/0/code\_of\_conduct.html 获取。
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html> 获取。
社区影响指南的灵感来源于 [Mozilla 的行为准则执行阶梯](https://github.com/mozilla/diversity)。
[homepage]: https://www.contributor-covenant.org
有关本行为准则常见问题的解答,请参阅常见问题解答:
https://www.contributor-covenant.org/faq。翻译版本可在
https://www.contributor-covenant.org/translations 获取。
<https://www.contributor-covenant.org/faq>。翻译版本可在
<https://www.contributor-covenant.org/translations> 获取。

View File

@@ -315,6 +315,6 @@ result = "".join(str(item) for item in items)
| 海象运算符 (`:=`) | 3.8+ |
| 仅限位置参数 | 3.8+ |
| Match 语句 | 3.10+ |
| 类型联合 (\`x | None\`) | 3.10+ |
| 类型联合 (\`x \| None\`) | 3.10+ |
确保你的项目 `pyproject.toml``setup.py` 指定了正确的最低 Python 版本。

View File

@@ -40,7 +40,7 @@
要在会话间共享记忆,最好的方法是使用一个技能或命令来总结和检查进度,然后保存到 `.claude` 文件夹中的一个 `.tmp` 文件中,并在会话结束前不断追加内容。第二天,它可以将其用作上下文,并从中断处继续。为每个会话创建一个新文件,这样你就不会将旧的上下文污染到新的工作中。
![Session Storage File Tree](../../assets/images/longform/03-session-storage.png)
*会话存储示例 -> https://github.com/affaan-m/everything-claude-code/tree/main/examples/sessions*
*会话存储示例 -> <https://github.com/affaan-m/everything-claude-code/tree/main/examples/sessions>*
Claude 创建一个总结当前状态的文件。审阅它,如果需要则要求编辑,然后重新开始。对于新的对话,只需提供文件路径。当你达到上下文限制并需要继续复杂工作时,这尤其有用。这些文件应包含:
@@ -130,7 +130,7 @@ alias claude-research='claude --system-prompt "$(cat ~/.claude/contexts/research
**定价参考:**
![Claude Model Pricing](../../assets/images/longform/05-pricing-table.png)
*来源https://platform.claude.com/docs/en/about-claude/pricing*
*来源:<https://platform.claude.com/docs/en/about-claude/pricing>*
**工具特定优化:**

View File

@@ -211,7 +211,7 @@ git worktree add ../feature-branch feature-branch
流式传输和监视 Claude 运行的日志/bash 进程:
https://github.com/user-attachments/assets/shortform/07-tmux-video.mp4
<https://github.com/user-attachments/assets/shortform/07-tmux-video.mp4>
```bash
tmux new -s dev

View File

@@ -129,7 +129,7 @@ CREATE INDEX orders_customer_id_idx ON orders (customer_id);
| 索引類型 | 使用場景 | 運算子 |
|----------|----------|--------|
| **B-tree**(預設)| 等於、範圍 | `=``<``>``BETWEEN``IN` |
| **GIN** | 陣列、JSONB、全文搜尋 | `@>``?``?&``?|``@@` |
| **GIN** | 陣列、JSONB、全文搜尋 | `@>``?``?&`<code>?\|</code>`@@` |
| **BRIN** | 大型時序表 | 排序資料的範圍查詢 |
| **Hash** | 僅等於 | `=`(比 B-tree 略快)|

View File

@@ -193,6 +193,7 @@ async function runTests() {
let passed = 0;
let failed = 0;
let skipped = 0;
const scriptsDir = path.join(__dirname, '..', '..', 'scripts', 'hooks');
@@ -2230,7 +2231,11 @@ async function runTests() {
passed++;
else failed++;
if (
if (process.platform === 'win32') {
console.log(' - detect-project writes project metadata to the registry and project directory');
console.log(' (skipped — bash script paths are not Windows-compatible)');
skipped++;
} else if (
await asyncTest('detect-project writes project metadata to the registry and project directory', async () => {
const testRoot = createTestDir();
const homeDir = path.join(testRoot, 'home');
@@ -4364,12 +4369,12 @@ async function runTests() {
// ── Round 74: session-start.js main().catch handler ──
console.log('\nRound 74: session-start.js (main catch — unrecoverable error):');
if (
if (process.platform === 'win32') {
console.log(' - session-start exits 0 with error message when HOME is non-directory');
console.log(' (skipped — /dev/null not available on Windows)');
skipped++;
} else if (
await asyncTest('session-start exits 0 with error message when HOME is non-directory', async () => {
if (process.platform === 'win32') {
console.log(' (skipped — /dev/null not available on Windows)');
return;
}
// HOME=/dev/null makes ensureDir(sessionsDir) throw ENOTDIR,
// which propagates to main().catch — the top-level error boundary
const result = await runScript(path.join(scriptsDir, 'session-start.js'), '', {
@@ -4386,12 +4391,12 @@ async function runTests() {
// ── Round 75: pre-compact.js main().catch handler ──
console.log('\nRound 75: pre-compact.js (main catch — unrecoverable error):');
if (
if (process.platform === 'win32') {
console.log(' - pre-compact exits 0 with error message when HOME is non-directory');
console.log(' (skipped — /dev/null not available on Windows)');
skipped++;
} else if (
await asyncTest('pre-compact exits 0 with error message when HOME is non-directory', async () => {
if (process.platform === 'win32') {
console.log(' (skipped — /dev/null not available on Windows)');
return;
}
// HOME=/dev/null makes ensureDir(sessionsDir) throw ENOTDIR,
// which propagates to main().catch — the top-level error boundary
const result = await runScript(path.join(scriptsDir, 'pre-compact.js'), '', {
@@ -4408,12 +4413,12 @@ async function runTests() {
// ── Round 75: session-end.js main().catch handler ──
console.log('\nRound 75: session-end.js (main catch — unrecoverable error):');
if (
if (process.platform === 'win32') {
console.log(' - session-end exits 0 with error message when HOME is non-directory');
console.log(' (skipped — /dev/null not available on Windows)');
skipped++;
} else if (
await asyncTest('session-end exits 0 with error message when HOME is non-directory', async () => {
if (process.platform === 'win32') {
console.log(' (skipped — /dev/null not available on Windows)');
return;
}
// HOME=/dev/null makes ensureDir(sessionsDir) throw ENOTDIR inside main(),
// which propagates to runMain().catch — the top-level error boundary
const result = await runScript(path.join(scriptsDir, 'session-end.js'), '{}', {
@@ -4430,12 +4435,12 @@ async function runTests() {
// ── Round 76: evaluate-session.js main().catch handler ──
console.log('\nRound 76: evaluate-session.js (main catch — unrecoverable error):');
if (
if (process.platform === 'win32') {
console.log(' - evaluate-session exits 0 with error message when HOME is non-directory');
console.log(' (skipped — /dev/null not available on Windows)');
skipped++;
} else if (
await asyncTest('evaluate-session exits 0 with error message when HOME is non-directory', async () => {
if (process.platform === 'win32') {
console.log(' (skipped — /dev/null not available on Windows)');
return;
}
// HOME=/dev/null makes ensureDir(learnedSkillsPath) throw ENOTDIR,
// which propagates to main().catch — the top-level error boundary
const result = await runScript(path.join(scriptsDir, 'evaluate-session.js'), '{}', {
@@ -4452,12 +4457,12 @@ async function runTests() {
// ── Round 76: suggest-compact.js main().catch handler ──
console.log('\nRound 76: suggest-compact.js (main catch — double-failure):');
if (
if (process.platform === 'win32') {
console.log(' - suggest-compact exits 0 with error when TMPDIR is non-directory');
console.log(' (skipped — /dev/null not available on Windows)');
skipped++;
} else if (
await asyncTest('suggest-compact exits 0 with error when TMPDIR is non-directory', async () => {
if (process.platform === 'win32') {
console.log(' (skipped — /dev/null not available on Windows)');
return;
}
// TMPDIR=/dev/null causes openSync to fail (ENOTDIR), then the catch
// fallback writeFile also fails, propagating to main().catch
const result = await runScript(path.join(scriptsDir, 'suggest-compact.js'), '', {
@@ -4939,7 +4944,8 @@ Some random content without the expected ### Context to Load section
console.log('\n=== Test Results ===');
console.log(`Passed: ${passed}`);
console.log(`Failed: ${failed}`);
console.log(`Total: ${passed + failed}\n`);
console.log(`Skipped: ${skipped}`);
console.log(`Total: ${passed + failed + skipped}\n`);
process.exit(failed > 0 ? 1 : 0);
}

View File

@@ -40,7 +40,7 @@ With lazy loading, the context window issue is mostly solved. But token usage an
For sharing memory across sessions, a skill or command that summarizes and checks in on progress then saves to a `.tmp` file in your `.claude` folder and appends to it until the end of your session is the best bet. The next day it can use that as context and pick up where you left off, create a new file for each session so you don't pollute old context into new work.
![Session Storage File Tree](./assets/images/longform/03-session-storage.png)
*Example of session storage -> https://github.com/affaan-m/everything-claude-code/tree/main/examples/sessions*
*Example of session storage -> <https://github.com/affaan-m/everything-claude-code/tree/main/examples/sessions>*
Claude creates a file summarizing current state. Review it, ask for edits if needed, then start fresh. For the new conversation, just provide the file path. Particularly useful when you're hitting context limits and need to continue complex work. These files should contain:
- What approaches worked (verifiably with evidence)
@@ -129,7 +129,7 @@ Default to Sonnet for 90% of coding tasks. Upgrade to Opus when first attempt fa
**Pricing Reference:**
![Claude Model Pricing](./assets/images/longform/05-pricing-table.png)
*Source: https://platform.claude.com/docs/en/about-claude/pricing*
*Source: <https://platform.claude.com/docs/en/about-claude/pricing>*
**Tool-Specific Optimizations:**

View File

@@ -211,7 +211,7 @@ git worktree add ../feature-branch feature-branch
Stream and watch logs/bash processes Claude runs:
https://github.com/user-attachments/assets/shortform/07-tmux-video.mp4
<https://github.com/user-attachments/assets/shortform/07-tmux-video.mp4>
```bash
tmux new -s dev