Can I claim authorship on work I wasn't personally involved in, that uses a framework I developed for my research? As a postdoc I joined an existing project of a PhD student. I made significant contributions to his code and developed an entire framework X in the code necessary for my research. Developing framework X took at least four months. After I finished the project and was put on a new project, he initiated collaborations with people from other labs using framework X (not including me). Without framework X this research would not have been possible (unless he would have implemented it himself).

Now I noticed that they are writing up an article about their collaboration. So far I have not been contacted as a co-author. My question is: should I claim co-authorship based on the fact that I developed framework X, which formed an important and necessary part of the code to obtain their results.
Disclaimer: This is somewhat field-dependent. I'm answering based on what I believe to be the current situation in computer science / related fields.

1) Can you claim authorship given the way things have evolved? Probably not.

2) Would it have been a good idea for him to find a way to include you in the research collaboration so that you could get something out of your work? Yes.

The area of academia in which I work (*) is structured so as to value ideas over implementation. In practice, that means that it's not uncommon for people who write large amounts of code for a project to get little credit for it, which seems inherently unjust.

The way sensible people usually handle this is to make sure that people who do a lot of implementation work are given an opportunity to contribute scientifically over and above that - that allows them to justify their authorship in scientific terms, regardless of the fact that they also made significant non-scientific contributions to the overall project.

It's certainly possible to take advantage of implementers by not doing this, but people who do that tend to find themselves doing the implementation work themselves.

Bottom line: He should have had the common sense to include you in the scientific collaboration, and if he didn't have that common sense then his supervisor should have suggested it.

As an aside, I would view the situation somewhat differently if you already had a publication as a result of your work. In that case, you've already got the credit for working on the framework, and there's less of a moral obligation to include you in the new collaboration: instead, they can simply cite you. I'm certainly not of the view that writing a framework entitles you to be involved in every paper that is ever built on top of that framework - indeed, I've written frameworks that other people have continued to use for later research, and I wouldn't expect to be involved with the papers in question.

(*) As pointed out in the comments, this may not be the case in other fields.