Skip to content

Conversation

@Lexpeartha
Copy link
Contributor

Adds AGENTS.md at the project root to provide better context to coding agents

@Lexpeartha Lexpeartha requested a review from zsculac January 15, 2026 15:26
@Balki-OriginTrail Balki-OriginTrail marked this pull request as ready for review January 19, 2026 14:10

# Optional
DKG_BLOCKCHAIN=hardhat1:31337 # Network
DKG_OTNODE_URL=http://localhost:8900 # OT-node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change comment to dkg-engine

DKG_OTNODE_URL=http://localhost:8900 # OT-node
PORT=9200 # Server port
EXPO_PUBLIC_MCP_URL=http://localhost:9200
EXPO_PUBLIC_APP_URL=http://localhost:8081
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for dev environment, for prod it's also 9200

## Debugging Tips

1. Check `apps/agent/dist/index.js` exists after build
2. Test database: `rm *.db && npm run script:setup`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we instruct the agent that for debugging one of the first it does is delete the db?

@zsculac
Copy link
Contributor

zsculac commented Jan 23, 2026

Looks pretty good @Lexpeartha. A couple of ideas to improve (not all need to be included now, I'll try to sort them by priority):

  1. Instructions for the agent to do after implementing any feature/fix/improvement - e.g. linting, formatting, add new tests if useful, running tests and fixing them if the change broke them
  2. withSourceKnowledgeAssets return when possible to include KA in the responses
  3. registering MCP prompts and resources

app = createExpressApp();

plugin(mockDkgContext, mockMcpServer, express.Router());
await connect();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need to mount the router for api tests below this line?
app.use("/", apiRouter);

@lupuszr
Copy link

lupuszr commented Jan 27, 2026

I have a feeling that we are missing some code quality constraints. For example:

Documentation Requirements

  • Add descriptive doc for every new class, function, interface.
  • Keep docs short but explicit about inputs/outputs and invariants.

Testing Requirements

  • Every new method must have a unit test.
  • Integration tests belong in integrations.

Performance Requirements

  • If code is performance-critical, add a benchmark.
  • Place benchmarks in benches/.
  • Document benchmark inputs and expected scale.

File Size Constraint

  • New js/ts files must be < 300 lines.
  • Split large js/ts files into modules if needed.

Build Size Limit (javascript)

  • Each build round must change ≤ 300 lines of js/ts code.
  • If more changes are needed, split the work into multiple tasks.

Task Tracking (Required)

  • For each feature, create a task entry under task/.
  • Task files must be Markdown.
  • Include subtasks and progress.
  • Use Mermaid diagrams for any architecture/flow diagrams.

A task should always fit in one commit

  • A lenght of the commit should not be more then 300 lines
  • If the task require more split the task into subtasks
  • In the end of your answer always propose a commit message
    in a style of [feat/docs/bug/improvement]

Task Template

# Task: [<tusk number ( last + 1 )>] <feature>

## Goal
- <short goal>

## Subtasks
- [ ] <subtask 1>
- [ ] <subtask 2>

Build Completion Checklist (Required)

  • Run npm run build.
  • Run relevant tests (at least one focused test + full suite if feasible).
  • Summarize test results in the final response.

If Uncertain, Ask

  • If requirements are ambiguous or a build step is unclear, stop and ask.

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.

4 participants