Skip to content

feat: make include an expression returning the declared package value#484

Merged
fuseraft merged 1 commit into
mainfrom
fuseraft/test
May 21, 2026
Merged

feat: make include an expression returning the declared package value#484
fuseraft merged 1 commit into
mainfrom
fuseraft/test

Conversation

@fuseraft

Copy link
Copy Markdown
Owner

This is the cleanest run of the brownfield-graph fuseraft-cli config to date.

scs@fedora ~/github/kiwi-lang/kiwi
$ fuseraft run -c .fuseraft/config/orchestration.yaml -f /tmp/fuseraft-task-1779337089802-s4lx4hxvv2.txt 

 .|';                                       .|';   ||    
 ||                                         ||     ||    
'||'  '||  ||` ('''' .|''|, '||''|  '''|.  '||'  ''||''  
 ||    ||  ||   `'') ||..||  ||    .|''||   ||     ||    
.||.   `|..'|. `...' `|...  .||.   `|..||. .||.    `|..' 
                                                         
                                                         
Multi-Agent Orchestration · Powered by Microsoft Agent Framework

Working directory → /home/scs/github/kiwi-lang/kiwi
                           Brownfield Graph Pipeline                            
╭───────────────┬─────────────────────────────┬────────────────────────────────╮
│ AgentModelPlugins                        │
├───────────────┼─────────────────────────────┼────────────────────────────────┤
│ Archaeologist │ grok-4-1-fast               │ FileSystem, Search, SubAgent,  │
│               │                             │ Handoff                        │
│ Planner       │ grok-4-1-fast-reasoning     │ FileSystem, Search, SubAgent,  │
│               │                             │ Handoff                        │
│ Developer     │ grok-4-1-fast               │ FileSystem, Shell, Git,        │
│               │                             │ Changes, Handoff               │
│ Reviewer      │ grok-4-1-fast-reasoning     │ FileSystem, Shell, Changes,    │
│               │                             │ Handoff                        │
│ Approved      │ grok-4-1-fast-non-reasoning │ none                           │
╰───────────────┴─────────────────────────────┴────────────────────────────────╯
Selection: graph  Termination: composite/2 rules, max=0

┏━Task━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 See AGENTS.md to learn how to work on kiwi.                                  
                                                                              
 Implement this new syntax:                                                   
                                                                              
 **app.kiwi**:                                                                
 ```kiwi                                                                      
 x = include 'mylib/libfoo'                                                   
 x.foofunc() # prints: funky foo!                                             
 ```                                                                          
                                                                              
 **mylib/libfoo.kiwi**:                                                       
 ```kiwi                                                                      
 package foo                                                                  
   fn foofunc()                                                               
     println "funky foo!"                                                     
   end                                                                        
 end                                                                          
 ```                                                                          
                                                                              
 The include statement should also be an expression that we can assign to a   
 variable (`x` in our example above). Calling `x.foofunc()` calls the package 
 `foo`'s `foofunc` function.                                                  
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

╭─Archaeologist  turn 1  29.2s  in:39,727 out:472──────────────────────────────╮
│ (7 tool calls — run with --tools to see details)                             │
╰──────────────────────────────────────────────────────────────────────────────╯
                                                                                
╭─Planner  turn 2  34.8s  in:45,299 out:359────────────────────────────────────╮
│ (4 tool calls — run with --tools to see details)                             │
╰──────────────────────────────────────────────────────────────────────────────╯
                                                                                
  ⚠ Developer used 494,342 input tokens this turn (warning threshold: 300,000). 
Reduce file reads and shell output to avoid a budget blowup.ssion returning the 
╭─Developer  turn 3  120.5s  in:494,342 out:1,777──────────────────────────────╮
│ (30 tool calls — run with --tools to see details)                            │
╰──────────────────────────────────────────────────────────────────────────────╯
                                                                                
╭─Reviewer  turn 4  42.3s  in:68,224 out:527───────────────────────────────────╮
│ {   "review": [     {"criterion": "include expr compiles without new opcode  │
│ or reuses Include to leave Package on stack", "verdict": "PASS", "evidence": │
│ "Compiler.cs:1763-1764 reuses Emit(Opcode.Include); KiwiVM.cs:1701-1702      │
│ calls IncludeFile then Push(pkg)"},     {"criterion": "x = include           │
│ 'mylib/libfoo' succeeds and x.foofunc() invokes the fn from package foo",    │
│ "verdict": "PASS", "evidence": "Developer run of tmp/app.kiwi produced       │
│ 'funky foo!' output"},     {"criterion": "existing require/import/include    │
│ semantics unchanged for non-assignment uses", "verdict": "PASS", "evidence": │
│ "tests/test.kiwi packages test + all 82 tests passed"},     {"criterion":    │
│ "full test suite passes after rebuild", "verdict": "PASS", "evidence":       │
│ "./build.sh OK; ./bin/kiwi tests/test.kiwi: 82/82 PASSED"},                  │
│ {"criterion": "no files outside files_to_change modified", "verdict":        │
│ "PASS", "evidence": "changes_read_latest shows only                          │
│ src/VM/{Compiler,KiwiVM}.cs + IncludeNode.cs + briefs"}   ] } APPROVED       │
╰──────────────────────────────────────────────────────────────────────────────╯
                                                                                
╭─Approved  turn 5  1.2s  in:24,346 out:3──────────────────────────────────────╮
│ Task complete.                                                               │
╰──────────────────────────────────────────────────────────────────────────────╯
                                                                                
Context viz → .fuseraft/logs/ctx_viz_12226d6a.html
─────────────────────────────── Session Summary ────────────────────────────────

                                                        
  Agent           Turns   Input tokens   Output tokens  
────────────────────────────────────────────────────────
  Archaeologist       1         39,727             472  
  Planner             1         45,299             359  
  Developer           1        494,342           1,777  
  Reviewer            1         68,224             527  
  Approved            1         24,346               3  
                                                        
  Total               5        671,938           3,138  
                                                        

✓ Completed  in 3.8 min

Policy compliance: 100.0%  0 error budget remaining

@fuseraft fuseraft merged commit 9efb5b0 into main May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant