Skip to content

Commit abfae24

Browse files
committed
feat(docs): restructure blog post with TOC and update title
1 parent ca45764 commit abfae24

File tree

3 files changed

+39
-6
lines changed

3 files changed

+39
-6
lines changed

original/2025-07-30-beyond-expectations-en.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
11
---
22
audio: false
3+
generated: false
4+
image: false
35
lang: en
46
layout: post
5-
title: Beyond Expectations
7+
title: Exceeding Expectations, Avoiding Validation, Staying Humble
68
translated: false
7-
generated: false
8-
image: false
99
---
1010

11+
### Table of Contents
12+
13+
1. [Beyond Expectations](#beyond-expectations)
14+
- Exceed corporate task quality standards
15+
- Surprise others with hidden efforts
16+
- Leverage AI for exceptional output
17+
- Limit self-disclosure for impact
18+
- Rare exceptional results exist
19+
20+
2. [Avoid Seeking Validation](#avoid-seeking-validation)
21+
- Validation-seeking stems from insecurity
22+
- Reject outdated societal assumptions
23+
- Over-sharing creates unnecessary friction
24+
- Embrace mortality for confidence
25+
- Focus on actions over approval
26+
27+
3. [Avoid Being Proud After Success](#avoid-being-proud-after-success)
28+
- Underestimate success to stay sharp
29+
- Emotional investing disrupts strategy
30+
- Premature scaling destroys startups
31+
- Debt assumptions backfire harshly
32+
- Recovery demands prolonged discipline
33+
34+
1135
## Beyond Expectations
1236

1337
*2025.07.30*

scripts/agent/title_agent.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ def generate_title_with_ai(content):
2626
2. If that doesn't work, use a clear descriptive title
2727
3. Keep it under 40 characters if possible
2828
29+
IMPORTANT INSTRUCTIONS:
30+
- Use original words from the section titles/content as much as possible
31+
- Preserve key terms and concepts from the source material
32+
- Avoid introducing new vocabulary not present in the content
33+
2934
Content:
3035
{content}"""
3136

scripts/agent/toc_agent.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ def validate_toc(toc):
3333
if not line: # Skip empty lines
3434
continue
3535

36-
# Check for numbered items like "1. [Title](#anchor)"
37-
if re.match(r'^\d+\.\s+\[.*\]\(#.*\)$', line.strip()):
36+
# Check for numbered items like "1. [Title](#anchor)" or "1. **[Title](#anchor)**"
37+
if re.match(r'^\d+\.\s+\**\[.*\]\(#.*\)\**$', line.strip()):
3838
item_count += 1
3939
# Extract the link text and anchor
40-
match = re.match(r'^\d+\.\s+\[(.*)\]\((#.*)\)$', line.strip())
40+
match = re.match(r'^\d+\.\s+\**\[(.*)\]\((#.*)\)\**$', line.strip())
4141
if match:
4242
link_text, anchor = match.groups()
4343
# Check if anchor starts with #
@@ -80,6 +80,7 @@ def generate_toc_with_ai(content):
8080
4. Never include subheaders as bullet points
8181
5. Never exceed 5 points per section
8282
6. Never use markdown code blocks
83+
7. Never use bold formatting (**)
8384
8485
Example Output:
8586
1. [Team Scaling](#team-scaling)
@@ -92,7 +93,10 @@ def generate_toc_with_ai(content):
9293

9394
try:
9495
response = call_openrouter_api(prompt)
96+
print(f"AI Response:\n{response}\n---End of AI Response---") # Log the raw AI response
9597
stripped = response.strip()
98+
# Remove any bold formatting that might have been added despite prompt instruction
99+
stripped = stripped.replace('**[', '[').replace(']**', ']')
96100
# Raise exception if markdown code blocks still appear despite prompt instruction
97101
if stripped.startswith('```') and stripped.endswith('```'):
98102
raise ValueError("TOC contains markdown code blocks despite prompt instructions")

0 commit comments

Comments
 (0)