投资复盘
原能力
回看立项假设、投决理由、执行差异和实际结果,保存可复用的证据与未确定事项。(细化版 p.14–15)
首选项目
DVC(Apache-2.0)。 DVC
接入说明
DVC 固定复盘输入,Portfolio 提供项目历史结构对照。
匹配范围
投后记录和版本化材料回溯项目变化。
源码
DVC · def to_lockfile(
dvc/stage/serialize.py · 195–208 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
def to_lockfile(stage: "PipelineStage", **kwargs) -> dict:
assert stage.name
return {stage.name: to_single_stage_lockfile(stage, **kwargs)}
def to_single_stage_file(stage: "Stage", **kwargs):
state = stage.dumpd(**kwargs)
# When we load a stage we parse yaml with a fast parser, which strips
# off all the comments and formatting. To retain those on update we do
# a trick here:
# - reparse the same yaml text with a slow but smart ruamel yaml parser
# - apply changes to a returned structure
# - serialize it
Portfolio · export async function GET(
app/api/portfolio/investments/route.ts · 18–31 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
export async function GET(req: NextRequest) {
const supabase = await createClient()
const { data: { user } } = await supabase.auth.getUser()
if (!user) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
const admin = createAdminClient()
const { data: membership } = await admin
.from('fund_members')
.select('fund_id, role')
.eq('user_id', user.id)
.maybeSingle()
if (!membership) return NextResponse.json({ error: 'No fund found' }, { status: 403 })
实现与验收要点
对齐立项证据、投决理由、实际兑现和不可识别原因。