What is Hackers' Pub?

Hackers' Pub is a place for software engineers to share their knowledge and experience with each other. It's also an ActivityPub-enabled social network, so you can follow your favorite hackers in the fediverse and get their latest posts in your feed.

1
1

Spotify 전체 백업본 공개
------------------------------
- *Anna’s Archive* 가 Spotify의 *메타데이터와 음악 파일 전체를 백업* 해 약 *300TB 규모의 토렌트 아카이브* 로 공개
- 약 *2억5600만 곡의 메타데이터* 와 *8600만 개의 음악 파일* 을 포함, *청취량의 99.6%* 를 포괄
- *OGG Vorbis 160kbit/s* 원본 품질로 인기곡을, *OGG Opus 75kbit/s* 로 비인기…
------------------------------
https://news.hada.io/topic?id=25216&utm_source=googlechat&utm_medium=bot&utm_campaign=1834

0
0
0
0
5
0
0

洪 民憙 (Hong Minhee) shared the below article:

Subagent는 Tool Use입니다.

자손킴 @jasonkim@hackers.pub

지난 글에서는 Tool Use가 무엇이고 어떻게 동작하는지 알아보았다. 이번 글에서는 subagent가 Tool Use 위에서 어떻게 동작하는지 알아볼 것이다.

Tool Use 정리

Subagent 설명에 앞서 Tool Use를 간단히 정리해보고 넘어가자.

┌─────────────────────────────────────────────────────────────┐
│                        메인 메시지 루프                         │
│                                                             │
│   ┌──────┐    request     ┌─────────┐    API call   ┌─────┐ │
│   │ User │ ─────────────► │  Agent  │ ────────────► │ LLM │ │
│   │      │ ◄───────────── │         │ ◄──────────── │     │ │
│   └──────┘    response    │         │   tool_use    └─────┘ │
│                           │    │    │                       │
│                           │    ▼    │                       │
│                        ┌──────────────┐                     │
│                        │    Tools     │                     │
│                        │ (Bash, Read, │                     │
│                        │  Glob, ...)  │                     │
│                        └──────────────┘                     │
└─────────────────────────────────────────────────────────────┘

Tool Use는 LLM이 외부 도구를 호출할 수 있게 해주는 메커니즘이다. Agent는 LLM에게 사용 가능한 도구 목록을 제공하고 LLM은 필요할 때 tool_use 응답을 반환한다. Agent는 해당 도구를 실행하고 결과를 다시 LLM에게 전달한다. 이 과정이 반복되면서 복잡한 작업을 수행한다.

Subagent란?

Subagent는 특정 작업에 특화된 AI 에이전트다. 각 subagent는 자신만의 컨텍스트 윈도우에서 독립적으로 작동하며 완료되면 결과를 메인 에이전트에게 반환한다.

Claude Code에서 subagent는 Task라는 도구로 구현되어 있다. 메인 에이전트의 시스템 프롬프트에는 Task 도구의 description으로 사용 가능한 모든 subagent 목록과 각각의 용도가 포함된다. 메인 에이전트는 이 description을 참고하여 적절한 subagent를 선택한다. 예를 들어 "코드베이스 구조 파악"이 필요하면 Explore를, "데이터베이스 스키마 설계"가 필요하면 database-schema-architect를 호출한다.

Subagent의 구조

Subagent는 마크다운 파일로 정의되고 YAML frontmatter에 다음과 같은 설정을 포함한다.

---
name: code-reviewer
description: Expert code review specialist. Use immediately after writing or modifying code.
tools: Read, Grep, Glob, Bash
model: sonnet
---

You are a senior code reviewer ensuring high standards of code quality and security.

When invoked:
1. Run git diff to see recent changes
2. Focus on modified files
3. Begin review immediately

Review checklist:
- Code is simple and readable
- Functions and variables are well-named
...

각 필드의 역할은 다음과 같다:

