hackathon-coach-brief

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Brief a coach on a team

向教练简报某支团队

The coach is signed in with their own Antasphere account; the
hackathon
CLI does every read and prints JSON with
--json
. This skill sequences the reads and writes the summary. It never posts, claims or resolves anything: that is the
hackathon-coach-help
skill, on the coach's word. Where a step says ASK, ask the coach and wait.
A refusal is
{ "ok": false, "error": { "code", "message" } }
with an exit code: 2 a flag is wrong, 3 access (a sign-in to do, not on the roster, no event), 1 another refusal the message names. Never retry in a loop.
教练使用自己的 Antasphere 账号登录;所有读取操作均由
hackathon
CLI 执行,并通过
--json
输出 JSON。此 skill 会依次调度各项读取并撰写总结。它绝不发布、认领或解决任何内容;这些操作属于
hackathon-coach-help
skill,只有在教练明确要求时才执行。凡步骤标为 ASK 的地方,都应询问教练并等待答复。
拒绝结果为
{ "ok": false, "error": { "code", "message" } }
,并带有退出码:2 表示 flag 有误;3 表示访问问题(需要登录、不在名册中或没有活动);1 表示其他拒绝,具体原因见消息。绝不循环重试。

1. Sign in and the event's workspace (once per machine)

1. 登录及活动 workspace(每台机器一次)

bash
npm i -g @antasphere/hackathon@latest
hackathon --version
hackathon connect --json
  • Exit 3 saying to run
    hackathon login
    :
    hackathon login
    is interactive (the Antasphere email, then the code mailed to it). ASK the coach to run it in a terminal of their own, with the email the organizers put on the roster, and to tell you when it printed
    Signed in as …
    . Then
    hackathon connect --json
    again.
  • not_on_roster
    or "no access to Antasphere Hackathon": the organizers must add the coach's email. Say so and stop.
  • event_not_configured
    : the account may be in several workspaces and this one holds no event. List them and pick the event's:
    bash
    hackathon workspaces --json          # { workspaces: [{ id, name, … }], selectedWorkspaceId }
    hackathon workspace use <id-or-name> # every later command runs there
    hackathon connect --json
    ASK which one when several could be the event's; never guess.
Read
eligibility.role
in the connect answer.
advisor
(a coach) or
organizer
: go on.
participant
: this is not a coach account, point to the
hackathon-setup
skill and stop.
jury
: the jury does not read the chats; stop.
eligible: false
is expected for a coach: a coach has no team app to set up.
bash
npm i -g @antasphere/hackathon@latest
hackathon --version
hackathon connect --json
  • 退出码为 3,且提示运行
    hackathon login
    时:
    hackathon login
    是交互式命令(先输入 Antasphere 邮箱,再输入发送到该邮箱的验证码)。ASK 教练在自有终端中运行该命令,使用组织者登记在名册中的邮箱,并在看到
    Signed in as …
    后告知你。然后再次运行
    hackathon connect --json
    。
  • 遇到
    not_on_roster
    或
    no access to Antasphere Hackathon
    时:组织者必须添加教练的邮箱。告知教练并停止。
  • 遇到
    event_not_configured
    时:账号可能位于多个 workspace,而当前 workspace 未配置活动。列出这些 workspace 并选择活动所属项:
    bash
    hackathon workspaces --json          # { workspaces: [{ id, name, … }], selectedWorkspaceId }
    hackathon workspace use <id-or-name> # every later command runs there
    hackathon connect --json
    当有多个 workspace 都可能是活动所属项时,ASK 教练选择;绝不猜测。
查看 connect 返回结果中的
eligibility.role
。若为
advisor
(教练)或
organizer
,继续执行。若为
participant
,说明这不是教练账号,引导使用
hackathon-setup
skill,然后停止。若为
jury
,jury 不读取聊天,停止。教练出现
eligible: false
属于预期情况:教练没有需要设置的团队应用。

2. The event and the teams

2. 活动与团队

