Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/llms.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ This file is the main entry point. All docs live at:
If you cannot find a documentation file in `node_modules`, fetch the equivalent file from the GitHub
repository at `https://github.com/Telefonica/mistica-web/blob/master/doc/<filename>`.

## Source code
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we add instructions to avoid the agent to change the source code in node_modules?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It did not every try to modify source code in my tests. I think it knows this source code shouldn't be modified implicitly


Source is available at `node_modules/@telefonica/mistica/src/` (fallback:
`https://github.com/Telefonica/mistica-web/tree/master/src`). Use `src/index.tsx` to map imports to files.

Read source only when you need to understand internal behavior that docs and types don't cover — for example
debugging layout/CSS issues (`*.css.ts` files), understanding event handling, or authoring a custom skin (read
a real skin in `src/skins/` to see canonical token patterns). Normally you shouldn't read source for
greenfield UI work — the docs already cover that, and reading source tends to pull toward low-level APIs when
a documented composite component would be simpler.

## Critical Rules

1. **NEVER hardcode colors in app/component UI code.** Always use `skinVars.colors.*` design tokens from
Expand Down
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@
"dist-es/**",
"css/**",
"doc/**",
"src/**",
"!src/generated/**",
"!src/**/__tests__/**",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some tests may be relevant to understand how to use a component

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm...
Actually we found there are very few cases where reading the source code helps the llm answers prompts. I am not so sure having the tests too would add any additional context in those cases

"!src/**/__acceptance_tests__/**",
"!src/**/__screenshot_tests__/**",
"!src/**/__type_tests__/**",
"!src/**/__stories__/**",
"!src/**/__private_stories__/**",
"!src/**/*-test.ts",
"!src/**/*-test.tsx",
"!src/**/*-story.ts",
"!src/**/*-story.tsx",
"community.d.ts",
"community.js"
],
Expand Down
Loading