필드 설명
name subagent의 고유 식별자
description 언제 이 subagent를 사용해야 하는지 설명
tools 이 subagent가 사용할 수 있는 도구 목록
model 사용할 모델 (sonnet, opus, haiku 또는 inherit)

YAML frontmatter 아래의 마크다운 본문이 subagent의 시스템 프롬프트가 된다. 이 프롬프트는 subagent가 호출될 때 API 요청의 system 필드에 주입되어 subagent의 행동을 정의한다.

이 subagent 정의는 메인 에이전트의 시스템 프롬프트에 있는 tools 섹션의 Task 도구 설명에 포함된다:

{
  "name": "Task",
  "description": "Launch a new agent to handle complex, multi-step tasks autonomously.

Available agent types and the tools they have access to:
- Explore: Fast agent specialized for exploring codebases. (Tools: All tools)
- Plan: Software architect agent for designing implementation plans. (Tools: All tools)
- database-schema-architect: Use this agent when you need to design database schemas...
...
"
}

Task 도구의 input schema는 다음과 같다:

{
  "type": "object",
  "properties": {
    "subagent_type": {
      "type": "string",
      "description": "The type of subagent to launch"
    },
    "prompt": {
      "type": "string",
      "description": "The task to delegate to the subagent"
    },
    "description": {
      "type": "string",
      "description": "Short description of what the agent will do"
    }
  }
}
  • subagent_type: 호출할 subagent 종류 (Explore, Plan, general-purpose 등)
  • prompt: subagent에게 전달할 작업 지시. 이 내용이 subagent의 user 메시지가 된다
  • description: 3-5단어의 짧은 요약. 로그나 UI에 표시된다

Subagent 호출 과정

실제 메시지 흐름을 통해 subagent가 어떻게 동작하는지 살펴보자.

1단계: 메인 에이전트가 Task 도구 호출

사용자가 "선물을 주고받는 기능을 위한 entity 설계"를 요청했다고 하자. 메인 에이전트(Opus 4.5)는 먼저 코드베이스를 탐색해야 한다고 판단하고 Explorer subagent를 호출한다:

{
  "content": [
    {
      "type": "thinking",
      "thinking": "사용자가 선물을 주고받는 기능을 위한 entity 설계를 요청했습니다. Plan mode가 활성화되어 있으므로, 먼저 코드베이스를 탐색하여 기존 구조를 이해해야 합니다.\n\nPhase 1에 따라:\n1. 기존 entity 구조와 패턴을 이해하기 위해 Explore agent를 사용\n2. 선물 관련 기존 구현이 있는지 확인\n3. 사용자와 아이템 관련 entity가 어떻게 구성되어 있는지 파악\n\n먼저 Explore agent를 사용하여 기존 entity 구조를 파악하겠습니다."
    },
    {
      "type": "text",
      "text": "선물 주고받기 기능을 위한 entity 설계를 시작하겠습니다. 먼저 기존 코드베이스의 entity 구조와 관련 패턴을 탐색하겠습니다."
    },
    {
      "type": "tool_use",
      "id": "toolu_01QjShG7gnF36vLgGKCWBNjg",
      "name": "Task",
      "input": {
        "subagent_type": "Explore",
        "prompt": "이 NestJS TypeScript 프로젝트에서 entity 구조를 탐색해주세요:\n\n1. 기존 entity 파일들의 위치와 구조 파악...",
        "description": "Entity 구조 탐색"
      }
    }
  ]
}

thinking 블록에서 메인 에이전트는 현재 상황(Plan mode 활성화)을 파악하고 Explore agent를 선택한 이유를 명시적으로 추론했다.

2단계: 새로운 메시지 루프에서 Subagent 실행

Agent는 Task 도구 호출을 받으면 완전히 새로운 메시지 루프를 시작한다. 이 때 위에서 보았던 YAML frontmatter 하단의 마크다운 본문이 subagent 전용 시스템 프롬프트로 주입된다.