bash
hackathon event status --json
hackathon chats list --json
hackathon decks gallery --json
  • From
    event status
    :
    phase
    ,
    nextDeadline
    ,
    event.freezeAt
    (the build end plus the grace), the event's
    timezone
    , and
    event.github.organization
    and
    event.github.designatedBranch
    (where the team repositories live and the branch that counts). A coach's status lists no team: the teams come from the two reads below.
  • From
    chats list
    :
    channels[]
    with
    kind
    team
    are the teams (
    name
    is the team,
    projectId
    its id,
    id
    the team chat's channel id);
    kind
    request
    are the help request threads (
    projectId
    names the team).
  • From
    decks gallery
    :
    entries[]
    , one per team:
    project.name
    ,
    project.description
    (what the team says it builds),
    project.memberCount
    , and
    links.demo
    /
    links.pitch
    (the demo deck and the presentation, Slideless share links, null until the team sets them).
No team named: give one line per team (name, description, members, open requests count from step 4) and ASK which one to brief. Match the team the coach names case-blind against
name
; several match, ASK.
bash
hackathon event status --json
hackathon chats list --json
hackathon decks gallery --json
  • 从
    event status
    获取:
    phase
    、
    nextDeadline
    、
    event.freezeAt
    (构建结束时间加宽限期)、活动的
    timezone
    ,以及
    event.github.organization
    和
    event.github.designatedBranch
    (团队仓库所在位置及计入成绩的分支)。教练的状态中不会列出团队;各团队需从以下两项读取结果中获取。
  • 从
    chats list
    获取:
    channels[]
    中
    kind
    为
    team
    的项就是各团队(
    name
    是团队名称,
    projectId
    是其 id,
    id
    是团队聊天的 channel id);
    kind
    为
    request
    的项是求助请求的 thread(
    projectId
    标明所属团队)。
  • 从
    decks gallery
    获取:
    entries[]
    中每项对应一支团队,包括
    project.name
    、
    project.description
    (团队说明自己正在构建什么)、
    project.memberCount
    ,以及
    links.demo
    /
    links.pitch
    (demo deck 和演示文稿的 Slideless 分享链接;团队设置前为 null)。
未指定团队时:每个团队输出一行(名称、描述、成员数、第 4 步统计的未处理请求数),并 ASK 要简报哪支团队。将教练指定的团队与
name
进行不区分大小写的匹配;若匹配到多个团队,则 ASK。

3. The team's chat, threads included

3. 团队聊天及其 thread

bash
hackathon chats read <teamChannelId> --limit 100 --json
posts[]
is newest first, with
author.name
,
authorRole
(
participant
,
advisor
,
organizer
),
body
,
createdAt
, and on a thread's first post
replyCount
. Follow
nextCursor
(
--cursor <nextCursor>
) while the posts are from the last six hours, then stop. For every post with
replyCount
above 0:
bash
hackathon chats replies <teamChannelId> <postId> --limit 100 --json   # oldest first
chats replies
came after the CLI 0.7.1. If it answers "unknown command", update the CLI (
npm i -g @antasphere/hackathon@latest
); if it is still unknown, say the thread replies are on the dashboard's Chats page and go on without them.
bash
hackathon chats read <teamChannelId> --limit 100 --json
posts[]
按最新在前排列,包含
author.name
、
authorRole
(
participant
、
advisor
、
organizer
)、
body
、
createdAt
;thread 的首条帖子还包含
replyCount
。只要这些帖子来自最近六小时,就持续跟随
nextCursor
(
--cursor <nextCursor>
),然后停止。对于每个
replyCount
大于 0 的帖子:
bash
hackathon chats replies <teamChannelId> <postId> --limit 100 --json   # oldest first
chats replies
是在 CLI 0.7.1 之后加入的。如果返回
unknown command
,请更新 CLI(
npm i -g @antasphere/hackathon@latest
);如果仍提示未知命令,说明 thread 回复位于 dashboard 的 Chats 页面,并在不读取这些回复的情况下继续。

4. The team's help requests

4. 团队的求助请求

bash
hackathon requests list --limit 100 --json
Keep the
requests[]
whose
project.id
is the team's. Each has
id
,
title
,
body
,
status
(
open
,
claimed
,
resolved
),
claimedBy
,
openedBy
,
createdAt
, and
channelId
, its thread:
bash
hackathon chats read <request.channelId> --limit 100 --json
Read every open and claimed request's thread; a resolved one only when it is from the last two hours.
bash
hackathon requests list --limit 100 --json
保留
requests[]
中
project.id
与该团队匹配的项目。每项包含
id
、
title
、
body
、
status
(
open
、
claimed
、
resolved
)、
claimedBy
、
openedBy
、
createdAt
和
channelId
,后者对应其 thread:
bash
hackathon chats read <request.channelId> --limit 100 --json
读取每个 open 和 claimed 请求的 thread;resolved 请求仅在创建时间位于最近两小时内时读取。

5. The repository

5. 仓库

A coach reads every team repository: the organizers' provisioning invites every coach whose GitHub username is on the roster, with read access. Nothing on the platform names a team's repository to a coach; GitHub does. The repository is
<organization>/<event>-<team>
, the team's name lower-cased, accents dropped, every run of spaces or signs turned into one hyphen (a team "Night Owls" →
…-night-owls
).
ASK the local folder once and propose
~/Antasphere/hackathon-coach/
; each team goes in its own subfolder named like the repository.
With the GitHub CLI (
gh auth status
answers):
bash
gh api /user/repository_invitations --jq '.[] | {id, repo: .repository.full_name}'
gh repo list <organization> --limit 200 --json name,url
  • A pending invitation for a repository of the event's organization: ASK the coach before accepting (it acts on their GitHub account), then
    gh api --method PATCH /user/repository_invitations/<id>
    for each one they OK.
  • The team's repository is the one of
    gh repo list
    whose name ends with
    -<team-slug>
    .