{
  "model": "claude-haiku-4-5-20251001",
  "system": [
    {
      "type": "text",
      "text": "You are Claude Code, Anthropic's official CLI for Claude."
    },
    {
      "type": "text",
      "text": "You are a file search specialist for Claude Code...

=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
This is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:
- Creating new files
- Modifying existing files
- Deleting files
...

Your strengths:
- Rapidly finding files using glob patterns
- Searching code and text with powerful regex patterns
- Reading and analyzing file contents
..."
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": "<system-reminder>\nAs you answer the user's questions, you can use the following context:\n# claudeMd\nCodebase and user instructions are ... <system-reminder>"
    },
    {
      "role": "user",
      "content": "이 NestJS TypeScript 프로젝트에서 entity 구조를 탐색해주세요..."
    }
  ],
  "tools": [
    {"name": "Bash", ...},
    {"name": "Glob", ...},
    {"name": "Grep", ...},
    {"name": "Read", ...}
  ]
}
  • 모델: Explorer는 빠른 탐색을 위해 Haiku 4.5를 사용한다 (메인은 Opus 4.5)
  • 시스템 프롬프트: 읽기 전용 모드로 제한된 전용 프롬프트가 주입된다
  • 도구 제한: 메인 에이전트가 가진 모든 도구가 아닌, 탐색에 필요한 도구만 제공된다
  • CLAUDE.md 전달: 프로젝트의 CLAUDE.md 내용이 user 메시지의 <system-reminder> 태그 안에 포함되어 전달된다. 따라서 subagent도 프로젝트 컨벤션을 따른다
  • 메시지: 메인 에이전트의 prompt가 user 메시지로 전달된다

3단계: Subagent의 도구 사용

Subagent도 자신만의 메시지 루프에서 도구를 사용한다:

{
  "content": [
    {
      "type": "text",
      "text": "이 NestJS 프로젝트의 entity 구조를 철저하게 탐색하겠습니다."
    },
    {
      "type": "tool_use",
      "id": "toolu_01VHysdohmuy9r58aVdcUQRh",
      "name": "Glob",
      "input": {
        "pattern": "**/*.entity.ts"
      }
    },
    {
      "type": "tool_use",
      "id": "toolu_01QYrMBhzbXpExYwgCFM7MLb",
      "name": "Bash",
      "input": {
        "command": "find /Volumes/project/src -type f -name \"*.ts\" | grep -E \"(entity|entities)\" | head -20",
        "description": "Find entity files in src directory"
      }
    }
  ]
}

Explorer subagent는 두 개의 도구를 병렬로 호출했다. Glob으로 entity 파일 패턴을 찾고 Bash로 디렉토리를 탐색한다. 이 과정이 반복되면서 subagent는 필요한 정보를 수집한다.

4단계: Subagent 완료 및 결과 반환

Subagent가 탐색을 완료하면 수집한 정보를 정리하여 최종 응답을 반환한다. 이 응답은 메인 에이전트의 Task 도구 호출에 대한 tool_result로 전달된다:

┌─────────────────────────────────────────────────────────────────────┐
│                           메인 메시지 루프                              │
│                                                                     │
│  User ──► Agent ──► LLM(Opus)                                       │
│                │                                                    │
│                ▼ tool_use: Task                                     │
│     ┌─────────────────────────────────────────────────────┐         │
│     │           Subagent 메시지 루프 (Explorer)              │         │
│     │                                                     │         │
│     │   prompt ──► Agent ──► LLM(Haiku)                   │         │
│     │                   │                                 │         │
│     │                   ▼ tool_use                        │         │
│     │              ┌─────────┐                            │         │
│     │              │  Glob   │                            │         │
│     │              │  Bash   │                            │         │
│     │              │  Read   │                            │         │
│     │              └─────────┘                            │         │
│     │                   │                                 │         │
│     │                   ▼                                 │         │
│     │              최종 응답                                │         │
│     └────────────────────┬────────────────────────────────┘         │
│                          │                                          │
│                          ▼ tool_result                              │
│                 Agent 계속 진행                                       │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

메인 에이전트는 Explorer의 조사 결과를 바탕으로 다음 단계(예: database-schema-architect 호출)를 진행한다.

마무리

지금까지 subagent의 동작 방식에 대해서 알아보았다. 핵심을 정리하면:

Subagent는 Tool Use다. 메인 에이전트가 Task 도구를 호출하면, 새로운 메시지 루프가 생성되어 전용 시스템 프롬프트와 제한된 도구로 작업을 수행한다.

왜 사용하는가?

  • 컨텍스트 분리: 탐색/분석 과정이 메인 대화를 오염시키지 않는다
  • 전문화: 각 subagent가 특정 작업에 최적화된 프롬프트와 도구를 가진다
  • 효율성: 목적에 맞게 가벼운 모델(Haiku)이나 무거운 모델(Opus)을 취사선택

주의할 점:

  • Subagent는 메인 대화 히스토리를 모른다. 필요한 정보는 Task의 prompt에 명시해야 한다 (단, CLAUDE.md는 자동 전달됨)
  • Subagent는 subagent를 호출할 수 없다 (무한 중첩 방지를 위해 Task 도구를 사용하지 않는다.)
  • 각 호출은 새로운 컨텍스트에서 시작한다 (단, resume 파라미터로 이전 대화 이어가기 가능)

결국 subagent는 Tool Use 패턴의 확장이다. 단순한 Function Call이라면 코드 실행 결과를 텍스트로 반환하지만 subagent는 별도의 메시지 루프에서 LLM이 생성한 텍스트를 반환한다는 차이만 있다. 메인 에이전트 입장에서는 둘 다 tool_result로 받는 텍스트일 뿐이다.

Read more →
3
0
0
0

Spotify 전체 백업본 공개
------------------------------
- *Anna’s Archive* 가 Spotify의 *메타데이터와 음악 파일 전체를 백업* 해 약 *300TB 규모의 토렌트 아카이브* 로 공개
- 약 *2억5600만 곡의 메타데이터* 와 *8600만 개의 음악 파일* 을 포함, *청취량의 99.6%* 를 포괄
- *OGG Vorbis 160kbit/s* 원본 품질로 인기곡을, *OGG Opus 75kbit/s* 로 비인기…
------------------------------
https://news.hada.io/topic?id=25216&utm_source=googlechat&utm_medium=bot&utm_campaign=1834

0
0
0

An Anthology of Remarkable Bugs by Jess French, 2025

Zoom in on the miniature world of insects with expert author Dr Jess French and discover some of the most amazing bugs on our planet.

The eighth book in the bestselling Children’s Anthologies series, An Anthology of Remarkable Bugs explores some of the most amazing bugs on our planet.



Children aged 7-9 can marvel at the perfectly camouflaged leaf insect that sways in the breeze and the ogre-faced spider that catches its prey in a net, in this impressive collection that showcases more than 90 of the world's most remarkable bugs. 
This impressive bug anthology for kids offers:A wide selection of insects featured throughout, each accompanied by a beautiful photograph and an illustration. 
The 8th book in the bestselling Children’s Anthologies series, selling more than130,000 copies in the US. A quality gift book, with metallic foil all over, a ribbon and striking photographs on every page. 
An Anthology of Remarkable Bugs pairs photography with storybook descriptions that will captivate young readers, whether it's finding out about bees and beetles or stick insects and spiders. Features on metamorphosis, eggs, camouflage and other key topics explore the enormous variety of invertebrate adaptations. There is also a visual index packed with reference information, including the size and range of each species. 
More in the series 
Anthology of Exquisite Bugs is part of the beautiful and informative Children’s Anthology series. Complete the series and nurture your child's curiosity as they explore the natural world with The Wonders of Nature, let them walk with the dinosaurs in Dinosaurs and other Prehistoric Life, explore the incredible ecosystems and geology of our planet with Earth, or dive into the deep with An Anthology of Aquatic Life.
0
0