Without
gh
: the invitations wait on https://github.com/notifications (and by email); ASK the coach to accept them, then try the name above with
git ls-remote https://github.com/<organization>/<name>.git
.
No invitation and no access at all: the roster has no GitHub username for the coach, or the organizers have not run the provisioning since the coach was added. Say so: an organizer adds the username (Add advisor, or the roster import) and presses Check again on the Admin page. Go on without the code.
Clone or update, never anything else:
bash
git clone https://github.com/<organization>/<repo>.git <folder>/<repo>   # first time
git -C <folder>/<repo> pull --ff-only                                    # afterwards
git -C <folder>/<repo> log origin/<designatedBranch> -n 30 --date=iso --format='%h %ad %an %s'
The log on the designated branch is what the team pushed; the platform counts the last push it received before
event.freezeAt
. A coach cannot read the platform's receipts (the submissions are the team's and the organizers'); an organizer running this skill may add
hackathon submissions show <team> --json
(the last received revision, the frozen evidence).
教练可以读取所有团队仓库:组织者的配置流程会向名册中拥有 GitHub username 的每位教练发出仓库邀请,并授予只读权限。平台不会告诉教练某支团队对应的仓库名称,GitHub 会提供。仓库名称为
<organization>/<event>-<team>
,其中团队名称转为小写、去除重音符号,并将每段由空格或符号组成的连续字符转换为一个连字符(团队 “Night Owls” →
…-night-owls
)。
只需 ASK 一次本地文件夹位置,并建议使用
~/Antasphere/hackathon-coach/
;每支团队放在一个以仓库命名的独立子文件夹中。
使用 GitHub CLI(可通过
gh auth status
检查):
bash
gh api /user/repository_invitations --jq '.[] | {id, repo: .repository.full_name}'
gh repo list <organization> --limit 200 --json name,url
  • 如果活动 organization 有一个待处理的仓库邀请:接受邀请会操作教练的 GitHub 账号,因此先 ASK 教练;得到同意后,针对每个已确认的邀请执行
    gh api --method PATCH /user/repository_invitations/<id>
    。
  • 团队仓库是
    gh repo list
    输出中名称以
    -<team-slug>
    结尾的仓库。