Gemini 3과 함께 리눅스 커널 코드를 탐험하고 있다. vdso gettimeofday와 time이 어떻게 구현이 다른지 궁금해서 찾아보고 있다. 물론 더 깊이 알 시간은 없겠지만, LLM이 아니었다면 이런 걸 들여다볼 생각조차 하지 못했겠지.

1

노션 n8n 동기화 관련...

서브 플로우에 커맨드 목록을 보내서 반복 순회하면서 결과가 눈덩이처럼 커진다.

배열이 아니라 한 명령만 실행하는 건 각 서브 플로우 호출마다 반복루프 노드를 추가해야하니까. 손이 많이 간다.

그래서 처음 동기화 로직 시작할때, 30개씩 정도 끊어서 처리를 하는 방향으로 가닥을 잡았다.

그리고.. 보니까. 전체 노션 페이지를 가져올 때는 일방향 동기화만 하면 되는데. 무조건 양방향 동기화를 하도록 만들어져 있다는 것도 요번에 발견했다.

될 것 같으면서도 아슬아슬하게 계속 시간이 걸리네.

1
1
1
0
0
0
0
1
1
0
0
1
1
0
1
0
1
1
0
0
1
0

我不反對AI做遊戲或AI作圖,畢竟科技的進步最大一部分就是用來節省時間,懶惰永遠都是進步的原動力。
但我也尊重那些排斥AI的人,因為我也能理解他們所想表達的立場,有些東西還是AI取代不了的。

所以,我對 的製作團隊,去報名了一個明確標示禁止使用AI的獎項,但卻不誠實的告知自己有使用AI,感到非常可惜。
甚至是在事後拿完了所有的大獎,才說自己有使用AI,要馬你就騙到底,要馬你就一開始就講。
對我而言,製作團隊這種做法跟詐欺沒有兩樣。

33號遠征隊依然是款好玩的遊戲,這起被IGA撤回最佳獨立與最佳遊戲的事件並不會影響我對這款遊戲的評價。
但對於製作團隊Sandfall Interactive,那可就不是這麼回事了...以後他們說什麼我都會選擇等子彈飛一會。

0
0
0
1

Adapting to Climate Change: Implications of Risk-Based Approaches by Claudia Morsut, 2025

has become the new mantra worldwide as the set of strategies, practices, and measures for coping with climate change and building resilient societies. Accompanying its rise on the international agenda, especially since the Paris Agreement, is the treatment of climate change adaptation using a risk management approach.

link.springer.com/book/10.1007



🎁

This Open Access book examines risk management as a type of policy logic that shapes and refracts the outcomes of climate change adaptation. Policy logics are underpinned by a set of ontological understandings of the nature of problems and how they should be handled, along with certain methodologies for analysing and acting upon those problems. Policy logics, in other words, are not politically neutral. Risk management approaches offer systematised models for making assessments and a clear set of decision tools. They also, however, may underestimate complexity, exclude wider social goals and trigger new unknown risks.
This book offers a novel view on climate change adaptation by critically questioning the use of a risk management approach. Empirically, the book expands our understanding of which climate change adaptation policies are being adopted, at international and national levels. Theoretically, the book considers two sets of literatures enlightening the implications of a risk approach to the governance of extreme events: Security Studies and Risk Governance. Each of these fields is mined for key insights into the advantages and drawbacks of risk management. Analytically, the book assesses international and national policies in the light of these advantages and drawbacks and discusses the resulting implications at practical level.
0
1
2
1
1

一丁目一番地、いつから使われてんのかなと思ってデジコレで調べたら当たり前だけど住所の一丁目一番地ばかりヒットしてしまう。
新聞のデータベースのほうが良いかもな。

0
1
0
0
1
0