如果没有
gh
:邀请会保留在 https://github.com/notifications(并通过邮件发送);ASK 教练接受邀请,然后使用上述名称尝试
git ls-remote https://github.com/<organization>/<name>.git
。
如果既无邀请也完全无访问权限:说明名册中没有教练的 GitHub username,或者组织者在其加入名册后尚未执行配置流程。告知教练:组织者需要添加该 username(Add advisor,或导入名册),并在 Admin 页面再次点击 Check。然后在不获取代码的情况下继续。
克隆或更新,绝不执行其他操作:
bash
git clone https://github.com/<organization>/<repo>.git <folder>/<repo>   # first time
git -C <folder>/<repo> pull --ff-only                                    # afterwards
git -C <folder>/<repo> log origin/<designatedBranch> -n 30 --date=iso --format='%h %ad %an %s'
designated branch 上的日志就是团队 push 的内容;平台会统计其在
event.freezeAt
之前最后接收到的 push。教练无权读取平台回执(submissions 属于团队和组织者);运行此 skill 的组织者可以补充执行
hackathon submissions show <team> --json
(获取最后接收到的 revision 和冻结证据)。

6. The summary

6. 总结

Read the repository's
README.md
,
hackathon.json
, the manifest files (
package.json
,
pyproject.toml
,
requirements.txt
,
go.mod
,
Cargo.toml
,
Dockerfile
,
docker-compose.yml
) and the last commits' diffs (
git -C <dir> show --stat HEAD~5..HEAD
). Then write, short:
  1. What they build: one or two sentences, from the description, the README and the code.
  2. Stack: languages, frameworks, services, how it runs.
  3. Where they are: the last pushes (count, last one's time against the freeze), what works.
  4. Where they are stuck: open and claimed requests (title, who claimed it, age), the questions left unanswered in the chat, errors quoted in the threads.
  5. What they asked: each request in one line, and what the thread already tried.
  6. Links: the demo deck and the presentation (or "not set yet"), the clone's folder.
End with the next move: the
hackathon-coach-help
skill to answer a request.
读取仓库的
README.md
、
hackathon.json
、manifest 文件(
package.json
、
pyproject.toml
、
requirements.txt
、
go.mod
、
Cargo.toml
、
Dockerfile
、
docker-compose.yml
),以及最近提交的 diff(
git -C <dir> show --stat HEAD~5..HEAD
)。然后简要写出:
  1. 构建内容:依据描述、README 和代码,用一两句话说明。
  2. 技术栈:语言、框架、服务及运行方式。
  3. 当前进展:最近 push(数量、最后一次 push 的时间与冻结时间的对比),以及已经完成的内容。
  4. 当前卡点:open 和 claimed 请求(标题、认领者、已持续时间)、聊天中尚未得到回答的问题,以及 thread 中引用的错误。
  5. 提出的请求:每个请求用一行概括,以及其 thread 已经尝试过的内容。
  6. 链接:demo deck 和演示文稿(或“尚未设置”),以及 clone 的文件夹。
最后给出下一步:使用
hackathon-coach-help
skill 回应某个请求。

Never

绝不

  • Never post, claim, unclaim, resolve or reopen here.
  • Never push, never commit in a team's clone, never
    git reset --hard
    or delete a clone:
    pull --ff-only
    only. A coach suggests a change in a reply; the team pushes it.
  • Never pass a credential to a command, never print a
    .env
    , never paste a secret found in a repository into a summary: name the file and tell the coach to tell the team.
  • Never read or summarize a team the coach did not ask about, beyond the one-line overview.
  • 绝不发布、认领、取消认领、解决或重新打开任何内容。
  • 绝不 push,绝不在团队的 clone 中 commit,绝不执行
    git reset --hard
    ,也绝不删除 clone:只允许
    pull --ff-only
    。教练在回复中提出修改建议;由团队 push。
  • 绝不把 credential 传给命令,绝不打印
    .env
    ,绝不把在仓库中发现的 secret 粘贴到总结中:只说明文件名称,并让教练转告团队。
  • 除一行概览外,绝不读取或总结教练未询问的团队。